:root {
  --bg: #101412;
  --panel: #171d1a;
  --panel-2: #202821;
  --text: #f3f5ef;
  --muted: #a9b2a8;
  --line: #303a31;
  --accent: #d8ef5f;
  --accent-2: #53c2a0;
  --danger: #ef6f6c;
  --warning: #e7b85a;
  --site-bg-image: url("/assets/site-background.svg");
  --hero-bg-image: none;
  --card-bg: rgba(23, 29, 26, 0.9);
  --button-bg: var(--accent);
  --button-text: #14170e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(16, 20, 18, 0.8), rgba(16, 20, 18, 0.92)),
    var(--site-bg-image);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  font-family:
    Inter, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 20, 18, 0.86);
  backdrop-filter: blur(18px);
}

.topbar .hero-panel {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  width: min(820px, 100%);
  margin-top: 0;
  position: relative;
  z-index: 0;
  align-self: center;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 220px;
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: center;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.brand-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.muted,
.product-meta,
.cart-item small,
.profile-row span {
  color: var(--muted);
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 3;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: center;
}

.nav a,
.filter,
.payment-tab,
.secondary-link,
.ghost-button,
.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  color: #dce3d8;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.message-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--button-bg);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.message-nav-badge[hidden] {
  display: none;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  grid-column: 4;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: center;
}

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 1500px) and (min-width: 941px) {
  .topbar {
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .topbar .hero-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    width: min(820px, 100%);
    margin-top: 4px;
    z-index: 1;
  }

  .nav {
    grid-column: 2;
    justify-content: flex-end;
  }

  .top-actions {
    grid-column: 3;
  }
}

.icon-button,
.steam-button,
.primary-button,
.secondary-button,
.ghost-button,
.filter,
.payment-tab,
.primary-link,
.secondary-link {
  min-height: 42px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.icon-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
}

.icon-button b {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 13px;
}

.steam-button,
.primary-button,
.primary-link {
  border: 0;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 800;
}

.steam-button {
  padding: 10px 15px;
}

.primary-button,
.secondary-button,
.ghost-button,
.filter,
.payment-tab {
  padding: 10px 14px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
}

.secondary-button,
.secondary-link {
  background: rgba(83, 194, 160, 0.12);
  border-color: rgba(83, 194, 160, 0.38);
}

.ghost-button {
  background: transparent;
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

main {
  padding-bottom: 24px;
}

.hero {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  min-height: 0;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(28px, 5vw, 58px) 0 clamp(18px, 3vw, 34px);
}

.hero-copy {
  max-width: 800px;
  padding-bottom: 0;
  justify-self: center;
  text-align: center;
}

.has-hero-bg .hero-copy {
  width: 100%;
  max-width: 100%;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(rgba(16, 20, 18, 0.42), rgba(16, 20, 18, 0.58)),
    var(--hero-bg-image);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
}

.hero-logo {
  display: inline-grid;
  width: clamp(58px, 7vw, 104px);
  height: clamp(58px, 7vw, 104px);
  flex: 0 0 auto;
  place-items: center;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.96;
}

.admin-title {
  font-size: clamp(44px, 7vw, 82px);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
}

h3 {
  margin-bottom: 16px;
  font-size: 20px;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  color: #dce3d8;
  font-size: clamp(17px, 1.8vw, 22px);
}

.has-hero-bg .hero p:not(.eyebrow) {
  transform: translateX(clamp(36px, 4.5vw, 66px));
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-card {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.hero-card-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--button-bg);
  font-weight: 900;
}

.hero-card-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-card-text,
.hero-card-text span,
.hero-card-text strong {
  display: block;
  min-width: 0;
}

.hero-card-text span {
  color: var(--muted);
  font-size: 13px;
}

.hero-card-text strong {
  overflow-wrap: anywhere;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  scroll-margin-top: 24px;
}

.admin-section {
  width: calc(100% - 32px);
}

#adminPanelView {
  display: flex;
  height: calc(100dvh - 76px);
  min-height: 560px;
  flex-direction: column;
  padding: 12px 0;
}

