/* ==========================================================================
   exqd — market data for vintage cards
   One design system for both sites (Yu-Gi-Oh on the main domain, Pokémon on
   pokemon.exqd.org). The idea: an auction-house ledger crossed with a
   grading-slab label. Warm paper and ink, an editorial serif for headings,
   monospaced tabular figures for every number a collector compares, and one
   accent per game, set on <html data-game="…"> by base.html.

   Sections: 1 tokens · 2 base · 3 header/nav · 4 page head & stats ·
   5 toolbar (filters) · 6 tables & cards · 7 badges (slab, set, chips) ·
   8 pop bars · 9 pages (landing, paywall, login, hall of fame, share) ·
   10 admin/quarantine leftovers · 11 responsive
   ========================================================================== */

/* 1 — tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light dark;
  --paper: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --sunken: #f1f1f3;
  --rule: #e8e8ec;
  --rule-strong: #d6d6dc;
  --ink: #111114;
  --ink-2: #3a3a42;
  --muted: #6b6b76;
  --faint: #a0a0aa;

  --pos: #23744a;
  --pos-bg: #e3f1e8;
  --neg: #b03a2e;
  --neg-bg: #f8e5e1;
  --warn: #9a6a00;
  --warn-bg: #f7edd3;

  /* per-game accent (see the end of this file) - the only thing that tells
     the two sites apart; everything else is shared and deliberately quiet */
  --accent: #a3742c;
  --accent-ink: #7d5720;
  --accent-soft: #f6eedf;
  --accent-on: #ffffff;
  --accent-glow: rgba(163, 116, 44, 0.16);

  /* one family everywhere; figures use Inter's tabular numerals rather than
     a monospace, which keeps columns aligned without the "terminal" look */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-ui: var(--font-display);
  --font-mono: var(--font-display);

  --t-xs: 0.72rem;
  --t-sm: 0.8125rem;
  --t-base: 0.9rem;
  --t-md: 1rem;
  --t-lg: 1.2rem;
  --t-xl: 1.6rem;
  --t-2xl: 2rem;
  --t-3xl: 2.9rem;

  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2.25rem; --s7: 3.5rem;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 0 rgba(23, 21, 15, 0.04), 0 1px 2px rgba(23, 21, 15, 0.05);
  --shadow: 0 1px 2px rgba(23, 21, 15, 0.05), 0 8px 24px -8px rgba(23, 21, 15, 0.12);
  --shadow-lg: 0 2px 6px rgba(23, 21, 15, 0.06), 0 24px 48px -16px rgba(23, 21, 15, 0.22);
  --ring: 0 0 0 3px var(--accent-glow);
  --max: 1360px;
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0c0e;
    --surface: #141417;
    --surface-2: #18181c;
    --sunken: #0f0f12;
    --rule: #26262c;
    --rule-strong: #34343c;
    --ink: #f2f2f5;
    --ink-2: #d0d0d8;
    --muted: #9a9aa6;
    --faint: #66666f;
    --pos: #5fd394;
    --pos-bg: #12261b;
    --neg: #ff8a7d;
    --neg-bg: #2c1513;
    --warn: #e8c063;
    --warn-bg: #2a2310;
    --accent: #d6a65a;
    --accent-ink: #e6bd7b;
    --accent-soft: #2a2215;
    --accent-on: #141417;
    --accent-glow: rgba(214, 166, 90, 0.2);
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.45), 0 28px 60px -18px rgba(0, 0, 0, 0.75);
  }
}

/* 2 — base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--rule-strong) transparent; scrollbar-width: thin; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11";
}
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); }
h1 { font-size: var(--t-2xl); margin: 0 0 var(--s3); font-weight: 700; }
h2 { font-size: var(--t-lg); margin: var(--s6) 0 var(--s3); }
h3 { font-size: var(--t-md); margin: var(--s4) 0 var(--s2); }
.mono, code { font-family: var(--font-mono); font-size: 0.92em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.small { font-size: var(--t-sm); color: var(--muted); }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: var(--t-sm); max-width: 340px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
main { max-width: var(--max); margin: 0 auto; padding: var(--s5) var(--s5) var(--s7); }
.empty {
  color: var(--muted);
  padding: var(--s6) var(--s4);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r);
}

/* 3 — header / nav ------------------------------------------------------------ */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--rule);
}
header.site nav {
  display: flex;
  align-items: center;
  gap: var(--s4);
  max-width: var(--max);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--s5);
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  flex: none;
  padding-right: var(--s4);
  border-right: 1px solid var(--rule);
}
.brand:hover { color: var(--ink); }
.brand-name {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.06em;
}
.brand-dot {
  width: 0.24em; height: 0.24em;
  margin-left: 0.06em;
  border-radius: 1px;
  background: var(--accent);
}

/* game switch: two plain text tabs right after the wordmark */
.game-switch { display: inline-flex; gap: var(--s3); flex: none; }
.game-switch a {
  position: relative;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--faint);
  text-decoration: none;
  white-space: nowrap;
}
.game-switch a:hover { color: var(--ink); }
.game-switch a.active { color: var(--ink); }
.game-switch a.active::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 0.4rem;
  border-radius: 99px;
  background: var(--accent);
  vertical-align: 0.12em;
}

.nav-links { display: flex; gap: 2px; flex-wrap: wrap; margin-left: var(--s3); }
.nav-links a {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
  font-size: var(--t-sm);
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.nav-links a:hover { background: var(--sunken); color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem; bottom: -12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-links a.locked { color: var(--faint); }
.nav-links a.locked .lock { font-size: 0.7em; margin-left: 0.25rem; opacity: 0.8; }

.nav-right { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }
.nav-right > a { font-size: var(--t-sm); font-weight: 550; text-decoration: none; color: var(--ink-2); }
.nav-right > a:hover { color: var(--accent-ink); }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  font-size: var(--t-xs);
  font-weight: 700;
}
.lang-switch a { padding: 0.2rem 0.55rem; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--ink); color: var(--paper); }
.lang-switch a:not(.active):hover { background: var(--sunken); color: var(--ink); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  font-size: var(--t-xs);
  font-weight: 650;
  border: 1px solid var(--rule);
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.role-badge.role-admin { color: var(--pos); background: var(--pos-bg); border-color: transparent; }
.role-badge.role-manager { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.role-badge.role-viewer { color: var(--ink-2); }
.badge.role-member { color: var(--muted); }

/* burger: CSS-only (checkbox precedes .nav-links / .nav-right) */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nav-toggle, .burger { display: none; }
.burger {
  align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; margin-left: auto;
  border-radius: var(--r-sm); color: var(--ink); cursor: pointer;
}
.burger:hover { background: var(--sunken); }
.nav-toggle:focus-visible + .burger { box-shadow: var(--ring); }
.burger-bars, .burger-bars::before, .burger-bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.2s ease, background 0.2s ease;
}
.burger-bars { position: relative; }
.burger-bars::before, .burger-bars::after { content: ""; position: absolute; left: 0; }
.burger-bars::before { transform: translateY(-6px); }
.burger-bars::after { transform: translateY(6px); }
.nav-toggle:checked + .burger .burger-bars { background: transparent; }
.nav-toggle:checked + .burger .burger-bars::before { transform: rotate(45deg); }
.nav-toggle:checked + .burger .burger-bars::after { transform: rotate(-45deg); }

/* 4 — page head & stats --------------------------------------------------------- */
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s4) var(--s5);
  margin: var(--s4) 0 var(--s5);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { margin: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--s2);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--accent-ink);
}

.lede { margin: var(--s2) 0 0; color: var(--muted); font-size: var(--t-md); max-width: 62ch; }
.back-link { display: table; margin-bottom: var(--s3); font-size: var(--t-sm); color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent-ink); }

.stats { display: flex; gap: 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.stat { padding: var(--s3) var(--s4); min-width: 8.5rem; }
.stat + .stat { border-left: 1px solid var(--rule); }
.stat-label { font-size: var(--t-xs); color: var(--muted); font-weight: 550; }
.stat-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-lg); font-weight: 650; letter-spacing: -0.02em; margin-top: 2px; white-space: nowrap; }
.stat-value small { font-size: var(--t-xs); color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 0.25rem; }

.count, .result-line { color: var(--muted); font-size: var(--t-sm); margin: 0 0 var(--s3); }
.result-line strong { color: var(--ink); font-weight: 650; }

/* 5 — toolbar (filters) ---------------------------------------------------------- */
.toolbar, form.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s3);
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span, .field > label {
  font-size: var(--t-xs); font-weight: 550; color: var(--muted);
}
.field-grow { flex: 1 1 15rem; }
.toolbar input[type="text"], .toolbar input[type="search"], .toolbar input[type="number"], .toolbar input[type="date"], .toolbar select,
form.filters input[type="text"], form.filters input[type="date"], form.filters select {
  height: 2.3rem;
  padding: 0 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-sm);
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.toolbar select, form.filters select {
  appearance: none;
  padding-right: 1.9rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.toolbar input:focus, .toolbar select:focus, form.filters input:focus, form.filters select:focus {
  outline: none; border-color: var(--accent); background-color: var(--surface); box-shadow: var(--ring);
}
.toolbar input[type="number"] { width: 7.5rem; }
.btn, .toolbar button, form.filters button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 2.3rem; padding: 0 1.05rem;
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  background: var(--ink); color: var(--paper);
  font: inherit; font-size: var(--t-sm); font-weight: 650;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover, .toolbar button:hover, form.filters button:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); color: var(--paper); }
