: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-border: var(--accent);
  --button-gradient: linear-gradient(to right, #d8ef5f, #53c2a0, #d8ef5f, #a8e850);
  --button-shadow: rgba(216, 239, 95, 0.38);
  --button-text: #14170e;
  --button-icon: var(--button-text);
  --cart-counter-bg: #d01696;
  --cart-counter-text: #ffffff;
  --message-counter-bg: #d01696;
  --message-counter-text: #ffffff;
  --product-card-bg: var(--card-bg);
  --product-card-body-bg: var(--card-bg);
  --product-card-border: rgba(255, 255, 255, 0.1);
  --product-card-overlay: rgba(0, 0, 0, 0.24);
  --product-category-text: #e7f0de;
  --product-badge-bg: rgba(216, 239, 95, 0.16);
  --product-badge-text: var(--accent);
  --product-title-text: var(--text);
  --product-description-text: #cbd4c8;
  --product-price-text: var(--accent);
  --product-old-price-text: var(--danger);
  --product-button-bg: var(--button-bg);
  --product-button-text: var(--button-text);
  --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;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.liquidGlass-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.liquidGlass-wrapper,
.liquid-glass {
  position: relative;
  display: flex;
  overflow: hidden;
  isolation: isolate;
  color: inherit;
  box-shadow:
    0 6px 6px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.24s ease,
    border-radius 0.28s ease,
    padding 0.28s ease,
    box-shadow 0.28s ease,
    background-position 0.4s ease-in-out;
}

.liquidGlass-wrapper:hover,
.liquidGlass-wrapper:focus-visible,
.liquid-glass:hover,
.liquid-glass:focus-visible {
  transform: translateY(-1px) scale(1.012);
}

.liquidGlass-effect,
.liquidGlass-tint,
.liquidGlass-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.liquidGlass-effect {
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  filter: url(#glass-distortion);
}

.liquidGlass-tint {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.08);
}

.liquidGlass-shine {
  z-index: 2;
  overflow: hidden;
  box-shadow:
    inset 2px 2px 1px 0 rgba(255, 255, 255, 0.42),
    inset -1px -1px 1px 1px rgba(255, 255, 255, 0.22);
}

.liquidGlass-shine::after {
  content: "";
  position: absolute;
  inset: -70% -35%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.22) 50%, transparent 58%);
  opacity: 0;
  transform: translateX(-50%) rotate(6deg);
  transition: opacity 0.22s ease, transform 0.62s ease;
}

.liquidGlass-wrapper:hover .liquidGlass-shine::after,
.liquid-glass:hover .liquidGlass-shine::after {
  opacity: 1;
  transform: translateX(50%) rotate(6deg);
}

.liquidGlass-text {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.nav-icon {
  position: relative;
  z-index: 4;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  color: var(--button-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--button-icon), transparent 68%));
  pointer-events: none;
}

.nav-icon-halo,
.nav-icon-dot {
  fill: currentColor;
  stroke: none;
}

.nav-icon-halo {
  opacity: 0.14;
}

.nav-icon-dot {
  opacity: 0.95;
}

.nav-icon path,
.nav-icon circle,
.nav-icon rect,
.nav-icon line,
.nav-icon polyline,
.nav-icon polygon {
  vector-effect: non-scaling-stroke;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquidGlass-effect {
    display: none;
  }

  .liquidGlass-wrapper,
  .liquid-glass {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 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);
}

.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;
}

.topbar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: clamp(16px, 3vw, 40px);
  z-index: 30;
  display: none;
  width: max-content;
  min-width: var(--topbar-menu-button-width, 156px);
  max-width: calc(100vw - 32px);
  max-height: min(76vh, 720px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(23, 29, 26, 0.96), rgba(12, 17, 14, 0.96)),
    var(--site-bg-image);
  background-size: cover;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar.menu-open .topbar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body:has(.admin-title) .topbar > .nav,