#adminPanelView .section-heading {
  flex: 0 0 auto;
  margin-bottom: 14px;
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.shop-filter-panel {
  display: flex;
  width: 100%;
  flex: 1 1 560px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.filters,
.server-filters,
.payment-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.server-filters {
  justify-content: center;
}

.filters {
  justify-content: center;
}

.server-filter {
  border-color: rgba(216, 239, 95, 0.36);
}

.filter.active,
.payment-tab.active {
  border-color: rgba(216, 239, 95, 0.7);
  background: rgba(216, 239, 95, 0.14);
  color: var(--accent);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.server-monitor-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 24, 21, 0.72);
  box-shadow: var(--shadow);
}

.server-monitor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.server-monitor-card {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  min-height: 46px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.server-monitor-name {
  flex: 1 1 auto;
  min-width: 220px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.server-monitor-status {
  flex: 0 0 auto;
  order: 3;
  margin-left: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.server-monitor-status.online {
  background: rgba(83, 226, 173, 0.16);
  color: var(--good);
}

.server-monitor-status.offline {
  background: rgba(255, 103, 103, 0.14);
  color: #ff8e8e;
}

.server-monitor-details {
  display: flex;
  gap: 6px;
  align-items: center;
  order: 2;
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  color: var(--muted);
}

.server-monitor-details span {
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.server-monitor-details strong {
  color: var(--text);
}

.site-version {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(216, 239, 95, 0.32);
  border-radius: 8px;
  background: rgba(216, 239, 95, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.brand .site-version {
  min-height: 28px;
  margin-left: 2px;
  padding: 4px 8px;
  font-size: 12px;
}

.site-info {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(18, 19, 18, 0.94);
  color: #dce3d8;
}

.footer-links {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  min-height: 86px;
  margin: 0 auto;
  align-items: center;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 22px;
}

.footer-links a {
  min-width: 0;
  color: #dce3d8;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: center;
}

.footer-links a:first-child {
  text-align: left;
}

.footer-links a:last-of-type {
  text-align: right;
}

.footer-links .complaint-open {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 190px;
}

.footer-info-lines {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 22px 18px;
}

.site-info p {
  margin: 0;
  overflow-wrap: anywhere;
}

.site-footer {
  width: 100%;
  margin: 0 auto;
  padding: 24px 0 0;
}

.legal-page h1 {
  margin-bottom: 24px;
}

.legal-content {
  white-space: pre-wrap;
}

.complaint-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.complaint-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.complaint-card:last-child {
  border-bottom: 0;
}

.complaint-card-head,
.complaint-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.complaint-meta {
  justify-content: flex-start;
  margin: 12px 0;
  color: var(--muted);
}

.complaint-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.complaint-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.complaint-message {
  margin: 0;
  white-space: pre-wrap;
}

.messages-panel {
  grid-column: 1 / -1;
}

.messages-section {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.messages-modal-card {
  display: grid;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  gap: 16px;
  overflow: auto;
  padding: 24px;
}

.messages-modal-card h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
}

.message-thread {
  display: grid;
  gap: 10px;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.message-bubble {
  max-width: min(720px, 82%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.message-bubble.own {
  justify-self: end;
  border-color: rgba(216, 239, 95, 0.38);
  background: rgba(216, 239, 95, 0.12);
}

.message-meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.message-bubble p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.message-form {
  display: grid;
  gap: 10px;
}

.admin-dialog-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.admin-dialog-card:last-child {
  border-bottom: 0;
}

.admin-dialog-head {
  align-items: center;
  gap: 14px;
}

.admin-dialog-toggle {
  min-width: 148px;
  padding: 12px 18px;
}

.admin-dialog-card.is-collapsed {
  padding: 14px 0;
}

.admin-dialog-card.is-collapsed .journal-row-head {
  margin-bottom: 0;
}

.admin-message-thread {
  margin-top: 12px;
  max-height: 520px;
  scroll-behavior: smooth;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(83, 194, 160, 0.16);
  color: #72e0bd;
  font-weight: 800;
}

.product-card,
.account-panel,
.admin-form,
.admin-list,
.table-wrap,
.drawer,
.modal-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.product-card {
  display: grid;
  min-height: 204px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  isolation: isolate;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: -70% -45%;
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.18) 49%,
    rgba(216, 239, 95, 0.18) 52%,
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transform: translateX(-60%) rotate(4deg);
}

.product-card:hover::after,
.product-card:focus-visible::after {
  opacity: 1;
  animation: product-shine 900ms ease forwards;
}

@keyframes product-shine {
  from {
    transform: translateX(-60%) rotate(4deg);
  }

  to {
    transform: translateX(60%) rotate(4deg);
  }
}

.product-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.product-art {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(216, 239, 95, 0.2), rgba(83, 194, 160, 0.18)),
    #222b24;
  background-position: center;
  background-size: cover;
}

.product-art.has-image {
  min-height: 0;
}

.product-art span {
  max-width: 70%;
  color: #e7f0de;
  font-size: 11px;
  font-weight: 700;
}

.product-art b {
  font-size: 21px;
}

.product-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.product-body h3 {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-body p {
  font-size: 13px;
}

.product-body p {
  color: #cbd4c8;
}

.product-body p:not(.product-meta) {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.issue-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #e7f0de;
  font-size: 11px;
  font-weight: 800;
}

.issue-badge.auto {
  border-color: rgba(216, 239, 95, 0.48);
  background: rgba(216, 239, 95, 0.16);
  color: var(--accent);
}

.issue-badge.manual {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd4c8;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 12px;
}

.product-footer.guest-footer,
.product-detail-footer.guest-footer {
  justify-content: center;
}

.price {
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
}

.discount-price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.old-price {
  position: relative;
  color: var(--accent);
}

.old-price::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 2px;
  background: var(--danger);
  transform: rotate(-14deg);
}

.new-price {
  color: var(--danger);
}

.hidden-price {
  display: none;
}

.wiki-grid {
  display: grid;
  gap: 20px;
}

.wiki-post {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.wiki-post-card {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  min-height: 210px;
}

.wiki-post-card .wiki-cover {
  height: 100%;
  max-height: none;
}

.wiki-post-card .wiki-post-body {
  align-content: center;
}

.wiki-open-button {
  width: fit-content;
}

.wiki-unavailable {
  display: grid;
  grid-template-columns: auto minmax(0, 620px);
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 360px;
  padding: 42px;
  border: 1px solid rgba(216, 239, 95, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 239, 95, 0.14), transparent 34%),
    color-mix(in srgb, var(--card-bg) 92%, #0b0e0c);
  box-shadow: var(--shadow);
}

.wiki-unavailable-mark {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid rgba(216, 239, 95, 0.55);
  border-radius: 8px;
  color: var(--button-bg);
  background: rgba(216, 239, 95, 0.08);
  font-size: 52px;
  font-weight: 900;
}

.wiki-unavailable-content {
  display: grid;
  gap: 14px;
}

.wiki-unavailable h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 62px);
  line-height: 1;
}

.wiki-unavailable .primary-button {
  width: fit-content;
}

.wiki-back-button {
  width: fit-content;
  margin-bottom: 6px;
}

.wiki-post-full {
  max-width: 1120px;
  margin: 0 auto;
}

.wiki-post.accent {
  border-color: rgba(216, 239, 95, 0.4);
}

.wiki-post.dark {
  background: rgba(10, 13, 11, 0.92);
}

.wiki-cover {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.wiki-post-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.wiki-content {
  display: grid;
  gap: 12px;
  color: #dce3d8;
}

.wiki-content p,
.wiki-content h2,
.wiki-content h3,
.wiki-content ul,
.wiki-content ol,
.wiki-content blockquote,
.wiki-content pre {
  margin: 0;
}

.wiki-content ul,
.wiki-content ol {
  padding-left: 24px;
}

.wiki-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
}

.wiki-content a,
.wiki-content-editor a {
  color: var(--accent);
  font-weight: 800;
}

.wiki-content code,
.wiki-content-editor code {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  padding: 2px 6px;
  font-family: Consolas, "Courier New", monospace;
  color: #f2f6e9;
}

.wiki-spoiler {
  border-radius: 5px;
  background: rgba(216, 239, 95, 0.18);
  color: transparent;
  padding: 0 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.wiki-spoiler:hover,
.wiki-spoiler:focus {
  background: rgba(216, 239, 95, 0.26);
  color: inherit;
}

.wiki-content img,
.wiki-content-editor img {
  display: block;
  width: min(100%, 760px);
  max-height: 520px;
  border-radius: 8px;
  object-fit: contain;
}

.wiki-content-editor img.selected-editor-image {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.wiki-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.wiki-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
}

.wiki-admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(520px, 1fr);
  gap: 18px;
  align-items: start;
}

.wiki-editor {
  order: 2;
}

.wiki-posts-list {
  order: 1;
}

.wiki-admin-post-row {
  grid-template-columns: 72px 1fr;
  column-gap: 12px;
  align-items: start;
}

.wiki-admin-post-row > :not(.wiki-admin-post-thumb) {
  grid-column: 2;
}

.wiki-admin-post-thumb {
  grid-row: 1 / span 4;
  width: 72px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(216, 239, 95, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.wiki-admin-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wiki-cover-preview {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  background-position: center;
  background-size: cover;
}

.wiki-cover-preview:not(.has-image)::before {
  content: "Обложка";
  display: grid;
  height: 180px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.wiki-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.wiki-gallery-thumb {
  display: grid;
  gap: 8px;
}

.wiki-gallery-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
}

.wiki-editor-label {
  gap: 10px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-toolbar button,
.editor-toolbar select {
  min-width: 44px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.editor-toolbar select {
  min-width: 92px;
  padding: 0 10px;
}

.editor-toolbar select option {
  background: #ffffff;
  color: #111711;
}

.editor-toolbar button:hover,
.editor-toolbar select:hover {
  border-color: rgba(216, 239, 95, 0.45);
  background: rgba(216, 239, 95, 0.12);
}

.wiki-content-editor {
  min-height: 320px;
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090e0b;
  color: var(--text);
  padding: 16px;
  line-height: 1.55;
  outline: none;
}

.wiki-content-editor:focus {
  border-color: rgba(216, 239, 95, 0.55);
  box-shadow: 0 0 0 3px rgba(216, 239, 95, 0.12);
}

.wiki-content-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.45);
}

.wiki-content-editor p,
.wiki-content-editor h2,
.wiki-content-editor h3,
.wiki-content-editor ul,
.wiki-content-editor ol,
.wiki-content-editor blockquote,
.wiki-content-editor pre {
  margin-top: 0;
}

.dashboard-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-panel,
.admin-form,
.admin-list {
  padding: 20px;
}

.profile-card {
  display: grid;
  gap: 12px;
}

.steam-avatar {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(216, 239, 95, 0.36);
  border-radius: 8px;
  object-fit: cover;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.users-panel {
  display: grid;
  gap: 18px;
}

.admin-user-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
}

.admin-user-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.admin-user-main {
  display: grid;
  gap: 4px;
}

.admin-user-main strong {
  font-size: 22px;
}

.admin-user-summary .muted,
.admin-cart-row .muted {
  display: block;
}

.admin-user-avatar-empty {
  display: grid;
  place-items: center;
  color: var(--button-bg);
  background: rgba(216, 239, 95, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.admin-user-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-user-metrics span {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.admin-user-metrics strong {
  color: var(--text);
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-collapsible {
  display: none;
  gap: 18px;
}

.admin-user-card.expanded .admin-user-collapsible {
  display: grid;
}

.admin-user-expand-label {
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid rgba(216, 239, 95, 0.35);
  border-radius: 8px;
  color: var(--button-bg);
  text-align: center;
}

.admin-user-actions .secondary-button {
  width: fit-content;
}

.admin-user-details {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.admin-user-cart-block {
  grid-column: 1 / -1;
}

.admin-user-orders-block {
  grid-column: 1 / -1;
}

.admin-user-detail-block,
.admin-cart-list,
.admin-user-orders {
  display: grid;
  gap: 12px;
}

.admin-user-detail-block {
  scroll-margin-top: 140px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.admin-user-detail-block h4 {
  margin: 0;
}

.admin-cart-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.admin-cart-row img,
.admin-cart-placeholder {
  width: 46px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.admin-cart-row strong {
  display: block;
  line-height: 1.1;
}

.admin-cart-row .muted {
  line-height: 1.15;
}

.admin-cart-price {
  white-space: nowrap;
}

.admin-cart-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  font-size: 18px;
}

.admin-cart-empty {
  min-height: 54px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.muted-box {
  min-height: 126px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #cbd4c8;
}

.steps {
  margin: 0;
  padding-left: 22px;
  color: #cbd4c8;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(83, 194, 160, 0.15);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.status.waiting {
  background: rgba(231, 184, 90, 0.16);
  color: var(--warning);
}

.status.partial {
  background: rgba(216, 239, 95, 0.14);
  color: var(--accent);
}

.status.cancelled {
  background: rgba(239, 111, 108, 0.16);
  color: var(--danger);
}

.admin-locked {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #cbd4c8;
}

.admin-grid {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  grid-template-areas:
    "product products"
    "category products";
  align-items: start;
  gap: 18px;
}

#adminPanelView .admin-grid {
  flex: 1 1 auto;
  min-height: 0;
}

#productForm {
  grid-area: product;
}

#categoryForm {
  grid-area: category;
}

#productForm,
#categoryForm {
  gap: 10px;
  padding: 18px;
}

#productForm h3,
#categoryForm h3 {
  margin-bottom: 10px;
}

#productForm label,
#categoryForm label {
  gap: 5px;
}

#productForm input,
#productForm select,
#productForm textarea,
#categoryForm input,
#categoryForm select,
#categoryForm textarea {
  padding: 10px 11px;
}

#productForm textarea {
  min-height: 98px;
}

#adminSettingsForm {
  grid-area: settings;
}

.products-list {
  grid-area: products;
}

.products-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.products-list h3 {
  margin: 0 0 12px;
}

.admin-product-filter-panel {
  margin: 0 0 16px;
  flex: 0 0 auto;
}

.orders-list {
  grid-area: orders;
}

.journal-list {
  grid-area: journal;
}

.products-list,
.orders-list,
.journal-list {
  min-width: 0;
}

.products-list #adminProducts,
.orders-list #adminOrders {
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.products-list #adminProducts {
  --admin-product-card-width: 250px;
  display: grid;
  width: 100%;
  max-width: calc((var(--admin-product-card-width) * 6) + (12px * 5) + 30px);
  grid-template-columns: 1fr;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  margin-inline: auto;
  max-height: none;
  align-content: start;
  align-items: stretch;
}

.admin-products-empty,
.admin-product-server-group {
  grid-column: 1 / -1;
}

.admin-product-server-group {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: calc((var(--admin-product-card-width) * 6) + (12px * 5) + 30px);
  margin-inline: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-product-group-title {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.admin-product-group-title span,
.admin-product-group-title small {
  color: var(--muted);
  font-size: 14px;
}

.admin-product-group-title strong {
  color: var(--text);
  font-size: 22px;
}

.admin-product-category-group {
  display: grid;
  gap: 10px;
}

.admin-product-category-group h4 {
  margin: 0;
  color: var(--accent);
  font-size: 17px;
}

.admin-product-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, var(--admin-product-card-width)));
  gap: 12px;
  align-items: stretch;
  justify-content: center;
}

.orders-page-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  align-items: start;
  gap: 18px;
}

.orders-page-grid .orders-list,
.orders-page-grid .journal-list {
  grid-area: auto;
}

.settings-form {
  width: min(520px, 100%);
}

.settings-form:has(#heroCardsEditor) {
  width: min(980px, 100%);
}

#monitorSettingsForm {
  width: min(820px, 100%);
}

#emailNotificationsForm {
  width: min(680px, 100%);
}

.hero-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-settings-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-settings-card legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 800;
}