.btn:active, .toolbar button:active, form.filters button:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.btn-accent:hover { background: var(--accent-ink); color: var(--accent-on); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.toolbar a.reset, form.filters a { align-self: center; font-size: var(--t-sm); color: var(--muted); text-decoration: none; }
.toolbar a.reset:hover, form.filters a:hover { color: var(--accent-ink); text-decoration: underline; }
form.filters label { font-size: var(--t-sm); display: inline-flex; align-items: center; gap: 0.35rem; }
.toolbar-actions { display: flex; gap: var(--s2); align-items: center; margin-left: auto; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: calc(-1 * var(--s2)) 0 var(--s4); }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.18rem 0.35rem 0.18rem 0.65rem;
  border-radius: 999px; border: 1px solid var(--rule-strong);
  background: var(--surface); font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
  text-decoration: none;
}
.chip b { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.62rem; }
.chip .x { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 999px; background: var(--sunken); color: var(--muted); font-size: 0.8rem; line-height: 1; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip:hover .x { background: var(--accent); color: var(--accent-on); }

.segmented { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.segmented a { padding: 0 0.8rem; height: 2.3rem; display: inline-flex; align-items: center; font-size: var(--t-sm); font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented a + a { border-left: 1px solid var(--rule); }
.segmented a.active { background: var(--ink); color: var(--paper); }
.segmented a:not(.active):hover { background: var(--sunken); color: var(--ink); }

/* autocomplete (static/autocomplete.js) */
.autocomplete { position: relative; }
.autocomplete-list {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 240px; max-height: 300px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); z-index: 30;
}
.autocomplete-item { padding: 0.5rem 0.75rem; cursor: pointer; font-size: var(--t-sm); }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--accent-soft); color: var(--accent-ink); }

/* 6 — tables & cards --------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--s5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; }
th, td { padding: 0.7rem 0.85rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--rule); }
th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2);
  font-size: var(--t-xs); font-weight: 550; color: var(--muted);
  white-space: nowrap;
  border-bottom-color: var(--rule-strong);
}
th a { color: inherit; text-decoration: none; }
th a:hover, th a.active { color: var(--ink); }
th.r, td.r { text-align: right; }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr { transition: background 0.1s ease; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
tbody tr:last-child td { border-bottom: none; }
td .title-line { display: block; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; }
td a.title-line:hover { color: var(--accent-ink); text-decoration: underline; }
td .sub-line { display: block; margin-top: 2px; font-size: var(--t-xs); color: var(--muted); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--t-md); letter-spacing: -0.03em; white-space: nowrap; }
.price-sub { display: block; font-size: var(--t-xs); color: var(--muted); font-family: var(--font-ui); letter-spacing: 0; font-weight: 500; }
.date { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; }

.data-cards { display: none; list-style: none; margin: 0 0 var(--s5); padding: 0; }
.data-card {
  display: flex; flex-direction: column; gap: var(--s1);
  padding: var(--s3) var(--s4);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.data-card-head { display: flex; align-items: flex-start; gap: var(--s2); }
.data-card-name { flex: 1; min-width: 0; font-weight: 650; font-size: var(--t-md); line-height: 1.3; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.data-card-head .share-icon-btn { flex: none; margin-top: -0.15rem; }
.data-card-attrs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.4rem; font-size: var(--t-sm); color: var(--muted); }
.data-card-set { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.data-card-price { margin-top: var(--s1); font-family: var(--font-mono); font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.03em; }
.data-card-price .small, .data-card-price .pts130-tag { font-family: var(--font-ui); letter-spacing: 0; }
.data-card-price br + .pts130-tag { white-space: nowrap; display: inline-block; margin-top: 0.15rem; }
.data-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.data-card-internal { display: flex; flex-wrap: wrap; gap: 0.1rem var(--s3); }
.data-card-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); margin: var(--s1) 0 0; }
.data-card-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.data-card-stats > div { min-width: 0; }
.data-card-stats dt, .data-card-price-label { display: block; font-size: var(--t-xs); font-weight: 550; color: var(--muted); }
.data-card-stats dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.data-card-stats .wide { grid-column: 1 / -1; }
.data-card-tags { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s1); }
.data-card-foot { margin-top: var(--s1); padding-top: var(--s2); border-top: 1px dashed var(--rule); font-size: var(--t-xs); color: var(--muted); letter-spacing: 0.04em; }

.thumb { display: block; width: 84px; height: 56px; object-fit: cover; object-position: left top; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sunken); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.thumb:hover { transform: scale(1.8); transform-origin: left center; box-shadow: var(--shadow-lg); position: relative; z-index: 5; }
.thumb-wrap { display: flex; gap: var(--s2); }
.no-shot { display: inline-grid; place-items: center; width: 84px; height: 56px; border: 1px dashed var(--rule-strong); border-radius: var(--r-sm); color: var(--faint); font-size: var(--t-xs); text-align: center; padding: 0 var(--s1); background: var(--surface-2); }

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin: var(--s4) 0 var(--s5); font-size: var(--t-sm); }
.pagination a, .pagination-disabled {
  display: inline-flex; align-items: center; height: 2.2rem; padding: 0 0.9rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--surface);
  font-weight: 600; color: var(--ink); text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagination-disabled { color: var(--faint); background: transparent; border-style: dashed; }
.pagination-status { color: var(--muted); font-family: var(--font-mono); font-size: var(--t-xs); padding: 0 var(--s3); }

/* 7 — badges ------------------------------------------------------------------------ */
/* the slab: a grade rendered like the label on a graded case */
.slab {
  display: inline-flex; align-items: stretch;
  border: 1.5px solid var(--slab-c, var(--ink)); border-radius: 4px; overflow: hidden;
  font-family: var(--font-mono); line-height: 1; white-space: nowrap; vertical-align: middle;
  background: var(--surface);
}
.slab b { display: grid; place-items: center; padding: 0 0.35rem; background: var(--slab-c, var(--ink)); color: var(--surface); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; }
.slab i { display: grid; place-items: center; font-style: normal; padding: 0.22rem 0.42rem; font-size: 0.82rem; font-weight: 700; color: var(--slab-c, var(--ink)); letter-spacing: -0.03em; }
.slab { --slab-c: var(--ink-2); border-width: 1px; border-radius: 5px; }
.slab b { background: var(--sunken); color: var(--ink-2); font-weight: 650; letter-spacing: 0.02em; }
.slab i { font-weight: 650; }
.slab.g10 { --slab-c: var(--accent-ink); }
.slab.g10 b { background: var(--accent-soft); color: var(--accent-ink); }
.setcode {
  display: inline-block; padding: 0.1rem 0.4rem; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--sunken); color: var(--ink-2); border: 1px solid var(--rule);
  white-space: nowrap; text-decoration: none;
}
a.setcode:hover { border-color: var(--accent); color: var(--accent-ink); }
.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  border: 1px solid var(--rule); color: var(--ink-2); background: var(--surface); white-space: nowrap;
}
.pill.sealed { color: var(--ink-2); border-color: var(--rule-strong); background: var(--sunken); }
.pill.graded { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.pill.region-JP::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--ink-2); }
.pill.region-EN::before { content: ""; width: 6px; height: 6px; border-radius: 99px; border: 1.5px solid var(--ink-2); }
.pill.era { color: var(--muted); }
.tag, .edition-tag {
  display: inline-block; padding: 0.08rem 0.45rem; border-radius: 4px; margin: 0 0.2rem 0.2rem 0;
  font-size: var(--t-xs); font-weight: 650; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-2);
}
.edition-tag { margin-left: 0.3rem; color: var(--ink-2); border-color: var(--rule-strong); background: transparent; }
.tag.fragile { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 45%, transparent); background: transparent; }
.tag.presumed { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: transparent; }
.tag.read { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 45%, transparent); background: transparent; }
.diff-pos, .diff-neg { font-family: var(--font-mono); font-weight: 650; font-size: 0.85em; padding: 0.02rem 0.35rem; border-radius: 4px; }
.diff-pos { color: var(--pos); background: var(--pos-bg); }
.diff-neg { color: var(--neg); background: var(--neg-bg); }
.price-up { color: var(--pos); }
.price-down { color: var(--neg); }
.pts130-tag { white-space: nowrap; display: inline-block; padding: 0.06rem 0.4rem; border-radius: 4px; margin: 0.15rem 0.2rem 0.1rem 0; font-size: var(--t-xs); font-weight: 650; }
.pts130-confirmed { color: var(--pos); background: var(--pos-bg); }
.pts130-unconfirmed { color: var(--muted); background: var(--sunken); }

.card-name-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.card-name-row h1 { margin: 0; }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0;
  padding: 0.18rem 0.6rem; border-radius: 999px; border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--muted); font-size: var(--t-xs); font-weight: 650; text-decoration: none;
}
.share-btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.share-icon-btn { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; }
.share-icon-btn:hover { color: var(--accent-ink); background: var(--accent-soft); }

