/* Brunine — Pitch Black theme (dark + light)
 *
 * Every colour comes from the tokens below. Dark is the base; light overrides the same tokens
 * either when the visitor picked it (html[data-theme="light"], set from a cookie) or when they
 * have no saved choice and their OS prefers light.
 */
:root {
  /* surfaces */
  --bg: #06060a;
  --bg-2: #0c0c13;
  --panel: rgba(20, 20, 30, .72);
  --panel-solid: #14141e;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --line-3: rgba(255, 255, 255, .22);
  --tint: rgba(255, 255, 255, .03);
  --tint-2: rgba(255, 255, 255, .05);
  --tint-3: rgba(255, 255, 255, .08);
  --field: rgba(0, 0, 0, .35);
  --field-2: rgba(0, 0, 0, .25);
  --topbar-bg: rgba(6, 6, 10, .7);
  --tabbar-bg: rgba(10, 10, 16, .88);
  --savebar-bg: rgba(20, 20, 30, .9);
  --footer-bg: linear-gradient(to bottom, rgba(12, 12, 19, .6), rgba(6, 6, 10, .95));
  /* text */
  --text: #f1f0f8;
  --text-2: #d6d4e4;
  --text-3: #b8b6c9;
  --muted: #9b99b0;
  --faint: #6f6d84;
  /* brand */
  --violet: #8b5cf6;
  --violet-deep: #6d28d9;
  --accent: #a78bfa;         /* icons, links */
  --accent-strong: #c4b5fd;  /* text on tinted violet */
  --accent-soft: rgba(139, 92, 246, .14);
  --accent-soft-2: rgba(139, 92, 246, .2);
  --yellow: #facc15;
  --wa: #25d366;
  /* semantic text */
  --warn: #facc15;
  --good: #34d399;
  --bad: #f87171;
  --info: #60a5fa;
  --orange: #fb923c;
  /* rarity badge text */
  --r-uncommon: #a7f3d0;
  --r-rare: #93c5fd;
  --r-double: #c4b5fd;
  --r-illus: #fbcfe8;
  --r-ultra: #fde68a;
  /* effects */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, .85);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, .9);
  --card-shadow: 0 30px 60px -15px rgba(0, 0, 0, .95);
  --ring: 0 0 0 3px rgba(139, 92, 246, .28);
  --glow-text: linear-gradient(95deg, #a78bfa 10%, #e9b8ff 45%, #facc15 90%);
  --body-glow:
    radial-gradient(1000px 600px at 90% -15%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(700px 500px at -15% 20%, rgba(250, 204, 21, .06), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(139, 92, 246, .1), transparent 60%);
  --dot: rgba(255, 255, 255, .06);
  --hero-bg:
    radial-gradient(600px 400px at 85% 50%, rgba(139, 92, 246, .28), transparent 65%),
    linear-gradient(135deg, rgba(28, 28, 42, .9), rgba(12, 12, 19, .9));
  --hero-grid: rgba(255, 255, 255, .03);
  --hero-sheen: rgba(255, 255, 255, .06);
  --show-sun: inline-block;  /* dark: offer the sun to switch to light */
  --show-moon: none;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 0px;
  color-scheme: dark;
}

/* Light tokens — kept identical in both blocks below. */
:root[data-theme="light"] {
  --bg: #f6f5fb;
  --bg-2: #eeecf6;
  --panel: rgba(255, 255, 255, .86);
  --panel-solid: #ffffff;
  --line: rgba(24, 18, 48, .08);
  --line-2: rgba(24, 18, 48, .14);
  --line-3: rgba(24, 18, 48, .24);
  --tint: rgba(24, 18, 48, .025);
  --tint-2: rgba(24, 18, 48, .045);
  --tint-3: rgba(24, 18, 48, .07);
  --field: #ffffff;
  --field-2: #faf9ff;
  --topbar-bg: rgba(255, 255, 255, .78);
  --tabbar-bg: rgba(255, 255, 255, .94);
  --savebar-bg: rgba(255, 255, 255, .95);
  --footer-bg: linear-gradient(to bottom, rgba(238, 236, 246, .6), #ebe8f5);
  --text: #16131f;
  --text-2: #37334a;
  --text-3: #4b4760;
  --muted: #6a6680;
  --faint: #9a96ad;
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: rgba(124, 58, 237, .1);
  --accent-soft-2: rgba(124, 58, 237, .16);
  --warn: #a16207;
  --good: #047857;
  --bad: #b91c1c;
  --info: #1d4ed8;
  --orange: #c2410c;
  --r-uncommon: #047857;
  --r-rare: #1d4ed8;
  --r-double: #6d28d9;
  --r-illus: #be185d;
  --r-ultra: #a16207;
  --shadow: 0 18px 40px -22px rgba(46, 26, 110, .28);
  --shadow-lg: 0 40px 80px -45px rgba(46, 26, 110, .35);
  --card-shadow: 0 26px 50px -18px rgba(30, 16, 70, .45);
  --ring: 0 0 0 3px rgba(124, 58, 237, .22);
  --glow-text: linear-gradient(95deg, #7c3aed 10%, #c026d3 50%, #d97706 90%);
  --body-glow:
    radial-gradient(1000px 600px at 90% -15%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(700px 500px at -15% 20%, rgba(250, 204, 21, .1), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(139, 92, 246, .08), transparent 60%);
  --dot: rgba(24, 18, 48, .07);
  --hero-bg:
    radial-gradient(600px 400px at 85% 50%, rgba(139, 92, 246, .2), transparent 65%),
    linear-gradient(135deg, #ffffff, #f1ecff);
  --hero-grid: rgba(24, 18, 48, .045);
  --hero-sheen: rgba(255, 255, 255, .9);
  --show-sun: none;
  --show-moon: inline-block;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f5fb;
    --bg-2: #eeecf6;
    --panel: rgba(255, 255, 255, .86);
    --panel-solid: #ffffff;
    --line: rgba(24, 18, 48, .08);
    --line-2: rgba(24, 18, 48, .14);
    --line-3: rgba(24, 18, 48, .24);
    --tint: rgba(24, 18, 48, .025);
    --tint-2: rgba(24, 18, 48, .045);
    --tint-3: rgba(24, 18, 48, .07);
    --field: #ffffff;
    --field-2: #faf9ff;
    --topbar-bg: rgba(255, 255, 255, .78);
    --tabbar-bg: rgba(255, 255, 255, .94);
    --savebar-bg: rgba(255, 255, 255, .95);
    --footer-bg: linear-gradient(to bottom, rgba(238, 236, 246, .6), #ebe8f5);
    --text: #16131f;
    --text-2: #37334a;
    --text-3: #4b4760;
    --muted: #6a6680;
    --faint: #9a96ad;
    --accent: #7c3aed;
    --accent-strong: #6d28d9;
    --accent-soft: rgba(124, 58, 237, .1);
    --accent-soft-2: rgba(124, 58, 237, .16);
    --warn: #a16207;
    --good: #047857;
    --bad: #b91c1c;
    --info: #1d4ed8;
    --orange: #c2410c;
    --r-uncommon: #047857;
    --r-rare: #1d4ed8;
    --r-double: #6d28d9;
    --r-illus: #be185d;
    --r-ultra: #a16207;
    --shadow: 0 18px 40px -22px rgba(46, 26, 110, .28);
    --shadow-lg: 0 40px 80px -45px rgba(46, 26, 110, .35);
    --card-shadow: 0 26px 50px -18px rgba(30, 16, 70, .45);
    --ring: 0 0 0 3px rgba(124, 58, 237, .22);
    --glow-text: linear-gradient(95deg, #7c3aed 10%, #c026d3 50%, #d97706 90%);
    --body-glow:
      radial-gradient(1000px 600px at 90% -15%, rgba(139, 92, 246, .16), transparent 60%),
      radial-gradient(700px 500px at -15% 20%, rgba(250, 204, 21, .1), transparent 60%),
      radial-gradient(900px 700px at 50% 120%, rgba(139, 92, 246, .08), transparent 60%);
    --dot: rgba(24, 18, 48, .07);
    --hero-bg:
      radial-gradient(600px 400px at 85% 50%, rgba(139, 92, 246, .2), transparent 65%),
      linear-gradient(135deg, #ffffff, #f1ecff);
    --hero-grid: rgba(24, 18, 48, .045);
    --hero-sheen: rgba(255, 255, 255, .9);
    --show-sun: none;
    --show-moon: inline-block;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; background-color: var(--bg); }
body {
  margin: 0;
  font: 15px/1.6 var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--body-glow);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabbar-h);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
          mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
img { max-width: 100%; height: auto; display: block; } /* height:auto keeps width/height attrs from stretching scaled images */
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 700; }
h2 > i, h1 > i { color: var(--accent); margin-right: 4px; }
h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
h3 i { color: var(--accent); margin-right: 4px; }
p { margin: 0 0 .75em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
.container--wide { max-width: 1440px; }
.main { flex: 1; padding-block: 28px 72px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.low { color: var(--orange); font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.stack { display: grid; gap: 16px; align-content: start; }
.link { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { color: var(--accent-strong); }
.link--danger { color: var(--bad); }
.link--danger:hover { color: var(--bad); text-decoration: underline; }
.page-title { margin-bottom: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .page-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; font-size: .9rem; color: var(--muted); }

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; flex: none; }
.brand__tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft-2); color: var(--accent-strong); }
.brand__mark {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #a78bfa, var(--yellow));
  -webkit-mask: radial-gradient(circle at 72% 30%, transparent 44%, #000 45%);
          mask: radial-gradient(circle at 72% 30%, transparent 44%, #000 45%);
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, .6));
}
.search { flex: 1; min-width: 0; position: relative; display: block; }
.search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px;
  background: var(--tint-2); border: 1px solid var(--line-2); border-radius: 999px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--violet); box-shadow: var(--ring); background: var(--field); }
.search--inline { flex: 0 1 280px; }
.search--inline input { height: 40px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav__link i { font-size: .95rem; }
.nav__link:hover { color: var(--text); background: var(--tint-2); }
.nav__link.is-active { color: var(--text); background: var(--accent-soft-2); }
.nav__link.is-active i { color: var(--accent); }
.nav__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: #111; font-size: .72rem; display: grid; place-items: center; }
.nav--admin { flex: 1; }
.theme-toggle {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--tint); color: var(--text); cursor: pointer; font-size: 1rem;
  transition: background .15s, border-color .15s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.theme-toggle:hover { background: var(--tint-3); border-color: var(--line-3); transform: rotate(-18deg); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.theme-toggle__sun { display: var(--show-sun); color: #fbbf24; }
.theme-toggle__moon { display: var(--show-moon); color: var(--accent); }
.cart-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff; font-size: 1.05rem;
  box-shadow: 0 8px 22px -8px rgba(139, 92, 246, .9); transition: transform .15s;
}
.cart-btn:hover { transform: translateY(-1px) scale(1.04); }
.cart-btn__count {
  position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: var(--yellow); color: #111; font-size: .72rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg);
}

/* ---- Buttons & forms -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff; font-weight: 700; font-size: .93rem;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, border-color .2s;
  box-shadow: 0 10px 24px -12px rgba(139, 92, 246, .95), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(139, 92, 246, 1), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .link:focus-visible, .chip:focus-visible, .nav__link:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--ghost { background: var(--tint); border-color: var(--line-2); box-shadow: none; color: var(--text); }
.btn--ghost:hover { background: var(--tint-3); border-color: var(--line-3); box-shadow: none; }
.btn--danger { color: var(--bad); }
.btn--danger:hover { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .08); }
.btn--wa { background: var(--wa); color: #06260f; box-shadow: 0 10px 24px -12px rgba(37, 211, 102, .9); }
.btn--wa:hover { background: #3ee07a; box-shadow: 0 14px 30px -12px rgba(37, 211, 102, 1); }
.btn--wa i { font-size: 1.15em; }
.btn--sm { height: 36px; padding: 0 14px; font-size: .86rem; gap: 7px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
.btn--add { background: var(--yellow); color: #16130a; box-shadow: 0 8px 20px -10px rgba(250, 204, 21, .8); font-size: 1rem; }
.btn--add:hover { background: #fde047; box-shadow: 0 12px 24px -10px rgba(250, 204, 21, 1); }

.field { display: grid; gap: 7px; }
.field > span:first-child { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field > span:first-child i { color: var(--accent); margin-right: 3px; }
.field input, .field select, .field textarea, .inp-num {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--field); border: 1px solid var(--line-2); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%239b99b0' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inp-num:focus { border-color: var(--violet); box-shadow: var(--ring); }
.field input:disabled { opacity: .55; }
.input-icon { position: relative; display: block; }
.input-icon > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 16px; text-align: center; }
.input-icon > input { padding-left: 42px; }
.input-icon:focus-within > i { color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.form-grid h2 { margin: 6px 0 0; }
.form-grid h2:first-of-type { margin-top: 0; }
.span-2 { grid-column: 1 / -1; }
.narrow { max-width: 680px; }

.select { position: relative; display: inline-block; }
.select > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: .8rem; pointer-events: none; }
.select select {
  height: 40px; padding: 0 36px 0 34px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .88rem;
  background: var(--tint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%239b99b0' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line-2); appearance: none; -webkit-appearance: none; outline: none;
}
.select select:focus { border-color: var(--violet); box-shadow: var(--ring); }
.select option, .field option { background: var(--panel-solid); color: var(--text); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--field); overflow: hidden; flex: none; }
.stepper button { width: 44px; height: 50px; border: 0; background: transparent; font-size: .85rem; cursor: pointer; color: var(--muted); transition: color .15s, background .15s; }
.stepper button:hover { color: var(--text); background: var(--tint-3); }
.stepper input { width: 46px; height: 50px; border: 0; background: transparent; text-align: center; outline: none; -moz-appearance: textfield; appearance: textfield; font-weight: 700; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button, .inp-num::-webkit-inner-spin-button, .inp-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--sm button { width: 32px; height: 36px; font-size: .72rem; }
.stepper--sm input { width: 40px; height: 36px; }

/* ---- Flash ------------------------------------------------------------ */
.flashes { display: grid; gap: 10px; padding-top: 18px; }
.flash {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel);
  backdrop-filter: blur(10px); animation: flash-in .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash__icon { font-size: 1.1rem; flex: none; }
.flash__msg { flex: 1; }
.flash--success { border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .1); }
.flash--success .flash__icon { color: var(--good); }
.flash--error { border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .1); }
.flash--error .flash__icon { color: var(--bad); }
.flash--info { border-color: rgba(139, 92, 246, .4); background: var(--accent-soft); }
.flash--info .flash__icon { color: var(--accent); }
.flash__x { background: none; border: 0; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); cursor: pointer; flex: none; }
.flash__x:hover { background: var(--tint-3); color: var(--text); }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: center;
  padding: 48px; margin-bottom: 18px; border-radius: 28px; overflow: hidden; position: relative; isolation: isolate;
  background: var(--hero-bg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--hero-sheen);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 50%, #000 10%, transparent 70%);
}
.hero::after {
  content: ""; position: absolute; right: -120px; bottom: -200px; width: 480px; height: 480px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(250, 204, 21, .14), transparent 65%); pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 12px; border-radius: 999px; background: rgba(250, 204, 21, .12); border: 1px solid rgba(234, 179, 8, .3);
  font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--warn);
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; letter-spacing: -.045em; line-height: 1.02; margin-bottom: 18px; }
.glow { background: var(--glow-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-3); font-size: 1.08rem; max-width: 44ch; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 22px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.hero__facts span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; background: var(--tint-2); border: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.hero__facts i { color: var(--accent); }
.hero__facts strong { color: var(--text); }
.hero__stage { position: relative; display: grid; justify-items: center; gap: 22px; }
.hero__hits { position: relative; width: 100%; height: 360px; perspective: 1200px; }
.hero__hit {
  position: absolute; width: 190px; top: 50%; left: 50%;
  border-radius: 12px; box-shadow: var(--card-shadow), 0 0 0 1px var(--line);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .3s;
}
.hero__hit img { border-radius: 12px; }
.hero__hit--0 { transform: translate(-50%, -50%) rotate(0deg); z-index: 4; box-shadow: var(--card-shadow), 0 0 70px -10px rgba(139, 92, 246, .7); }
.hero__hit--1 { transform: translate(-112%, -46%) rotate(-11deg) scale(.92); z-index: 3; }
.hero__hit--2 { transform: translate(12%, -46%) rotate(11deg) scale(.92); z-index: 3; }
.hero__hit--3 { transform: translate(-50%, -54%) rotate(0deg) scale(.8); z-index: 1; filter: brightness(.45); }
.hero__hits:hover .hero__hit--0 { transform: translate(-50%, -54%) scale(1.04); }
.hero__hits:hover .hero__hit--1 { transform: translate(-128%, -47%) rotate(-15deg) scale(.92); }
.hero__hits:hover .hero__hit--2 { transform: translate(28%, -47%) rotate(15deg) scale(.92); }
.hero__hit-price {
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px; background: var(--yellow); color: #111; font-weight: 800; font-size: .82rem; white-space: nowrap;
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .45);
}
.hero__caption { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.hero__caption i { color: #eab308; }

.perks-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 36px; }
.perk { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.perk > i { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 1.05rem; }
.perk strong { display: block; font-size: .93rem; }
.perk span { display: block; font-size: .8rem; color: var(--muted); }

/* ---- Toolbar ---------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.toolbar__controls, .toolbar--admin { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar--admin { justify-content: flex-start; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--tint); color: var(--muted); font-size: .86rem; font-weight: 600;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.is-active { color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-deep)); border-color: transparent; box-shadow: 0 8px 18px -10px rgba(139, 92, 246, 1); }
.chip__n { font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--tint-3); }
.chip.is-active .chip__n { background: rgba(255, 255, 255, .2); }
.results-bar { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.results-bar strong { color: var(--text); }

/* ---- Card grid -------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tile {
  --glow: rgba(139, 92, 246, 0);
  position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .25s;
}
.tile:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow), 0 0 40px -12px var(--glow); }
.tile--double-rare { --glow: rgba(139, 92, 246, .45); }
.tile--illustration-rare { --glow: rgba(244, 114, 182, .45); }
.tile--ultra-rare { --glow: rgba(250, 204, 21, .45); }
.tile--special-illustration-rare, .tile--mega-hyper-rare { --glow: rgba(250, 204, 21, .6); border-color: rgba(234, 179, 8, .3); }
.tile__img { display: block; padding: 12px 12px 0; position: relative; }
.tile__img img { border-radius: 9px; aspect-ratio: 245 / 342; object-fit: cover; width: 100%; background: var(--bg-2); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .tile__img img { transform: scale(1.025); }
.tile__img--holofoil::after, .tile__img--reverse_holofoil::after {
  content: ""; position: absolute; inset: 12px 12px 0; border-radius: 9px; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(167, 139, 250, .55) 45%, rgba(250, 204, 21, .45) 55%, transparent 70%);
  background-size: 250% 250%; transition: opacity .25s;
}
.tile:hover .tile__img--holofoil::after, .tile:hover .tile__img--reverse_holofoil::after { opacity: .65; animation: holo 1.6s ease infinite; }
@keyframes holo { 0% { background-position: 100% 100%; } 100% { background-position: 0 0; } }
.tile__body { padding: 12px 14px 14px; display: grid; gap: 5px; flex: 1; align-content: start; }
.tile__meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .78rem; }
.tile__no { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.tile__name { font-weight: 700; line-height: 1.3; font-size: .98rem; }
.tile__name:hover { color: var(--accent-strong); }
.tile__finish { display: flex; justify-content: space-between; gap: 6px; font-size: .8rem; color: var(--muted); }
.tile__finish i { color: var(--accent); font-size: .72rem; margin-right: 2px; }
.tile__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.price { font-family: var(--display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price--lg { font-size: 2.4rem; letter-spacing: -.04em; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; background: var(--tint-2); color: var(--muted); border: 1px solid var(--line-2); }
.badge i { font-size: .65rem; }
.badge--uncommon { color: var(--r-uncommon); }
.badge--rare { color: var(--r-rare); border-color: rgba(96, 165, 250, .4); }
.badge--double-rare { color: var(--r-double); border-color: rgba(139, 92, 246, .45); background: var(--accent-soft); }
.badge--illustration-rare { color: var(--r-illus); border-color: rgba(244, 114, 182, .45); background: rgba(244, 114, 182, .08); }
.badge--ultra-rare { color: var(--r-ultra); border-color: rgba(234, 179, 8, .45); background: rgba(250, 204, 21, .1); }
.badge--special-illustration-rare, .badge--mega-hyper-rare { color: #16130a; border-color: transparent; background: linear-gradient(90deg, #c4b5fd, var(--yellow)); }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 36px; }
.empty { text-align: center; padding: 64px 20px; max-width: 480px; margin: 0 auto; }
.empty--sm { padding: 28px 20px; }
.empty__icon {
  width: 76px; height: 76px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 24px; font-size: 1.9rem;
  color: var(--accent); background: linear-gradient(145deg, var(--accent-soft-2), var(--accent-soft)); border: 1px solid rgba(139, 92, 246, .3);
  box-shadow: 0 20px 40px -20px rgba(139, 92, 246, .7);
}
.empty--sm .empty__icon { width: 56px; height: 56px; font-size: 1.4rem; border-radius: 18px; margin-bottom: 12px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 8px; }
.empty-inline { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.empty-inline i { color: var(--accent); }

/* ---- Product page ----------------------------------------------------- */
.product { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 56px; align-items: start; }
.product__media { position: sticky; top: 92px; }
.product__img { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 20px; }
.product__img img { border-radius: 20px; box-shadow: var(--card-shadow), 0 0 90px -25px rgba(139, 92, 246, .6); }
.product__img.tile__img--holofoil::after, .product__img.tile__img--reverse_holofoil::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none; mix-blend-mode: color-dodge; opacity: .3;
  background: linear-gradient(115deg, transparent 30%, rgba(167, 139, 250, .55) 45%, rgba(250, 204, 21, .45) 55%, transparent 70%);
  background-size: 250% 250%; animation: holo 3s ease infinite;
}
.product__zoom {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px); color: #fff; opacity: 0; transition: opacity .2s;
}
.product__img:hover .product__zoom, .product__img:focus-visible .product__zoom { opacity: 1; }
.product__info h1 { margin: 14px 0 4px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.product__info > p i { color: var(--accent); }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.variant { display: grid; gap: 1px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--tint); min-width: 130px; transition: border-color .15s, background .15s; }
.variant span { font-weight: 600; }
.variant small { color: var(--muted); }
.variant:hover { border-color: var(--violet); }
.variant.is-active { border-color: var(--violet); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.variant.is-out { opacity: .5; }
.buybox { margin: 22px 0; padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-2); max-width: 520px; box-shadow: var(--shadow); }
.product__price { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.stock-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .84rem; font-weight: 700; background: rgba(52, 211, 153, .14); color: var(--good); }
.stock-pill.is-low { background: rgba(251, 146, 60, .15); color: var(--orange); }
.stock-pill.is-out { background: rgba(248, 113, 113, .13); color: var(--bad); }
.buy { display: flex; gap: 12px; margin-bottom: 8px; }
.buybox > p { margin: 10px 0 0; }
.perks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; max-width: 520px; }
.perks li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint); border: 1px solid var(--line); }
.perks li > i { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.perks strong { display: block; font-size: .92rem; }
.perks span { display: block; color: var(--muted); font-size: .84rem; }
/* The zoom overlay stays dark in both themes so the card art pops. */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .9); backdrop-filter: blur(8px); cursor: zoom-out; animation: flash-in .2s ease; }
.lightbox img { max-height: 92vh; width: auto; border-radius: 18px; }
.lightbox__x { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; font-size: 1.1rem; }