.hero-image-preview {
  width: 104px;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 96px 96px;
}

.brand-logo-preview {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 30px 30px;
}

.brand-logo-preview:not(.has-image)::before {
  content: "DS";
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.favicon-preview {
  width: 64px;
  height: 64px;
  background-size: 48px 48px;
}

.favicon-preview:not(.has-image)::before {
  content: "ICO";
}

.hero-image-preview:not(.has-image)::before {
  content: "96";
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.theme-preview {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(16, 20, 18, 0.15), rgba(16, 20, 18, 0.58)),
    var(--site-bg-image);
  background-position: center;
  background-size: cover;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stats-summary .account-panel {
  display: grid;
  gap: 6px;
}

.stats-summary strong {
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
}

.statistics-list {
  display: grid;
  gap: 14px;
}

.stats-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-login-section {
  min-height: calc(100vh - 74px);
  display: grid;
  align-content: center;
}

.admin-login-form {
  width: min(420px, 100%);
}

.admin-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1210;
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.admin-row,
.cart-item,
.order-row,
.journal-row {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.admin-row.just-added {
  margin-inline: -10px;
  padding-inline: 10px;
  border-radius: 8px;
  background: rgba(216, 239, 95, 0.1);
}

.admin-product-card {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto repeat(6, auto) 1fr auto;
  gap: 8px;
  height: auto;
  min-height: 560px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  overflow: visible;
}

.admin-product-thumb,
.admin-product-placeholder {
  width: 100%;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-product-thumb {
  object-fit: cover;
}

.admin-product-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(216, 239, 95, 0.16), rgba(83, 194, 160, 0.14)), #1d241d;
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
}

.admin-product-card .admin-row-head {
  align-items: flex-start;
  min-height: 46px;
}

.admin-product-card .admin-row-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  min-height: 2.35em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-product-card .muted {
  overflow-wrap: anywhere;
  display: -webkit-box;
  min-height: 1.25em;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.admin-product-card .status {
  width: fit-content;
}

.admin-product-card .admin-row-actions {
  grid-template-columns: 1fr;
  margin-top: auto;
  gap: 8px;
  align-self: end;
}

.admin-product-card .admin-row-actions button {
  min-height: 38px;
  margin: 0;
}

.admin-row-head,
.cart-item-head,
.order-row-head,
.journal-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.category-row .admin-row-head {
  align-items: baseline;
  flex-wrap: wrap;
}

.admin-row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.journal-row-head span {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  width: min(420px, 100%);
  height: 100dvh;
  flex-direction: column;
  padding: 20px;
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header,
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 10px 0;
}

.cart-item-actions {
  display: grid;
  grid-template-columns: minmax(64px, 0.35fr) 1fr;
  gap: 8px;
}

.cart-mini-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.cart-mini-button-accent {
  border-color: transparent;
  background: var(--button-bg);
  color: var(--button-text);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 20px;
}

.wide {
  width: 100%;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.66);
}

.modal-card {
  width: min(560px, 100%);
  padding: 22px;
}

.product-modal-card {
  width: min(880px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.product-detail-art {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 239, 95, 0.18), rgba(83, 194, 160, 0.16)),
    #222b24;
  background-position: center;
  background-size: cover;
  color: var(--accent);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 900;
}

.product-detail-body {
  display: grid;
  gap: 12px;
}

.product-detail-description {
  max-height: 240px;
  overflow: auto;
  color: #dce3d8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.product-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.payment-tabs {
  margin: 18px 0;
}

.qr-box {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.qr {
  display: grid;
  width: 150px;
  height: 150px;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: #f4f6ef;
}

.qr i {
  border-radius: 3px;
  background: #111511;
}

.card-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  width: min(460px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(216, 239, 95, 0.32);
  border-radius: 8px;
  background: #1b231b;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hidden {
  display: none !important;
}

body:has(#cartDrawer) .admin-section,
body:has(#cartDrawer) .nav a[href="/admin"] {
  display: none;
}

body.is-guest .topbar .nav,
body.is-guest #cartToggle,
body.is-guest #adminPanelButton {
  display: none;
}

body.is-guest #profile,
body.is-guest #history {
  display: none;
}

body.is-guest #home .eyebrow,
body.is-guest #home .hero-actions {
  display: none;
}

body.is-guest #home {
  min-height: auto;
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: 8px;
}