/* 8 — pop bars ----------------------------------------------------------------------- */
.bar { position: relative; height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; min-width: 70px; }
.bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.bar.muted > span { background: var(--rule-strong); }
.gem { display: flex; align-items: center; gap: var(--s2); }
.gem .num { min-width: 3.2rem; text-align: right; font-size: var(--t-sm); }
.histo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 160px; padding: var(--s4) var(--s4) 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r) var(--r) 0 0; }
.histo-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.histo-col span { display: block; background: var(--rule-strong); border-radius: 3px 3px 0 0; min-height: 2px; }
.histo-col.g9 span { background: color-mix(in srgb, var(--accent) 55%, var(--rule-strong)); }
.histo-col.g10 span { background: var(--accent); }
.histo-axis { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding: var(--s2) var(--s4); background: var(--surface-2); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r) var(--r); margin-bottom: var(--s5); }
.histo-axis div { text-align: center; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.histo-axis div b { display: block; color: var(--ink); font-weight: 600; font-size: 0.72rem; }

/* set grid (pop index) */
.set-group { margin-bottom: var(--s6); }
.set-group-head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.set-group-head h2 { margin: 0; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.set-tile {
  position: relative; display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3) var(--s4) var(--s4);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.set-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.set-tile-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.set-tile-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.set-tile-meta { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--muted); }
.set-tile-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); padding-top: var(--s2); border-top: 1px dashed var(--rule); }
.set-tile-figs dt { font-size: var(--t-xs); font-weight: 550; color: var(--muted); }
.set-tile-figs dd { margin: 0; font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 9 — pages ------------------------------------------------------------------------------ */
/* landing (pokemon home, login) */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s6);
  align-items: center;
  padding: var(--s6) 0 var(--s6);
}
.hero-kicker { font-size: var(--t-sm); font-weight: 600; color: var(--accent-ink); }
.hero-title { font-size: var(--t-3xl); line-height: 1.02; margin: var(--s3) 0 var(--s4); letter-spacing: -0.03em; }
.hero-title em { font-style: normal; color: var(--accent-ink); }
.hero-subtitle { color: var(--ink-2); font-size: var(--t-md); line-height: 1.65; max-width: 52ch; margin: 0 0 var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.hero-note { color: var(--muted); font-size: var(--t-xs); margin-top: var(--s4); }
.hero-panel {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: var(--s5); position: relative; overflow: hidden;
}
.hero-panel::before { content: none; }
.hero-panel .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); }
.hero-panel .stat-value { font-size: var(--t-xl); }
.hero-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: var(--s5) 0; }
.hero-feature { padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.hero-feature-title { font-family: var(--font-display); font-weight: 600; font-size: var(--t-md); margin-bottom: 0.3rem; }
.hero-feature-text { color: var(--muted); font-size: var(--t-sm); line-height: 1.55; }
.hero-mark { display: none; }
.discord-cta {
  display: inline-flex; align-items: center; gap: 0.55rem;
  height: 2.8rem; padding: 0 1.4rem; border-radius: var(--r-sm);
  background: #5865f2; color: #fff; text-decoration: none; font-weight: 650;
  box-shadow: 0 8px 22px -8px rgba(88, 101, 242, 0.7);
}
.discord-cta:hover { background: #4752c4; color: #fff; }
.coverage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin: var(--s5) 0; }
.coverage-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: var(--s4); }
.coverage-card h3 { margin: 0 0 var(--s1); font-size: var(--t-lg); }
.coverage-card .years { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); }
.coverage-list { list-style: none; padding: 0; margin: var(--s3) 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.coverage-list li { font-size: var(--t-xs); padding: 0.15rem 0.5rem; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--rule); color: var(--ink-2); }
.coverage-region { margin-top: var(--s3); font-size: var(--t-xs); font-weight: 550; color: var(--muted); }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: var(--s5) 0; }
.rule-card { padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--rule); }
.rule-card .rule-fig { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.rule-card p { margin: var(--s1) 0 0; color: var(--muted); font-size: var(--t-sm); }

/* paywall */
.paywall { display: flex; justify-content: center; padding: var(--s6) var(--s3); }
.paywall-card { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s6) var(--s5); position: relative; overflow: hidden; }
.paywall-card::before { content: none; }
.paywall-badge { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent-ink); font-size: var(--t-sm); font-weight: 600; }
.paywall-title { font-size: var(--t-xl); margin: var(--s3) 0 var(--s2); }
.paywall-lead { color: var(--muted); font-size: var(--t-md); margin: 0 0 var(--s5); }
.paywall-perks { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: var(--s2); }
.paywall-perks li { display: flex; gap: var(--s2); font-size: var(--t-sm); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--rule); }
.paywall-check { color: var(--pos); font-weight: 700; flex: none; }
.patreon-cta { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 2.8rem; padding: 0 1.4rem; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-on); font-weight: 650; text-decoration: none; box-shadow: var(--shadow); }
.patreon-cta:hover { background: var(--accent-ink); color: var(--accent-on); }
.paywall-alt { color: var(--muted); font-size: var(--t-sm); margin: var(--s4) 0 0; }
.paywall-free { color: var(--muted); font-size: var(--t-xs); margin: var(--s3) 0 0; }

/* hall of fame (feed) */
.hof-page { max-width: 720px; margin: 0 auto; }
form.filters.hof-bar { gap: var(--s2); align-items: center; }
.hof-count { flex: 1 1 auto; min-width: 0; margin: 0; line-height: 1.3; }
form.filters.hof-bar input[type="text"] { flex: 0 1 9rem; min-width: 5rem; }
.hof-signin { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r); padding: var(--s3); text-align: center; font-size: var(--t-sm); color: var(--ink-2); margin: 0 0 var(--s5); }
.feed { display: flex; flex-direction: column; gap: var(--s5); margin: 0 0 var(--s6); }
.feed-item { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.feed-item:hover { box-shadow: var(--shadow); }
.feed-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); }
.feed-avatar { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.feed-avatar-img { object-fit: cover; background: var(--sunken); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.feed-head-text { display: flex; flex-direction: column; min-width: 0; }
.feed-user { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-theme { font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-rank { flex: none; margin-left: auto; background: var(--ink); color: var(--paper); border-color: transparent; font-family: var(--font-mono); }
.feed-media { display: block; background: var(--sunken); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.feed-media img { display: block; width: 100%; max-height: 80vh; object-fit: contain; margin: 0 auto; }
.feed-media-missing { display: grid; place-items: center; min-height: 12rem; color: var(--muted); font-size: var(--t-sm); }
.feed-actions { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4) var(--s1); }
.feed-actions .share-icon-btn { margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; gap: var(--s1); background: none; border: none; padding: 0; cursor: pointer; color: var(--ink); line-height: 0; text-decoration: none; transition: transform 0.12s ease, color 0.12s ease; }
.icon-btn:hover { transform: scale(1.08); }
.icon-btn-static { cursor: default; color: var(--muted); }
.icon-btn-static:hover { transform: none; }
.icon-count { font-size: var(--t-sm); line-height: 1; font-family: var(--font-mono); }
.heart-btn:hover, .heart-btn.hearted { color: #e0245e; }
.feed-likes { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3em; margin: 0; padding: 0 var(--s4); font-size: var(--t-sm); color: var(--muted); }
.feed-likes strong { color: var(--ink); font-weight: 650; }
.liker-names { min-width: 0; }
.liker-stack { display: inline-flex; align-items: center; flex: none; }
.liker-stack > * + * { margin-left: -0.45rem; }
.liker-avatar { width: 1.3rem; height: 1.3rem; border-radius: 999px; object-fit: cover; background: var(--sunken); box-shadow: 0 0 0 2px var(--surface); }
.liker-avatar-letter { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.6rem; font-weight: 700; line-height: 1; }
.feed-caption { margin: var(--s1) 0 0; padding: 0 var(--s4); font-size: var(--t-sm); line-height: 1.45; }
.feed-caption-user { font-weight: 650; margin-right: 0.35em; }
.feed-theme-band { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: var(--s3) var(--s4) 0; }
.feed-theme-label { flex: none; font-size: var(--t-xs); font-weight: 550; color: var(--muted); }
.feed-theme-value { font-family: var(--font-display); font-size: var(--t-md); font-weight: 600; color: var(--accent-ink); overflow-wrap: anywhere; }
.feed-score { display: inline-flex; align-items: baseline; gap: 0.3em; margin-left: 0.4em; padding: 0.06rem 0.5rem; border-radius: 999px; background: var(--sunken); border: 1px solid var(--rule); font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 650; white-space: nowrap; }
.feed-score-pct { color: var(--muted); }
.feed-time { display: block; padding: var(--s2) var(--s4) var(--s3); font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.comments { list-style: none; margin: var(--s2) 0 0; padding: 0 var(--s4); }
.comment { --comment-line: 1.6rem; display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-sm); line-height: var(--comment-line); padding: 0.15rem 0; }
.comment-avatar { flex: none; width: var(--comment-line); height: var(--comment-line); border-radius: 999px; object-fit: cover; background: var(--sunken); }
.comment-avatar-letter { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 700; line-height: 1; }
.comment-text { min-width: 0; }
.comment-user { font-weight: 650; margin-right: 0.4em; }
.comment-del { margin-left: auto; opacity: 0; transition: opacity 0.12s ease; }
.comment:hover .comment-del, .comment-del:focus-within { opacity: 1; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: var(--t-md); line-height: 1; padding: 0 0.2rem; }
.link-btn:hover { color: var(--neg); }
.comment-form { display: flex; align-items: center; gap: var(--s3); padding: var(--s1) var(--s4) var(--s2); border-top: 1px solid var(--rule); margin-top: var(--s3); background: var(--surface-2); }
.comment-form input[type="text"] { flex: 1; min-width: 0; border: none; background: transparent; color: inherit; font: inherit; font-size: var(--t-sm); padding: var(--s3) 0; }
.comment-form input[type="text"]:focus { box-shadow: none; }
.comment-form button { flex: none; background: none; border: none; padding: var(--s2) 0; color: var(--accent-ink); font: inherit; font-size: var(--t-sm); font-weight: 650; cursor: pointer; }

/* flash */
.flash, .flash-ok, .flash-err { padding: 0.7rem 1rem; border-radius: var(--r-sm); margin-bottom: var(--s4); font-weight: 600; font-size: var(--t-sm); border: 1px solid transparent; }
.flash.ok, .flash-ok { background: var(--pos-bg); color: var(--pos); border-color: color-mix(in srgb, var(--pos) 30%, transparent); }
.flash.err, .flash-err { background: var(--neg-bg); color: var(--neg); border-color: color-mix(in srgb, var(--neg) 30%, transparent); }

/* share pages */
.share-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s5); }
.share-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s5); max-width: 440px; width: 100%; text-align: center; position: relative; overflow: hidden; }
.share-card::before { content: none; }
.share-card-wide { max-width: 720px; text-align: left; }
.share-image { width: 100%; border-radius: var(--r-sm); margin-bottom: var(--s4); border: 1px solid var(--rule); }
.share-price { font-family: var(--font-mono); font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.04em; color: var(--ink); margin: var(--s2) 0; }
.share-win .share-image { max-height: 60vh; object-fit: contain; }
.share-win-who { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin-top: var(--s4); }
.share-win-who h1 { margin: 0; }
.share-win-line { color: var(--muted); margin: var(--s2) 0 0; }
.share-win-more { margin: var(--s5) 0 0; }
.share-win-more a { display: inline-flex; align-items: center; gap: var(--s2); height: 2.4rem; padding: 0 1.2rem; border-radius: var(--r-sm); background: var(--ink); color: var(--paper); text-decoration: none; font-size: var(--t-sm); font-weight: 650; }
.share-attrs { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; margin: var(--s3) 0; }
.share-footer { color: var(--muted); margin-top: var(--s4); font-size: var(--t-sm); }

/* 10 — admin / quarantine ----------------------------------------------------------------- */
.candidates { font-size: var(--t-sm); }
.candidates strong { display: inline-block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-top: var(--s2); }
.candidates ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; }
.candidates li { margin-bottom: 0.2rem; }
.candidates li.would-accept { font-weight: 700; color: var(--pos); }
.inline-form { display: inline-flex; gap: 0.3rem; align-items: center; margin: 0.1rem 0; }
.action-box { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s3); padding: var(--s3); background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-sm); }
.action-box input[type="text"] { height: 2.1rem; padding: 0 0.6rem; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--surface); color: inherit; font: inherit; font-size: var(--t-sm); }
.action-box button { height: 2.1rem; padding: 0 0.9rem; cursor: pointer; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: inherit; font-weight: 650; font-size: var(--t-sm); }
button.mini { font: inherit; font-size: var(--t-xs); padding: 0.22rem 0.6rem; cursor: pointer; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: 650; }
button.mini:hover { border-color: var(--accent); color: var(--accent-ink); }
button.danger, .action-box button.danger { background: var(--neg-bg); border: 1px solid color-mix(in srgb, var(--neg) 40%, transparent); color: var(--neg); cursor: pointer; border-radius: var(--r-sm); padding: 0 0.9rem; height: 2.1rem; font: inherit; font-weight: 650; font-size: var(--t-sm); }

