:root {
  --bg: #101014;
  --surface: #202024;
  --surface-2: #2a2a2e;
  --surface-3: #35353a;
  --line: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --faint: rgba(255, 255, 255, 0.42);
  --text-soft: rgba(255, 255, 255, 0.82);
  --blue: #26bbff;
  --blue-hover: #61cdff;
  --switch-red: #e60012;
  --radius: 12px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --lootbox-blue: #2b65cc;
  --lootbox-red: #cf3638;
  --radius-lg: 18px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --topbar-bg: rgba(16, 16, 20, 0.92);
  --footer-bg: #18181c;
  --toast-bg: #ffffff;
  --toast-text: #101014;
  --shadow: 0 16px 40px rgba(0, 0, 0, .5);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23fff' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* White background theme: the default (index.html sets it before the page draws). The sun/moon button switches to dark. */
:root[data-theme="light"] {
  --bg: #f4f4f6;
  --surface: #e8e8ed;
  --surface-2: #dcdce3;
  --surface-3: #cfcfd8;
  --line: rgba(0, 0, 0, 0.1);
  --text: #111114;
  --muted: rgba(17, 17, 20, 0.64);
  --faint: rgba(17, 17, 20, 0.48);
  --text-soft: rgba(17, 17, 20, 0.8);
  --blue: #1aa9f0;
  --blue-hover: #0d97dc;
  --topbar-bg: rgba(244, 244, 246, 0.9);
  --footer-bg: #e9e9ee;
  --toast-bg: #111114;
  --toast-text: #ffffff;
  --shadow: 0 16px 40px rgba(17, 17, 20, .16);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111114' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="light"] .search input::-webkit-search-cancel-button { filter: none; }
:root[data-theme="light"] .menu,
:root[data-theme="light"] .search-results { background: #fff; }
:root[data-theme="light"] .menu button:hover,
:root[data-theme="light"] .sr-item:hover,
:root[data-theme="light"] .sr-item.is-active,
:root[data-theme="light"] .sr-all:hover { background: var(--surface); }
:root[data-theme="light"] .drawer { background: #fff; }
:root[data-theme="light"] .more-panel { background: #fff; }
:root[data-theme="light"] .pdp-note { background: #fff; }
:root[data-theme="light"] .card .cover,
:root[data-theme="light"] .promo-img { box-shadow: 0 6px 18px rgba(17, 17, 20, .12); }

.theme-btn .ico-moon { display: none; }
:root[data-theme="light"] .theme-btn .ico-sun { display: none; }
:root[data-theme="light"] .theme-btn .ico-moon { display: block; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  overflow-x: clip; /* nothing may widen the page sideways (phones would let people zoom out to it) */
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 0;
  font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: background-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-blue { background: var(--blue); color: #0b0b0f; }
.btn-blue:hover { background: var(--blue-hover); }
.btn-white { background: #fff; color: #101014; height: 56px; padding: 0 28px; font-size: 16px; }
.btn-white:hover { background: #e3e3e3; }
.btn-ghost { background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; height: 52px; }
.btn-glass {
  width: 56px; height: 56px; padding: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.24); }
.btn-glass[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent;
}
.icon-btn:hover { background: var(--surface); }
.link-btn { background: none; border: 0; color: var(--muted); padding: 0; font-size: 13px; }
.link-btn:hover { color: var(--text); }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  height: 72px; padding: 0 20px 0 16px;
  background: var(--topbar-bg); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 46px; height: auto; }
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.brand-title { font-family: var(--display); font-size: 27px; letter-spacing: .03em; line-height: 1; }
.brand-tag { margin-top: 3px; font-size: 9.5px; font-weight: 600; letter-spacing: .38em; color: var(--muted); padding-left: 1px; }
.topnav { display: flex; gap: 28px; font-size: 16px; color: var(--muted); }
.topnav a:hover { color: var(--text); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px;
  padding: 6px; background: var(--surface-2); border-radius: 10px;
  box-shadow: var(--shadow);
}
.menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  border: 0; border-radius: 6px; background: none;
}
.menu button:hover { background: var(--surface-3); }
.menu button[aria-checked="true"]::after { content: "✓"; float: right; color: var(--blue); }
.currency { display: flex; padding: 3px; border-radius: 10px; background: var(--surface); }
.currency button {
  border: 0; background: none; padding: 8px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .03em;
}
.currency button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.cart-btn { position: relative; }
.btn-sm { height: 34px; padding: 0 14px; margin-top: 10px; font-size: 13px; border-radius: 8px; }
.cart-row-side .from { color: var(--muted); font-size: 12px; font-weight: 400; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: #0b0b0f; color: var(--blue); font-size: 12px; font-weight: 700;
}

/* ───────── Sub nav ───────── */
.subnav-wrap { position: sticky; top: 72px; z-index: 30; background: var(--bg); }
.subnav {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; gap: 40px;
}
.search {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: min(360px, 100%); height: 48px; padding: 0 18px;
  border-radius: 24px; background: var(--surface); color: var(--muted);
}
.search:focus-within { background: var(--surface-2); color: var(--text); }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none;
  color: var(--text); font: inherit; font-size: 15px;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.search-results {
  position: absolute; left: 0; top: calc(100% + 8px); width: min(440px, calc(100vw - 32px));
  padding: 8px; border-radius: 14px; background: var(--surface-2);
  box-shadow: var(--shadow); z-index: 5;
}
.sr-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px;
  border: 0; border-radius: 8px; background: none; text-align: left;
}
.sr-item:hover, .sr-item.is-active { background: var(--surface-3); }
.sr-item .cover { width: 38px; flex: none; border-radius: 4px; }
.sr-name { flex: 1; font-size: 14px; color: var(--text); }
.sr-price { font-size: 13px; color: var(--muted); }
.sr-all { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 0; border-radius: 8px; background: none; color: var(--blue); font-size: 14px; text-align: left; }
.sr-all:hover { background: var(--surface-3); }
.sr-empty { padding: 12px; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 36px; font-size: 17px; }
.tabs a { color: var(--muted); padding: 6px 0; transition: color .15s; }
.tabs a:hover, .tabs a.active { color: var(--text); }
.tabs .tab-compact { display: none; } /* shown when the header links hide (≤1024px) */
.browse-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.browse-title .link-btn { font-size: 14px; color: var(--blue); }

main { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; }

/* ───────── Announcement bar ───────── */
/* One message at a time: the new one slides up from below while the old one leaves through the top. */
.promo-bar {
  position: relative; height: 50px; margin: 0 0 20px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(38, 187, 255, .09), transparent 32%, transparent 68%, rgba(255, 70, 70, .08)), var(--bg);
}
.promo-bar[hidden] { display: none; }
.promo-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px;
  border: 0; background: none; color: var(--text-soft); font: inherit; font-size: 14.5px; line-height: 1.3; text-align: center; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(100%);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s ease, visibility 0s linear .6s;
}
.promo-msg.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.promo-msg.is-leaving { opacity: 0; visibility: visible; transform: translateY(-100%); transition-delay: 0s; }
.promo-msg strong { color: var(--text); font-weight: 700; }
.promo-msg svg { flex: none; color: var(--blue); }
.promo-msg:hover { color: var(--text); }
.promo-msg:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; border-radius: var(--radius); }
.bar-cta { margin-left: 4px; color: var(--blue); font-weight: 600; white-space: nowrap; }

/* ───────── Hero ───────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px;
  margin-top: 12px;
}
.hero-stage {
  position: relative; aspect-ratio: 16 / 9; max-height: 74vh; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--surface);
}
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.slide-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); transition: transform 8s ease-out;
}
.slide.is-active .slide-img { transform: scale(1); }
.slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 6, 9, .88) 0%, rgba(6, 6, 9, .55) 38%, rgba(6, 6, 9, 0) 68%),
    linear-gradient(0deg, rgba(6, 6, 9, .7) 0%, rgba(6, 6, 9, 0) 45%);
}
.slide-content {
  color: #fff;
  position: absolute; z-index: 1; left: clamp(20px, 4%, 52px); bottom: clamp(20px, 7%, 52px);
  width: min(560px, 82%);
  display: flex; flex-direction: column; align-items: flex-start;
}
.slide-logo {
  font-family: var(--display); text-transform: uppercase; line-height: .95;
  font-size: clamp(30px, 4.4vw, 68px); letter-spacing: .01em; margin: 0 0 14px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .5);
  text-wrap: balance;
}
.slide-logo small {
  display: inline-block; margin-top: 10px; padding: 3px 10px; background: #0b0b0f;
  font-family: var(--ui); font-size: clamp(10px, .9vw, 13px); font-weight: 700; letter-spacing: .28em;
}
.slide-eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.slide-desc { margin: 0 0 22px; font-size: clamp(14px, 1.3vw, 18px); line-height: 1.55; color: rgba(255, 255, 255, .92); max-width: 46ch; }
.price-line { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 18px; font-weight: 500; }
.pill {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px;
  background: var(--blue); color: #0b0b0f; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.slide-actions { display: flex; gap: 14px; }

.hero-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; height: 0; min-height: 100%; }
.hero-item {
  position: relative; display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 8px 16px; border: 0; border-radius: var(--radius); background: none; text-align: left;
  overflow: hidden; isolation: isolate; height: 100%;
}
.hero-item::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface-2);
  transform: scaleX(0); transform-origin: left;
}
.hero-item:hover { background: var(--surface); }
.hero-item.is-active { background: var(--surface); }
.hero-item.is-active::before { animation: fill var(--hero-ms, 5000ms) linear forwards; }
.hero.is-paused .hero-item.is-active::before,
.hero.is-paused .hero-dots button.is-active::before { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.hero-thumb { height: 100%; max-height: 86px; aspect-ratio: 3 / 4; width: auto; flex: none; border-radius: 8px; object-fit: cover; }
.hero-item span { font-size: 17px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-list li { flex: 1; min-height: 0; display: flex; }
.hero-dots { display: none; }

/* ───────── Covers (generated "key art" until real photos are added) ───────── */
.cover {
  --h: 210;
  position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  container-type: inline-size;
  background:
    radial-gradient(120% 75% at 15% 10%, hsl(var(--h) 85% 55% / .95), transparent 62%),
    radial-gradient(90% 70% at 100% 100%, hsl(calc(var(--h) + 50) 80% 42% / .9), transparent 65%),
    linear-gradient(160deg, hsl(var(--h) 45% 18%), #0c0c10 75%);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.cover.has-img { background: #f4f4f4; }
/* Wide photos (see GCcover in app.js): a console or controller on a plain backdrop gets a pure white
   card, the same white as its backdrop (tools/whiten_backdrops.py), so there's no box around it; a
   photo with a real background sits on a blurred copy of itself instead of a light frame. */
.cover.is-plain, .cover.is-photo { isolation: isolate; }
.cover.has-img.is-plain { background: #fff; }
.cover.is-plain img { object-fit: contain; object-position: center; padding: 10%; mix-blend-mode: multiply; }
.cover.is-photo::before {
  content: ""; position: absolute; inset: -12%;
  background: var(--photo) center / cover; filter: blur(18px) brightness(.8);
}
.cover.is-photo img { object-fit: contain; object-position: center; }
.cover-band {
  position: absolute; left: 0; right: 0; top: 0; height: 9%;
  display: flex; align-items: center; padding: 0 7%;
  background: var(--switch-red); color: #fff;
  font-weight: 700; font-size: 5cqw; letter-spacing: .12em;
}
.cover-glyph {
  position: absolute; right: -6%; bottom: -12%;
  font-family: var(--display); font-size: 92cqw; line-height: 1; color: #fff; opacity: .12;
  pointer-events: none;
}
.cover-rings {
  position: absolute; width: 90cqw; height: 90cqw; left: 50%; top: 42%;
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 0 0 9cqw rgba(255, 255, 255, .035), 0 0 0 18cqw rgba(255, 255, 255, .02);
}
.cover-title {
  position: absolute; left: 8%; right: 8%; bottom: 7%;
  font-family: var(--display); text-transform: uppercase; line-height: 1.02;
  font-size: 11cqw; letter-spacing: .01em; text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cover-kind {
  position: absolute; left: 8%; top: 14%;
  font-size: 4.6cqw; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .8;
}
.cover.has-img .cover-glyph, .cover.has-img .cover-rings, .cover.has-img .cover-title, .cover.has-img .cover-kind { display: none; }

/* ───────── Cards ───────── */
.card { position: relative; min-width: 0; }
.card-link {
  display: flex; flex-direction: column; gap: 4px; width: 100%;
  padding: 0; border: 0; background: none; text-align: left;
}
.card .cover { margin-bottom: 10px; transition: filter .2s; }
.card .cover::after {
  content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .2s;
}
.card:hover .cover::after, .card-link:focus-visible .cover::after { opacity: .1; }
/* Overlay with the same box as the cover (full width, 3:4), so the buttons land on the art. */
.card-over { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 3 / 4; pointer-events: none; }
.card-actions { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; }
.card-act {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 10px; background: rgba(16, 16, 20, .74); color: #fff;
  backdrop-filter: blur(6px); pointer-events: auto;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .18s, transform .18s var(--ease-out), background-color .15s;
}
.card-act svg { width: 18px; height: 18px; }
.card-act:hover { background: rgba(16, 16, 20, .92); }
.card:hover .card-act, .card:focus-within .card-act, .card.is-picking .card-act,
.card-act[aria-pressed="true"] { opacity: 1; transform: none; }
.card-act[aria-pressed="true"] { color: #ff5a5c; }
.card-act[aria-pressed="true"] svg { fill: currentColor; }
.card-act[aria-expanded="true"] { background: var(--blue); color: #0b0b0f; }
@media (hover: none) { .card-act { opacity: 1; transform: none; } }
.card-pick {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: grid; gap: 2px; padding: 6px; border-radius: 10px;
  background: rgba(16, 16, 20, .9); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  pointer-events: auto; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .22s var(--ease-out), visibility 0s .22s;
}
.card.is-picking .card-pick { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.card-pick button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; border: 0; border-radius: 7px; background: none;
  color: #fff; font-size: 13px; text-align: left;
}
.card-pick button:hover, .card-pick button:focus-visible { background: rgba(255, 255, 255, .14); }
.card-pick strong { font-weight: 600; white-space: nowrap; }
.card-over { container-type: inline-size; }
/* Small cards (phones): condition above its price so neither gets cut. */
@container (max-width: 180px) {
  .card-pick { left: 6px; right: 6px; bottom: 6px; padding: 4px; }
  .card-pick button { flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 8px; font-size: 12px; line-height: 1.25; }
}
.card-meta { font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.card-title { font-size: 16px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin-top: 4px; font-size: 15px; color: var(--text); }
.card-price .from { color: var(--muted); font-size: 13px; margin-right: 4px; }
/* ───────── Offers ───────── */
.price-was { color: var(--faint); font-weight: 400; font-size: .86em; text-decoration-thickness: 1px; }
.price-now { color: var(--text); }
.card-badge, .offer-pill, .pill-offer {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px;
  background: var(--switch-red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.card-badge { position: absolute; left: 8px; bottom: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.offer-pill { font-size: 13px; vertical-align: 4px; }
.side-offer { margin: 2px 0 12px; font-size: 13px; color: var(--muted); }
/* Market comparison: green, so it never reads as one of our own offers (those are red). */
.card-badge.is-market { background: #1f9d55; }
.side-market { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.side-market strong { font-weight: 600; color: var(--text-soft); }
.side-market small { flex-basis: 100%; font-size: 12px; color: var(--faint); }
.market-pill { padding: 3px 9px; border-radius: 6px; background: rgba(31, 157, 85, .16); color: #3fd486; font-size: 12px; font-weight: 700; }
:root[data-theme="light"] .market-pill { background: #d9f4e4; color: #11733d; }
.section-empty { display: grid; justify-items: center; gap: 10px; }
.section-empty h3 { margin: 0; font-size: 20px; font-weight: 600; color: var(--text); }
.section-empty p { margin: 0 0 8px; max-width: 420px; }

/* ───────── Rows ───────── */
.row { margin-top: 64px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.row-head h2 { margin: 0; font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.row-head h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.chev { font-size: 26px; line-height: 1; color: var(--muted); transform: translateY(-1px); }
.row-arrows { display: flex; gap: 10px; }
.row-tools { display: flex; align-items: center; gap: 18px; }
.row-tools .link-btn { font-size: 14px; }
.arrow {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--surface); font-size: 22px; line-height: 1; padding-bottom: 3px;
}
.arrow:hover:not(:disabled) { background: var(--surface-2); }
.arrow:disabled { opacity: .35; cursor: default; }
.row-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 24px) / 6);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }

/* ───────── Promos ───────── */
/* minmax(0, …): Safari would otherwise size a card to its photo file (900px) and push it off the screen. */
.promos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 64px; }
.promo { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.promo-img { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }
.promo-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.promo:hover .promo-img img { transform: scale(1.04); }
.promo-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.35), transparent 50%); }
.promo h3 { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.promo p { margin: 0; color: var(--muted); font-size: 15px; }
.promo-cta { margin-top: 4px; color: var(--text); font-weight: 500; }
.promo-cta::after { content: " →"; color: var(--blue); }

/* ───────── Browse ───────── */
.browse { margin-top: 88px; }
.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.browse-head h2 { margin: 0; font-size: 28px; font-weight: 600; }
.browse-tools { display: flex; align-items: center; gap: 12px; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sort select {
  height: 40px; padding: 0 34px 0 12px; border: 0; border-radius: 8px; color: var(--text);
  background: var(--surface) var(--chev) no-repeat right 12px center;
  appearance: none; font: inherit; font-size: 14px; cursor: pointer;
}
.filters-toggle { display: none; height: 40px; }
.browse-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 36px 24px; }
.grid-empty { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--muted); }
.filters {
  position: sticky; top: 164px; display: flex; flex-direction: column; gap: 8px;
  /* Scrolls on its own, with a visible bar, so every option is reachable without scrolling the page */
  max-height: calc(100vh - 188px); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 14px 16px 8px; margin-left: -8px;
}
/* Firefox has no ::-webkit-scrollbar; Chrome ignores those rules if these are set, so scope them. */
@supports not selector(::-webkit-scrollbar) {
  .filters { scrollbar-width: thin; scrollbar-color: var(--surface-3) var(--surface); }
}
.filters::-webkit-scrollbar { width: 8px; }
.filters::-webkit-scrollbar-track { background: var(--surface); border-radius: 8px; }
.filters::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--surface); }
.filters::-webkit-scrollbar-thumb:hover { background: var(--muted); }
:root[data-theme="light"] .filters::-webkit-scrollbar-thumb { background: #b3b3be; }
:root[data-theme="light"] .filters::-webkit-scrollbar-thumb:hover { background: #8e8e9a; }
.filters-top { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.filters fieldset { margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.filters legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.filters label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 6px; font-size: 15px; cursor: pointer; }
.filters label:hover { background: var(--surface); }
.filters input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }

/* ───────── Help ───────── */

/* ───────── Footer ───────── */
/* Footer: link columns, payment badges + social icons, bottom bar (copyright, legal, currency/language). */
.footer { margin-top: 96px; background: var(--footer-bg); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 52px var(--gutter) 32px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 230px)); gap: 32px 48px; }
.footer-col { display: grid; align-content: start; justify-items: start; gap: 12px; }
.footer-col h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.footer-col a, .footer-link { padding: 0; border: 0; background: none; font: inherit; font-size: 15px; color: var(--muted); text-align: left; cursor: pointer; }
.footer-col a:hover, .footer-link:hover { color: var(--text); }
.footer-mid { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; }
.pay-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pb { display: grid; place-items: center; width: 60px; height: 38px; border-radius: 5px; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; text-align: center; letter-spacing: .02em; }
.pb-spei { background: #1f3b73; }
.pb-visa { background: #1a1f71; font-size: 16px; font-style: italic; }
.pb-mc { background: #232323; }
.pb-mp { background: #00a5e3; font-size: 10px; font-weight: 700; line-height: 1.05; }
.pb-paypal { background: #003087; font-size: 12px; font-style: italic; }
.pb-paypal i { color: #4dc3ff; }
.pb-oxxo { background: #e2001a; color: #ffd200; }
:root[data-theme="light"] .pb { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.footer-social { display: flex; flex-wrap: wrap; gap: 12px; }
.social { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--footer-bg); transition: transform .15s, opacity .15s; }
.social:hover { opacity: .85; transform: translateY(-2px); }
.footer-bottom { display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-copy { flex: 1 1 280px; margin: 0; font-size: 14px; color: var(--muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-legal a { font-size: 14px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--blue); }
.footer-locale { display: flex; gap: 6px; padding-left: 18px; border-left: 1px solid var(--line); }
.foot-select select {
  appearance: none; height: 34px; padding: 0 28px 0 10px; border: 0; border-radius: 8px;
  background: transparent var(--chev) no-repeat right 9px center; color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.foot-select select:hover, .foot-select select:focus-visible { background-color: var(--surface); }
.footer-note { margin: 18px 0 0; max-width: 90ch; font-size: 12px; color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ───────── Policies ───────── */
.legal { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; }
.legal-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding-top: 24px; }
.legal-nav { position: sticky; top: 168px; display: grid; gap: 4px; }
.legal-nav-title { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.legal-nav a { padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text-soft); }
.legal-nav a:hover { background: var(--surface); color: var(--text); }
.legal-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.legal-nav-contact { margin-top: 12px; font-size: 13px !important; color: var(--muted) !important; word-break: break-all; }
.legal-doc { max-width: 76ch; }
.legal-doc h1 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(36px, 4vw, 54px); line-height: 1; }
.legal-updated { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.legal-doc h2 { margin: 36px 0 12px; font-size: 20px; font-weight: 600; }
.legal-doc p, .legal-doc li { font-size: 16px; line-height: 1.75; color: var(--text-soft); }
.legal-doc p { margin: 0 0 14px; }
.legal-doc ul { margin: 0 0 16px; padding-left: 22px; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc li::marker { color: var(--blue); }
.legal-doc strong { color: var(--text); }
.legal-doc a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal-callout { padding: 12px 16px; border-radius: 10px; background: var(--surface); font-size: 14px !important; }
.legal-callout.is-todo { border-left: 3px solid #ffb547; }
mark.todo { padding: 1px 6px; border-radius: 4px; background: rgba(255, 181, 71, .22); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 181, 71, .55); }
:root[data-theme="light"] .legal-callout { background: #fff; }

/* ───────── Product page (Epic-style) ───────── */
.pdp { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; }
.pdp-crumbs { display: flex; align-items: center; gap: 8px; margin: 6px 0 16px; font-size: 14px; color: var(--muted); }
.pdp-crumbs a:hover { color: var(--text); }
.pdp-title { margin: 0 0 6px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.pdp-sub { margin-bottom: 28px; font-size: 14px; color: var(--muted); }
.pdp-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 56px;
  grid-template-areas: "gal side" "body side"; align-items: start;
}
.pdp-gal { grid-area: gal; min-width: 0; }
.pdp-body { grid-area: body; min-width: 0; }
.pdp-side { grid-area: side; grid-row: 1 / span 2; }

/* Gallery */
.gal-stage {
  position: relative; aspect-ratio: 16 / 12.6; max-height: 78vh; overflow: hidden; border-radius: var(--radius);
  background: #000; cursor: zoom-in; isolation: isolate;
}
.gal-bg { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(28px) brightness(.5); z-index: -1; }
.gal-img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .2s; }
.gal-kind, .gal-count {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px);
}
.gal-kind { left: 12px; }
.gal-kind[hidden] { display: none; }
.gal-count { right: 12px; font-variant-numeric: tabular-nums; }
.gal-strip { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.gal-thumbs { flex: 1; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-thumb {
  flex: 0 0 112px; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border-radius: 8px;
  border: 2px solid transparent; background: #000; opacity: .55; transition: opacity .15s, border-color .15s;
}
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal-thumb:hover { opacity: .85; }
.gal-thumb.is-active { opacity: 1; border-color: var(--text); }
.gal-strip .arrow { flex: none; }
.gal-empty { max-width: 320px; }

/* Body */
.pdp-short { margin: 34px 0 26px; font-size: 17px; line-height: 1.65; }
.pdp-tags { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 6px; }
.tag-col { padding-right: 24px; }
.tag-col + .tag-col { padding-left: 24px; border-left: 1px solid var(--line); }
.tag-col h4 { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 10px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.pdp-about { margin-top: 40px; }
.about-body { position: relative; }
.pdp-about.is-collapsed .about-body {
  max-height: 290px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.about-body h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.about-body p { margin: 0 0 16px; line-height: 1.7; color: var(--text-soft); }
.highlights { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 10px; }
.highlights li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-soft); }
.highlights svg { flex: none; margin-top: 3px; color: var(--blue); }
.pdp-note { padding: 12px 16px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: var(--surface); }
.about-toggle { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.pdp-more { margin-top: 56px; }
.pdp-more h2, .pdp-related h2 { margin: 0 0 18px; font-size: 22px; font-weight: 600; }
.more-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; padding: 28px 32px; border-radius: var(--radius-lg); background: var(--surface); }
.more-col h3 { display: inline-block; margin: 0 0 18px; padding-bottom: 8px; border-bottom: 2px solid var(--blue); font-size: 15px; font-weight: 600; }
.facts { margin: 0; display: grid; gap: 14px; }
.fact dt { margin-bottom: 2px; font-size: 12px; color: var(--muted); }
.fact dd { margin: 0; font-size: 15px; line-height: 1.5; }
.pdp-related { margin-top: 72px; }
.related-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }

/* Sidebar */
.side-cover { width: 64%; margin: 0 auto 20px; }
.esrb { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.esrb-badge {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 42px; height: 54px; padding: 0 4px; border: 2px solid #000; border-radius: 3px;
  background: #fff; color: #000; font-weight: 900; font-size: 17px; line-height: 1;
}
.esrb-badge small { margin-top: 5px; font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.esrb strong { display: block; font-size: 14px; }
.esrb div span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.side-chip { display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 6px; background: var(--surface-2); font-size: 12px; }
.side-variants { display: grid; gap: 8px; margin-bottom: 14px; }
.side-variant {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border: 2px solid transparent; border-radius: 10px; background: var(--surface); text-align: left; transition: border-color .15s;
}
.side-variant[aria-checked="true"] { border-color: var(--blue); }
.side-variant strong { display: block; font-size: 14px; }
.side-variant small { display: block; font-size: 12px; color: var(--muted); }
.side-variant > span:last-child { font-weight: 600; white-space: nowrap; }
.side-cond { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.side-cond span { font-weight: 400; color: var(--muted); }
.side-price { margin: 4px 0 4px; font-size: 24px; font-weight: 600; }
.side-stock { margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.side-stock.is-last { color: #ff9a4d; font-weight: 600; }
.side-buy { display: grid; gap: 10px; margin-bottom: 10px; }
.side-buy .btn { width: 100%; height: 50px; margin: 0; gap: 8px; font-size: 16px; }
.side-wish { width: 100%; height: 44px; margin-bottom: 22px; }
.side-wish .when-on, .side-wish[aria-pressed="true"] .when-off { display: none; }
.side-wish[aria-pressed="true"] .when-on { display: inline; }
.side-wish[aria-pressed="true"] { color: var(--lootbox-red); }
.side-wish[aria-pressed="true"] svg { fill: currentColor; }
.side-facts { list-style: none; margin: 0; padding: 0; }
.side-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-facts li span:first-child { color: var(--muted); }
.side-facts li span:last-child { text-align: right; }
.side-share { margin-top: 16px; height: 40px; padding: 0 16px; font-size: 14px; }

/* Full-screen gallery */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, .94); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: fade-in .2s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
.lb-img { position: absolute; inset: 64px 88px; width: calc(100% - 176px); height: calc(100% - 128px); object-fit: contain; }
.lb-close, .lb-nav { position: absolute; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-close { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 16px; }
.lb-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 30px; padding-bottom: 4px; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-count { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .7); }

/* ───────── Account: header button ───────── */
.acct-btn { gap: 8px; }
.acct-btn.is-signed { padding: 0 14px 0 6px; }
.avatar {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #6b5cff); color: #0b0b0f; font-weight: 700; letter-spacing: .02em;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }

/* ───────── Account: sign in / create account (split layout + hero) ───────── */
.account { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; }
.auth {
  display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: start; padding: 24px 0 8px;
}
.auth-main { padding-top: 8px; }
.auth-back { display: inline-block; margin-bottom: 36px; font-size: 14px; color: var(--muted); }
.auth-back:hover { color: var(--text); }
.auth-eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); }
.auth-title {
  margin: 0 0 12px; font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(40px, 4.6vw, 62px); line-height: .95; letter-spacing: .005em;
}
.auth-sub { margin: 0 0 28px; max-width: 42ch; font-size: 17px; line-height: 1.55; color: var(--text-soft); }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 12px; background: var(--surface); }
.auth-tabs a { flex: 1; padding: 10px 12px; border-radius: 9px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.auth-tabs a[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.auth-tabs a:not([aria-selected="true"]):hover { color: var(--text); }
.auth-form { display: grid; gap: 14px; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.field input {
  width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(38, 187, 255, .22); }
.field input[readonly] { color: var(--muted); }
.field.has-error input { border-color: #ff6b6b; }
.field-msg { min-height: 0; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.field-msg:empty { display: none; }
.field.has-error .field-msg, .field-msg.is-error { color: #ff7a7a; }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--muted);
}
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--text); }
.pw-meter { display: flex; align-items: center; gap: 6px; margin-top: -6px; }
.pw-meter span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background-color .2s; }
.pw-meter em { min-width: 64px; font-size: 12px; font-style: normal; text-align: right; color: var(--muted); }
.pw-meter[data-score="1"] span:nth-child(1) { background: #ff6b6b; }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: #ffb547; }
.pw-meter[data-score="3"] span { background: #3ddc84; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--text-soft); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.check a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.check.has-error { color: #ff7a7a; }
.auth-submit { height: 54px; margin-top: 6px; font-size: 16px; font-weight: 600; }
.btn-outline { height: 54px; margin-top: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 16px; font-weight: 600; }
.btn-outline:hover { background: var(--surface); }
.form-error, .form-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.form-error { background: rgba(255, 107, 107, .12); color: #ff8a8a; }
.form-note { background: rgba(38, 187, 255, .12); color: var(--text); }
.auth-perks { list-style: none; display: grid; gap: 18px; margin: 32px 0 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.auth-perks li { display: flex; align-items: flex-start; gap: 14px; }
.perk-icon {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(38, 187, 255, .12); border: 1px solid rgba(38, 187, 255, .25); color: var(--blue);
}
.auth-perks p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.auth-perks strong { color: var(--text); font-weight: 600; }
.auth-secure { display: flex; align-items: flex-start; gap: 8px; margin: 20px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.auth-secure svg { flex: none; margin-top: 2px; }
.auth-secure svg { color: var(--blue); }
.auth-secure strong { color: var(--text); font-weight: 600; }
.auth-legal { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.auth-legal a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.auth-demo { margin: 18px 0 0; font-size: 12px; color: var(--faint); }

/* Sign-in hero: exploded-view GameCraft controller */
.auth-hero {
  position: sticky; top: 168px; height: min(760px, calc(100vh - 196px)); min-height: 560px;
  overflow: hidden; isolation: isolate; border-radius: 24px; color: #fff;
  background:
    radial-gradient(90% 70% at 88% 104%, rgba(38, 187, 255, .55) 0%, rgba(30, 110, 220, .35) 28%, transparent 62%),
    radial-gradient(70% 55% at 0% 0%, rgba(207, 54, 56, .28) 0%, transparent 60%),
    linear-gradient(165deg, #05060a 0%, #0a1430 55%, #0d2550 100%);
}
.ah-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.xc {
  position: absolute; inset: 0 0 130px; display: grid; place-items: center; perspective: 1600px;
  /* RGB split on the edges, like the cinematic reference */
  filter: drop-shadow(1.6px 0 0 rgba(255, 46, 90, .5)) drop-shadow(-1.6px 0 0 rgba(0, 200, 255, .5));
}
.xc-rig {
  position: relative; width: min(480px, 78%); aspect-ratio: 456 / 272; transform-style: preserve-3d;
  animation: xc-turn 16s ease-in-out infinite;
}
@keyframes xc-turn {
  0%, 100% { transform: rotateX(56deg) rotateZ(-30deg); }
  50% { transform: rotateX(46deg) rotateZ(-12deg); }
}
.xc-layer { position: absolute; inset: 0; animation: xc-explode 8s cubic-bezier(.65, 0, .35, 1) infinite; }
.xc-layer svg { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes xc-explode {
  0%, 14% { transform: translateZ(calc(var(--z) * 5px)); }
  42%, 68% { transform: translateZ(calc(var(--z) * var(--xc-gap, 64px))); }
  92%, 100% { transform: translateZ(calc(var(--z) * 5px)); }
}
.xc-shadow {
  position: absolute; inset: 12% 6%; border-radius: 50%; background: rgba(0, 0, 0, .6);
  filter: blur(34px); transform: translateZ(-260px);
}
.xc-axis {
  position: absolute; width: 0; height: 400px; margin: -200px 0 0;
  border-left: 1px dashed rgba(160, 220, 255, .55); transform: rotateX(90deg);
  animation: xc-axis 8s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes xc-axis { 0%, 18%, 90%, 100% { opacity: 0; } 42%, 68% { opacity: 1; } }
.ah-caption { position: absolute; z-index: 3; left: 32px; right: 32px; bottom: 30px; display: grid; gap: 4px; }
.ah-caption strong { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.4vw, 34px); text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.ah-caption span { font-size: 14px; color: rgba(255, 255, 255, .78); }

/* Forgot password + recovery code */
.steps { list-style: none; display: flex; gap: 10px; margin: 0 0 22px; padding: 0; }
.steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); }
.steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-size: 12px; }
.steps li.is-on { color: var(--text); box-shadow: inset 0 0 0 1px var(--blue); }
.steps li.is-on span { background: var(--blue); color: #0b0b0f; }
.steps li.is-done span { background: #3ddc84; color: #0b0b0f; }
.field input.code-input { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 18px 18px 18px 22px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(38, 187, 255, .14), rgba(107, 92, 255, .1)); border: 1px dashed rgba(38, 187, 255, .55);
}
.code-box code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: clamp(16px, 1.6vw, 21px); font-weight: 700; letter-spacing: .06em; white-space: nowrap; user-select: all; }
.code-box .btn { height: 40px; gap: 8px; }
.code-ack { margin: 18px 0 4px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-blue:disabled:hover { background: var(--blue); }

/* ───────── Account: signed-in profile ───────── */
.acct { padding: 24px 0 8px; }
.acct-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px 32px; border-radius: 20px; background: var(--surface); }
.acct-hello { flex: 1; min-width: 200px; }
.acct-hello h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.6vw, 48px); text-transform: uppercase; line-height: 1; }
.acct-hello p { margin: 6px 0 0; color: var(--muted); }
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.acct-card { padding: 26px 28px; border-radius: 18px; background: var(--surface); }
.acct-card h2 { margin: 0 0 18px; font-size: 18px; font-weight: 600; }
.acct-card .field input { background: var(--bg); }
.acct-muted { margin: 0 0 16px; color: var(--muted); }
.acct-empty { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.acct-empty img { animation: gc-float 4s var(--ease-out) infinite; }
.acct-empty p { margin: 0; }
.orders { list-style: none; margin: 0; padding: 0; }
.orders li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.orders li span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.acct-wish { display: grid; grid-template-columns: repeat(4, 64px); gap: 10px; margin-bottom: 18px; }
.acct-wish-item { padding: 0; border: 0; background: none; border-radius: 6px; overflow: hidden; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pref:last-child { border-bottom: 0; }
.pref > span { color: var(--text-soft); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg); }
.acct-security { grid-column: 1 / -1; }
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.sec-grid h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.sec-grid .btn { justify-self: start; }
.sec-status { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(61, 220, 132, .12); font-size: 14px; }
.sec-status.is-missing { background: rgba(255, 181, 71, .14); }
.seg button { padding: 7px 12px; border: 0; border-radius: 7px; background: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

:root[data-theme="light"] .field input { background: #fff; }
:root[data-theme="light"] .auth-tabs { background: var(--surface); }
:root[data-theme="light"] .auth-tabs a[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
:root[data-theme="light"] .acct-head, :root[data-theme="light"] .acct-card { background: #fff; }
:root[data-theme="light"] .acct-card .field input { background: var(--bg); }
:root[data-theme="light"] .seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
:root[data-theme="light"] .form-error { color: #c62828; }
:root[data-theme="light"] .field.has-error .field-msg, :root[data-theme="light"] .field-msg.is-error, :root[data-theme="light"] .check.has-error { color: #c62828; }

/* ───────── Checkout ───────── */
.pay { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; }
.co { padding: 24px 0 8px; }
.co-title { margin: 0 0 28px; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 4.6vw, 62px); line-height: .95; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.co-main { display: grid; gap: 20px; }
.co-step { padding: 26px 28px; border-radius: 18px; background: var(--surface); }
.co-step h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 19px; font-weight: 600; }
.co-step h2 span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #0b0b0f; font-size: 14px; font-weight: 700; }
.co-step > :is(.field, .field-pair) + :is(.field, .field-pair) { margin-top: 14px; }
.co-step .field input, .co-step select, .co-step textarea { background: var(--bg); }
.co-hint { margin: -6px 0 16px; font-size: 14px; color: var(--muted); }
.co-hint a { color: var(--blue); font-weight: 600; }
.co-note { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.co-note a { color: var(--blue); }
.co-step .check { margin-top: 14px; }
.co-ship-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.co-ship-label { font-size: 15px; font-weight: 600; }
.co-country { margin-bottom: 18px; }
.ship-grid { grid-template-columns: minmax(0, 1fr); margin-bottom: 22px; }
.ship-grid + .co-note { margin-top: 0; }
.ship-price { margin-left: auto; padding-left: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.co-locate { height: 42px; padding: 0 16px; gap: 8px; font-size: 14px; color: var(--blue); }
.co-locate[aria-busy="true"] { opacity: .7; cursor: progress; }
.co-locate[aria-busy="true"] svg { animation: gc-pin 0.9s ease-in-out infinite; }
@keyframes gc-pin { 50% { transform: translateY(-3px); } }
.co-locate-msg { margin: -6px 0 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.co-locate-msg:empty { display: none; }
.co-locate-msg.is-error { color: #ff7a7c; }
:root[data-theme="light"] .co-locate-msg.is-error { color: #c62828; }
.co-locate-msg a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.co-country button { padding: 9px 16px; font-size: 14px; }
.field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field select { height: 50px; padding: 0 40px 0 14px; appearance: none; background: var(--bg) var(--chev) no-repeat right 14px center; cursor: pointer; }
.field textarea { padding: 12px 14px; resize: vertical; min-height: 84px; }
.field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(38, 187, 255, .22); }
.field.has-error select { border-color: #ff6b6b; }
.pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pay-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 12px;
  background: var(--bg); border: 2px solid transparent; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.pay-card:hover { border-color: var(--line); }
.pay-card:has(input:checked) { border-color: var(--blue); background: rgba(38, 187, 255, .08); }
.pay-card:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.pay-card input { position: absolute; opacity: 0; pointer-events: none; }
.pay-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); color: var(--blue); }
.pay-text strong { display: block; font-size: 15px; }
.pay-text small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.co-summary { position: sticky; top: 168px; display: grid; gap: 14px; padding: 26px; border-radius: 18px; background: var(--surface); }
.co-summary h2 { margin: 0; font-size: 19px; font-weight: 600; }
.co-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.co-items li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.co-items li:not(:has(.co-thumb)) { grid-template-columns: 1fr auto; }
.co-thumb { position: relative; width: 48px; }
.co-thumb .cover { border-radius: 6px; }
.co-thumb > span {
  position: absolute; top: -7px; right: -7px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--blue); color: #0b0b0f; font-size: 11px; font-weight: 700;
}
.co-item-name strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.35; }
.co-item-name span { font-size: 12px; color: var(--muted); }
.co-item-price { font-size: 14px; white-space: nowrap; }
.co-edit { justify-self: start; font-size: 13px; color: var(--blue); }
#cart-ship-note { display: grid; gap: 8px; }
#cart-ship-note strong { color: var(--text); }
.free-meter { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.free-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #7fdcff); transition: width .4s ease; }
.free-meter.is-full > span { background: linear-gradient(90deg, #1f9d55, #4cd38a); }
.co-code { display: grid; gap: 6px; }
.co-code-form { display: flex; gap: 8px; }
.co-code-form input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px; text-transform: uppercase;
}
.co-code-form input::placeholder { text-transform: none; }
.co-code-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(38, 187, 255, .22); }
.co-code-form .btn { height: 42px; padding: 0 16px; font-size: 14px; }
.co-code-on {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px dashed rgba(38, 187, 255, .5); background: rgba(38, 187, 255, .1); font-size: 14px; font-weight: 700; letter-spacing: .04em;
}
.co-code-msg { margin: 0; font-size: 13px; line-height: 1.4; }
.co-code-msg.is-ok, .co-discount dd { color: #1f9d55; }
.co-code-msg.is-error { color: #ff6b6b; }
.co-totals { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.co-totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co-totals dt { color: var(--muted); }
.co-totals dd { margin: 0; text-align: right; }
.co-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 17px !important; font-weight: 600; }
.co-total dt { color: var(--text) !important; }
.co-total small { font-size: 12px; font-weight: 400; color: var(--muted); }
.co-summary .auth-secure { margin-top: 0; }
.co-links { display: flex; gap: 16px; font-size: 13px; }
.co-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.co-empty { display: grid; place-items: center; min-height: 50vh; }
.co-empty .empty { max-width: 420px; }

/* Confirmation */
.done-head { max-width: 680px; margin-bottom: 32px; }
.done-check { display: inline-grid; margin-bottom: 16px; color: #3ddc84; }
.done-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s var(--ease-out) forwards; }
.done-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .5s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-head .co-title { margin-bottom: 12px; }
.done-check.is-wait { color: var(--blue); }
/* SPEI / OXXO slip on the confirmation page */
.slip { display: grid; gap: 12px; justify-items: start; margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--surface); }
.slip-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.slip-ref span { font-size: 13px; color: var(--muted); }
.slip-ref strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: .04em; word-break: break-all; }
.slip-ref .btn { height: 36px; padding: 0 12px; gap: 6px; font-size: 13px; }
.slip .co-note { margin: 0; }
/* Card step: Mercado Pago's card form */
.mp-card { min-height: 280px; }
.mp-note { display: flex; align-items: flex-start; gap: 8px; }
.mp-note svg { flex: none; margin-top: 2px; color: var(--blue); }
.done-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.done-actions .btn { height: 54px; padding: 0 22px; gap: 8px; }
.done-actions .btn-outline { margin-top: 0; }
.done-fallback { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.done-warn { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 122, 124, .12); color: #ff9a9c; font-size: 14px; }
:root[data-theme="light"] .done-warn { color: #b3261e; }
.done-fallback a { color: var(--blue); }
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.next-steps li { display: flex; gap: 14px; }
.next-steps li > span { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); font-weight: 700; }
.next-steps li:first-child > span { background: var(--blue); color: #0b0b0f; }
.next-steps strong { display: block; margin-top: 4px; }
.next-steps p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.co-ship-to { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-soft); }
.order-id { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px !important; }

:root[data-theme="light"] .co-step, :root[data-theme="light"] .co-summary { background: #fff; }
:root[data-theme="light"] .pay-card { background: var(--bg); }
:root[data-theme="light"] .pay-card:has(input:checked) { background: rgba(38, 187, 255, .1); }

/* ───────── Drawer ───────── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); }
.drawer-frame { position: fixed; inset: 0; z-index: 61; overflow: hidden; pointer-events: none; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); pointer-events: auto;
  display: flex; flex-direction: column; background: var(--surface);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px 24px; }
.drawer-head { gap: 14px; }
.drawer-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.drawer-title { flex: 1; font-size: 17px !important; }
.drawer-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.drawer-panel.is-entering { animation: panel-in 300ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateX(10px); } }

/* Cart / wishlist tabs (ported from the Shopify drawer) */
.dtabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.dtab {
  position: relative; width: 44px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: none; color: var(--muted);
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.dtab:not([aria-selected="true"]):hover { color: var(--text); }
.dtab[aria-selected="true"] { background: var(--lootbox-blue); color: #fff; box-shadow: 0 3px 10px rgba(43, 101, 204, .4); }
.dtab--wish[aria-selected="true"] { background: var(--lootbox-red); box-shadow: 0 3px 10px rgba(207, 54, 56, .4); }
.dtab[aria-selected="true"] svg { fill: none; }
.dtab--wish[aria-selected="true"] svg { fill: currentColor; }
.dtab-n {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--lootbox-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
}
.dtab--wish .dtab-n { background: var(--lootbox-red); }
.dtab[aria-selected="true"] .dtab-n { background: #fff; color: var(--lootbox-blue); }
.dtab--wish[aria-selected="true"] .dtab-n { color: var(--lootbox-red); }
:root[data-theme="light"] .dtabs { background: var(--surface); }
:root[data-theme="light"] .dtab-n { box-shadow: 0 0 0 2px #fff; }
.drawer-items { flex: 1; overflow-y: auto; padding: 0 24px; }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-row .cover { border-radius: 6px; }
.cart-row-name { font-weight: 500; line-height: 1.3; }
.cart-row-cond { font-size: 13px; color: var(--muted); }
.cart-row-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; margin-top: 10px; border-radius: 8px; background: var(--surface-2); }
.stepper button { width: 32px; height: 32px; border: 0; background: none; font-size: 16px; }
.stepper span { min-width: 22px; text-align: center; font-size: 14px; }
/* Empty states: floating lootboxes from the GameCraft Shopify theme */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 0 40px; }
.empty-art {
  width: 200px; height: 200px; object-fit: contain;
  animation: gc-float 4s var(--ease-out) infinite; will-change: transform;
}
.empty h3 { margin: 20px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.empty p { margin: 0 0 22px; max-width: 26ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.empty-cta { max-width: 300px; height: 48px; color: #fff; }
.empty--cart .empty-cta { background: var(--lootbox-blue); }
.empty--cart .empty-cta:hover { background: #3a76de; }
.empty--wish .empty-cta { background: var(--lootbox-red); }
.empty--wish .empty-cta:hover { background: #e04446; }

@keyframes gc-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
/* Header button bounce when something lands in the cart or wishlist */
@keyframes gc-brinco {
  0% { transform: translateY(0) scale(1); }
  28% { transform: translateY(-8px) scale(1.14); }
  52% { transform: translateY(0) scale(.94); }
  72% { transform: translateY(-3px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
.gc-brinco { animation: gc-brinco 640ms var(--ease-out); }
/* Bookmark pop when a game is saved */
@keyframes gc-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.is-pop { animation: gc-pop 320ms cubic-bezier(.34, 1.56, .64, 1); }
.btn-glass[aria-pressed="true"] { color: var(--lootbox-red); }
.slide .btn-glass[aria-pressed="true"] { color: #ff5a5c; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.subtotal { display: flex; justify-content: space-between; font-size: 17px; margin-bottom: 6px; }
.drawer-note { margin: 0 0 16px; font-size: 13px; color: var(--muted); }

/* ───────── Toast ───────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-text);
  font-weight: 500; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ───────── Responsive ───────── */
@media (max-width: 1200px) {
  .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .row-track { grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 20px; }
}
@media (max-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-list { display: none; }
  .hero-dots { display: flex; justify-content: center; gap: 8px; }
  .hero-dots button { width: 28px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: var(--surface-3); }
  .hero-dots button { position: relative; overflow: hidden; }
  .hero-dots button.is-active { width: 44px; }
  .hero-dots button.is-active::before {
    content: ""; position: absolute; inset: 0; background: var(--text);
    transform: scaleX(0); transform-origin: left; animation: fill var(--hero-ms, 5000ms) linear forwards;
  }
  .row-track { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
  .browse-body { grid-template-columns: minmax(0, 1fr); }
  .filters-toggle { display: inline-flex; }
  .filters { position: static; order: -1; display: none; max-height: none; overflow: visible; margin-left: 0; padding: 16px; border-radius: var(--radius); background: var(--surface); }
  .filters.is-open { display: flex; }
  .filters label:hover { background: var(--surface-2); }
  .topnav { display: none; }
  .tabs .tab-compact { display: inline; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
  .subnav { gap: 28px; }
  .tabs { min-width: 0; gap: 28px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
  .pdp-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "gal" "side" "body"; }
  .pdp-side { grid-row: auto; margin-top: 24px; }
  .side-cover { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { position: relative; top: 0; order: -1; height: 300px; min-height: 0; }
  .auth-main { max-width: 560px; }
  .xc { inset: 0; }
  .xc-rig { width: 300px; --xc-gap: 30px; }
  .ah-caption { display: none; }
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .sec-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .co-grid { grid-template-columns: minmax(0, 1fr); }
  .co-summary { position: static; }
  .legal-wrap { grid-template-columns: minmax(0, 1fr); }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .legal-nav-title { width: 100%; margin-bottom: 2px; }
  .legal-nav a { background: var(--surface); }
  .legal-nav-contact { display: none; }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { gap: 8px; height: 64px; padding: 0 12px; }
  .brand-mark { width: 36px; }
  .brand { gap: 8px; }
  .brand-title { font-size: 21px; }
  .brand-tag { font-size: 8px; letter-spacing: .3em; }
  .topbar-actions { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
  .topbar-actions { margin-left: auto; flex: none; }
  .cart-btn span[data-i18n] { display: none; }
  .cart-btn { width: 40px; height: 40px; padding: 0; }
  .topbar .cart-count {
    position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
    font-size: 11px; box-shadow: 0 0 0 2px var(--bg);
  }
  .currency button { padding: 7px 9px; font-size: 12px; }
  .currency button[aria-pressed="false"] { display: none; }
  .subnav-wrap { top: 64px; }
  .subnav { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .search { width: 100%; }
  .tabs { gap: 22px; font-size: 15px; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .hero-stage { aspect-ratio: 4 / 5; max-height: none; }
  .slide-img { object-position: var(--focus, 50%) center; }
  .slide::after { background: linear-gradient(0deg, rgba(6,6,9,.95) 0%, rgba(6,6,9,.6) 50%, rgba(6,6,9,0) 80%); }
  .slide-content { width: auto; right: 20px; }
  .slide-desc { font-size: 14px; margin-bottom: 16px; }
  .btn-white { height: 50px; padding: 0 22px; }
  .btn-glass { width: 50px; height: 50px; }
  .promo-bar { height: 58px; margin-bottom: 16px; }
  .promo-msg { gap: 8px; padding: 0 14px; font-size: 13px; }
  .promo-msg svg { width: 18px; height: 18px; }
  .row { margin-top: 48px; }
  .row-arrows { display: none; }
  .row-track { grid-auto-columns: 42%; gap: 16px; }
  .promos { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .gal-thumb { flex-basis: 88px; }
  .acct-btn .acct-label { display: none; }
  .acct-btn, .acct-btn.is-signed { width: 40px; height: 40px; padding: 0; }
  .auth-hero { height: 240px; border-radius: 18px; }
  .xc-rig { width: 230px; --xc-gap: 22px; }
  .xc-axis { height: 220px; margin-top: -110px; }
  .auth-back { margin-bottom: 20px; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .steps { flex-direction: column; }
  .co-step, .co-summary { padding: 22px 18px; }
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .done-actions .btn { width: 100%; }
  .code-box { padding: 16px; }
  .acct-head { padding: 22px 20px; }
  .acct-card { padding: 22px 20px; }
  .gal-strip .arrow { display: none; }
  .pdp-title { font-size: 28px; }
  .pdp-sub { margin-bottom: 18px; }
  .pdp-short { margin-top: 26px; font-size: 16px; }
  .pdp-tags { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tag-col + .tag-col { padding-left: 0; border-left: 0; }
  .more-panel { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 22px 20px; }
  .lb-img { inset: 64px 12px; width: calc(100% - 24px); }
  .lb-nav { display: none; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  html { scroll-padding-top: 150px; }
}
/* Small phones: everything a little more compact so the controller logo still fits in the top bar. */
@media (max-width: 420px) {
  .topbar { gap: 6px; padding: 0 10px; }
  .brand { gap: 6px; }
  .brand-mark { width: 32px; }
  .brand-title { font-size: 20px; }
  .brand-tag { font-size: 7px; letter-spacing: .26em; }
  .topbar-actions { gap: 3px; }
  .icon-btn { width: 34px; height: 34px; }
  .cart-btn { width: 38px; height: 38px; }
  .currency button { padding: 6px 7px; font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .empty-art, .gc-brinco, .is-pop, .xc-rig, .xc-layer, .xc-axis, .co-locate svg { animation: none !important; }
  .xc-rig { transform: rotateX(52deg) rotateZ(-22deg); }
  .xc-layer { transform: translateZ(calc(var(--z) * 40px)); }
  .xc-axis { opacity: .8; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-item.is-active::before, .hero-dots button.is-active::before { animation-duration: var(--hero-ms, 5000ms) !important; }
}

/* ───────── Members popup ("club", app.js) ───────── */
/* Text on the left, the hero banners on the right as a slow push-in crossfade with a light sweep.
   On phones it becomes a bottom sheet with the film on top. Above the drawers, below the toast. */
.club { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 24px; --club-bg: var(--surface); }
:root[data-theme="light"] .club { --club-bg: #fff; }
.club[hidden] { display: none; }
body.club-open { overflow: hidden; }
.club-scrim { position: absolute; inset: 0; background: rgba(5, 5, 8, .62); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
.club-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  width: min(1000px, 100%); min-height: 560px; max-height: calc(100dvh - 48px);
  border-radius: 24px; overflow: hidden; background: var(--club-bg); color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .3s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.club.is-open .club-scrim { opacity: 1; }
.club.is-open .club-card { opacity: 1; transform: none; }
.club-body { display: flex; flex-direction: column; justify-content: center; padding: 52px 48px 44px; overflow-y: auto; }
.club-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; }
.club-brand img { width: 46px; height: auto; }
.club-pill {
  align-self: flex-start; margin: 0 0 18px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(38, 187, 255, .4); background: rgba(38, 187, 255, .12); color: var(--blue);
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.club-title { margin: 0 0 14px; font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; text-transform: uppercase; }
.club-text { margin: 0 0 24px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.club-text strong { color: var(--text); }
.club-form { display: grid; gap: 10px; }
.club-form input {
  height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
}
.club-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(38, 187, 255, .22); }
.club-form input[aria-invalid="true"] { border-color: #ff6b6b; }
.club-form .btn { height: 52px; gap: 8px; font-size: 16px; }
.club-error { margin: 0; font-size: 13px; color: #ff6b6b; }
.club-error:empty { display: none; }
.club-fine { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.club-fine a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.club-code {
  display: grid; justify-items: start; gap: 4px; margin: 0 0 22px; padding: 18px 20px; border-radius: 14px;
  border: 2px dashed rgba(38, 187, 255, .55); background: rgba(38, 187, 255, .08);
}
.club-code strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 30px; letter-spacing: .08em; }
.club-code span { font-size: 13px; color: var(--muted); }
.club-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.club-actions .btn { gap: 8px; }
.club-close {
  position: absolute; top: 16px; right: 16px; z-index: 4; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(10, 10, 14, .55); color: #fff; backdrop-filter: blur(8px); cursor: pointer;
}
.club-close:hover { background: rgba(10, 10, 14, .78); }
.club-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ───────── Report an error (footer → <dialog>) ───────── */
.report {
  width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
:root[data-theme="light"] .report { background: #fff; }
.report::backdrop { background: rgba(5, 5, 8, .62); backdrop-filter: blur(6px); }
.report-box { position: relative; padding: 32px 28px 28px; }
.report-title { margin: 0 48px 8px 0; font-size: 28px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-transform: uppercase; }
.report-sub { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.report .field input, .report .field textarea,
:root[data-theme="light"] .report .field input { background: var(--bg); }
.report .co-note { margin: 0; }
.report-close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); cursor: pointer;
}
.report-close:hover { background: var(--surface-3); }
.report-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.club-film { position: relative; overflow: hidden; margin-left: -1px; background: var(--club-bg); }
/* Product scene: a dark stage lit in Scarlet orange and Violet purple; the canvases draw the energy
   ribbons and embers behind (.scene-back) and in front (.scene-front) of the floating console. */
.club-scene {
  isolation: isolate; container-type: size;
  background:
    radial-gradient(55% 42% at 32% 36%, rgba(226, 74, 36, .42), transparent 70%),
    radial-gradient(52% 42% at 70% 64%, rgba(139, 61, 240, .4), transparent 70%),
    radial-gradient(95% 75% at 50% 50%, #1b1124 0%, #07050b 72%);
}
.club-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene-back { z-index: 0; }
.scene-prod { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; }
.scene-front { z-index: 2; }
.scene-float { --tilt: -9deg; position: relative; width: 86%; animation: scene-float 6s ease-in-out infinite; }
.scene-float img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .65)) drop-shadow(0 0 46px rgba(255, 110, 60, .2));
}
/* A highlight that sweeps across the console only (masked to its shape). */
.scene-sheen {
  position: absolute; inset: 0; mix-blend-mode: screen;
  -webkit-mask: url("images/club/console.webp") center / 100% 100% no-repeat; mask: url("images/club/console.webp") center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .42) 50%, transparent 62%) 160% 0 / 300% 100% no-repeat;
  animation: scene-sheen 6s ease-in-out infinite;
}
.scene-shadow {
  position: absolute; left: 50%; top: 50%; width: 60%; height: 34px; margin: 0 0 0 -30%;
  transform: translateY(var(--shadow-y, calc(22cqw + 30px))); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); animation: scene-shadow 6s ease-in-out infinite;
}
.club.is-open .scene-prod { animation: scene-in 1.2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes scene-in { from { opacity: 0; transform: translateY(26px) scale(.86); filter: blur(8px); } }
@keyframes scene-float { 0%, 100% { transform: translateY(-8px) rotate(calc(var(--tilt) - 1.6deg)); } 50% { transform: translateY(10px) rotate(calc(var(--tilt) + 1.2deg)); } }
@keyframes scene-shadow { 0%, 100% { scale: .84 1; opacity: .5; } 50% { scale: 1 1; opacity: .85; } }
@keyframes scene-sheen { 0%, 45% { background-position: 160% 0; } 75%, 100% { background-position: -60% 0; } }
/* Melts into the text side, darkens the bottom for the caption, and a soft vignette. */
.club-film::before {
  content: ""; position: absolute; inset: -1px; z-index: 3; pointer-events: none; /* -1px: no hairline at the seam */
  background:
    linear-gradient(90deg, var(--club-bg) 0, var(--club-bg) 6px, transparent 14%),
    linear-gradient(0deg, rgba(0, 0, 0, .6) 0%, transparent 34%),
    radial-gradient(120% 90% at 60% 50%, transparent 58%, rgba(0, 0, 0, .5) 100%);
}

@media (max-width: 760px) {
  .club { place-items: end center; padding: 0; }
  .club-card {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: 230px auto; width: 100%; min-height: 0; max-height: 94dvh;
    border-radius: 22px 22px 0 0; transform: translateY(40px);
  }
  .club-film { order: -1; }
  .scene-float { width: 58%; }
  .scene-shadow { --shadow-y: calc(15cqw + 16px); }
  .club-film::before {
    background:
      linear-gradient(0deg, var(--club-bg) 0%, transparent 42%),
      linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, transparent 40%);
  }
  .club-close { top: 12px; right: 12px; }
  .club-body { padding: 4px 22px 28px; justify-content: flex-start; }
  .club-brand { margin-bottom: 16px; }
  .club-brand img { width: 38px; }
  .club-pill { margin-bottom: 14px; }
  .club-title { font-size: 28px; }
  .club-text { margin-bottom: 18px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-float, .scene-shadow, .scene-sheen, .club.is-open .scene-prod { animation: none; }
  .scene-float { transform: rotate(var(--tilt)); }
}

/* ───────── Admin (#/admin, admin.js) ───────── */
body.is-admin .topbar, body.is-admin .subnav-wrap, body.is-admin .footer { display: none; }
main.admin { max-width: none; padding: 0; }
.admin { --adm-card: var(--surface); --adm-line: var(--line); }
:root[data-theme="light"] .admin { --adm-card: #fff; }
.adm { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
/* Dark sidebar in both themes, like Shopify's. */
.adm-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 18px 12px; background: #0e0e11; color: #fff; border-right: 1px solid rgba(255, 255, 255, .06);
}
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 6px; color: #fff; font-family: var(--display); font-size: 20px; line-height: 1; letter-spacing: .02em; }
.adm-brand small { display: block; margin-top: 3px; font-family: var(--ui); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: rgba(255, 255, 255, .76); font-size: 15px; }
.adm-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-link.is-active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.adm-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 7px; border-radius: 11px; background: var(--blue); color: #0b0b0f; font-size: 12px; font-weight: 700; }
.adm-user { display: grid; gap: 4px; margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: rgba(255, 255, 255, .7); overflow-wrap: anywhere; }
.adm-user .link-btn { justify-self: start; color: rgba(255, 255, 255, .55); }
.adm-user .link-btn:hover { color: #fff; }
.adm-main { min-width: 0; padding: 24px clamp(16px, 3vw, 36px) 48px; }
.adm-test { margin: 0 0 18px; padding: 10px 14px; border: 1px solid rgba(38, 187, 255, .28); border-radius: 10px; background: rgba(38, 187, 255, .08); font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.adm-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-subhead { margin-top: 30px; }
.adm-subhead h2 { margin: 0; font-size: 20px; }
.adm-subhead .btn { margin-left: auto; gap: 8px; }
.adm-head h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 650; }
.adm-live { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.adm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); animation: adm-ping 1.8s infinite; }
@keyframes adm-ping { 0% { box-shadow: 0 0 0 0 rgba(38, 187, 255, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(38, 187, 255, 0); } }
.adm-card { position: relative; padding: 18px; border: 1px solid var(--adm-line); border-radius: 14px; background: var(--adm-card); }
:root[data-theme="light"] .adm-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.adm-card h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.adm-card p { margin: 0 0 6px; }
.adm-note { margin: 12px 0 0 !important; font-size: 12px; color: var(--faint); }
.adm-warn { margin: 12px 0 0 !important; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 176, 32, .45); background: rgba(255, 176, 32, .12); font-size: 13px; line-height: 1.45; }
.adm-empty { margin: 0; font-size: 14px; color: var(--faint); }

/* Real-time view */
.adm-dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.adm-stats { display: grid; gap: 14px; }
.adm-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.adm-kpi h2 { margin-bottom: 8px; text-decoration: underline dotted var(--faint); text-underline-offset: 4px; cursor: help; }
.adm-kpi-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 10px; }
.adm-kpi { min-width: 0; }
.adm-kpi strong { font-size: 24px; font-weight: 650; }
.adm-spark { flex: none; color: var(--blue); }
.adm-funnel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-funnel div { display: grid; gap: 6px; padding: 2px 14px; border-left: 1px solid var(--adm-line); }
.adm-funnel div:first-child { padding-left: 0; border-left: 0; }
.adm-funnel span { font-size: 13px; color: var(--muted); }
.adm-funnel strong { font-size: 22px; font-weight: 650; }
.adm-bar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) auto; align-items: center; gap: 12px; padding: 5px 0; font-size: 14px; }
.adm-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.adm-bar-track { height: 12px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
:root[data-theme="light"] .adm-bar-track { background: #eef1f4; }
.adm-bar-track span { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.adm-bar b { min-width: 2ch; font-weight: 600; text-align: right; }
.adm-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.adm-top { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.adm-top li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.adm-top a { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.adm-top a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-top .cover { width: 30px; flex: none; border-radius: 4px; }
.adm-globe { position: sticky; top: 24px; padding: 12px 12px 16px; }
.adm-globe canvas { display: block; width: 100%; aspect-ratio: 1; cursor: grab; touch-action: none; }
.adm-globe canvas:active { cursor: grabbing; }
.adm-globe-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0 !important; font-size: 14px; color: var(--muted); }
.adm-globe-msg[hidden] { display: none; }
.adm-legend { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.adm-legend span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
:root[data-theme="light"] .adm-legend span { background: #f1f4f7; }
.adm-legend i { width: 10px; height: 10px; border-radius: 50%; }
.adm-legend .is-order { background: #8b5cf6; }
.adm-legend .is-visit { background: #1fb6ff; }

/* Orders */
.adm-orders { padding: 0; overflow: hidden; }
.adm-orders-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--adm-line); }
.adm-tabs { display: flex; gap: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.adm-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 0; border-radius: 8px; background: none; font-size: 14px; color: var(--muted); white-space: nowrap; }
.adm-tabs button span { font-size: 12px; color: var(--faint); }
.adm-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
:root[data-theme="light"] .adm-tabs button[aria-selected="true"] { background: #eef1f4; }
.adm-search, .adm-ship input, .adm-ship select {
  height: 38px; padding: 0 11px; border: 1px solid var(--adm-line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px;
}
.adm-search { width: min(280px, 100%); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { padding: 10px 14px; border-bottom: 1px solid var(--adm-line); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; }
.adm-table td { padding: 12px 14px; border-bottom: 1px solid var(--adm-line); }
.adm-table tbody tr { cursor: pointer; }
.adm-table tbody tr:hover { background: var(--surface-2); }
:root[data-theme="light"] .adm-table tbody tr:hover { background: #f6f7f9; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table .num { text-align: right; white-space: nowrap; }
.adm-table a { font-weight: 600; }
.adm-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.adm-badge.is-warn { background: rgba(255, 184, 0, .16); color: #ffcf5c; }
.adm-badge.is-ok { background: rgba(52, 211, 153, .16); color: #4ade9b; }
.adm-badge.is-info { background: rgba(255, 255, 255, .09); color: var(--text-soft); }
.adm-badge.is-blue { background: rgba(38, 187, 255, .16); color: var(--blue); }
.adm-badge.is-muted { background: var(--surface-2); color: var(--faint); }
:root[data-theme="light"] .adm-badge.is-warn { background: #fff1c2; color: #7a5200; }
:root[data-theme="light"] .adm-badge.is-ok { background: #d7f5e6; color: #0f6b45; }
:root[data-theme="light"] .adm-badge.is-info { background: #eceff3; color: #3d4450; }
:root[data-theme="light"] .adm-badge.is-blue { background: #dcf1fc; color: #0b6fa4; }
.adm-empty-lg { display: grid; justify-items: center; gap: 12px; padding: 56px 20px; text-align: center; }
.adm-empty-lg svg { width: 40px; height: 40px; opacity: .45; }
.adm-empty-lg p { max-width: 460px; margin: 0; }

/* Order detail */
.adm-order-head { gap: 8px 16px; }
.adm-back { width: 100%; font-size: 14px; color: var(--muted); }
.adm-back:hover { color: var(--text); }
.adm-order-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-muted { font-size: 14px; color: var(--muted); }
.adm-print { height: 38px; margin-left: auto; padding: 0 14px; gap: 8px; font-size: 14px; }
.adm-order { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-col { display: grid; gap: 16px; }
.adm-items { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.adm-items li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; font-size: 14px; }
.adm-items .cover { width: 40px; border-radius: 5px; }
.adm-items strong { display: block; font-weight: 600; }
.adm-items span { font-size: 13px; color: var(--muted); }
.adm-qty { color: var(--muted); }
.adm-totals { display: grid; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--adm-line); font-size: 14px; }
.adm-totals div { display: flex; justify-content: space-between; }
.adm-totals dd { margin: 0; }
.adm-totals .is-total { font-size: 16px; font-weight: 700; }
.adm-line { display: flex !important; align-items: center; justify-content: space-between; margin: 0 0 12px !important; font-size: 14px; }
.adm-line > span:first-child { color: var(--muted); }
.adm-ship { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-ship label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.adm-actions .btn, .adm-card > .btn { height: 38px; padding: 0 14px; gap: 8px; font-size: 14px; }
.adm-link-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--blue); }
.adm-card > .adm-link-inline { margin-top: 14px; }
.adm-history { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.adm-history li { display: flex; justify-content: space-between; gap: 12px; }
.adm-history time { font-size: 13px; color: var(--faint); white-space: nowrap; }
.adm-strong { font-weight: 600; }
.adm-address { margin-bottom: 12px; font-size: 15px; font-style: normal; line-height: 1.6; }
.adm-refs { font-size: 13px; color: var(--text-soft); }
.adm-refs span { display: block; font-size: 12px; color: var(--muted); }
.adm-danger { padding: 12px; text-align: center; }
.adm-danger .link-btn { font-size: 14px; color: #ff7a7c; }
:root[data-theme="light"] .adm-danger .link-btn { color: #c62828; }
.adm-gate { display: grid; justify-items: center; gap: 12px; max-width: 480px; margin: 12vh auto; padding: 32px 20px; text-align: center; }
.adm-gate h1 { margin: 0; font-family: var(--display); font-size: 34px; letter-spacing: .01em; text-transform: uppercase; }
.adm-gate p { margin: 0; color: var(--muted); }
.adm-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.adm-gate-back { font-size: 14px; color: var(--muted); }
.adm-gate-back:hover { color: var(--text); }
.adm-gate-note { max-width: 380px; font-size: 13px; color: var(--faint) !important; }
.adm-slip { display: none; }
/* Customer accounts (Supabase) */
.order-status { display: block; margin-top: 2px; font-size: 12px; color: var(--blue); }
.auth-resend { display: block; margin: -6px 0 14px; font-size: 14px; color: var(--blue); }
.sec-single { max-width: 440px; }
@media (max-width: 760px) {
  .adm-customers tr { grid-template-areas: "who count" "mail spent" "phone date"; }
  .adm-customers td[data-label="Cliente"] { grid-area: who; }
  .adm-customers td[data-label="Pedidos"] { grid-area: count; }
  .adm-customers td[data-label="Pedidos"]::after { content: " pedidos"; font-size: 12px; color: var(--muted); }
  .adm-customers td[data-label="Correo"] { grid-area: mail; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .adm-customers td[data-label="Compras"] { grid-area: spent; }
  .adm-customers td[data-label="Teléfono"] { grid-area: phone; font-size: 13px; color: var(--muted); }
  .adm-customers td[data-label="Registro"] { grid-area: date; font-size: 13px; color: var(--muted); text-align: right; }
}
.adm-error { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 122, 124, .12); font-size: 14px; color: #ff9a9c; }
:root[data-theme="light"] .adm-error { color: #b3261e; }
.adm-error[hidden] { display: none; }
.adm-loading { padding: 40px 0; text-align: center; }
.adm-login { display: grid; gap: 12px; width: min(340px, 100%); margin-top: 8px; text-align: left; }
.adm-login label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.adm-login input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.adm-login .adm-error { margin: 0; }
.adm-login .btn { height: 46px; }

@media (max-width: 1100px) {
  .adm-dash, .adm-order { grid-template-columns: minmax(0, 1fr); }
  .adm-globe { position: static; order: -1; justify-self: center; width: 100%; max-width: 480px; }
}
@media (max-width: 760px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-mid { flex-direction: column; align-items: flex-start; margin-top: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-copy { flex: none; }
  .footer-locale { padding-left: 0; border-left: 0; }
  .adm { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .adm-side { z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; border-right: 0; }
  .adm-side::-webkit-scrollbar { display: none; }
  .adm-brand { flex: none; padding: 0 4px 0 0; }
  .adm-brand span { display: none; }
  .adm-nav { flex-direction: row; }
  .adm-link { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  .adm-user { display: none; }
  .adm-main { padding: 16px 16px 40px; }
  .adm-pair { grid-template-columns: minmax(0, 1fr); }
  .adm-bar { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) auto; gap: 10px; }
  .adm-kpi strong { font-size: 20px; }
  .adm-funnel div { padding: 2px 10px; }
  .adm-funnel strong { font-size: 19px; }
  .adm-ship { grid-template-columns: minmax(0, 1fr); }
  .adm-search { width: 100%; }
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody { display: block; }
  .adm-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id total" "who date" "where where" "pay ship"; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--adm-line); }
  .adm-table td { padding: 0; border: 0; }
  .adm-table td[data-label="Pedido"] { grid-area: id; }
  .adm-table td[data-label="Total"] { grid-area: total; font-weight: 600; }
  .adm-table td[data-label="Cliente"] { grid-area: who; }
  .adm-table td[data-label="Fecha"] { grid-area: date; font-size: 13px; color: var(--muted); text-align: right; }
  .adm-table td[data-label="Destino"] { grid-area: where; font-size: 13px; color: var(--muted); }
  .adm-table td[data-label="Pago"] { grid-area: pay; }
  .adm-table td[data-label="Envío"] { grid-area: ship; text-align: right; }
  .adm-items li { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .adm-items .cover { width: 36px; }
  .adm-qty { display: none; }
  .adm-print { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .adm-dot { animation: none; } }

/* Printing an order: only the packing slip. */
@media print {
  body.is-admin { background: #fff !important; color: #000; }
  body.is-admin .adm-side, body.is-admin .adm-main > :not(.adm-slip), .toast, .drawer, .scrim { display: none !important; }
  body.is-admin .adm { display: block; min-height: 0; }
  body.is-admin .adm-main { padding: 0; }
  body.is-admin .adm-slip { display: block; color: #000; font: 13px/1.5 var(--ui); }
  .slip-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #000; }
  .slip-head strong { font-family: var(--display); font-size: 26px; }
  .slip-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; margin-bottom: 16px; }
  .adm-slip small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #555; }
  .slip-to p { padding: 12px; border: 2px solid #000; border-radius: 6px; font-size: 17px; font-weight: 600; line-height: 1.45; }
  .adm-slip table { width: 100%; margin: 12px 0; border-collapse: collapse; }
  .adm-slip th, .adm-slip td { padding: 6px 8px; border-bottom: 1px solid #ccc; text-align: left; }
  .slip-thanks { margin-top: 20px; font-weight: 600; text-align: center; }
}