/* ---- Panels, cart, checkout ------------------------------------------ */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel__head h1, .panel__head h2 { margin-bottom: 0; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.summary { position: sticky; top: 92px; }
.summary dl { margin: 14px 0 18px; display: grid; gap: 10px; }
.summary dl div { display: flex; justify-content: space-between; }
.summary dt { color: var(--muted); }
.summary dt i { font-size: .85em; margin-right: 3px; }
.summary dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.summary__total { padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 1.2rem; font-weight: 800; }
.summary__total dt { color: var(--text); }
.summary__total dd { font-weight: 800; }
.summary .field, .summary .check { margin-bottom: 14px; }
.summary__note { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 0; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text-2); font-size: .85rem; }
.summary__note i { color: var(--accent); margin-top: 3px; }
dl.summary { position: static; margin: 18px 0 0; display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:first-of-type { padding-top: 0; }
.line__img img { border-radius: 7px; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .55); }
.line__info { display: grid; gap: 3px; justify-items: start; }
.line__name { font-weight: 700; }
.line__name:hover { color: var(--accent-strong); }
.line__total { font-weight: 800; min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.line__qty { color: var(--muted); font-weight: 700; }
.lines__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }
.mini-lines { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; max-height: 340px; overflow: auto; }
.mini-lines li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.mini-lines img { border-radius: 4px; }
.mini-lines__name { display: grid; line-height: 1.3; }
.mini-lines__name small { color: var(--muted); }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; padding: 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); cursor: pointer; background: var(--field-2); transition: border-color .15s, background .15s; }
.choice input { margin-top: 4px; accent-color: var(--violet); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--violet); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.choice.is-static { cursor: default; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .07); }
.choice__icon { color: var(--good); font-size: 1.2rem; margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: var(--accent-soft-2); color: var(--accent-strong); }
.steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.steps li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); }
.steps li.is-done { color: var(--good); border-color: rgba(52, 211, 153, .35); }
.steps li.is-active { color: var(--accent-strong); background: var(--accent-soft-2); border-color: rgba(139, 92, 246, .5); }