footer.site { max-width: var(--max); margin: 0 auto; padding: var(--s5); border-top: 1px solid var(--rule); color: var(--faint); font-size: var(--t-xs); display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
footer.site a { color: var(--muted); }

/* 11 — responsive --------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  header.site nav { row-gap: var(--s2); padding-top: var(--s2); padding-bottom: var(--s2); }
  .nav-toggle { display: block; }
  .burger { display: flex; }
  .nav-links, .nav-right { display: none; }
  .nav-toggle:checked ~ .nav-links, .nav-toggle:checked ~ .nav-right { display: flex; flex: 0 0 100%; margin-left: 0; }
  .nav-toggle:checked ~ .nav-links { flex-direction: column; gap: 2px; max-height: calc(100vh - 10rem); overflow-y: auto; }
  .nav-toggle:checked ~ .nav-links a { padding: 0.65rem 0.7rem; font-size: var(--t-base); }
  .nav-toggle:checked ~ .nav-links a.active { background: var(--accent-soft); }
  .nav-links a.active::after { display: none; }
  .nav-toggle:checked ~ .nav-right { flex-wrap: wrap; padding: var(--s3) 0 var(--s2); border-top: 1px solid var(--rule); }
}
@media (max-width: 900px) {
  .page-head { grid-template-columns: 1fr; }
  .stats { overflow-x: auto; }
  .hero { grid-template-columns: 1fr; padding-top: var(--s4); }
  .hero-features, .rules, .coverage { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --t-2xl: 1.75rem; --t-3xl: 2.3rem; }
  main { padding: var(--s3) var(--s3) var(--s6); }
  header.site nav { padding-left: var(--s3); padding-right: var(--s3); gap: var(--s2); }
  .brand { padding-right: var(--s3); }
  .stat { min-width: 7rem; padding: var(--s2) var(--s3); }
  .toolbar, form.filters { display: grid; grid-template-columns: 1fr 1fr; padding: var(--s3); }
  .toolbar > .field-grow, .toolbar > .toolbar-actions, form.filters > .autocomplete, form.filters > input[type="text"], form.filters > button, form.filters > a { grid-column: 1 / -1; }
  .toolbar input, .toolbar select, form.filters input[type="text"], form.filters input[type="date"], form.filters select, form.filters button, .toolbar button { width: 100%; }
  .toolbar-actions { margin-left: 0; justify-content: space-between; }
  form.filters .autocomplete { width: 100%; }
  form.filters .autocomplete-list { min-width: 100%; }
  form.filters.hof-bar { display: flex; }
  form.filters.hof-bar input[type="text"] { flex: 1 1 100%; }
  form.filters.hof-bar select { flex: 1 1 8rem; }
  form.filters.hof-bar button { flex: 1 1 100%; }
  th, td { padding: 0.5rem 0.6rem; }
  .table-scroll.has-cards { display: none; }
  .data-cards { display: flex; flex-direction: column; gap: var(--s3); }
  .share-icon-btn { width: 2.4rem; height: 2.4rem; }
  .feed-item { border-radius: var(--r); }
  .patreon-cta { width: 100%; }
  .set-grid { grid-template-columns: 1fr; }
  .histo { height: 120px; gap: 3px; padding: var(--s3) var(--s2) 0; }
  .histo-axis { gap: 3px; padding: var(--s2); }
}


/* tabular figures only where numbers are compared (applied globally they
   also widen hyphens: "Yu-Gi-Oh", dates) */
.num, .price, .stat-value, td.num, .data-card-price, .data-card-stats dd, .set-tile-figs dd,
.histo-axis, .pagination-status, .diff-pos, .diff-neg, .gem .num { font-variant-numeric: tabular-nums; }

/* 12 — game identity ----------------------------------------------------------
   The shared base stays quiet; each game is recognised by two things only:
   1. the top bar, filled with the game's colour (Yu-Gi-Oh!: Millennium black
      and gold, Pokémon: Poké Ball red with a thin black seam);
   2. a large, very faint watermark behind the page title (the Millennium Eye
      for Yu-Gi-Oh!, a Poké Ball for Pokémon).
   Plus the accent colour for links, the active tab and key figures. */
:root {
  /* Yu-Gi-Oh!: Millennium items - black and gold */
  --bar: #121110;
  --bar-2: #1d1b18;
  --bar-ink: #f5efe2;
  --bar-muted: #b7ad98;
  --bar-accent: #dcb14d;
  --bar-seam: #dcb14d;
  --accent: #9a741f;
  --accent-ink: #7a5b15;
  --accent-soft: #f6efdc;
  --accent-glow: rgba(154, 116, 31, 0.16);
  --gold: #c8962a;
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 110'%3E%3Cg fill='none' stroke='%23111' stroke-width='3.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 6H114L60 104Z'/%3E%3Cpath d='M30 34C42 20 78 20 90 34C78 48 42 48 30 34Z'/%3E%3Cpath d='M58 47L54 64M38 42Q34 52 42 56'/%3E%3C/g%3E%3Ccircle cx='60' cy='34' r='6.5' fill='%23111'/%3E%3C/svg%3E");
}
:root[data-game="pokemon"] {
  --bar: #d6362a;
  --bar-2: #c22c21;
  --bar-ink: #ffffff;
  --bar-muted: #ffd2cc;
  --bar-accent: #ffffff;
  --bar-seam: #111114;
  --accent: #c8432f;
  --accent-ink: #a5341f;
  --accent-soft: #fbece9;
  --accent-glow: rgba(200, 67, 47, 0.15);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23111' stroke-width='3.5'%3E%3Ccircle cx='50' cy='50' r='46'/%3E%3Cpath d='M4 50H35M65 50H96'/%3E%3Ccircle cx='50' cy='50' r='14'/%3E%3Ccircle cx='50' cy='50' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root { --bar: #0b0a09; --bar-2: #161412; --accent: #dcb14d; --accent-ink: #e8c46e; --accent-soft: #29220f; --accent-glow: rgba(220, 177, 77, 0.2); --gold: #dcb14d; }
  :root[data-game="pokemon"] { --bar: #b52a20; --bar-2: #a3241b; --accent: #f07a64; --accent-ink: #f59a88; --accent-soft: #2e1814; --accent-glow: rgba(240, 122, 100, 0.2); }
}

/* 1. the top bar */
header.site {
  background: linear-gradient(180deg, var(--bar-2), var(--bar));
  border-bottom: 0;
  box-shadow: 0 2px 0 var(--bar-seam);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  color: var(--bar-ink);
}
header.site .brand { color: var(--bar-ink); border-right-color: color-mix(in srgb, var(--bar-ink) 22%, transparent); }
header.site .brand-dot { background: var(--bar-accent); }
header.site .game-switch a { color: var(--bar-muted); }
header.site .game-switch a:hover, header.site .game-switch a.active { color: var(--bar-ink); }
header.site .game-switch a.active::before { background: var(--bar-accent); }
header.site .nav-links a { color: var(--bar-muted); }
header.site .nav-links a:hover { color: var(--bar-ink); background: color-mix(in srgb, var(--bar-ink) 10%, transparent); }
header.site .nav-links a.active { color: var(--bar-ink); }
header.site .nav-links a.active::after { background: var(--bar-accent); bottom: -13px; height: 3px; }
header.site .nav-links a.locked { color: color-mix(in srgb, var(--bar-muted) 65%, transparent); }
header.site .nav-right > a { color: var(--bar-ink); }
header.site .lang-switch { border-color: color-mix(in srgb, var(--bar-ink) 30%, transparent); }
header.site .lang-switch a { color: var(--bar-muted); }
header.site .lang-switch a.active { background: var(--bar-ink); color: var(--bar); }
header.site .badge { background: color-mix(in srgb, var(--bar-ink) 12%, transparent); color: var(--bar-ink); border-color: transparent; }
header.site .btn-ghost { background: transparent; color: var(--bar-ink); border-color: color-mix(in srgb, var(--bar-ink) 40%, transparent); }
header.site .btn-ghost:hover { background: color-mix(in srgb, var(--bar-ink) 12%, transparent); color: var(--bar-ink); }
header.site .burger { color: var(--bar-ink); }
header.site .burger:hover { background: color-mix(in srgb, var(--bar-ink) 12%, transparent); }
@media (max-width: 1180px) {
  .nav-toggle:checked ~ .nav-links a.active { background: color-mix(in srgb, var(--bar-ink) 14%, transparent); }
  .nav-toggle:checked ~ .nav-right { border-top-color: color-mix(in srgb, var(--bar-ink) 20%, transparent); }
}

/* 2. the watermark behind page titles */
.page-head, .hero { position: relative; isolation: isolate; }
.page-head { overflow: hidden; }  /* the hero keeps its panel shadow */
.page-head::before, .hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 28%;
  top: 50%;
  width: 230px; height: 230px;
  transform: translateY(-50%) rotate(-8deg);
  background: var(--mark) center / contain no-repeat;
  opacity: 0.045;
  pointer-events: none;
}
.hero::before { right: auto; left: 32%; width: 420px; height: 420px; opacity: 0.04; }
@media (prefers-color-scheme: dark) { .page-head::before, .hero::before { filter: invert(1); opacity: 0.06; } }
@media (max-width: 900px) { .page-head::before { right: -40px; width: 200px; height: 200px; } .hero::before { display: none; } }


/* 3. reminders on every page: the bar colour as a top edge on every panel,
   the game mark as a small icon (eyebrows, section titles, empty states,
   footer), primary buttons in the bar colour. */
.table-scroll, .toolbar, form.filters, .stats, .set-tile, .data-card, .hero-panel,
.paywall-card, .share-card, .coverage-card, .rule-card, .feed-item {
  border-top: 2px solid var(--accent);
}
th { background: color-mix(in srgb, var(--bar) 5%, var(--surface)); }
.btn, .toolbar button, form.filters button, .action-box button {
  background: var(--bar); border-color: var(--bar); color: var(--bar-ink);
}
.btn:hover, .toolbar button:hover, form.filters button:hover, .action-box button:hover {
  background: var(--bar-2); color: var(--bar-ink); box-shadow: 0 0 0 2px var(--accent-glow);
}
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); box-shadow: none; }
.segmented a.active, .lang-switch a.active { background: var(--bar); color: var(--bar-ink); }
.pagination a:hover { border-color: var(--bar); color: var(--ink); }
.set-tile:hover { border-color: var(--rule-strong); border-top-color: var(--bar); }