body:has(.admin-title) .topbar > .top-actions,
body:has(#adminLoginView:not(.hidden)) .topbar > .nav,
body:has(#adminLoginView:not(.hidden)) .topbar > .top-actions {
  display: none !important;
}

body:has(.admin-title) .topbar > .topbar-menu .nav,
body:has(.admin-title) .topbar > .topbar-menu .top-actions,
body:has(#adminLoginView:not(.hidden)) .topbar > .topbar-menu .nav,
body:has(#adminLoginView:not(.hidden)) .topbar > .topbar-menu .top-actions {
  display: flex;
}

body:has(.admin-title) .topbar:not(.menu-open) > .topbar-menu,
body:has(#adminLoginView:not(.hidden)) .topbar:not(.menu-open) > .topbar-menu {
  display: none !important;
}

body:has(.admin-title) .topbar.menu-open .topbar-menu,
body:has(#adminLoginView:not(.hidden)) .topbar.menu-open .topbar-menu {
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: none;
  overflow: visible;
  gap: 8px;
  padding: 10px;
}

body:has(.admin-title) .topbar .topbar-menu .nav,
body:has(.admin-title) .topbar .topbar-menu .top-actions,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .nav,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .top-actions {
  gap: 6px;
}

body:has(.admin-title) .topbar .topbar-menu .nav a,
body:has(.admin-title) .topbar .topbar-menu .top-actions .icon-button,
body:has(.admin-title) .topbar .topbar-menu .top-actions .steam-button,
body:has(.admin-title) .topbar .topbar-menu .top-actions .secondary-button,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .nav a,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .top-actions .icon-button,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .top-actions .steam-button,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .top-actions .secondary-button {
  min-height: 38px;
  height: 38px;
  padding: 6px 12px;
  flex-direction: row;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
}

body:has(.admin-title) .topbar .topbar-menu .nav-icon,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-menu .nav-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.topbar .topbar-menu .nav,
.topbar .topbar-menu .top-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.topbar .topbar-menu .nav a,
.topbar .topbar-menu .top-actions .icon-button,
.topbar .topbar-menu .top-actions .steam-button,
.topbar .topbar-menu .top-actions .secondary-button {
  width: var(--topbar-menu-button-width, 156px);
  min-width: var(--topbar-menu-button-width, 156px);
  max-width: min(var(--topbar-menu-button-width, 156px), calc(100vw - 56px));
}

.topbar-cart-actions {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.xcoin-balance {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--general-button-border, rgba(210, 255, 82, 0.45));
  border-radius: 999px;
  background: rgba(19, 31, 24, 0.78);
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.topbar-cart-actions #cartToggle {
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
}

.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: stretch;
  gap: 8px;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  grid-column: auto;
  grid-row: auto;
  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(--button-border);
  border-radius: 18px;
  background-color: color-mix(in srgb, var(--button-bg), #101512 76%);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.09), transparent 35%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--button-bg) 42%, #111a15 58%),
      color-mix(in srgb, var(--button-bg) 30%, #06100c 70%));
  color: var(--button-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 8px 16px;
  justify-content: center;
  text-align: center;
  gap: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-glass .liquidGlass-tint,
.button-glass .liquidGlass-tint {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--button-bg) 42%, #111a15 58%),
      color-mix(in srgb, var(--button-bg) 30%, #06100c 70%));
}

.nav-glass .liquidGlass-text,
.button-glass .liquidGlass-text,
.filter .liquidGlass-text,
.product-button-glass .liquidGlass-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-glass > .liquidGlass-effect,
.nav-glass > .liquidGlass-tint,
.nav-glass > .liquidGlass-shine,
.button-glass > .liquidGlass-effect,
.button-glass > .liquidGlass-tint,
.button-glass > .liquidGlass-shine,
.filter > .liquidGlass-effect,
.filter > .liquidGlass-tint,
.filter > .liquidGlass-shine,
.product-button-glass > .liquidGlass-effect,
.product-button-glass > .liquidGlass-tint,
.product-button-glass > .liquidGlass-shine {
  display: none;
}

.message-nav-badge {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--message-counter-bg);
  color: var(--message-counter-text);
  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: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  grid-column: auto;
  grid-row: auto;
  position: relative;
  z-index: 1;
  align-self: center;
}

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

.topbar .hero-panel {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 0;
  align-self: center;
}

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

  .topbar .hero-panel {
    width: max-content;
    margin-top: 2px;
    z-index: 1;
  }

  .nav {
    grid-column: auto;
    justify-content: stretch;
  }

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

.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,
    color 160ms ease,
    box-shadow 160ms ease;
}

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

.top-actions .icon-button,
.top-actions .steam-button,
.top-actions .primary-button,
.top-actions .secondary-button,
.top-actions .ghost-button,
.topbar-cart-actions .icon-button,
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 8px;
  white-space: nowrap;
}

#cartToggle .liquidGlass-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 4;
}

#cartToggle {
  overflow: visible;
}