/* ---- Auth & account --------------------------------------------------- */
.auth { display: grid; place-items: center; padding: 28px 0; }
.auth__card { width: 100%; max-width: 440px; display: grid; gap: 16px; padding: 36px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--tint); }
.auth__card h1 { margin: 0; font-size: 1.8rem; }
.auth__card p { margin: 0; }
.auth__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-deep)); box-shadow: 0 14px 30px -12px rgba(139, 92, 246, 1); }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.account-head__who { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 1.3rem; color: #16130a; background: linear-gradient(135deg, #c4b5fd, var(--yellow)); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__link { display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: .92rem; margin-bottom: -1px; }
.tabs__link:hover { color: var(--text); }
.tabs__link.is-active { color: var(--text); border-color: var(--violet); }
.tabs__link.is-active i { color: var(--accent); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.address { display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.address__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.address.is-default { border-color: rgba(139, 92, 246, .5); }
.address__actions { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.order-list { display: grid; gap: 10px; }
.order-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 18px; align-items: center; transition: border-color .15s, transform .15s; }
.order-row > div { display: grid; }
.order-row:hover { border-color: var(--line-2); transform: translateX(2px); }
.order-row__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--pending { background: rgba(250, 204, 21, .15); color: var(--warn); }
.status--confirmed { background: rgba(96, 165, 250, .15); color: var(--info); }
.status--out_for_delivery { background: var(--accent-soft-2); color: var(--accent-strong); }
.status--delivered { background: rgba(52, 211, 153, .15); color: var(--good); }
.status--cancelled { background: rgba(248, 113, 113, .14); color: var(--bad); }
.paid-yes { color: var(--good); }

/* ---- Tables & admin --------------------------------------------------- */
.admin-view { flex: none; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--tint); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--tint); }
.inv__thumb img { border-radius: 5px; transition: opacity .15s; }
.inv__name strong, .inv__name span { display: block; }
.inv tr:not(.is-listed) .inv__name strong { color: var(--text-2); font-weight: 600; }
.inv tr:not(.is-listed) .inv__thumb img { opacity: .45; }
.inv tr.is-listed .inv__stock input { color: var(--good); }
.inv tr.is-dirty td { background: rgba(250, 204, 21, .08) !important; }
.inp-num { width: 100px; min-height: 36px; padding: 6px 10px; text-align: right; font-weight: 600; }
input.is-dirty { border-color: #eab308 !important; }
.stepper input.is-dirty { color: var(--warn) !important; }
.savebar {
  position: sticky; bottom: calc(var(--tabbar-h) + 12px); z-index: 30; margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 18px; border-radius: 999px; background: var(--savebar-bg); backdrop-filter: blur(14px); border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.has-changes .savebar { border-color: rgba(234, 179, 8, .65); box-shadow: var(--shadow), 0 0 30px -12px rgba(250, 204, 21, .5); }
.has-changes [data-dirty-count] { color: var(--warn); font-weight: 700; }
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.setup__item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); border: 1px dashed rgba(139, 92, 246, .5); background: var(--accent-soft); transition: background .15s, border-color .15s; }
.setup__item:hover { background: var(--accent-soft-2); border-color: var(--violet); }
.setup__item small { display: block; color: var(--muted); }
.setup__item > i { color: var(--muted); }
.setup__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff; font-size: 1.05rem; }
.setup__icon--wa { background: var(--wa); color: #06260f; font-size: 1.3rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { position: relative; display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .15s, transform .15s; }
.stat span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat strong { font-family: var(--display); font-size: 1.75rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__icon { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
a.stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.stat--warn .stat__icon { background: rgba(250, 204, 21, .15); color: var(--warn); }
.stat--warn strong { color: var(--warn); }
.stat--good .stat__icon { background: rgba(52, 211, 153, .14); color: var(--good); }
.split--2 { grid-template-columns: 1fr 1fr; }

/* ---- Invoice ---------------------------------------------------------- */
.invoice-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 auto 16px; flex-wrap: wrap; max-width: 920px; }
.invoice { background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; padding: 40px; max-width: 920px; margin: 0 auto; box-shadow: var(--shadow); }
.invoice__head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.invoice__head p i { color: var(--accent); }
.invoice__title { text-align: right; }
.invoice__title h1 { font-size: 2rem; margin: 0; text-transform: uppercase; letter-spacing: .14em; }
.invoice__title p { margin: 3px 0; }
.invoice__parties { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 26px; }
.invoice__parties > div { padding: 16px; border-radius: var(--radius-sm); background: var(--tint); border: 1px solid var(--line); }
.invoice__parties p { margin: 0; }
.invoice__table tfoot td { border-bottom: 0; padding-top: 7px; padding-bottom: 7px; }
.invoice__grand td { font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--line-2) !important; padding-top: 14px !important; }
.invoice__note { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--field-2); border: 1px solid var(--line); margin-top: 16px; }
.invoice__note i { color: var(--accent); }
.invoice__foot { margin-top: 26px; margin-bottom: 0; }