.eyebrow::before, main h2::before, footer.site > span:first-child::before, .empty::before {
  content: "";
  display: inline-block;
  flex: none;
  background: var(--accent);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.eyebrow::before { width: 14px; height: 14px; }
main h2 { display: flex; align-items: center; gap: 0.5rem; }
main h2::before { width: 16px; height: 16px; opacity: 0.85; }
.set-group-head h2::before { display: none; }
footer.site { border-top: 3px solid var(--bar); }
footer.site > span:first-child { display: inline-flex; align-items: center; gap: 0.45rem; }
footer.site > span:first-child::before { width: 13px; height: 13px; }
.empty::before { display: block; width: 44px; height: 44px; margin: 0 auto var(--s3); opacity: 0.35; }
@media (prefers-color-scheme: dark) {
  /* the bar colour is too close to a dark page: buttons and edges use the accent */
  .btn, .toolbar button, form.filters button, .action-box button,
  .segmented a.active, .lang-switch a.active { background: var(--accent); border-color: var(--accent); color: #141210; }
  .btn:hover, .toolbar button:hover, form.filters button:hover, .action-box button:hover { background: var(--accent-ink); color: #141210; }
  .btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--rule-strong); }
  footer.site { border-top-color: var(--accent); }
  th { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
}


/* 4. more brand reminders */
::selection { background: var(--accent-soft); color: var(--ink); }
html { scrollbar-color: color-mix(in srgb, var(--accent) 45%, var(--rule-strong)) transparent; }
/* the wordmark's dot becomes the game's glyph (pyramid-eye / Poké Ball) */
header.site .brand-dot {
  width: 0.62em; height: 0.62em; margin-left: 0.14em; align-self: center; border-radius: 0;
  background: var(--bar-accent);
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
}
/* page title signature: an accent segment on the rule under every page head */
.page-head { border-bottom-color: var(--rule); }
.page-head::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 2px; background: var(--accent);
}
/* rows: an accent edge on hover */
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* missing screenshot: the game glyph instead of a bare dashed box */
.no-shot { flex-direction: column; gap: 2px; font-size: 0.62rem; }
.no-shot::before {
  content: ""; width: 18px; height: 18px; background: var(--faint); opacity: 0.7;
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
}
/* current page and set codes pick up the accent */
.pagination-status { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 0.3rem 0.8rem; font-weight: 600; }
.setcode { border-left: 2px solid var(--accent); }
/* grade 10 slabs: the game's highlight colour */
.slab.g10 b { background: var(--accent); color: #fff; }
:root:not([data-game="pokemon"]) .slab.g10 b { background: var(--gold); color: #1b1206; }
.slab.g10 { --slab-c: var(--accent-ink); }
:root:not([data-game="pokemon"]) .slab.g10 { --slab-c: var(--gold); }
/* paywall / login badges carry the glyph */
.paywall-badge::before, .hero-kicker::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 0.4rem; vertical-align: -2px; background: var(--accent);
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
}


/* 5. sharing ------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--bar); color: var(--bar-ink); border-bottom: 2px solid var(--bar-accent);
  padding: 0.65rem 1.1rem; border-radius: var(--r); font-weight: 600; font-size: var(--t-sm);
  box-shadow: var(--shadow-lg); transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.share-body { min-height: 100vh; display: flex; flex-direction: column; }
.share-bar-label { color: var(--bar-muted); font-size: var(--t-sm); font-weight: 600; }
.share-main { max-width: 1040px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); width: 100%; display: grid; gap: var(--s5); }
.share-sale {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s6); align-items: center;
  background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--accent);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s6);
  position: relative; isolation: isolate; overflow: hidden;
}
.share-sale::before {
  content: ""; position: absolute; z-index: -1; right: -60px; bottom: -60px; width: 320px; height: 320px;
  background: var(--mark) center / contain no-repeat; opacity: 0.04; transform: rotate(-10deg);
}
.share-sale-media {
  display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--rule); overflow: hidden;
}
.share-sale-media img { width: 100%; height: 100%; object-fit: contain; }
.share-sale-glyph { width: 40%; aspect-ratio: 1; background: var(--rule-strong);
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.share-sale-body h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: var(--s2) 0 var(--s3); }
.share-sale-attrs { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.share-sale-line { color: var(--muted); margin: var(--s3) 0 0; }
.share-sale-price { display: flex; align-items: center; gap: var(--s4); margin: var(--s5) 0 var(--s2); }
.share-sale-price .slab i { font-size: 1.2rem; padding: 0.35rem 0.6rem; }
.share-sale-price .slab b { font-size: 0.72rem; padding: 0 0.55rem; }
.share-sale-amount { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.share-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.share-cta {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s5); flex-wrap: wrap;
  background: var(--bar); color: var(--bar-ink); border-radius: var(--r-lg); padding: var(--s5) var(--s6);
  border-top: 0; border-bottom: 3px solid var(--bar-accent);
}
.share-cta h2 { color: var(--bar-ink); margin: var(--s2) 0 var(--s1); }
.share-cta h2::before { display: none; }
.share-cta .muted { color: var(--bar-muted); margin: 0; }
.share-cta .eyebrow { color: var(--bar-accent); }
.share-cta .eyebrow::before { background: var(--bar-accent); }
.share-cta-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.share-cta .btn-ghost { background: transparent; color: var(--bar-ink); border-color: color-mix(in srgb, var(--bar-ink) 35%, transparent); }
.share-cta .btn-accent { background: var(--bar-accent); border-color: var(--bar-accent); color: var(--bar); }
@media (max-width: 760px) {
  .share-sale { grid-template-columns: 1fr; padding: var(--s4); gap: var(--s4); }
  .share-sale-media { aspect-ratio: 4 / 3; }
  .share-main { padding: var(--s4) var(--s3) var(--s6); }
  .share-cta { padding: var(--s4); }
  .share-bar-label { display: none; }
}

/* 6. landing ---------------------------------------------------------------------
   A sales page, not a dashboard: full-bleed bands in the game's colours (hero,
   pricing), a wide display face (Archivo, loaded by landing.html only) and
   monospaced figures. Mirrors the "exqd — landing" design canvas. */
/* Pokémon leads the page whatever the host, so its colours are fixed here
   rather than following <html data-game>; the Yu-Gi-Oh! band has its own. */
.land {
  --land-hero: #c42f24;
  --land-hero-ink: #ffffff;
  --land-hero-muted: #ffe3de;
  --land-cta: #ffcb05;
  --land-cta-ink: #17181c;
  --land-band: #17181c;
  --land-band-muted: #c9cad1;
  --land-on-light: #b3261c;
  --land-pk-tint: #fbf1ef;
  --land-display: "Archivo", var(--font-display);
  --land-mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  .land { --land-hero: #a8271e; --land-band: #0c0c0e; --land-on-light: #f59a88; --land-pk-tint: #1c1210; }
}
body:has(.land) { overflow-x: clip; }
.land { font-size: 1.0625rem; }
.land h2::before { display: none; }
.land h1, .land h2 { font-family: var(--land-display); font-weight: 850; font-stretch: 112%; letter-spacing: -0.025em; }
.land h2 { display: block; font-size: clamp(1.8rem, 3.2vw, 2.65rem); line-height: 1.07; margin: 0; }

/* full-bleed band: breaks out of <main>'s max-width, content stays aligned */
.land-band { margin-inline: calc(50% - 50vw); padding-inline: max(var(--s5), calc(50vw - var(--max) / 2 + var(--s5))); }

.land-label { font-family: var(--land-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.land-label.accent { color: var(--land-on-light); }
.land-check { flex: none; margin-top: 0.2em; color: var(--land-on-light); }

.land-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 56px; padding: 0 1.6rem;
  border-radius: 12px; font-weight: 800; font-size: 1.0625rem; text-decoration: none; border: 1px solid transparent; box-sizing: border-box; }
.land-btn.wide { width: 100%; }
.land-btn-cta { background: var(--land-cta); color: var(--land-cta-ink); }
.land-btn-cta:hover { filter: brightness(1.06); color: var(--land-cta-ink); }
.land-btn-ghost { color: var(--land-hero-ink); border-color: color-mix(in srgb, var(--land-hero-ink) 38%, transparent); font-weight: 700; }
.land-btn-ghost:hover { background: color-mix(in srgb, var(--land-hero-ink) 10%, transparent); color: var(--land-hero-ink); }
.land-btn-line { color: var(--ink); border-color: var(--rule-strong); font-weight: 700; min-height: 52px; margin-top: 0.6rem; }
.land-btn-line:hover { background: var(--sunken); color: var(--ink); }

/* hero */
.land-hero { margin-top: calc(-1 * var(--s5)); background: var(--land-hero); color: var(--land-hero-ink);
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: var(--s7); align-items: center;
  padding-top: 5rem; padding-bottom: 6rem; position: relative; isolation: isolate; overflow: hidden; }
.land-hero::before { content: ""; position: absolute; z-index: -1; right: -60px; bottom: -80px; width: 420px; height: 420px;
  background: var(--land-hero-ink); opacity: 0.05; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.land-kicker { font-family: var(--land-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--land-cta); }
.land-hero h1 { margin: 1.1rem 0 0; font-size: clamp(2.6rem, 5.4vw, 4.7rem); line-height: 1.0; font-stretch: 118%; letter-spacing: -0.03em; color: var(--land-hero-ink); }
.land-hero h1 em { font-style: normal; color: var(--land-cta); }
.land-lede { margin: 1.5rem 0 0; max-width: 34em; font-size: 1.18rem; line-height: 1.55; color: var(--land-hero-muted); }
.land-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.land-reassure { margin: 1rem 0 0; font-size: 0.875rem; color: var(--land-hero-muted); }

.land-shot { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--rule);
  box-shadow: var(--shadow-lg); position: relative; }
.land-shot img { display: block; width: 100%; height: auto; }
.land-shot-hero { border: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38); }
.land-shot figcaption { padding: 0.45rem 0.8rem; font-size: 0.72rem; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--rule); }
.browser { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--rule); }
.browser span { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-strong); }
.browser i { font-style: normal; font-family: var(--land-mono); font-size: 0.72rem; color: var(--muted); margin-left: 10px; }