body.is-guest #shop {
  padding-top: 18px;
}

body:has(#adminLoginView:not(.hidden)) .topbar .nav,
body:has(#adminLoginView:not(.hidden)) .topbar .top-actions,
body:has(#adminLoginView:not(.hidden)) .topbar .mobile-menu-toggle {
  display: none;
}

@media (max-width: 940px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-content: center;
  }

  .topbar .hero-panel,
  .topbar .nav,
  .topbar .top-actions {
    display: none;
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .topbar.menu-open .hero-panel {
    display: grid;
  }

  .topbar.menu-open .nav,
  .topbar.menu-open .top-actions {
    display: flex;
  }

  #adminPanelView {
    height: auto;
    min-height: calc(100dvh - 150px);
    padding: 24px 0;
  }

  #adminPanelView .admin-grid {
    min-height: auto;
  }

  .nav,
  .top-actions {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .has-hero-bg .hero p:not(.eyebrow) {
    transform: none;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .server-monitor-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-monitor-details {
    margin-left: 0;
    justify-content: flex-start;
  }

  .product-grid,
  .dashboard-grid,
  .admin-grid,
  .hero-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-areas:
      "product category"
      "products products";
  }

  .orders-page-grid {
    grid-template-columns: 1fr;
  }

  .wiki-admin-grid {
    grid-template-columns: 1fr;
  }

  .wiki-post-card {
    grid-template-columns: 1fr;
  }

  .wiki-post-card .wiki-cover {
    height: auto;
    max-height: 320px;
  }

  .wiki-unavailable {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 28px;
  }

  .admin-user-summary,
  .admin-user-details {
    grid-template-columns: 1fr;
  }

  .admin-user-metrics {
    justify-content: flex-start;
  }

  .stats-summary {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  .topbar,
  .top-actions,
  .section-heading,
  .hero-actions,
  .qr-box {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .section-heading {
    display: flex;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar:not(.menu-open) .nav,
  .topbar:not(.menu-open) .top-actions {
    display: none;
  }

  .nav a,
  .top-actions button,
  .hero-actions a {
    justify-content: center;
    text-align: center;
  }

  .product-grid,
  .dashboard-grid,
  .admin-grid,
  .card-row,
  .hero-settings-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .footer-links a,
  .footer-links a:first-child,
  .footer-links a:last-of-type {
    text-align: center;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-grid {
    grid-template-areas:
      "product"
      "category"
      "products";
  }

  .products-list #adminProducts {
    overflow: visible;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-card {
    min-height: 84px;
  }

  .qr-box {
    display: flex;
  }
}
