/* Toploader design system.
   Layout: a collector's table. Soft grey trays hold the cards, the cards are
   the only colourful objects. Prices are plain bold figures.
   One typeface (Serotiva), neutral greys, one accent. */

@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 30%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 20%; }

:root {
  /* Neutrals: near-grey with a faint warm bias toward the accent yellow. */
  --bg: oklch(0.985 0.002 95);
  --surface: oklch(0.955 0.004 95);
  --surface-2: oklch(0.92 0.005 95);
  --line: oklch(0.885 0.005 95);
  --edge: transparent;
  --fg: oklch(0.2 0.006 95);
  --fg-muted: oklch(0.46 0.008 95);

  /* Actions are ink. The yellow accent marks watching: the stamp, the button, selection. */
  --primary: oklch(0.2 0.006 95);
  --primary-ink: oklch(0.985 0.002 95);
  --primary-hover: oklch(0.32 0.006 95);
  --accent: oklch(0.88 0.16 97);
  --accent-ink: oklch(0.2 0.006 95);
  --error: oklch(0.53 0.19 27);

  --holder-bg: oklch(0.995 0.001 95);
  --holder-line: oklch(0.85 0.005 95);
  --card-shadow: 0 14px 30px -16px oklch(0.2 0.01 95 / 0.4);

  --deck-bg: oklch(0.16 0.004 95);
  --scrim: oklch(0.15 0.005 95 / 0.5);
  --toast-bg: oklch(0.2 0.006 95);
  --toast-fg: oklch(0.985 0.002 95);

  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23323233' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --font: "Serotiva", "Albert Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale. Nothing below 14px outside the card art. */
  --t-display: clamp(52px, 8.5vw, 112px);
  --t-h1: clamp(42px, 6.2vw, 76px);
  --t-h2: clamp(30px, 3.6vw, 40px);
  --t-h3: 21px;
  --t-body: 17px;
  --t-2: 15px;
  --t-min: 14px;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --gut: clamp(20px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.165 0.004 95);
    --surface: oklch(0.21 0.005 95);
    --surface-2: oklch(0.26 0.006 95);
    --line: oklch(0.3 0.006 95);
    --edge: oklch(1 0 0 / 0.06);
    --fg: oklch(0.965 0.003 95);
    --fg-muted: oklch(0.72 0.007 95);
    --primary: oklch(0.965 0.003 95);
    --primary-ink: oklch(0.165 0.004 95);
    --primary-hover: oklch(0.85 0.004 95);
    --error: oklch(0.72 0.15 27);
    --holder-bg: oklch(0.24 0.005 95);
    --holder-line: oklch(0.36 0.006 95);
    --card-shadow: 0 14px 30px -16px oklch(0 0 0 / 0.7);
    --deck-bg: oklch(0.12 0.004 95);
    --scrim: oklch(0 0 0 / 0.6);
    --toast-bg: oklch(0.965 0.003 95);
    --toast-fg: oklch(0.165 0.004 95);
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F3F3F1' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.165 0.004 95);
  --surface: oklch(0.21 0.005 95);
  --surface-2: oklch(0.26 0.006 95);
  --line: oklch(0.3 0.006 95);
  --edge: oklch(1 0 0 / 0.06);
  --fg: oklch(0.965 0.003 95);
  --fg-muted: oklch(0.72 0.007 95);
  --primary: oklch(0.965 0.003 95);
  --primary-ink: oklch(0.165 0.004 95);
  --primary-hover: oklch(0.85 0.004 95);
  --error: oklch(0.72 0.15 27);
  --holder-bg: oklch(0.24 0.005 95);
  --holder-line: oklch(0.36 0.006 95);
  --card-shadow: 0 14px 30px -16px oklch(0 0 0 / 0.7);
  --deck-bg: oklch(0.12 0.004 95);
  --scrim: oklch(0 0 0 / 0.6);
  --toast-bg: oklch(0.965 0.003 95);
  --toast-fg: oklch(0.165 0.004 95);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F3F3F1' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
  scrollbar-width: thin;
  scrollbar-color: rgb(127 127 127 / .35) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(127 127 127 / .35); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgb(127 127 127 / .55); }
