/* Full Card List – one stylesheet, no framework. Light/dark via prefers-color-scheme and [data-theme]. */
:root {
  --bg: #f6f6fa; --surface: #ffffff; --surface-2: #eff0f6; --surface-3: #e6e8f1; --line: #e1e3ec;
  --text: #15172a; --muted: #5d6279; --accent: #4f46e5; --accent-soft: #eceafe; --accent-ink: #ffffff; --accent-2: #f59e0b;
  --good: #16a34a; --good-soft: #dcfce7; --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(15 20 40 / .06), 0 6px 20px rgb(15 20 40 / .06);
  --shadow-lg: 0 10px 30px rgb(15 20 40 / .16);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1020; --surface: #161a2e; --surface-2: #1d2139; --surface-3: #262b47; --line: #2a3050;
    --text: #e8e9f5; --muted: #a2a7c2; --accent: #8f88ff; --accent-soft: #24264a; --accent-ink: #0e1020; --accent-2: #fbbf24;
    --good: #4ade80; --good-soft: #143322; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 20px rgb(0 0 0 / .3); --shadow-lg: 0 10px 30px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1020; --surface: #161a2e; --surface-2: #1d2139; --surface-3: #262b47; --line: #2a3050;
  --text: #e8e9f5; --muted: #a2a7c2; --accent: #8f88ff; --accent-soft: #24264a; --accent-ink: #0e1020; --accent-2: #fbbf24;
  --good: #4ade80; --good-soft: #143322; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 20px rgb(0 0 0 / .3); --shadow-lg: 0 10px 30px rgb(0 0 0 / .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 750; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.strong { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
.eyebrow img { width: 20px; height: 20px; object-fit: contain; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; border: 0; cursor: pointer; text-decoration: none !important; box-shadow: var(--shadow); }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: var(--surface); color: var(--accent); border: 1px solid var(--line); box-shadow: none; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; font-size: .9rem; }
.link-btn:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none !important; white-space: nowrap; }
.logo b { color: var(--accent); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--muted); font-weight: 600; font-size: .94rem; padding: 7px 11px; border-radius: 999px; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.search { position: relative; flex: 1; max-width: 360px; margin-left: auto; }
.search input, .hero-search input, .tb-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' d='m20 20-4.5-4.5M17 10.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0Z'/%3E%3C/svg%3E") 12px 50% no-repeat; }
.search input:focus, .hero-search input:focus, .tb-search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.header-tools { display: flex; gap: 6px; }
.tool { height: 38px; min-width: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.tool:hover { color: var(--text); border-color: var(--muted); }
.menu-btn { display: none; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; max-height: 70vh; overflow: auto; }
.suggest h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 10px 4px; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); text-decoration: none; }
.suggest a:hover, .suggest a.active { background: var(--accent-soft); }
.suggest a img { width: 30px; height: 42px; object-fit: cover; border-radius: 4px; flex: none; }
.suggest a span { display: flex; flex-direction: column; min-width: 0; }
.suggest a small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .sg-price { margin-left: auto; font-weight: 700; font-size: .85rem; }
.suggest .sg-all { justify-content: center; color: var(--accent); font-weight: 650; }

/* ---------- currency toggle ---------- */
html[data-currency="usd"] .eur { display: none; }
html[data-currency="eur"] .usd { display: none; }

/* ---------- breadcrumbs & page heads ---------- */
.crumbs { margin: 18px 0 8px; font-size: .86rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); }
.page-head { margin: 18px 0 22px; }
.page-head .tb-search { margin-top: 14px; }
main { min-height: 60vh; padding-bottom: 40px; }