#cartToggle .liquidGlass-text > span {
  min-width: 0;
}

body:has(#cartDrawer) .topbar .nav a,
body:has(#cartDrawer) .topbar .top-actions .icon-button,
body:has(#cartDrawer) .topbar .top-actions .steam-button,
body:has(#cartDrawer) .topbar .top-actions .secondary-button {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 50px;
  padding: 0;
  gap: 0;
}

body:has(#cartDrawer) .topbar .nav a .liquidGlass-text,
body:has(#cartDrawer) .topbar .top-actions .steam-button,
body:has(#cartDrawer) .topbar .top-actions .secondary-button {
  font-size: 0;
}

body:has(#cartDrawer) .topbar .top-actions .icon-button .liquidGlass-text > span {
  font-size: 0;
  width: 0;
  overflow: hidden;
}

body:has(#cartDrawer) .topbar .nav-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

body:has(#cartDrawer) .topbar .message-nav-badge,
body:has(#cartDrawer) .topbar .icon-button b {
  font-size: 12px;
}

.topbar .nav a,
.topbar .top-actions .icon-button,
.topbar .top-actions .steam-button,
.topbar .top-actions .secondary-button {
  width: var(--topbar-menu-button-width, auto);
  min-width: var(--topbar-menu-button-width, auto);
  max-width: var(--topbar-menu-button-width, none);
  min-height: 66px;
  padding: 7px 12px;
  flex-direction: column;
  gap: 4px;
  line-height: 1.08;
}

.topbar .nav a .liquidGlass-text,
.topbar .top-actions .icon-button .liquidGlass-text {
  flex-direction: column;
  gap: 4px;
}

.topbar .nav-icon {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
}

.topbar .message-nav-badge,
.topbar .icon-button b {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

.topbar #cartToggle b {
  position: static;
  flex: 0 0 auto;
  transform: none;
}

.topbar .icon-button .liquidGlass-text > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:has(#cartDrawer) .topbar .nav a,
body:has(#cartDrawer) .topbar .top-actions .icon-button,
body:has(#cartDrawer) .topbar .top-actions .steam-button,
body:has(#cartDrawer) .topbar .top-actions .secondary-button {
  width: var(--topbar-menu-button-width, auto);
  min-width: var(--topbar-menu-button-width, auto);
  max-width: var(--topbar-menu-button-width, none);
  height: auto;
  padding: 7px 12px;
  gap: 4px;
}

body:has(#cartDrawer) .topbar #cartToggle {
  width: var(--topbar-menu-button-width, auto);
  min-width: var(--topbar-menu-button-width, auto);
  max-width: var(--topbar-menu-button-width, none);
}

body:has(#cartDrawer) .topbar .nav a .liquidGlass-text,
body:has(#cartDrawer) .topbar .top-actions .steam-button,
body:has(#cartDrawer) .topbar .top-actions .secondary-button {
  font-size: inherit;
}

body:has(#cartDrawer) .topbar .top-actions .icon-button .liquidGlass-text > span {
  width: auto;
  font-size: inherit;
}

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

.steam-button,
.primary-button,
.primary-link {
  border: 1px solid var(--button-border);
  border-radius: 18px;
  background-color: color-mix(in srgb, var(--button-bg), #101512 76%);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(135deg, var(--button-bg), color-mix(in srgb, var(--button-bg), #000 14%));
  color: var(--button-text);
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px color-mix(in srgb, var(--button-bg), transparent 78%);
}

.steam-button {
  padding: 9px 16px;
}

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

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

.secondary-button,
.secondary-link {
  background-color: color-mix(in srgb, var(--button-bg), #101512 76%);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--button-bg) 34%, #111a15 66%),
      color-mix(in srgb, var(--button-bg) 28%, #000 72%));
}

.ghost-button {
  background-color: color-mix(in srgb, var(--button-bg), #101512 82%);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.07), transparent 35%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--button-bg) 26%, #111a15 74%),
      color-mix(in srgb, var(--button-bg) 20%, #000 80%));
}

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

.nav a:hover,
.filter:hover,
.payment-tab:hover,
.secondary-link:hover,
.ghost-button:hover,
.secondary-button:hover,
.icon-button:hover,
.steam-button:hover,
.primary-button:hover,
.primary-link:hover {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 35%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--button-bg), white 10%),
      color-mix(in srgb, var(--button-bg), #000 8%));
  color: var(--button-text);
  border-color: color-mix(in srgb, var(--button-border), white 18%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 13px 28px color-mix(in srgb, var(--button-bg), transparent 68%);
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(216, 239, 95, 0.72);
  outline-offset: 3px;
}

button:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.cart-mini-button:disabled {
  cursor: not-allowed;
  transform: none;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

body:has(.admin-shell) button:not(:disabled),
body:has(.admin-title) button:not(:disabled) {
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--button-bg), transparent 72%);
  background-image: none;
  color: var(--button-text);
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

body:has(.admin-shell) button:not(:disabled):hover,
body:has(.admin-title) button:not(:disabled):hover {
  background: color-mix(in srgb, var(--button-bg), white 8%);
  background-image: none;
  color: var(--button-text);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--button-bg), transparent 74%);
}

.nav a,
.top-actions button,
.top-actions a,
.filter,
.payment-tab,
.secondary-link,
.ghost-button,
.secondary-button,
.icon-button,
.steam-button,
.primary-button,
.primary-link,
.shop-button,
.cart-button,
.cart-mini-button,
.server-filter,
.category-filter,
.template-actions button,
.admin-product-card .admin-row-actions button,
body:has(.admin-shell) button:not(:disabled),
body:has(.admin-title) button:not(:disabled) {
  background-size: 300% 100%;
  transition:
    transform 160ms ease,
    background-position 400ms ease-in-out,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

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(10px, 2vw, 22px) 0 clamp(8px, 1.5vw, 16px);
}

.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(12px, 1.8vw, 22px) clamp(16px, 3vw, 38px);
  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(52px, 6vw, 88px);
  height: clamp(52px, 6vw, 88px);
  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: 8px;
  font-size: clamp(40px, 7vw, 88px);
  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: inline-flex;
  width: max-content;
  max-width: 100%;
  justify-content: center;
  gap: 8px;
  align-self: center;
  justify-self: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(14, 20, 17, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-card {
  display: grid;
  width: 46px;
  height: 46px;
  min-height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--button-border), transparent 22%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--button-bg), #101512 80%);
  color: var(--text);
  text-decoration: none;
}

.hero-card-inner {
  display: grid;
  width: 100%;
  place-items: center;
}

.hero-card-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  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-default-icon {
  width: 28px;
  height: 28px;
}

.hero-logo-icon {
  width: 28px;
  height: 28px;
}

.hero-default-icon path,
.hero-default-icon circle,
.hero-default-icon rect,
.hero-default-icon line,
.hero-default-icon polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-logo-icon path,
.hero-logo-icon circle {
  fill: currentColor;
  stroke: none;
}

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

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

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

.topbar .hero-panel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  overflow: hidden;
}

.topbar .hero-card {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border-radius: 13px;
}

.topbar .hero-card-inner,
.topbar .hero-card-icon {
  width: 100%;
  height: 100%;
  place-items: center;
}

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

.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 {
  background: color-mix(in srgb, var(--button-bg), transparent 18%);
  background-image: none;
  color: var(--button-text);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--button-bg), transparent 74%);
}

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

.shop-disabled-message {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--muted);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  text-align: center;
}

.server-monitor-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px;
  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: 6px;
}

.server-monitor-card {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  width: 100%;
  padding: 5px 8px;
  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: 4px 9px;
  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: 4px 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 {
  border-color: var(--product-card-border);
  background: var(--product-card-bg);
  display: block;
  min-height: 204px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  isolation: isolate;
}

.product-card-content {
  display: grid;
  width: 100%;
  min-height: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: -70% -45%;
  z-index: 4;
  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 {
  position: relative;
  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::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--product-card-overlay);
  pointer-events: none;
}

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

.product-art span {
  position: relative;
  z-index: 1;
  max-width: 70%;
  color: var(--product-category-text);
  font-size: 11px;
  font-weight: 700;
}

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

.product-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: var(--product-card-body-bg);
}

.product-body h3 {
  margin-bottom: 0;
  color: var(--product-title-text);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

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

.product-body p {
  color: var(--product-description-text);
}

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

.paint-select-wrap {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.paint-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(6, 10, 8, 0.88);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.paint-select option {
  background: #07100c;
  color: #f5f6ef;
}

.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;
}

.product-card-badges {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.product-server-badge {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(83, 194, 160, 0.45);
  border-radius: 999px;
  background: rgba(83, 194, 160, 0.12);
  color: #9cebd3;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

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

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

.product-footer {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 12px;
  background: var(--product-card-body-bg);
}

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

.price {
  min-width: 0;
  color: var(--product-price-text);
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.xcoin-price {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.82em;
  line-height: 1.15;
}

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

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

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

.new-price {
  color: var(--product-old-price-text);
}

.product-card .primary-button {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  border-color: color-mix(in srgb, var(--product-button-bg), white 20%);
  background: var(--product-button-bg);
  background-image: linear-gradient(
    to right,
    var(--product-button-bg),
    color-mix(in srgb, var(--product-button-bg), white 24%),
    color-mix(in srgb, var(--product-button-bg), black 10%)
  );
  box-shadow: 0 6px 18px color-mix(in srgb, var(--product-button-bg), transparent 48%);
  color: var(--product-button-text);
  white-space: nowrap;
}

.product-card .product-button-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-card .product-button-glass .liquidGlass-tint {
  background: color-mix(in srgb, var(--product-button-bg), white 20%);
  opacity: 0.45;
}

.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 rgba(216, 239, 95, 0.34);
  border-radius: 999px;
  background: rgba(216, 239, 95, 0.1);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.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.72);
  background: rgba(216, 239, 95, 0.18);
  color: var(--accent);
}

.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);
}

.profile-xcoin-daily {
  margin-top: 12px;
}

.profile-xcoin-button {
  width: 100%;
  min-height: 42px;
}

.profile-xcoin-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.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-manual-issue-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;
}

.admin-user-manual-issue-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(110px, 160px) auto;
  gap: 12px;
  align-items: end;
}

.admin-user-manual-issue-form .muted {
  grid-column: 1 / -1;
}

.admin-user-nickname-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-user-xcoin-form {
  display: grid;
  gap: 10px;
}

.admin-user-xcoin-current {
  color: var(--muted);
  font-size: 18px;
}

.admin-user-xcoin-current strong {
  color: var(--accent);
}

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

.checkbox-row input {
  width: auto;
}

.server-activation-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 10, 8, 0.4);
}

.server-activation-row {
  justify-content: flex-start;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.server-activation-row span {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.server-activation-row small {
  color: var(--muted);
}

.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;
}

.history-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.history-toggle {
  min-width: 210px;
}

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;
}

.product-file-actions {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-file-actions .secondary-button {
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

.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%);
}

#settingsView {
  display: grid;
  justify-items: center;
}

#settingsView > .section-heading,
#settingsView > .settings-form {
  width: min(980px, 100%);
  max-width: 980px;
  margin-inline: auto;
}

#settingsView > .settings-form {
  justify-self: center;
}

#settingsView .settings-form,
#settingsView .settings-form:has(#heroCardsEditor),
#settingsView #monitorSettingsForm,
#settingsView #emailNotificationsForm {
  width: min(760px, 100%);
  max-width: 760px;
}

#settingsView .hero-settings-grid {
  grid-template-columns: 1fr;
}