::-webkit-scrollbar-corner { background: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Hold the first paint until the typeface is in, so nothing jumps (max ~0.9s). */
html:not(.fonts-ready) body > :not(.toast) { opacity: 0; }
body > * { transition: opacity .2s ease; }
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 30;
  height: env(safe-area-inset-top, 0px); background: var(--bg);
}
::selection { background: var(--accent); color: var(--accent-ink); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: from-font; text-underline-offset: .18em; }
h1, h2, h3 {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 10px 14px; border-radius: var(--r-s); }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.muted { color: var(--fg-muted); }
.small { font-size: var(--t-2); }
.ic { width: 22px; height: 22px; flex: none; }
[aria-pressed="true"] .ic-heart { fill: currentColor; }

/* Prices are plain, bold ink figures. No chips or labels around them. */
.amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--fg); }
.amount-lg { display: block; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: var(--r-m);
  background: var(--surface-2); color: var(--fg);
  font-weight: 600; font-size: 16px; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  user-select: none;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(0.97); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: var(--t-2); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--line); }
  .btn-primary:hover, .btn[aria-pressed="true"]:hover { background: var(--primary-hover); }
}
.link {
  border: 0; background: none; padding: 10px 2px; min-height: 44px;
  color: var(--fg-muted); font-size: var(--t-2); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: .18em;
  cursor: pointer;
}

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r-m);
  background: var(--surface); cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--surface-2); } }
.count {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--primary); color: var(--primary-ink);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 22px; height: 28px; }
.brand-name { font-weight: 800; font-size: 23px; letter-spacing: -0.03em; }
.brand-who { font-size: var(--t-2); color: var(--fg-muted); }
.top-nav { display: flex; gap: 2px; margin-left: auto; }
.top-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 16px; color: var(--fg-muted);
}
.top-nav a[aria-current="page"] { color: var(--fg); background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .top-nav a:hover { color: var(--fg); } }
.top-nav .n { font-size: var(--t-min); font-variant-numeric: tabular-nums; color: var(--fg-muted); }
.nav-sell { margin-left: 8px; }
.head-actions { display: flex; gap: 8px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: none;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 -1px 0 var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
}
.tabbar a {
  position: relative; flex: 1;
  display: grid; justify-items: center; gap: 2px; padding: 6px 0;
  text-decoration: none; font-size: var(--t-min); font-weight: 600; color: var(--fg-muted);
}
.tabbar a[aria-current="page"] { color: var(--fg); }
.tabbar .count { top: 0; right: calc(50% - 26px); }