.set-head, .poke-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin: 14px 0 22px; }
.set-head-logo { width: 260px; max-height: 120px; object-fit: contain; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .18)); }
.poke-head-img { width: 150px; border-radius: 9px; box-shadow: var(--shadow-lg); transform: rotate(-3deg); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin: 0 0 28px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 12px 16px; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.facts dd { margin: 3px 0 0; font-weight: 650; }

/* ---------- strips & tiles ---------- */
.strip { margin: 10px 0 34px; }
.strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.strip-head h2 { margin: 0; }
.strip-head a { font-weight: 650; font-size: .92rem; white-space: nowrap; }
.grid-title { margin-top: 8px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.set-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.set-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.set-logo { height: 76px; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; }
.set-logo img { max-height: 60px; width: auto; object-fit: contain; }
.set-logo.no-logo { position: relative; overflow: hidden; padding: 8px 12px; background: linear-gradient(135deg, var(--accent), #312e81); }
.set-logo .set-logo-art { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: 50% 24%; opacity: .5; }
.set-logo.no-logo b { position: relative; color: #fff; font-size: 1.12rem; line-height: 1.2; text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.set-info { display: flex; flex-direction: column; gap: 2px; }
.set-name { font-weight: 750; }

/* ---------- card grid ---------- */
.cards { list-style: none; padding: 0; margin: 0; }
.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile-link { display: flex; flex-direction: column; height: 100%; color: var(--text); text-decoration: none !important; padding: 10px; }
.tile-img { position: relative; display: block; aspect-ratio: 245 / 342; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank { position: absolute; z-index: 1; left: 6px; top: 6px; background: rgb(0 0 0 / .72); color: #fff; font-weight: 800; font-size: .78rem; padding: 2px 8px; border-radius: 999px; }
.noimg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%; padding: 10px; text-align: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface-3) 12px 24px); aspect-ratio: 245 / 342; border-radius: 8px; }
.noimg.big { max-width: 420px; }
.tile-body { display: flex; flex-direction: column; gap: 2px; padding: 9px 2px 0; flex: 1; }
.tile-name { font-weight: 700; font-size: .93rem; line-height: 1.25; }
.tile-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; }
.price { font-weight: 750; font-variant-numeric: tabular-nums; }
.tile-foot .price { margin-left: auto; font-size: .9rem; }
.price.none { color: var(--muted); font-weight: 500; font-size: .8rem; }
.price.inline { font-size: .92rem; }
.price.big { font-size: 1.2rem; }
.price.huge { font-size: 2rem; font-weight: 800; display: block; letter-spacing: -0.02em; }
.own { position: absolute; top: 16px; right: 16px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgb(255 255 255 / .9); background: rgb(20 20 30 / .38); color: #fff; cursor: pointer; opacity: .0; transition: opacity .15s, background .15s, transform .1s; backdrop-filter: blur(3px); }
.tile:hover .own, .own:focus-visible, .own[aria-pressed="true"], .is-checklist .own { opacity: 1; }
@media (hover: none) { .own { opacity: .85; } }
.own:active { transform: scale(.92); }
.own[aria-pressed="true"] { background: var(--good); border-color: #fff; }
.tile.owned { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); }
.tile.owned .tile-name::after { content: " ✓"; color: var(--good); }
.is-hidden { display: none !important; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* list view */
.view-list { display: flex; flex-direction: column; gap: 6px; }
.view-list .tile:hover { transform: none; }
.view-list .tile-link { flex-direction: row; align-items: center; gap: 14px; padding: 8px 56px 8px 10px; }
.view-list .tile-img { width: 46px; flex: none; border-radius: 4px; }
.view-list .rank { display: none; }
.view-list .tile-body { flex-direction: row; align-items: center; gap: 14px; padding: 0; }
.view-list .tile-name { flex: 1; }
.view-list .tile-sub { width: 32%; }
.view-list .tile-foot { margin: 0; padding: 0; min-width: 110px; justify-content: flex-end; }
.view-list .own { top: 50%; right: 12px; transform: translateY(-50%); opacity: 1; background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.view-list .own[aria-pressed="true"] { background: var(--good); color: #fff; }

/* binder view: 3 x 3 pages */
.view-binder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 720px; margin-inline: auto; padding: 18px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.view-binder .tile { border-radius: 10px; }
.view-binder .tile:hover { transform: none; }
.view-binder .tile-link { padding: 6px; }
.view-binder .tile-body { display: none; }
.view-binder .tile[data-page] { margin-top: 34px; }
.view-binder .tile[data-page]::before { content: "Page " attr(data-page); position: absolute; top: -28px; left: 0; font-size: .78rem; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.view-binder .tile:not(.owned) .tile-img img { filter: grayscale(.85) opacity(.55); }
.view-binder:not(.has-owned) .tile .tile-img img { filter: none; }
.view-binder .own { top: 10px; right: 10px; width: 26px; height: 26px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 72px; z-index: 20; box-shadow: var(--shadow); }
.toolbar.slim { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; box-shadow: none; }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tb-search { flex: 1; min-width: 180px; }
.tb-search.wide { display: block; max-width: 420px; }
.tb-select select { height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 34px 0 14px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.tb-select.small select { height: 30px; font-size: .85rem; padding: 0 30px 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { height: 38px; width: 42px; display: grid; place-items: center; background: var(--surface); border: 0; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.chip span { color: var(--muted); font-weight: 600; }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rc, #999); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tb-status { justify-content: space-between; font-size: .88rem; color: var(--muted); }
.count { font-weight: 650; }
.own-status { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar { width: 120px; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: inline-block; }
.bar i { display: block; height: 100%; width: 0; background: var(--good); transition: width .25s; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }

/* ---------- rarity colours ---------- */
.r-common { --rc: #9aa0ad; } .r-unc { --rc: #1fa39d; } .r-rare { --rc: #3b82f6; } .r-double { --rc: #475569; }
.r-ultra { --rc: #94a3b8; } .r-ir { --rc: #d4a017; } .r-sir { --rc: #e05aa8; } .r-hyper { --rc: #f59e0b; } .r-promo { --rc: #7c3aed; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rc, #999); flex: none; display: inline-block; }
.r-sir.dot, .r-sir.chip::before { background: linear-gradient(135deg, #f6c34a, #e05aa8); }
.r-hyper.dot, .r-hyper.chip::before { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #8b5cf6, #f43f5e); }
.rarity { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--rc, #999) 14%, var(--surface)); color: color-mix(in srgb, var(--rc, #999) 70%, var(--text)); border: 1px solid color-mix(in srgb, var(--rc, #999) 35%, transparent); text-decoration: none !important; white-space: nowrap; }
.rarity::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc, #999); }
.r-sir.rarity::before { background: linear-gradient(135deg, #f6c34a, #e05aa8); }
.r-hyper.rarity::before { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #8b5cf6, #f43f5e); }
.types { display: inline-flex; gap: 3px; vertical-align: middle; }
.type { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--t); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35), 0 0 0 1px rgb(0 0 0 / .12); vertical-align: middle; }

/* ---------- tables ---------- */
.data { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; border-collapse: separate; border-spacing: 0; font-size: .93rem; margin-bottom: 18px; }
.data th, .data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data tr:last-child td { border-bottom: 0; }
.data th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.tbl-h { font-size: 1rem; margin: 0 0 8px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .data { min-width: 100%; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data tr.hl td { background: var(--accent-soft); }
.rarity-table td:nth-child(2) { color: var(--muted); font-size: .9rem; min-width: 280px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 30px 0; align-items: start; }
.tiles-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0; }
.feature { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature h2 { font-size: 1.1rem; color: var(--accent); }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; }
.callout { padding: 18px 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 14%, var(--surface))); border: 1px solid var(--line); margin: 0 0 34px; }
.callout h2 { font-size: 1.05rem; margin-bottom: .3em; }
.callout p { margin: 0; }
.prose { max-width: 78ch; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.25fr .9fr; gap: 30px; align-items: center; padding: 34px 0 30px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.hero-search { position: relative; display: flex; gap: 10px; max-width: 560px; margin: 18px 0 6px; }
.hero-search input { height: 50px; font-size: 1.02rem; padding-left: 42px; background-position: 14px 50%; }
.hero-search .btn { height: 50px; padding: 0 22px; }
.hero-fan { list-style: none; padding: 0; margin: 0; position: relative; height: 340px; }
.hero-fan li { position: absolute; width: 190px; top: 20px; left: 50%; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface-2); aspect-ratio: 245 / 342; }
.hero-fan li img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-fan li:nth-child(1) { transform: translateX(-120%) rotate(-12deg); top: 40px; }
.hero-fan li:nth-child(2) { transform: translateX(-50%); z-index: 2; }
.hero-fan li:nth-child(3) { transform: translateX(20%) rotate(12deg); top: 40px; }

/* ---------- sets index ---------- */
.series-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.series-nav a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 650; color: var(--muted); }
.series-nav a:hover { color: var(--accent); text-decoration: none; border-color: var(--accent); }
.series { margin: 0 0 30px; scroll-margin-top: 90px; }
.set-table-head, .set-row a { display: grid; grid-template-columns: 36px 1fr 120px 100px 110px; gap: 12px; align-items: center; }
.set-table-head { padding: 0 14px 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.set-table-head span:nth-child(n+4) { text-align: right; }
.set-rows { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row a { padding: 10px 14px; color: var(--text); text-decoration: none !important; }
.set-row a:hover { background: var(--surface-2); }
.set-row .sym img { width: 28px; height: 28px; object-fit: contain; display: block; }
.set-row-name { font-weight: 650; }
.code { font-family: var(--mono); font-size: .72rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.set-row-date { color: var(--muted); font-size: .9rem; }
.set-row-n, .set-row-v { text-align: right; font-variant-numeric: tabular-nums; font-size: .92rem; }
.set-row-v { font-weight: 650; }
.series-list.main-only .set-row:not([data-kind="main"]) { display: none; }
.symbol-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.symbol-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none !important; height: 100%; }
.symbol-grid a:hover { border-color: var(--accent); }
.symbol-grid img { width: 48px; height: 48px; object-fit: contain; }
.sym-name { font-weight: 650; font-size: .9rem; line-height: 1.25; }

/* ---------- pokemon ---------- */
.poke-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.poke-tile a { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none !important; height: 100%; transition: transform .15s, box-shadow .15s; }
.poke-tile a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.poke-img { aspect-ratio: 245 / 342; border-radius: 7px; overflow: hidden; background: var(--surface-2); display: block; }
.poke-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poke-name { font-weight: 700; font-size: .93rem; margin-top: 6px; }
.poke-name small { color: var(--muted); font-weight: 600; font-family: var(--mono); font-size: .75rem; display: block; }
.gen { margin: 0 0 26px; }
.poke-list, .artist-list { list-style: none; padding: 0; margin: 0; columns: 4 210px; column-gap: 16px; }
.poke-list li, .artist-list li { break-inside: avoid; }
.poke-list a { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 8px; color: var(--text); }
.poke-list a:hover { background: var(--surface); text-decoration: none; }
.poke-list .small { margin-left: auto; }
.artist-list a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 9px; color: var(--text); }
.artist-list a:hover { background: var(--surface); text-decoration: none; }
.mech { display: flex; flex-wrap: wrap; gap: 6px; margin: -10px 0 20px; }

/* ---------- ranked lists ---------- */
.rank-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; counter-reset: r; }
.rank-list li { display: grid; grid-template-columns: 42px 58px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rank-no { font-size: 1.15rem; font-weight: 800; color: var(--muted); text-align: center; }
.rank-list li:nth-child(-n+3) .rank-no { color: var(--accent-2); }
.rank-img img, .rank-img .noimg { width: 58px; height: auto; border-radius: 5px; display: block; aspect-ratio: 245 / 342; object-fit: cover; }
.rank-img .noimg b, .rank-img .noimg small { display: none; }
.rank-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.rank-name { font-weight: 750; color: var(--text); }

/* ---------- card page ---------- */
.card-hero { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 40px; align-items: start; margin: 18px 0 10px; }
.card-figure { margin: 0; position: sticky; top: 88px; }
.card-figure img { width: 100%; border-radius: 18px; box-shadow: var(--shadow-lg); display: block; background: var(--surface-2); }
.card-info h1 { margin-bottom: .35em; }
.card-info h1 .muted { font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.price-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 26px; padding: 18px 20px; margin: 18px 0 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.price-hero > div { display: flex; flex-direction: column; }
.big-own { position: static; opacity: 1; width: auto; height: 44px; padding: 0 18px; border-radius: 999px; display: inline-flex; gap: 8px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); margin-left: auto; font-weight: 700; backdrop-filter: none; }
.big-own[aria-pressed="true"] { background: var(--good); color: #fff; border-color: var(--good); }
.big-own[aria-pressed="true"] .own-label::after { content: " ✓"; }
.prices h2, .card-text h2 { margin-top: 0; }
.move { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
.move p { margin: 0; }
.move p + p { margin-top: 6px; color: var(--muted); font-size: .94rem; }
.move-head { display: flex; align-items: center; gap: 8px; }
.cost { display: inline-flex; gap: 3px; }
.dmg { margin-left: auto; font-weight: 800; font-size: 1.1rem; }
.ability .tag { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.flavor { margin: 14px 0 0; padding: 10px 16px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }

/* ---------- FAQ, pager, timeline ---------- */
.faq { margin: 34px 0; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin: 34px 0 10px; }
.pager a { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; justify-content: center; }
.pager a:hover { border-color: var(--accent); }
.pager small { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.pager-next { text-align: right; }
.pager-mid { align-items: center; color: var(--accent) !important; }
.timeline { list-style: none; padding: 0; margin: 0 0 30px; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 22px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline time { font-weight: 800; display: block; margin-bottom: 4px; }
.timeline p { margin: 6px 0 0; color: var(--muted); }
.link-list { padding-left: 20px; }

/* ---------- checklist ---------- */
.checklist .cb { width: 64px; text-align: center; }
.checklist .box { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--muted); border-radius: 4px; }
.checklist .na { color: var(--line); }
.own.sm { position: static; opacity: 1; width: 26px; height: 26px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); backdrop-filter: none; margin: 0 auto; }
.own.sm[aria-pressed="true"] { background: var(--good); color: #fff; border-color: var(--good); }
.checklist tr.owned td { background: var(--good-soft); }

/* ---------- footer ---------- */
.site-footer { margin-top: 50px; border-top: 1px solid var(--line); background: var(--surface); padding: 34px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.logo-footer { margin-bottom: 10px; }
.foot-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-list a { color: var(--text); font-size: .94rem; }
.disclaimer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }


/* ---------- overflow guards (flex/grid children must be allowed to shrink) ---------- */
.header-row > *, .search, .search input, .toolbar > *, .tb-row > *, .set-head > *, .poke-head > *, .hero > *, .two-col > *, .card-hero > *, .card-info, .facts > div, .strip-head > * { min-width: 0; }
.chips { max-width: 100%; }
.strip-head h2 { overflow-wrap: anywhere; }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header.open .main-nav { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow-lg); }
  .site-header.open .main-nav a { padding: 12px; font-size: 1.05rem; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 18px; }
  .hero-fan { display: none; }
  .two-col, .tiles-3, .footer-grid { grid-template-columns: 1fr; }
  .card-hero { grid-template-columns: 1fr; gap: 20px; }
  .card-figure { position: static; max-width: 380px; margin-inline: auto; }
  .set-head, .poke-head { grid-template-columns: 1fr; gap: 14px; }
  .set-head-logo { width: 200px; }
  .poke-head-img { width: 110px; }
  .toolbar { top: 64px; }
}
@media (max-width: 640px) {
  .header-row { gap: 10px; height: 60px; }
  .logo span { display: none; }
  .search { max-width: none; }
  .tool[data-currency-toggle] { padding: 0 8px; }
  .view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .set-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .set-grid > * { scroll-snap-align: start; }
  .hero-search .btn { padding: 0 16px; }
  .strip-head { flex-wrap: wrap; }
  .tb-search { min-width: 100%; }
  .strip-cards { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .strip-cards .tile { scroll-snap-align: start; }
  .tile-link { padding: 7px; }
  .tile-name { font-size: .86rem; }
  .set-table-head { display: none; }
  .set-row a { grid-template-columns: 30px 1fr auto; row-gap: 2px; }
  .set-row-date { grid-column: 2; grid-row: 2; font-size: .8rem; }
  .set-row-n { grid-column: 3; grid-row: 1; font-size: .82rem; }
  .set-row-v { grid-column: 3; grid-row: 2; font-size: .82rem; }
  .rank-list li { grid-template-columns: 26px 46px 1fr; padding: 10px; }
  .rank-list li > .price { grid-column: 2 / 4; justify-self: end; }
  .rank-img img, .rank-img .noimg { width: 46px; }
  .view-list .tile-sub { display: none; }
  .view-binder { padding: 10px; gap: 6px; }
  .price-hero { gap: 16px; }
  .big-own { margin-left: 0; width: 100%; justify-content: center; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-mid { grid-column: 1 / 3; grid-row: 2; }
  .toolbar { position: static; }
  .facts { grid-template-columns: 1fr 1fr; }
  .data { font-size: .86rem; }
  .data th, .data td { padding: 8px; }
  .rarity-table td:nth-child(2) { min-width: 0; }
  .data .opt { display: none; }
  .checklist .cb { width: 44px; }
  .card-figure { max-width: 300px; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .crumbs, .no-print, .toolbar, .faq, .pager, .strip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11px; }
  .wrap { width: 100%; }
  .data { border: 0; }
  .data th, .data td { padding: 3px 6px; border-bottom: 1px solid #ccc; }
  .own.sm { border: 1.5px solid #000; background: #fff; color: transparent; width: 14px; height: 14px; }
  .own.sm[aria-pressed="true"] { color: #000; }
  a { color: #000; }
  .page-head .lead { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