.templates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
  gap: 18px;
}

.templates-editor {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.templates-editor .settings-form,
.templates-editor .settings-form:has(#heroCardsEditor) {
  width: 100%;
}

.templates-panel {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 16px;
  width: 100%;
}

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

.template-list {
  display: grid;
  gap: 12px;
}

.template-list-section {
  display: grid;
  gap: 12px;
}

.template-list-title {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 16px;
}

.template-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.template-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.template-card.active {
  border-color: rgba(216, 239, 95, 0.65);
  background: rgba(216, 239, 95, 0.08);
}

.template-card.builtin {
  border-color: rgba(216, 239, 95, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.template-card h4 {
  margin: 0;
  font-size: 18px;
}

.template-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.template-swatches span {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-actions .secondary-button,
.template-actions .ghost-button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 14px;
}

.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;
}

.template-product-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 320px);
  gap: 16px;
  align-items: start;
}

.template-product-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.template-control-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.template-control-group h4 {
  margin: 0;
}

.template-product-colors.compact-colors {
  margin: 0;
}

.template-product-colors label {
  min-width: 0;
}

.template-product-colors input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 4px;
}

.template-product-preview {
  width: min(320px, 100%);
  justify-self: center;
  cursor: default;
}

.template-product-preview .product-art {
  min-height: 260px;
}