@media (max-width: 759px) {
  .top-nav, .brand-who { display: none; }
  .head-actions { margin-left: auto; }
  .site-head .wrap { height: 60px; }
  .tabbar { display: flex; }
  main { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Card holders (slab or toploader) ---------- */
.holder { container-type: inline-size; width: 100%; }
.h-in {
  position: relative;
  display: grid; gap: 3cqi; padding: 5cqi;
  background: var(--holder-bg);
  border: 1px solid var(--holder-line);
  border-radius: 4cqi;
  box-shadow: var(--card-shadow);
}
.top .h-in { border-radius: 3cqi; }
.slab .h-in::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, oklch(1 0 0 / .35), oklch(1 0 0 / 0) 28%);
}
.label {
  height: 15cqi; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 3cqi;
  padding: 0 3.5cqi; border-radius: 1.8cqi;
  background: oklch(0.99 0.002 95); color: oklch(0.2 0.006 95);
  font-size: 3.6cqi; line-height: 1.15;
  overflow: hidden;
}
.lab-co { font-weight: 800; font-size: 5.5cqi; letter-spacing: .02em; }
.lab-txt { display: grid; min-width: 0; }
.lab-txt b { font-weight: 700; font-size: 4.2cqi; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: oklch(0.46 0.008 95); }
.lab-grade { display: grid; justify-items: end; font-weight: 800; font-size: 8cqi; line-height: .9; }
.lab-grade small { font-weight: 600; font-size: 2.8cqi; text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
.lip { grid-template-columns: minmax(0, 1fr); background: transparent; border: 1px dashed var(--holder-line); color: var(--fg-muted); }
.lip .lab-txt span { color: inherit; }
.well { position: relative; aspect-ratio: 5 / 7; border-radius: 4.3cqi; overflow: hidden; }
.well svg { display: block; width: 100%; height: 100%; }
.well .scan { display: block; width: 100%; height: 100%; object-fit: cover; }
.cardsvg text { font-family: var(--font); }
.cardsvg .t-name { font-weight: 800; letter-spacing: -.01em; }
.cardsvg .t-big { font-weight: 800; letter-spacing: -.05em; }
.cardsvg .t-set { font-weight: 700; }
.cardsvg .t-sub, .cardsvg .t-foot { font-weight: 600; letter-spacing: .04em; }
.cardsvg .t-badge { font-weight: 800; }

/* Holo foil: a moving rainbow plus a glare that follows the pointer. */
.foil {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  mix-blend-mode: overlay; opacity: .75;
  background:
    radial-gradient(circle at var(--mx) var(--my), oklch(1 0 0 / .8), oklch(1 0 0 / 0) 42%),
    repeating-linear-gradient(115deg,
      oklch(0.7 0.2 30 / 0) 0%, oklch(0.7 0.2 30 / .5) 5%, oklch(0.9 0.15 160 / .55) 10%,
      oklch(0.75 0.12 200 / .45) 15%, oklch(0.55 0.2 300 / .5) 20%, oklch(0.7 0.2 30 / 0) 25%);
  background-size: 100% 100%, 260% 260%;
  background-position: 0 0, var(--mx) var(--my);
  animation: sheen 7s ease-in-out infinite alternate;
}
.live .foil { animation: none; }
@keyframes sheen {
  from { --mx: 10%; --my: 15%; }
  to   { --mx: 90%; --my: 85%; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center;
  padding-block: 64px 48px;
}
.hero h1 { font-size: var(--t-display); font-weight: 800; letter-spacing: -0.04em; line-height: .95; }
.hero .lede { margin-top: 22px; max-width: 30ch; font-size: clamp(19px, 2vw, 22px); line-height: 1.45; color: var(--fg-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-fan {
  position: relative; display: block; width: 100%; height: 500px;
  padding: 0; border: 0; border-radius: var(--r-l); background: var(--surface); cursor: pointer;
}
.hero-fan .holder {
  position: absolute; left: 50%; top: 47%;
  width: min(220px, 40%);
  translate: calc(-50% + var(--x)) calc(-50% + var(--y));
  rotate: var(--r);
  transition: translate .4s var(--ease), rotate .4s var(--ease);
  animation: deal .8s var(--ease) both;
}
.hero-fan .holder:nth-child(1) { --x: -56%; --y: 4%; --r: -9deg; z-index: 1; animation-delay: .1s; }
.hero-fan .holder:nth-child(2) { --x: 0%; --y: -3%; --r: 0deg; z-index: 3; animation-delay: .22s; }
.hero-fan .holder:nth-child(3) { --x: 56%; --y: 4%; --r: 9deg; z-index: 2; animation-delay: .34s; }
@media (hover: hover) and (pointer: fine) {
  .hero-fan:hover .holder:nth-child(1) { --x: -70%; --r: -14deg; }
  .hero-fan:hover .holder:nth-child(2) { --y: -7%; }
  .hero-fan:hover .holder:nth-child(3) { --x: 70%; --r: 14deg; }
}
.hero-fan-hint {
  position: absolute; left: 0; right: 0; bottom: 20px; text-align: center;
  font-size: var(--t-2); color: var(--fg-muted);
}
@keyframes deal { from { translate: -50% -45%; rotate: 0deg; } }

@media (max-width: 759px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 8px 32px; }
  .hero-fan { order: -1; height: 330px; }
  .hero-fan .holder { width: min(150px, 38%); }
  .hero .lede { margin-top: 14px; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 0; }
}

/* ---------- Sections ---------- */
.block { padding-block: 44px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 24px; }
.block-head h2 { font-size: var(--t-h2); }
.block-head a { color: var(--fg-muted); font-size: var(--t-2); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.page-head { padding-block: 48px 4px; display: grid; gap: 14px; }
.page-head h1 { font-size: var(--t-h1); font-weight: 800; letter-spacing: -0.035em; }
.page-head .lede { max-width: 48ch; font-size: clamp(18px, 2vw, 20px); color: var(--fg-muted); }
.page-head .hero-cta { margin-top: 8px; }
.page-head + .block { padding-top: 24px; }
@media (min-width: 760px) { .block { padding-block: 56px; } }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.toolbar .seg { margin: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.seg button {
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px;
  background: var(--surface); font-weight: 600; font-size: var(--t-2); cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
@media (hover: hover) and (pointer: fine) { .seg button:not([aria-pressed="true"]):hover { background: var(--surface-2); } }
.select {
  -webkit-appearance: none; appearance: none;
  min-height: 44px; padding: 0 44px 0 18px;
  border: 0; border-radius: var(--r-m);
  background: var(--surface) var(--chevron) no-repeat right 16px center / 12px 8px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}

/* ---------- Binders ---------- */
.binders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.binder {
  display: grid; grid-template-rows: auto 1fr;
  padding: 0; text-align: left; cursor: pointer; overflow: hidden;
  background: var(--surface); border: 0; border-radius: var(--r-l);
  transition: background-color .15s ease;
}
@media (hover: hover) and (pointer: fine) { .binder:hover { background: var(--surface-2); } }
.fan { position: relative; height: 220px; overflow: hidden; }
.fan .holder {
  position: absolute; left: 50%; top: 28px; width: 112px;
  translate: calc(-50% + var(--x)) var(--y);
  rotate: var(--r);
  transition: translate .3s var(--ease), rotate .3s var(--ease);
}
.fan .holder:nth-child(1) { --x: -60%; --y: 6px; --r: -9deg; z-index: 1; }
.fan .holder:nth-child(2) { --x: 0%; --y: -6px; --r: 0deg; z-index: 3; }
.fan .holder:nth-child(3) { --x: 60%; --y: 6px; --r: 9deg; z-index: 2; }
.fan[data-n="1"] .holder:nth-child(1) { --x: 0%; --r: -3deg; }
.fan[data-n="2"] .holder:nth-child(1) { --x: -30%; }
.fan[data-n="2"] .holder:nth-child(2) { --x: 30%; --r: 6deg; }
@media (hover: hover) and (pointer: fine) {
  .binder:hover .fan .holder:nth-child(1) { --x: -78%; --r: -14deg; }
  .binder:hover .fan .holder:nth-child(2) { --y: -14px; }
  .binder:hover .fan .holder:nth-child(3) { --x: 78%; --r: 14deg; }
  .binder:hover .fan[data-n="1"] .holder:nth-child(1) { --x: 0%; --r: 2deg; }
}
.binder-meta { display: grid; gap: 4px; align-content: start; padding: 4px 22px 22px; }
.binder-meta h3 { font-size: var(--t-h3); margin-bottom: 2px; }
.binder-meta .muted { font-size: var(--t-2); }

/* ---------- Card tiles (shop, auctions, watchlist, home) ---------- */
.figs { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 10px; }
.figs .v { white-space: nowrap; }
.k { display: block; font-size: var(--t-2); color: var(--fg-muted); margin-bottom: 2px; }
.v { font-weight: 700; font-variant-numeric: tabular-nums; }
.v.soon, .soon { font-weight: 700; color: var(--fg); }
.bump { animation: bump .6s var(--ease); display: inline-block; }
@keyframes bump { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }
.leading { color: var(--fg); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 32px 18px; }
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; } }
.tile {
  display: grid; gap: 14px; align-content: start; min-width: 0;
  padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
  border-radius: var(--r-l);
}
.tile-art {
  display: grid; place-items: center; padding: 22px 15%;
  background: var(--surface); border-radius: var(--r-l);
  transition: background-color .15s ease;
}
.tile-art .holder { transition: translate .3s var(--ease), rotate .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile-art { background: var(--surface-2); }
  .tile:hover .tile-art .holder { translate: 0 -6px; rotate: -2deg; }
}
.tile-body { display: grid; gap: 2px; min-width: 0; padding-inline: 2px; }
.tile-name, .tile-meta, .tile-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.tile-meta { font-size: var(--t-2); color: var(--fg-muted); }
.tile-price { margin-top: 8px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-status { font-size: var(--t-min); color: var(--fg-muted); }
.tile.is-sold { opacity: .6; }

.empty { padding: 56px 24px; border-radius: var(--r-l); background: var(--surface); text-align: center; display: grid; gap: 16px; justify-items: center; }
.empty p { max-width: 40ch; color: var(--fg-muted); }

.site-foot { margin-top: 40px; }
.site-foot .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: var(--t-min); color: var(--fg-muted); box-shadow: 0 -1px 0 var(--line); }

/* ---------- Deck (full-screen swipe viewer) ---------- */
.deck {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(16px, env(safe-area-inset-left, 0px));
  background: var(--deck-bg); color: oklch(0.97 0.003 95);
  --fg: oklch(0.97 0.003 95); --bg: var(--deck-bg); --fg-muted: oklch(0.74 0.006 95);
  --surface: oklch(1 0 0 / .08); --surface-2: oklch(1 0 0 / .14); --line: oklch(1 0 0 / .14);
  --primary: oklch(0.97 0.003 95); --primary-ink: oklch(0.16 0.004 95); --primary-hover: oklch(0.86 0.004 95);
  --holder-bg: oklch(0.24 0.005 95); --holder-line: oklch(1 0 0 / .26);
  --card-shadow: 0 28px 50px -18px oklch(0 0 0 / .75);
  overscroll-behavior: contain;
  animation: fade .2s ease;
}
.deck[hidden] { display: none; }
.deck-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; width: 100%; max-width: 560px; margin: 0 auto; }
.deck-titles { text-align: center; display: grid; gap: 0; min-width: 0; }
.deck-titles h2 { font-size: 20px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-titles p { font-size: var(--t-min); font-variant-numeric: tabular-nums; }
.deck-stage {
  --cw: min(78vw, 340px, calc((100dvh - 350px) / 1.62));
  flex: 1; min-height: 0;
  display: grid; place-items: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.deck-card {
  grid-area: 1 / 1;
  position: relative; width: var(--cw);
  perspective: 1400px;
  transform: translateY(calc((var(--k) - var(--p, 0)) * 13px)) scale(calc(1 - (var(--k) - var(--p, 0)) * .05));
  transition: transform .28s var(--ease-out), opacity .28s var(--ease-out);
  will-change: transform;
}
.deck-card.is-top { cursor: grab; }
.deck-card[data-k="3"] { opacity: 0; }
.deck-card.dragging, .is-dragging .deck-card { transition: none; }
.deck-card.dragging { cursor: grabbing; }
.flip { position: relative; transform-style: preserve-3d; transition: transform .45s var(--ease-out); }
.deck-card.flipped .flip { transform: rotateY(180deg); }
.face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back {
  position: absolute; inset: 0; transform: rotateY(180deg);
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px; overflow: auto;
  background: oklch(0.23 0.005 95); border-radius: 14px;
  color: oklch(0.97 0.003 95);
}
.face.back h3 { font-size: 26px; }
.face.back .muted { font-size: var(--t-2); }
.face.back dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 8px 0 0; font-size: var(--t-2); }
.face.back dt { color: var(--fg-muted); }
.face.back dd { margin: 0; font-weight: 600; }
.face.back .note { font-size: var(--t-2); color: var(--fg-muted); margin-top: auto; }
.face.back .btn { align-self: flex-start; }
.stamp {
  position: absolute; left: 50%; top: 24%; z-index: 4;
  translate: -50% 0; rotate: -8deg;
  padding: 6px 18px 8px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 28px; letter-spacing: -0.02em;
  opacity: 0; pointer-events: none;
}
.burst { grid-area: 1 / 1; z-index: 30; width: 104px; height: 104px; color: var(--accent); pointer-events: none; animation: burst .7s var(--ease-out) forwards; }
.burst svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes burst {
  0% { transform: scale(.6); opacity: 0; }
  30% { transform: scale(1.1); opacity: 1; }
  100% { transform: translateY(-80px) scale(.9); opacity: 0; }
}
.deck-foot { display: grid; gap: 12px; width: 100%; max-width: 460px; margin: 0 auto; }
.deck-info { text-align: center; display: grid; gap: 2px; min-height: 64px; align-content: start; }
.deck-info h3 { font-size: 23px; }
.deck-info p { font-size: var(--t-2); color: var(--fg-muted); }
.deck-hint { text-align: center; font-size: var(--t-min); color: var(--fg-muted); transition: opacity .3s; }
.deck-hint.gone { opacity: 0; }
.deck-controls { display: flex; justify-content: center; gap: 12px; }
.sq {
  width: 56px; height: 56px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 16px;
  background: var(--surface); color: var(--fg); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.sq:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .sq:hover { background: var(--surface-2); } }
.sq[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.deck .icon-btn { background: var(--surface); }
@media (max-height: 640px) { .deck-hint { display: none; } .deck-info { min-height: 0; } }

/* ---------- Sheet (card detail, cart, forms) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s ease; }
.sheet-panel {
  position: relative; width: 100%; max-width: 1000px;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 20px);
  overflow: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--fg);
  border-radius: 22px 22px 0 0;
  padding: 24px max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  animation: rise .28s var(--ease-out);
}
.sheet-bar { position: sticky; top: 0; z-index: 5; height: 0; display: flex; justify-content: flex-end; }
.sheet-close { margin: -6px -6px 0 0; }
@media (min-width: 760px) {
  .sheet { align-items: center; }
  .sheet-panel { width: calc(100% - 48px); border-radius: 22px; padding: 36px; max-height: calc(100dvh - 48px); }
  .sheet.is-drawer { justify-items: end; align-items: stretch; }
  .is-drawer .sheet-panel { width: 460px; max-height: none; height: 100%; border-radius: 0; animation: slide .28s var(--ease-out); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(32px); opacity: 0; } }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }

.detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.detail-art { position: sticky; top: 0; display: grid; gap: 14px; justify-items: center; perspective: 1000px; padding: 28px 20px 20px; border-radius: var(--r-l); background: var(--surface); }
.tilt { width: 100%; max-width: 280px; transition: transform .25s var(--ease); transform-style: preserve-3d; touch-action: pan-y; }
.detail-art .hint { font-size: var(--t-min); text-align: center; }
.detail-info { display: grid; gap: 8px; min-width: 0; }
.detail-info h2 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; padding-right: 52px; }
.detail-info > .muted { font-size: var(--t-2); }
.quote { margin-top: 10px; font-size: 19px; line-height: 1.45; max-width: 46ch; }
.buybox { display: grid; gap: 16px; margin-top: 18px; padding: 20px; border-radius: var(--r-l); background: var(--surface); }
.buybox .figs { margin-top: 0; }
.buybox .figs .v { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.bb-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bb-actions .btn-primary { flex: 1 1 200px; }
.bid-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.stepper { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; border-radius: var(--r-m); background: var(--bg); height: 52px; overflow: hidden; }
.stepper button { border: 0; background: transparent; font-size: 22px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { background: var(--surface-2); } }
.stepper output { display: grid; place-items: center; font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row input {
  flex: 1 1 160px; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); color: var(--fg);
  font-size: 16px; font-variant-numeric: tabular-nums;
}
.field-row input:focus { outline: none; border-color: var(--fg); }
.field-label { font-size: var(--t-2); font-weight: 600; }
.specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 28px; margin: 28px 0 0; font-size: 16px; }
.specs dt { color: var(--fg-muted); }
.specs dd { margin: 0; font-weight: 600; }
.spark { margin-top: 28px; display: grid; gap: 10px; }
.spark-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.spark-head .k { margin: 0; }
.spark svg { width: 100%; height: auto; display: block; }
.sp-area { fill: var(--surface); }
.sp-line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; }
.sp-dot { fill: var(--fg); }
.sp-grid { stroke: var(--line); stroke-width: 1; }
.spark-axis { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--t-min); color: var(--fg-muted); }
@media (max-width: 759px) {
  .detail { grid-template-columns: 1fr; gap: 20px; }
  .detail-art { position: static; padding: 24px 20px 16px; }
  .tilt { max-width: 200px; }
  .detail-info h2 { padding-right: 0; }
  .amount-lg { font-size: 28px; }
  .buybox .figs .v { font-size: 24px; }
}

.cart-title { font-size: 34px; margin-bottom: 6px; padding-right: 52px; }
.cart-list { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 16px; }
.cart-item { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.cart-item .holder .h-in { box-shadow: none; }
.ci-name { font-weight: 700; }
.ci-right { display: grid; justify-items: end; gap: 0; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-variant-numeric: tabular-nums; margin-bottom: 22px; padding: 18px; border-radius: var(--r-l); background: var(--surface); }
.sum .total { font-weight: 750; font-size: 19px; padding-top: 8px; }
.cart-empty { display: grid; gap: 16px; justify-items: start; margin-top: 14px; }

/* ---------- Seller desk ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.inv-thumb { width: 56px; padding: 0; border: 0; background: none; cursor: pointer; }
.inv-thumb .h-in, .listing-art .h-in { box-shadow: none; }
.inv-row {
  display: grid; grid-template-columns: 56px minmax(0, 2fr) 120px minmax(0, 2fr) minmax(0, auto);
  gap: 18px; align-items: center; padding: 14px 0; box-shadow: 0 1px 0 var(--line);
}
.inv-name { font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.inv-name .muted { font-weight: 500; font-size: var(--t-min); }
.inv-main .muted { font-size: var(--t-2); }
.inv-status { font-size: var(--t-2); font-weight: 600; }
.inv-status.is-auction { font-weight: 800; }
.inv-status.is-keep, .inv-status.is-sold { color: var(--fg-muted); font-weight: 500; }
.inv-price { font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.inv-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 759px) {
  .inv-row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "thumb main status" "thumb price price" "actions actions actions"; gap: 6px 14px; padding: 16px 0; }
  .inv-row .inv-thumb { grid-area: thumb; align-self: start; }
  .inv-main { grid-area: main; min-width: 0; }
  .inv-status { grid-area: status; justify-self: end; align-self: start; }
  .inv-price { grid-area: price; }
  .inv-actions { grid-area: actions; justify-content: flex-start; margin-top: 4px; }
  .inv-actions:empty { display: none; }
}
.offers-list { display: grid; gap: 12px; }
.offer-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px 18px; align-items: start; padding: 18px; border-radius: var(--r-l); background: var(--surface); }
.offer-main { display: grid; gap: 4px; min-width: 0; }
.offer-main .small { font-size: var(--t-2); }
.offer-line { font-size: 17px; }
.offer-amt { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.offer-note { margin-top: 4px; }
.offer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.offer-actions .btn { background: var(--bg); }
.offer-actions .btn-primary { background: var(--primary); }
.counter-form { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.counter-form .input { flex: 1 1 140px; max-width: 220px; }
@media (max-width: 759px) {
  .offer-row { grid-template-columns: 60px minmax(0, 1fr); }
  .offer-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .counter-form { grid-column: 1 / -1; }
}
.answered { margin-top: 18px; }
.answered summary { cursor: pointer; font-weight: 600; font-size: var(--t-2); color: var(--fg-muted); min-height: 44px; display: flex; align-items: center; }
.answered-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; box-shadow: 0 1px 0 var(--line); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.desk-note { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }

/* ---------- Forms (listing, add a card) ---------- */
.form { display: grid; gap: 22px; min-width: 0; }
.form-head { display: grid; gap: 6px; padding-right: 52px; }
.form-head h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.form-head .muted { font-size: var(--t-2); }
.fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs legend { padding: 0; margin-bottom: 10px; font-size: var(--t-2); font-weight: 600; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field > label, .field-label { font-size: var(--t-2); font-weight: 600; }
.input {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--bg); color: var(--fg); font-size: 16px; font-variant-numeric: tabular-nums;
  transition: border-color .15s ease;
}
.input::placeholder { color: var(--fg-muted); opacity: .8; }
.input:focus { border-color: var(--fg); outline: none; }
select.input { -webkit-appearance: none; appearance: none; padding-right: 44px; background: var(--bg) var(--chevron) no-repeat right 16px center / 12px 8px; cursor: pointer; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input[aria-invalid="true"] { border-color: var(--error); }
.hint { font-size: var(--t-min); color: var(--fg-muted); }
.hint .link { min-height: 0; padding: 0; font-size: inherit; color: var(--fg); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-fields { display: grid; gap: 18px; }
.error { color: var(--error); font-size: var(--t-2); font-weight: 600; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface); cursor: pointer; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s ease, background-color .15s ease; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { font-size: 16px; }
.opt span { font-size: var(--t-min); color: var(--fg-muted); }
@media (hover: hover) and (pointer: fine) { .opt:hover { background: var(--surface-2); } }
.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--fg); background: var(--bg); }
.opt:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 3px; }
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } }
.payout { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 18px; background: var(--surface); border-radius: var(--r-l); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.payout .total { font-weight: 750; font-size: 18px; padding-top: 6px; }
.radio-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-seg label, .swatches label { position: relative; }
.radio-seg input, .swatches input { position: absolute; opacity: 0; pointer-events: none; }
.radio-seg span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--surface); font-weight: 600; font-size: var(--t-2); cursor: pointer;
}
.radio-seg input:checked + span { background: var(--primary); color: var(--primary-ink); }
.radio-seg input:focus-visible + span, .swatches input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 3px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches span:not(.visually-hidden) { display: block; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--bg); border: 2px solid transparent; }
.swatches input:checked + span { border-color: var(--fg); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.checks label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.checks input { width: 20px; height: 20px; accent-color: var(--primary); }
.upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload label.btn { cursor: pointer; }
.upload:has(input:focus-visible) label.btn { outline: 2px solid var(--fg); outline-offset: 3px; }
.upload .small { font-size: var(--t-min); }

.listing, .add { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; align-items: start; }
.listing-art, .add-preview { position: sticky; top: 0; display: grid; gap: 12px; padding: 24px; border-radius: var(--r-l); background: var(--surface); }
.add-preview .small { font-size: var(--t-min); }
@media (max-width: 759px) {
  .listing, .add { grid-template-columns: 1fr; gap: 18px; }
  .listing-art { position: static; width: 150px; padding: 16px; }
  .add-preview { position: static; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 16px; padding: 16px; }
  .row2 { gap: 12px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 80;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  translate: -50% 12px; max-width: calc(100% - 40px); width: max-content;
  padding: 14px 18px; border-radius: 14px;
  background: var(--toast-bg); color: var(--toast-fg);
  font-size: var(--t-2); font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, translate .25s var(--ease-out);
}
.toast.show { opacity: 1; translate: -50% 0; }
@media (max-width: 759px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.deck-open .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .foil { animation: none; }
}

/* Fixed-width digit slots for live clocks (Serotiva has no tabular figures). */
.dg { display: inline-block; width: 0.6em; text-align: center; }

.price { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Dark mode: panels get a hairline edge instead of relying on shadows. */
.binder, .tile-art, .offer-row, .buybox, .empty, .payout, .sum,
.detail-art, .listing-art, .add-preview, .hero-fan, .icon-btn, .seg button:not([aria-pressed="true"]) {
  box-shadow: inset 0 0 0 1px var(--edge);
}