/* proof strip */
.land-proof { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); justify-content: space-between; padding-top: 1.75rem; padding-bottom: 1.75rem;
  background: var(--surface); border-bottom: 1px solid var(--rule); }
.land-proof > div { flex: 1 1 140px; display: grid; gap: 0.15rem; }
.land-proof b { font-family: var(--land-mono); font-weight: 600; font-size: 1.75rem; line-height: 1.2; color: var(--ink); }
.land-proof span { color: var(--muted); font-size: 0.94rem; }

/* problem */
.land-problem { padding: 6.5rem 0 2.5rem; }
.land-problem h2 { max-width: 19em; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; }
.land-intro { margin: 1.25rem 0 0; max-width: 40em; font-size: 1.18rem; color: var(--ink-2); }
.land-pains { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.land-pains article { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.75rem; display: flex; flex-direction: column; }
.land-pains h3 { margin: 0.5rem 0 0; font-size: 1.3rem; line-height: 1.25; }
.land-pains p { margin: 0.6rem 0 1.1rem; color: var(--ink-2); }
.land-fix { margin-top: auto; padding-top: 1.1rem; position: relative; top: 0; border-top: 1px solid var(--rule); display: flex; gap: 0.6rem; }

/* features */
.land-features { display: grid; gap: 6rem; padding: 4.5rem 0 2rem; }
.land-feature { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s7); align-items: center; }
.land-feature.reverse .land-feature-copy { order: 2; }
.land-feature h2 { margin: 0.75rem 0 0; }
.land-feature p { color: var(--ink-2); font-size: 1.12rem; line-height: 1.6; margin: 1rem 0 0; }
.land-ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 0.65rem; }
.land-ticks li { display: flex; gap: 0.6rem; color: var(--ink-2); }