.template-product-preview .product-footer .primary-button {
  min-width: 116px;
  padding-inline: 16px;
}

.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: 0;
  border-radius: 999px;
  background-image: var(--button-gradient);
  background-size: 300% 100%;
  color: var(--button-text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 15px var(--button-shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.cart-mini-button:hover {
  background: color-mix(in srgb, var(--button-bg), white 8%);
  background-image: none;
  color: var(--button-text);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--button-bg), transparent 74%);
}

.cart-mini-button-accent {
  background: var(--button-bg);
  background-image: none;
}

.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 .mobile-menu-toggle {
  display: none;
}

body.is-guest .topbar-menu {
  position: relative;
  top: auto;
  right: auto;
  display: flex !important;
  grid-column: 4;
  grid-row: 1;
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-guest .topbar .topbar-menu .top-actions {
  display: flex !important;
  flex-direction: row;
  width: auto;
}

body.is-guest .topbar .topbar-menu .top-actions .steam-button {
  display: inline-flex !important;
  width: auto;
  min-width: max-content;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
}

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 .topbar-menu,
body:has(#adminLoginView:not(.hidden)) .topbar .topbar-cart-actions,
body:has(#adminLoginView:not(.hidden)) .topbar .mobile-menu-toggle {
  display: none;
}

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

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

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

  .topbar-cart-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .topbar .hero-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .topbar .topbar-menu {
    display: none;
  }

  .topbar.menu-open .topbar-menu {
    display: flex;
  }

  body.is-guest .topbar-menu {
    display: flex !important;
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

  #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 {
    display: none;
  }

  .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;
  }

  .templates-layout {
    grid-template-columns: 1fr;
  }

  .template-product-editor,
  .template-product-colors {
    grid-template-columns: 1fr;
  }

  .templates-panel {
    position: static;
  }

  .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,
  .admin-user-nickname-form {
    grid-template-columns: 1fr;
  }

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

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

}

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

  .section-heading {
    display: flex;
  }

  .nav a,
  .top-actions button,
  .top-actions a,
  .hero-actions a {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-content: center;
    text-align: center;
  }

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

  #shop .section-heading {
    gap: 10px;
    margin-bottom: 10px;
  }

  #shop .shop-filter-panel {
    flex: 0 0 auto;
    width: 100%;
    gap: 8px;
  }

  #shop .product-grid {
    margin-top: 0;
  }

  .template-actions {
    display: grid;
  }

  .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;
  }
}