/* ---- Footer, tab bar & WhatsApp -------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--footer-bg); padding-block: 44px 20px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer p { color: var(--muted); font-size: .9rem; margin: 12px 0 14px; max-width: 38ch; }
.footer h3 { margin-bottom: 14px; }
.footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--text-2); font-size: .9rem; }
.footer__list i { width: 20px; color: var(--accent); }
.footer__legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: .78rem; }
.tabbar { display: none; }
.wa-fab {
  position: fixed; right: 22px; bottom: calc(var(--tabbar-h) + 22px); z-index: 50; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); color: #fff; font-size: 1.8rem; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .8);
  transition: transform .15s;
}
.wa-fab:hover { transform: scale(1.08) rotate(-4deg); }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1080px) {
  .perks-strip { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav--admin .nav__link span { display: none; }
  .nav--admin .nav__link { padding: 10px 12px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .hero__stage { order: -1; }
  .hero__hits { height: 280px; }
  .hero__hit { width: 150px; }
  .product { grid-template-columns: 1fr; gap: 28px; }
  .product__media { position: static; max-width: 380px; margin: 0 auto; width: 100%; }
  .checkout-layout, .split, .split--2 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .invoice__parties { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
  .container { padding-inline: 16px; }
  .topbar__inner { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-block: 10px; }
  .topbar .nav { display: none; }
  .brand { margin-right: auto; }
  .topbar .search { order: 3; flex-basis: 100%; }
  .topbar .search input { height: 42px; }
  .theme-toggle { width: 38px; height: 38px; }
  .admin-view span { display: none; }
  .admin-view { width: 38px; padding: 0; }
  .main { padding-block: 18px 40px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: var(--tabbar-bg); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line-2);
  }
  .tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: .68rem; font-weight: 600; }
  .tabbar a > i, .tabbar__icon { font-size: 1.15rem; }
  .tabbar__icon { position: relative; line-height: 1; }
  .tabbar__icon b { position: absolute; top: -7px; right: -12px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--yellow); color: #111; font-size: .64rem; display: grid; place-items: center; }
  .tabbar a.is-active { color: var(--text); }
  .tabbar a.is-active i { color: var(--accent); }
  .tabbar a.is-active::before { content: ""; position: absolute; top: 0; width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--violet); }
  .topbar .cart-btn { display: none; }
  .wa-fab { display: none; }
  .hero { padding: 24px 18px 26px; border-radius: 22px; }
  .hero h1 { font-size: 2.15rem; }
  .hero p { font-size: 1rem; }
  .hero__hits { height: 230px; }
  .hero__hit { width: 124px; }
  .hero__cta .btn { flex: 1; }
  .perks-strip { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 26px; }
  .perk { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .perk > i { width: 36px; height: 36px; font-size: .95rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile__img { padding: 8px 8px 0; }
  .tile__img--holofoil::after, .tile__img--reverse_holofoil::after { inset: 8px 8px 0; }
  .tile__body { padding: 10px; gap: 4px; }
  .tile__meta .tile__no { display: none; }
  .tile__name { font-size: .9rem; }
  .tile__finish { flex-direction: column; gap: 0; }
  .price { font-size: 1.02rem; }
  .btn--icon { width: 36px; height: 36px; border-radius: 10px; }
  .toolbar__controls { width: 100%; }
  .toolbar__controls .select { flex: 1; }
  .toolbar__controls select { width: 100%; }
  .toolbar--admin .search--inline { flex-basis: 100%; }
  .toolbar--admin .select { flex: 1 1 0; min-width: 0; }
  .toolbar--admin .select select { width: 100%; }
  .toolbar--admin > .btn { display: none; } /* selects auto-submit; search submits on Enter */
  .line { grid-template-columns: 56px 1fr; gap: 10px 12px; }
  .line__img { grid-row: span 3; }
  .line .stepper, .line__qty { grid-column: 2; justify-self: start; }
  .line__total { grid-column: 2; text-align: left; }
  .order-row { grid-template-columns: auto 1fr auto; gap: 10px 12px; }
  .order-row .status { grid-column: 2; justify-self: start; }
  .order-row > .fa-chevron-right { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .invoice { padding: 22px 18px; border-radius: 18px; }
  .invoice__title { text-align: left; }
  .row--end { justify-content: flex-start; }
  .invoice__parties { grid-template-columns: 1fr; }
  .buy { flex-direction: column; }
  .buy .stepper { align-self: stretch; justify-content: space-between; }
  .buybox { padding: 18px; }
  .price--lg { font-size: 2rem; }
  .stats { gap: 8px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 1.35rem; }
  .stat__icon { width: 30px; height: 30px; font-size: .8rem; right: 12px; top: 12px; }
  .footer { padding-block: 32px 16px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .account-head .page-title { font-size: 1.4rem; }
  .savebar { padding: 8px; border-radius: 999px; }
  .savebar > span { display: none; }
  .savebar .row { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .savebar .row .btn { flex: 1; height: 40px; padding: 0 12px; font-size: .85rem; }
  /* Inventory becomes stacked cards on phones. */
  .inv thead { display: none; }
  .inv, .inv tbody { display: block; }
  .inv tr { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; }
  .inv td { padding: 0; border: 0 !important; background: none !important; }
  .inv__thumb { grid-row: span 3; }
  .inv__name { grid-column: 2 / 4; }
  .inv__finish { grid-column: 2; font-size: .82rem; color: var(--muted); }
  .inv__rarity { grid-column: 3; justify-self: end; }
  .inv__market { display: none; }
  .inv__price { grid-column: 2; }
  .inv__stock { grid-column: 3; justify-self: end; }
  .inv tr.is-dirty { background: rgba(250, 204, 21, .08); }
  .inp-num { width: 100%; max-width: 120px; text-align: left; }
}

/* ---- Print (invoice) — always light ----------------------------------- */
@media print {
  :root, :root[data-theme] {
    --bg: #fff; --text: #111; --text-2: #333; --muted: #555; --faint: #777; --line: #ddd; --line-2: #bbb;
    --panel: #fff; --tint: transparent; --field-2: #f5f5f5; --accent: #555; --tabbar-h: 0px;
    --shadow: none; color-scheme: light;
  }
  body { background: #fff; color: #111; }
  body::before { display: none; }
  .topbar, .footer, .wa-fab, .flashes, .tabbar, .no-print { display: none !important; }
  .main { padding: 0; }
  .invoice { border: 0; padding: 0; max-width: none; box-shadow: none; }
  .status { border: 1px solid #999; background: none !important; color: #111 !important; }
  .brand__mark { filter: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