/* Pokémon section */
.land-pk { margin-top: 5rem; background: var(--land-pk-tint); border-top: 6px solid #d6362a; padding-top: 4.5rem; padding-bottom: 5rem; }
.land-pk h2 { margin-top: 0.9rem; max-width: 16em; font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.03; }
.land-with-glyph { display: flex; align-items: center; gap: 0.75rem; }
.land-ticks-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; }
.land-eras { margin-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.75rem; }
.land-era { padding: 1.1rem 1.25rem; border-radius: 14px; background: var(--surface); border: 1px solid color-mix(in srgb, #d6362a 22%, var(--rule)); display: grid; gap: 0.4rem; font-size: 0.95rem; color: var(--ink-2); }
.land-sets { margin-top: 1rem; }
.land-sets summary { cursor: pointer; font-weight: 700; color: var(--land-on-light); min-height: 44px; display: flex; align-items: center; }
.land-sets .coverage { margin-top: 0.75rem; }
.land-pk .land-features { padding-bottom: 0; }
.land-h3 { font-family: var(--land-display); font-weight: 850; font-stretch: 110%; letter-spacing: -0.02em; font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.08; margin: 0.75rem 0 0; }

/* Yu-Gi-Oh! band: included, in its own black and gold */
.land-ygo { background: #121110; color: #f5efe2; padding-top: 5rem; padding-bottom: 5rem;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s7); align-items: center; }
.land-ygo .land-label { color: #dcb14d; }
.land-ygo h2 { color: #f5efe2; margin-top: 0.9rem; }
.land-ygo-copy > p { margin: 1rem 0 0; font-size: 1.12rem; color: #bdb29a; }
.land-ygo .land-ticks li { color: #f5efe2; }
.land-ygo .land-check { color: #dcb14d; }
.land-ygo .land-shot { border-color: #2c2924; }
.land-btn-gold { margin-top: 1.75rem; min-height: 48px; color: #dcb14d; border-color: #dcb14d; font-weight: 700; }
.land-btn-gold:hover { background: rgba(220, 177, 77, 0.1); color: #dcb14d; }

/* pricing */
.land-pricing { background: var(--land-band); color: #ffffff; padding-top: 6rem; padding-bottom: 6rem;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s7); align-items: start; }
.land-pricing h2 { color: #ffffff; margin-top: 0.75rem; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; }
.land-pricing .land-label.accent { color: var(--land-cta); }
.land-pricing-copy > p { margin: 1.1rem 0 0; max-width: 32em; font-size: 1.12rem; color: var(--land-band-muted); }
.land-steps { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; gap: 1.1rem; color: var(--land-band-muted); }
.land-steps li { display: flex; gap: 1rem; align-items: flex-start; }
.land-steps b { color: #ffffff; }
.land-step-n { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--land-cta); color: var(--land-cta);
  display: grid; place-items: center; font-family: var(--land-mono); font-weight: 600; }
.land-plan { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 2.1rem; border-top: 6px solid var(--land-cta); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.land-plan-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: 1.1rem; }
.land-plan-games { display: flex; gap: 0.4rem; }
.land-plan-games span { font-size: 0.75rem; font-weight: 800; padding: 0.25rem 0.65rem; border-radius: 999px; }
.land-plan-games .pk { background: #fdecea; color: #b3261c; }
.land-plan-games .ygo { background: #f4ecd8; color: #7a5a12; }
.land-plan-price { margin-top: 1.1rem; display: flex; align-items: baseline; gap: 0.5rem; }
.land-plan-price b { font-family: var(--land-display); font-stretch: 110%; font-size: 3.2rem; font-weight: 850; line-height: 1; }
.land-plan-price span { color: var(--muted); }
.land-plan .land-ticks { margin: 1.6rem 0 1.9rem; }

/* FAQ */
.land-faq { max-width: 820px; margin: 0 auto; padding: 6rem 0 1rem; }
.land-faq h2 { margin-bottom: 1.75rem; }
.land-faq details { border-bottom: 1px solid var(--rule-strong); }
.land-faq details:first-of-type { border-top: 1px solid var(--rule-strong); }
.land-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 44px; padding: 1.1rem 0; font-weight: 750; font-size: 1.12rem; }
.land-faq summary::-webkit-details-marker { display: none; }
.land-faq summary::after { content: "+"; color: var(--land-on-light); font-size: 1.6rem; font-weight: 400; line-height: 1; transition: transform 0.15s; }
.land-faq details[open] summary::after { transform: rotate(45deg); }
.land-faq details p { margin: 0 0 1.25rem; color: var(--ink-2); line-height: 1.6; }

.land-coverage { padding: 4rem 0 0; }
.land-coverage h2 { margin-bottom: 1.25rem; }

/* final CTA */
.land-final { margin: 3.5rem 0 1.5rem; background: var(--land-hero); color: var(--land-hero-ink); border-radius: 24px; padding: 3.5rem 2.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem; }
.land-final > div { flex: 1 1 420px; min-width: 0; }
.land-final h2 { color: var(--land-hero-ink); font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.05; }
.land-final p { margin: 0.75rem 0 0; color: var(--land-hero-muted); font-size: 1.12rem; }
.land-legal { margin: 0 0 var(--s4); font-size: 0.8rem; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .land-hero, .land-feature, .land-pricing, .land-pains, .land-ygo { grid-template-columns: minmax(0, 1fr); }
  .land-pk, .land-ygo { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .land-feature.reverse .land-feature-copy { order: 0; }
  .land-hero { margin-top: calc(-1 * var(--s3)); padding-top: 3rem; padding-bottom: 3.5rem; gap: var(--s6); }
  .land-band { padding-inline: var(--s4); }
  .land-problem { padding-top: 4rem; }
  .land-features { gap: 4rem; padding-top: 3rem; }
  .land-pricing { padding-top: 4rem; padding-bottom: 4rem; }
  .land-plan { padding: 1.5rem; }
  .land-final { padding: 2.25rem 1.5rem; }
  .land-btn { width: 100%; }
}

.share-sale-pills { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.share-pill { display: inline-flex; align-items: center; height: 1.8rem; padding: 0 0.8rem; border-radius: 999px;
  font-size: var(--t-xs); font-weight: 650; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--rule); }
.share-pill.strong { background: var(--bar); color: var(--bar-ink); border-color: var(--bar); }

/* 7. accounts (login, signup, reset, /account) ------------------------------------ */
.auth { display: grid; place-items: start center; padding: var(--s6) 0 var(--s7); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--bar);
  border-radius: var(--r-lg); padding: var(--s6) var(--s5); box-shadow: var(--shadow); box-sizing: border-box; }
.auth-card.auth-wide { max-width: 620px; }
.auth-card h1 { margin: 0; font-size: var(--t-2xl); letter-spacing: -0.02em; }
.auth-sub { margin: var(--s2) 0 0; color: var(--ink-2); line-height: 1.55; }
.auth-form { display: grid; gap: var(--s2); margin-top: var(--s5); }
.auth-form label { font-weight: 650; font-size: var(--t-sm); display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--s2); }
.auth-form input { font: inherit; padding: 0.7rem 0.85rem; min-height: 46px; box-sizing: border-box; border: 1px solid var(--rule-strong);
  border-radius: var(--r); background: var(--surface); color: var(--ink); }
.auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.auth-aside { font-weight: 500; font-size: var(--t-sm); }
.auth-help { color: var(--muted); font-size: var(--t-xs); }
.auth-submit { margin-top: var(--s3); min-height: 48px; justify-content: center; }
.auth-or { display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0; color: var(--muted); font-size: var(--t-sm); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.auth-discord { width: 100%; justify-content: center; min-height: 48px; box-sizing: border-box; }
.auth-hint { margin: var(--s3) 0 0; color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }
.auth-switch { margin: var(--s5) 0 0; font-size: var(--t-sm); text-align: center; }
.auth-error { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--neg-bg); color: var(--neg); font-size: var(--t-sm); }
.auth-flash { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--pos-bg); color: var(--pos); font-size: var(--t-sm); }
.auth-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s3) var(--s5); margin: var(--s5) 0 0; }
.auth-facts dt { color: var(--muted); font-size: var(--t-sm); }
.auth-facts dd { margin: 0; overflow-wrap: anywhere; }
.auth-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.auth-actions form { margin: 0; }
a.role-badge { text-decoration: none; }
@media (max-width: 560px) { .auth-card { padding: var(--s5) var(--s4); } .auth-facts { grid-template-columns: 1fr; gap: var(--s1); } .auth-facts dd { margin-bottom: var(--s2); } }

/* 8. motion ------------------------------------------------------------------------
   Decoration only (static/motion.js): content never depends on it, and
   prefers-reduced-motion switches every effect below off at the end. */
.js [data-reveal] { opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* landing hero: staggered entrance, floating screenshot that tilts with the pointer */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes shot-in { from { opacity: 0; transform: perspective(1400px) rotateY(-14deg) translateX(40px); } to { opacity: 1; transform: perspective(1400px) rotateY(0) translateX(0); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes underline { from { background-size: 0% .14em; } to { background-size: 100% .14em; } }
@keyframes shimmer { 0%, 70% { transform: translateX(-120%) skewX(-18deg); } 100% { transform: translateX(260%) skewX(-18deg); } }
.land-hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.land-hero-copy > :nth-child(2) { animation-delay: .08s; }
.land-hero-copy > :nth-child(3) { animation-delay: .16s; }
.land-hero-copy > :nth-child(4) { animation-delay: .24s; }
.land-hero-copy > :nth-child(5) { animation-delay: .32s; }
.land-hero h1 em { background: linear-gradient(currentColor, currentColor) left 92% / 0% .14em no-repeat; animation: underline .7s .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.land-shot-hero { animation: shot-in .9s .15s cubic-bezier(.2, .7, .2, 1) both, float 7s 1.2s ease-in-out infinite;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
.land-hero::before { animation: spin-slow 80s linear infinite; }
.land-btn-cta { position: relative; overflow: hidden; isolation: isolate; transition: transform .15s ease, filter .15s ease; }
.land-btn-cta::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shimmer 4.5s 1.5s ease-in-out infinite; }
.land-btn:active, .btn:active { transform: scale(.97); }
.land-pains article, .land-era, .land-game, .land-plan { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease; }
.land-pains article:hover, .land-era:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.land-plan:hover { transform: translateY(-4px); }
.land-feature .land-shot img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.land-feature .land-shot:hover img { transform: scale(1.025); }
.land-check { transition: transform .3s ease; }
.land-ticks li:hover .land-check { transform: scale(1.25) rotate(-8deg); }
main { animation: rise .45s ease both; }

/* ---- post-login splash: a Poké Ball / a duel disk opens, then the app unfolds */
.splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.splash-panel { position: absolute; left: 0; right: 0; height: 50.5%; }
.splash-panel.a { top: 0; }
.splash-panel.b { bottom: 0; }
.splash-stage { position: relative; z-index: 2; display: grid; justify-items: center; gap: 22px; animation: stage-out .45s 1.95s ease-in forwards; }
.splash-word { font-family: "Archivo", var(--font-display); font-weight: 850; font-stretch: 115%; font-size: 30px; letter-spacing: -.02em;
  opacity: 0; animation: rise .5s .45s ease both; }
.splash-flash { position: absolute; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: #fff; opacity: 0; pointer-events: none;
  animation: flash .7s 1.55s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; transform: scale(.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(60); } }
@keyframes stage-out { to { opacity: 0; transform: scale(1.25); } }
@keyframes open-up { to { transform: translateY(-101%); } }
@keyframes open-down { to { transform: translateY(101%); } }
@keyframes open-left { to { transform: translateX(-101%); } }
@keyframes open-right { to { transform: translateX(101%); } }
@keyframes unfold { from { opacity: 0; transform: scale(.94) translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
body.unfold main, body.unfold header.site { animation: unfold .75s 1.95s cubic-bezier(.2, .7, .2, 1) both; }
body.splashing { overflow: hidden; }

/* Pokémon: red over white, the ball drops, wobbles, its button glows, it opens */
.splash-pokemon .splash-panel.a { background: #c42f24; animation: open-up .6s 1.95s cubic-bezier(.7, 0, .3, 1) forwards; }
.splash-pokemon .splash-panel.b { background: #f4f4f6; border-top: 10px solid #17181c; animation: open-down .6s 1.95s cubic-bezier(.7, 0, .3, 1) forwards; }
.splash-pokemon .splash-word { color: #17181c; }
.pokeball { position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: visible;
  animation: pb-drop .55s cubic-bezier(.3, 1.6, .5, 1) both, pb-wobble .8s .6s ease-in-out both; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .3)); }
.pb-top, .pb-bottom { position: absolute; left: 0; width: 132px; height: 66px; box-sizing: border-box; border: 6px solid #17181c; }
.pb-top { top: 0; border-radius: 66px 66px 0 0; background: radial-gradient(circle at 34% 30%, #ff7a6e 0 12%, #e2382b 13% 100%); border-bottom: 0;
  transform-origin: 6% 100%; animation: pb-open .35s 1.5s cubic-bezier(.3, 1.4, .6, 1) forwards; }
.pb-bottom { bottom: 0; border-radius: 0 0 66px 66px; background: #fff; border-top: 0; }
.pb-band { position: absolute; left: 0; right: 0; top: 60px; height: 12px; background: #17181c; }
.pb-button { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #fff;
  border: 6px solid #17181c; box-sizing: border-box; animation: pb-glow .45s 1.1s ease-in-out 2 alternate; }
@keyframes pb-drop { from { transform: translateY(-70vh) rotate(-120deg); } to { transform: none; } }
@keyframes pb-wobble { 0%, 100% { rotate: 0deg; } 20% { rotate: -16deg; } 45% { rotate: 12deg; } 70% { rotate: -6deg; } }
@keyframes pb-glow { to { background: #ffcb05; box-shadow: 0 0 0 6px rgba(255, 203, 5, .35), 0 0 30px 10px rgba(255, 203, 5, .7); } }
@keyframes pb-open { to { transform: rotate(-38deg) translateY(-6px); } }

/* Yu-Gi-Oh!: the disk spins in, its blade extends, five zones light up in gold */
.splash-yugioh .splash-panel { height: 100%; width: 50.5%; top: 0; background: #0d0c0b; }
.splash-yugioh .splash-panel.a { left: 0; right: auto; border-right: 2px solid #dcb14d; animation: open-left .6s 1.95s cubic-bezier(.7, 0, .3, 1) forwards; }
.splash-yugioh .splash-panel.b { right: 0; left: auto; animation: open-right .6s 1.95s cubic-bezier(.7, 0, .3, 1) forwards; }
.splash-yugioh .splash-word { color: #f5efe2; }
.splash-yugioh .splash-flash { background: #f0d48a; }
.disk { position: relative; width: 380px; max-width: 86vw; height: 130px; }
.disk-core { position: absolute; left: 0; top: 0; width: 130px; height: 130px; border-radius: 50%; box-sizing: border-box; z-index: 2;
  border: 7px solid #dcb14d; background: radial-gradient(circle, #2a2620 0 45%, #121110 46% 100%); color: #dcb14d; display: grid; place-items: center;
  box-shadow: 0 0 0 3px #121110, 0 0 0 5px rgba(220, 177, 77, .4), 0 16px 30px rgba(0, 0, 0, .5);
  animation: disk-in .6s cubic-bezier(.2, 1.3, .5, 1) both, disk-glow .4s 1.3s ease-in-out 2 alternate; }
.disk-core svg { width: 62px; height: 62px; }
.disk-blade { position: absolute; left: 92px; top: 41px; right: 0; height: 48px; box-sizing: border-box; display: flex; gap: 6px; align-items: center;
  padding: 0 10px 0 48px; border: 3px solid #dcb14d; border-left: 0; border-radius: 0 24px 24px 0; background: linear-gradient(#24211c, #121110);
  transform-origin: left center; transform: scaleX(0); animation: blade-out .45s .55s cubic-bezier(.3, 1.3, .5, 1) forwards; }
.disk-blade i { flex: 1; height: 30px; border: 2px solid rgba(220, 177, 77, .45); border-radius: 3px; animation: zone-on .2s ease forwards; }
.disk-blade i:nth-child(1) { animation-delay: .95s; } .disk-blade i:nth-child(2) { animation-delay: 1.03s; }
.disk-blade i:nth-child(3) { animation-delay: 1.11s; } .disk-blade i:nth-child(4) { animation-delay: 1.19s; }
.disk-blade i:nth-child(5) { animation-delay: 1.27s; }
@keyframes disk-in { from { transform: scale(.2) rotate(-270deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes disk-glow { to { box-shadow: 0 0 0 3px #121110, 0 0 0 5px #dcb14d, 0 0 40px 14px rgba(220, 177, 77, .55); } }
@keyframes blade-out { to { transform: scaleX(1); } }
@keyframes zone-on { to { background: rgba(220, 177, 77, .85); border-color: #f0d48a; box-shadow: 0 0 10px rgba(240, 212, 138, .6); } }

/* 9. binder (classeur) -------------------------------------------------------------- */
.card-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.binder-btn-form { display: inline-flex; align-items: center; margin: 0; }
.binder-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 38px; padding: 0 .9rem; border-radius: 999px; font: inherit;
  font-size: var(--t-sm); font-weight: 650; cursor: pointer; text-decoration: none; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, background .15s ease; }
.binder-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.binder-btn.in { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; border-radius: 999px 0 0 999px; }
.binder-btn-x { min-height: 38px; padding: 0 .7rem; border: 0; border-left: 1px solid var(--rule); border-radius: 0 999px 999px 0; background: var(--accent-soft);
  color: var(--accent-ink); font-size: 1.1rem; cursor: pointer; }

.binder-tabs { display: flex; gap: var(--s2); margin: 0 0 var(--s4); flex-wrap: wrap; }
.binder-tab { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; text-decoration: none;
  font-weight: 650; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule); }
.binder-tab span { font-size: var(--t-xs); padding: .1rem .5rem; border-radius: 999px; background: var(--sunken); }
.binder-tab.pk.active { background: #c42f24; border-color: #c42f24; color: #fff; }
.binder-tab.ygo.active { background: #121110; border-color: #121110; color: #dcb14d; }
.binder-tab.active span { background: rgba(255, 255, 255, .18); color: inherit; }

/* the sheet: a binder page, rings on the left, plastic pockets */
.binder-sheet { position: relative; border-radius: 22px; padding: 28px 28px 28px 64px; overflow: hidden;
  background: linear-gradient(90deg, rgba(0, 0, 0, .18) 0 40px, transparent 40px), var(--sheet, #1d1b18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), var(--shadow-lg); }
.binder-sheet::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 14px;
  background: radial-gradient(circle at 7px 7px, #d9d9de 0 5px, #8a8a92 6px, transparent 7px) 0 40px / 14px 120px repeat-y; opacity: .8; }
.binder-pokemon { --sheet: #a8271e; }
.binder-yugioh { --sheet: #171512; }
.binder-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.binder-pocket { position: relative; aspect-ratio: 63 / 88; border-radius: 12px; padding: 7px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .1));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 -10px 20px rgba(0, 0, 0, .15); }
.binder-pocket.empty { border: 2px dashed rgba(255, 255, 255, .22); background: transparent; box-shadow: none; }
.binder-empty { position: relative; }
.binder-empty .binder-grid { opacity: .5; }
.binder-empty-copy { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: var(--s3); color: #fff; padding: var(--s5); }
.binder-empty-copy h2 { color: #fff; margin: 0; justify-content: center; }
.binder-empty-copy h2::before { display: none; }
.binder-empty-copy p { margin: 0 auto; max-width: 36ch; color: rgba(255, 255, 255, .85); }
.binder-empty-copy .btn { justify-self: center; }
.binder-foot { margin-top: var(--s3); }

/* the flip card */
.flip { position: relative; width: 100%; height: 100%; perspective: 1200px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.2, .5, 1); }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border-radius: 9px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-back { transform: rotateY(180deg); background: var(--surface); color: var(--ink); display: flex; flex-direction: column; gap: .55rem;
  padding: .7rem .75rem; font-size: .8rem; overflow-y: auto; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.flip-hit { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; border-radius: 9px; overflow: hidden; background: #f1f1f3;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35); transition: transform .25s ease, box-shadow .25s ease; }
.flip-hit:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 18px 30px rgba(0, 0, 0, .45); }
.flip-hit:focus-visible { outline: 3px solid #ffcb05; outline-offset: 3px; }
.flip-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flip-hit::after { content: ""; position: absolute; inset: 0; pointer-events: none; /* holo sheen on hover */
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 45%, rgba(255, 200, 255, .2) 50%, transparent 62%) -120% 0 / 250% 100% no-repeat;
  transition: background-position .8s ease; }
.flip-hit:hover::after { background-position: 120% 0; }
.flip-drawn { position: absolute; inset: 6px; border-radius: 7px; display: flex; flex-direction: column; padding: .55rem; gap: .4rem; box-sizing: border-box; }
.binder-pokemon .flip-drawn { background: linear-gradient(#ffe46b, #f5c518); color: #3b2c00; border: 3px solid #e2b007; }
.binder-yugioh .flip-drawn { background: linear-gradient(#3a2a18, #20170d); color: #f0d48a; border: 3px solid #b48a3a; }
.flip-drawn-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .72rem; font-weight: 700; }
.flip-drawn-art { flex: 1; display: grid; place-items: center; border-radius: 4px; opacity: .55;
  background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .06) 0 6px, transparent 6px 12px); }
.flip-drawn-name { font-weight: 800; font-size: .95rem; line-height: 1.15; }
.flip-drawn-meta { font-size: .7rem; opacity: .8; }
.flip-ribbon { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .7rem .6rem; color: #fff; display: grid; gap: .1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78)); }
.flip-ribbon b { font-size: .92rem; line-height: 1.2; }
.flip-ribbon small { font-size: .7rem; opacity: .85; }
.flip-owned { position: absolute; top: .55rem; left: 50%; transform: translateX(-50%); }
.flip-hint { position: absolute; top: .5rem; right: .55rem; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: .9rem; opacity: 0; transition: opacity .2s ease; }
.flip-hit:hover .flip-hint, .flip-hit:focus-visible .flip-hint { opacity: 1; }
.flip-back-head { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.flip-back-head b { display: block; font-size: .9rem; line-height: 1.2; }
.flip-back-head small { color: var(--muted); }
.flip-back-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1rem; }
.flip-block { display: grid; gap: .3rem; }
.flip-label { font-family: var(--font-mono); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.flip-bars { display: flex; align-items: flex-end; gap: 4px; height: 74px; }
.flip-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; font-size: .62rem; }
.flip-bar i { width: 100%; height: 0; border-radius: 3px 3px 1px 1px; background: var(--rule-strong); transition: height .7s cubic-bezier(.2, .7, .2, 1) .25s; }
.flip.is-flipped .flip-bar i, html:not(.js) .flip-bar i { height: max(var(--h), 4%); }
.flip-bar.top i { background: var(--accent); }
.flip-bar b { font-weight: 700; }
.flip-bar span { color: var(--muted); }
.flip-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: .72rem; background: none; box-shadow: none; border: 0; }
.flip-table th, .flip-table td { padding: 3px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: static; }
.flip-table th { text-align: left; font-weight: 600; color: var(--muted); background: none; border-bottom: 1px solid var(--rule); font-size: .66rem; text-transform: none; letter-spacing: 0; }
.flip-table td { border-bottom: 1px solid var(--rule); background: none; }
.flip-table th:first-child, .flip-table td:first-child { width: 38%; }
.flip-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.flip-table tr.mine td { font-weight: 800; color: var(--accent-ink); }
.flip-note { margin: 0; color: var(--muted); font-size: .72rem; }
.flip-foot { margin-top: auto; display: grid; gap: .45rem; padding-top: .4rem; border-top: 1px solid var(--rule); }
.flip-grade { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .72rem; }
.flip-grade select { font: inherit; font-size: .72rem; padding: .25rem .4rem; border-radius: 6px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); min-height: 30px; }
.flip-links { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.flip-links form { margin: 0; }
.flip-links a { font-weight: 650; font-size: .74rem; }
.flip-remove { border: 0; background: none; color: var(--neg); font: inherit; font-size: .72rem; cursor: pointer; padding: .3rem 0; min-height: 30px; }
/* no JS: no flipping, the back simply sits under the front */
html:not(.js) .binder-pocket { aspect-ratio: auto; }
html:not(.js) .flip, html:not(.js) .flip-inner { height: auto; }
html:not(.js) .flip-face { position: relative; transform: none; backface-visibility: visible; }
html:not(.js) .flip-front { aspect-ratio: 63 / 88; }
@media (max-width: 640px) {
  .binder-sheet { padding: 18px 14px 18px 40px; }
  .binder-sheet::before { left: 8px; }
  .binder-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
}

/* motion off ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .splash { display: none; }
  .flip-inner { transition: none; }
}