body:has(.admin-shell) button:not(:disabled),
body:has(.admin-title) button:not(:disabled) {
  border: 1px solid rgba(83, 194, 160, 0.42) !important;
  border-radius: 8px !important;
  background: rgba(22, 49, 39, 0.9) !important;
  background-image: none !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body:has(.admin-shell) button:not(:disabled):hover,
body:has(.admin-title) button:not(:disabled):hover {
  border-color: rgba(83, 194, 160, 0.7) !important;
  background: rgba(28, 61, 48, 0.96) !important;
  background-image: none !important;
  color: var(--text) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18) !important;
}

html :where(.product-card, .template-product-preview) .primary-button,
body:has(.admin-title) .template-product-preview .primary-button,
body:has(.admin-shell) .template-product-preview .primary-button {
  border-color: color-mix(in srgb, var(--product-button-bg), white 20%) !important;
  background: var(--product-button-bg) !important;
  background-image: linear-gradient(
    to right,
    var(--product-button-bg),
    color-mix(in srgb, var(--product-button-bg), white 24%),
    color-mix(in srgb, var(--product-button-bg), black 10%)
  ) !important;
  color: var(--product-button-text) !important;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--product-button-bg), transparent 48%) !important;
}

html :where(.product-card, .template-product-preview) .primary-button:hover,
body:has(.admin-title) .template-product-preview .primary-button:hover,
body:has(.admin-shell) .template-product-preview .primary-button:hover {
  border-color: color-mix(in srgb, var(--product-button-bg), white 30%) !important;
  background: color-mix(in srgb, var(--product-button-bg), white 10%) !important;
  background-image: linear-gradient(
    to right,
    color-mix(in srgb, var(--product-button-bg), white 8%),
    color-mix(in srgb, var(--product-button-bg), white 28%),
    color-mix(in srgb, var(--product-button-bg), black 6%)
  ) !important;
  color: var(--product-button-text) !important;
  box-shadow: 0 9px 24px color-mix(in srgb, var(--product-button-bg), transparent 38%) !important;
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
    justify-items: center;
  }

  .topbar .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .topbar .hero-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .topbar .topbar-cart-actions {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
  }

  .topbar .mobile-menu-toggle {
    grid-column: 3;
    grid-row: 3;
    justify-self: start;
  }

  body.is-guest .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding: 14px 16px 18px;
  }

  body.is-guest .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: calc(100vw - 32px);
  }

  body.is-guest .topbar .hero-panel {
    display: inline-flex;
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: auto;
    max-width: calc(100vw - 32px);
    margin: 0 auto;
    gap: 8px;
    padding: 6px;
    overflow: hidden;
  }

  body.is-guest .topbar .hero-card {
    width: 56px;
    min-width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 16px;
  }

  body.is-guest .topbar .hero-card-inner,
  body.is-guest .topbar .hero-card-icon {
    width: 100%;
    height: 100%;
    place-items: center;
  }

  body.is-guest .topbar .hero-card-icon img,
  body.is-guest .topbar .hero-default-icon,
  body.is-guest .topbar .hero-logo-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  body.is-guest .topbar-menu {
    display: flex;
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
    width: 100%;
    max-width: calc(100vw - 32px);
    justify-content: center;
  }

  body.is-guest .topbar .topbar-menu .top-actions {
    justify-content: center;
    width: 100%;
  }

  body.is-guest .topbar .topbar-menu .top-actions .steam-button {
    justify-content: center;
    width: min(260px, 100%);
    min-width: 0;
    max-width: calc(100vw - 48px);
    margin: 0 auto;
    text-align: center;
  }
}

/* Keep the settings page as a single, centered column. */
#settingsView {
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 18px;
}

#settingsView > .settings-form,
#settingsView .settings-form:has(#heroCardsEditor),
#settingsView #monitorSettingsForm,
#settingsView #emailNotificationsForm {
  grid-area: auto !important;
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  margin: 0 auto !important;
}

#settingsView .settings-form {
  grid-template-columns: minmax(0, 1fr) !important;
}

#settingsView #heroCardsEditor,
#settingsView .hero-settings-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

#settingsView .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#settingsView .form-actions .primary-button,
#settingsView .form-actions .secondary-button {
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.profile-events-panel {
  grid-column: 1 / -1;
}

.profile-events,
.screenshot-events-admin-list,
.admin-user-events-list {
  display: grid;
  gap: 12px;
}

.profile-event-card,
.admin-screenshot-event-row,
.admin-user-event-row {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.profile-event-card.is-collapsed .profile-event-body {
  display: none;
}

.profile-event-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-event-toggle {
  min-height: 42px;
  padding: 8px 14px;
}

.profile-event-summary {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
}

.profile-event-card:not(.is-collapsed) .profile-event-summary {
  display: none;
}

.profile-event-body {
  margin-top: 12px;
}

.profile-event-head,
.profile-event-meta,
.profile-event-actions,
.admin-screenshot-event-row,
.admin-user-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-event-head > div,
.admin-screenshot-event-row > div:first-child,
.admin-user-event-row {
  display: grid;
  gap: 6px;
}

.profile-event-head span,
.profile-event-meta {
  color: var(--muted);
}

.profile-event-status,
.status-pill {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(216, 239, 95, 0.16);
  color: var(--accent);
  font-weight: 800;
}

.profile-event-upload-form,
.screenshot-field-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-event-upload-form button {
  align-self: end;
}

.profile-event-reward-select {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
}

.profile-event-reward-select select {
  width: 100%;
}

.reward-product-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.reward-product-picker label {
  min-width: 0;
}

.reward-product-picker button {
  min-height: 48px;
  white-space: nowrap;
}

.profile-event-upload-form:focus-within {
  border-radius: 10px;
  outline: 1px solid color-mix(in srgb, var(--accent), transparent 35%);
  outline-offset: 6px;
}

.profile-event-paste-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.profile-event-thumbs,
.admin-event-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.profile-event-thumbs img,
.admin-event-thumbs img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

@media (max-width: 720px) {
  .profile-event-head-actions {
    justify-content: flex-start;
  }

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

  .reward-product-picker button {
    width: 100%;
  }

  .profile-event-head,
  .profile-event-meta,
  .profile-event-actions,
  .admin-screenshot-event-row {
    align-items: stretch;
    flex-direction: column;
  }
}
