/*
 * Pooka site stylesheet: tokens, base, nav, footer and every component/page
 * class the redesign uses. Dark mode is a pure `prefers-color-scheme` media
 * query (no toggle, no JS, no data-theme attribute), a Material 3 dark
 * scheme seeded from #F8B700.
 */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url('/fonts/bricolage/BricolageGrotesque-Variable-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url('/fonts/bricolage/BricolageGrotesque-Variable-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/Inter-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/Inter-Italic-Variable.woff2') format('woff2');
}

/* ---------- tokens (light default; dark via prefers-color-scheme) ---------- */
:root {
  --bg: #f8eadf;
  --bg-2: #f3e1d3;
  --surface: #fff6ee;
  --surface-2: #f5d4c5;
  --line: rgba(41, 37, 36, 0.12);
  --text: #292524;
  /* Darkened from #6b5c52 (same hue) to clear 4.5:1 against the tinted hero
     rgb(228,212,204) at .crumbs a's size (was 4.45:1, now 4.51:1). */
  --muted: #6a5b52;
  --accent: #f8b700;
  /* Darkened from #9a6a00 (same hue, 41deg), then again from #805800 (same hue)
     to clear 4.5:1 against the tinted hero rgb(228,212,204) at .eyebrow's
     0.75rem/700 size (was 4.40:1 on that background, now 4.53:1). */
  --accent-text: #7e5600;
  --accent-ink: #292524;
  --navy: #0d1e39;
  --good: #15803d;
  --theme: #f8b700;
  --shadow-card: 0 10px 22px rgba(41, 37, 36, 0.16), 0 2px 5px rgba(41, 37, 36, 0.1);
  --radius: 16px;
  --max: 1320px;
  /* Space between the viewport edge and .wrap; full-bleed rows use it to line up with the content. */
  --gutter: max(24px, calc((100vw - var(--max)) / 2));
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130b;
    --bg-2: #1c1810;
    --surface: #231f17;
    --surface-2: #2e2921;
    --line: rgba(235, 225, 212, 0.12);
    --text: #ebe1d4;
    --muted: #b8ad9d;
    --accent-text: #f8b700;
    --accent-ink: #261a00;
    --good: #4ade80;
    --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
  .store:not(.store-web) { background: #ebe1d4; border-color: #ebe1d4; color: #17130b; }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
.nav a:not(.btn), .footer a { color: inherit; }
.nav a:hover, .footer a:hover { text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }

:lang(ja) body { font-family: "Inter", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; line-height: 1.7; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { font-family: "Bricolage Grotesque", "Hiragino Sans", "Noto Sans JP", sans-serif; letter-spacing: 0; line-height: 1.3; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px) saturate(1.4); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.nav-links { display: flex; gap: 22px; font-size: 0.93rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.nav-search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 16px 0 40px; font: inherit; font-size: 0.9rem; }
.nav-search svg { position: absolute; left: 14px; top: 12px; width: 16px; height: 16px; stroke: var(--muted); fill: none; }
.nav-search kbd { position: absolute; right: 12px; top: 9px; font: 600 0.7rem var(--font-body); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.nav-web { font-size: 0.88rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nav-web:hover { color: var(--text); }
.lang { font-size: 0.85rem; font-weight: 700; color: var(--muted); white-space: nowrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
.lang:hover { color: var(--text); }

/* Nav "Sets" menu: a native <details> so it opens on tap with no JS; hover/focus
   on pointer devices is a CSS-only enhancement on top of that. */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: "▾"; font-size: 0.65em; }
.nav-menu-list { display: none; position: absolute; top: 100%; left: 0; margin-top: 14px; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow-card); z-index: 60; }
.nav-menu[open] > .nav-menu-list, .nav-menu:hover > .nav-menu-list, .nav-menu:focus-within > .nav-menu-list { display: grid; }
.nav-menu-list a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 0.9rem; }
.nav-menu-list a:hover { background: var(--bg-2); color: var(--text); }

/* Mobile nav menu: hidden on desktop (the inline nav-links/nav-web/btn-primary
   cover that case); shown at <=960px instead of them. A native <details> so it
   opens with no JS; site.js only adds an outside-click close on top of that. */
.nav-mobile { display: none; }
.nav-mobile > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; flex: none; }
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary::before { content: ""; display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 -6px currentColor, 0 6px currentColor; }
.nav-mobile-panel { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 4px var(--gutter) 12px; z-index: 60; }
.nav-mobile[open] > .nav-mobile-panel { display: grid; }
.nav-mobile-panel a { display: flex; align-items: center; min-height: 44px; font-size: 0.94rem; font-weight: 600; color: var(--text); border-top: 1px solid var(--line); }
.nav-mobile-label { display: flex; align-items: center; min-height: 36px; padding-top: 8px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.nav-mobile-panel > :first-child { border-top: 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 0.93rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: transform 0.15s, background 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 22px rgba(248, 183, 0, 0.28); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 0.87rem; }

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.83rem; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { opacity: 0.5; }

/* ---------- ambient themed hero ---------- */
.ambient { position: relative; isolation: isolate; overflow: clip; border-bottom: 1px solid var(--line); }
.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 90% at 78% 10%, color-mix(in srgb, var(--theme) 34%, transparent), transparent 70%),
    radial-gradient(50% 80% at 8% 0%, color-mix(in srgb, var(--theme) 14%, transparent), transparent 70%),
    linear-gradient(var(--bg-2), var(--bg));
}
/* Declared after the base rule (equal specificity) so this wins under dark,
   instead of the dead duplicate that used to sit inside the :root dark block
   above the base rule and always lost to it. */
@media (prefers-color-scheme: dark) {
  .ambient::before {
    background:
      radial-gradient(60% 90% at 78% 10%, color-mix(in srgb, var(--theme) 45%, transparent), transparent 70%),
      radial-gradient(50% 80% at 8% 0%, color-mix(in srgb, var(--theme) 18%, transparent), transparent 70%),
      linear-gradient(var(--bg-2), var(--bg));
  }
}

/* ---------- card image + tile ---------- */
.tcg { position: relative; aspect-ratio: 63 / 88; border-radius: 4.4% / 3.2%; overflow: hidden; background: color-mix(in srgb, var(--c, var(--surface-2)) 55%, var(--surface-2)); box-shadow: var(--shadow-card); transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s; transform-style: preserve-3d; }
.tcg img { width: 100%; height: 100%; object-fit: cover; }
.tcg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.38) 48%, rgba(180, 220, 255, 0.18) 54%, transparent 65%); background-size: 250% 250%; background-position: 120% 0; opacity: 0; transition: opacity 0.3s, background-position 0.7s; pointer-events: none; mix-blend-mode: screen; }
.tile:hover .tcg, .tcg.is-hero:hover { transform: translateY(-6px) scale(1.025); box-shadow: 0 22px 44px color-mix(in srgb, var(--c, #292524) 55%, rgba(41, 37, 36, 0.3)); }
.tile:hover .tcg::after, .tcg.is-hero:hover::after { opacity: 1; background-position: -20% 0; }
.tile { display: block; min-width: 0; }
.tile-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 10px; }
.tile-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.tile-sub span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Card number gets its own span so it never truncates alongside a long set name. */
.tile-sub .tile-num { flex: none; }
.price { font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price.hot { color: var(--accent-text); }
.rank { position: absolute; top: 8px; left: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.82rem; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 28px 20px; }
.row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding: 14px 4px 18px;
  margin: -14px calc(-1 * var(--gutter)) 0;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.row > * { scroll-snap-align: start; }
.row::-webkit-scrollbar { display: none; }
.row::after { content: ""; width: 1px; }

.section { padding: 64px 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.section-head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.more { font-weight: 600; font-size: 0.9rem; color: var(--accent-text); white-space: nowrap; }

/* ---------- chips + stats ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
button.chip { cursor: pointer; color: var(--muted); font-family: inherit; }
button.chip:hover { color: var(--text); }
button.chip[aria-pressed="true"], a.chip[aria-current] { background: var(--text); color: var(--bg); border-color: transparent; }
.chip .count { opacity: 0.6; font-weight: 500; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--muted)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(8px); }
.stat dt { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat dd small { display: block; font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 24px; }

/* ---------- home hero ---------- */
.home-hero { padding: 56px 0 64px; }
.home-hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.home-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.home-hero h1 em { font-style: normal; color: var(--accent-text); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 54ch; margin-top: 18px; }
.hero-search { margin-top: 30px; display: flex; gap: 10px; max-width: 560px; flex-wrap: nowrap; }
.hero-search input { flex: 1; min-width: 0; height: 56px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 24px; font: inherit; font-size: 1rem; }
.hero-search .btn { height: 56px; padding: 0 28px; flex: none; }
.quick { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.83rem; color: var(--muted); }
.fan { position: relative; height: 520px; perspective: 1400px; }
.fan .tcg { position: absolute; width: 270px; left: 50%; top: 50%; transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.fan .tcg:nth-child(1) { transform: translate(-112%, -50%) rotate(-13deg); z-index: 1; }
.fan .tcg:nth-child(2) { transform: translate(12%, -46%) rotate(12deg); z-index: 1; }
.fan .tcg:nth-child(3) { width: 310px; transform: translate(-50%, -54%) rotate(-1.5deg); z-index: 2; box-shadow: 0 40px 80px rgba(41, 37, 36, 0.4); }
.fan:hover .tcg:nth-child(1) { transform: translate(-128%, -52%) rotate(-17deg); }
.fan:hover .tcg:nth-child(2) { transform: translate(28%, -48%) rotate(16deg); }
.fan-set { height: 400px; }
.fan-set .tcg { width: 210px; }
.fan-set .tcg:nth-child(3) { width: 240px; }
.strip { background: var(--bg-2); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip div { padding: 22px 8px; text-align: center; border-left: 1px solid var(--line); }
.strip div:first-child { border-left: 0; }
.strip b { display: block; font-family: var(--font-display); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.strip span { display: block; padding: 0 8px; font-size: 0.82rem; color: var(--muted); }
.hero-visual { position: relative; }
.scan-chip { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(41, 37, 36, 0.25); z-index: 3; white-space: nowrap; }
.scan-chip b { display: block; font-size: 0.9rem; }
.scan-chip span { font-size: 0.78rem; color: var(--muted); }
.scan-chip i { font-style: normal; font-weight: 700; font-size: 0.8rem; color: var(--good); margin-left: 8px; }
.scan-chip .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(248, 183, 0, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 12px rgba(248, 183, 0, 0); } }
.lookup { border-block: 1px solid var(--line); background: var(--bg-2); padding: 30px 0 32px; }
.lookup .wrap { display: grid; grid-template-columns: auto minmax(0, 560px) 1fr; gap: 12px 24px; align-items: center; }
.lookup h2 { font-size: 1.35rem; }
.lookup .hero-search { margin: 0; max-width: none; }
.lookup .hero-search input, .lookup .hero-search .btn { height: 48px; }
.lookup .quick { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); display: block; transition: transform 0.2s; }
.step:hover { transform: translateY(-4px); }
.step > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--muted); font-size: 0.93rem; margin: 8px 0 14px; }
.step b { font-size: 0.88rem; color: var(--accent-text); }

/* ---------- set tiles ---------- */
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.set-tile { position: relative; border-radius: 20px; padding: 18px; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(150deg, color-mix(in srgb, var(--c) 46%, var(--surface)), var(--surface) 75%); transition: transform 0.2s; }
.set-tile:hover { transform: translateY(-4px); }
.set-tile img.logo { height: 84px; width: 100%; object-fit: contain; object-position: left center; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35)); }
.set-tile .meta { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.set-tile .meta b { display: block; font-size: 0.98rem; }
.set-tile .meta span { font-size: 0.78rem; color: var(--muted); }
.badge-new { position: absolute; top: 14px; right: 14px; background: var(--accent); color: var(--accent-ink); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px; }

/* ---------- card language tiles (home "Choose your cards") ---------- */
.card-langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.card-lang { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: center; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(150deg, color-mix(in srgb, var(--c) 40%, var(--surface)), var(--surface) 70%); transition: transform 0.2s; overflow: hidden; }
.card-lang:hover { transform: translateY(-4px); }
.card-lang h3 { font-size: 1.5rem; margin-top: 6px; }
.card-lang p, .card-lang .more { color: var(--muted); margin: 4px 0 12px; overflow-wrap: break-word; }
/* Grid items default to a content-based min-width, which lets a long set name
   push this column past its 1fr track; force it to actually shrink. */
.card-lang > div:last-child { min-width: 0; }
.cl-fan { position: relative; height: 150px; }
.cl-fan .tcg { position: absolute; width: 96px; top: 8px; }
.cl-fan .tcg:nth-child(1) { left: 0; transform: rotate(-9deg); }
.cl-fan .tcg:nth-child(2) { left: 44px; transform: rotate(-1deg); z-index: 1; }
.cl-fan .tcg:nth-child(3) { left: 88px; transform: rotate(8deg); }
@media (max-width: 960px) { .card-lang { grid-template-columns: 130px 1fr; padding: 16px; } .cl-fan { height: 110px; } .cl-fan .tcg { width: 68px; } .cl-fan .tcg:nth-child(2) { left: 30px; } .cl-fan .tcg:nth-child(3) { left: 60px; } }
/* Below ~480px even the shrunk two-column layout is too tight for translated
   set names; stack the fan above the text instead of trying to fit both
   side by side. */
@media (max-width: 480px) {
  .card-lang { grid-template-columns: minmax(0, 1fr); }
  .cl-fan { height: 120px; }
}

/* ---------- illustrator tiles ---------- */
/* min(360px, 100%) instead of a bare 360px floor: a fixed floor overflows any
   viewport narrower than 360px plus its gutters (this section renders below
   960px too, unlike most other grids, which get a template-columns override
   at that breakpoint). */
.artists { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 18px; }
.artist-tile { border-radius: 20px; border: 1px solid var(--line); background: var(--surface); padding: 16px; display: block; transition: transform 0.2s; }
.artist-tile:hover { transform: translateY(-4px); }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.mosaic .tcg { box-shadow: none; }
.artist-tile b { font-size: 1rem; }
.artist-tile span { display: block; font-size: 0.8rem; color: var(--muted); }

/* ---------- guides ---------- */
.guides { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
.guides-3 { grid-template-columns: repeat(3, 1fr); }
.guide-tile { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: transform 0.2s; }
.guide-tile:hover { transform: translateY(-3px); }
.guide-tile .cover { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface-2); }
.guide-tile .body { padding: 18px 22px 22px; }
.guide-tile h3 { font-size: 1.25rem; margin-top: 6px; }
.guide-tile p { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

/* ---------- app band ---------- */
.app-band { border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(135deg, #0d1e39, #152a52 60%, #3a2c00); color: #eef2f9; padding: 48px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; overflow: hidden; }
/* .eyebrow's --accent-text is tuned for contrast against the page's light
   background; on this navy band it measures 2.49:1, so use --accent instead. */
.app-band .eyebrow { color: var(--accent); }
.app-band p { color: #b9c4da; margin-top: 12px; max-width: 52ch; }
.app-band ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.95rem; }
.app-band li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 10px; }
.app-band .cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.app-band .store:not(.store-web) { background: #fff; border-color: #fff; color: #0d1e39; }
.app-band .web { display: block; margin-top: 14px; font-size: 0.88rem; color: #b9c4da; }
.app-band .web a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.phone { justify-self: center; width: 250px; border-radius: 38px; border: 8px solid #05080f; background: #0b1220; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); padding: 16px 12px; margin-bottom: -120px; }
.phone .ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.phone .tcg { box-shadow: none; }
.phone .tcg.missing { opacity: 0.25; filter: grayscale(1); }

/* ---------- set page ---------- */
.set-hero { padding: 36px 0 44px; }
.set-hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; margin-top: 26px; }
.set-logo { height: 110px; width: auto; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); margin-bottom: 20px; }
.set-hero .lead { font-size: 1.05rem; }
.set-hero .stats { margin-top: 26px; }
.set-hero .cta { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.toolbar { position: sticky; top: 64px; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-block: 1px solid var(--line); padding: 12px 0; margin-bottom: 30px; }
.toolbar .wrap { display: flex; gap: 12px; align-items: center; }
.toolbar input, .toolbar select { min-height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 16px; font: inherit; font-size: 0.87rem; }
.toolbar input { width: 170px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.chips::-webkit-scrollbar { display: none; }
/* Desktop: .chips shares its toolbar row with an input/select (flex: 1 above),
   so it can't take the .row full-bleed treatment without misaligning those
   siblings. A permanent edge fade reads fine whether or not the row actually
   overflows, unlike .row's bleed, which only fits a lone full-width scroller. */
@media (min-width: 961px) {
  .chips { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button, .seg a { border: 0; background: none; color: var(--muted); min-height: 36px; padding: 0 14px; font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; }
.seg button[aria-pressed="true"], .seg a[aria-current="true"] { background: var(--text); color: var(--bg); }
.own-seg a { display: inline-grid; place-items: center; min-height: 36px; padding: 0 14px; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.own-seg a:hover { color: var(--text); }
.result-count { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.checklist-wrap { overflow-x: auto; }
table.checklist { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.checklist th { text-align: left; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.checklist td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.checklist tr:hover td { background: var(--surface); }
.checklist .thumb { width: 38px; border-radius: 3px; }
.checklist td.r, .checklist th.r { text-align: right; }
[data-view="grid"] .checklist-wrap, [data-view="list"] #card-grid { display: none; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 18px 0 14px; }
.bar i { display: block; background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.84rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.two { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.prose p + p { margin-top: 14px; }
.prose p { color: color-mix(in srgb, var(--text) 84%, var(--muted)); }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin-top: 10px; max-width: 75ch; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.pager a:last-child { flex-direction: row-reverse; text-align: right; }
.pager img { height: 46px; width: 110px; object-fit: contain; }
.pager .tcg { width: 52px; flex: none; box-shadow: none; }
.pager small { display: block; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }

@media (min-width: 961px) { .facts div:last-child:nth-child(3n+1) { grid-column: 1 / -1; } .facts div:nth-last-child(2):nth-child(3n+1), .facts div:last-child:nth-child(3n+2) { grid-column: span 1; } }
@media (max-width: 960px) { .facts div:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- card page ---------- */
.card-hero { padding: 32px 0 72px; }
.card-layout { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 64px; margin-top: 28px; align-items: start; }
.card-stage { position: sticky; top: 96px; perspective: 1200px; }
.card-stage .tcg { width: 100%; box-shadow: 0 36px 80px rgba(41, 37, 36, 0.38), 0 0 120px color-mix(in srgb, var(--theme) 40%, transparent); }
.card-stage .under { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.card-info h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.card-sub { font-size: 1.08rem; color: var(--muted); margin-top: 8px; }
.card-sub a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.price-panel { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; }
.pp-head { grid-column: 1 / -1; }
.sources { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.source { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.source small { display: block; color: var(--muted); font-size: 0.76rem; }
.source b { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.note { font-size: 0.78rem; color: var(--muted); grid-column: 1 / -1; }
.set-price { margin-top: 8px; }
.set-price .sources { grid-template-columns: 1fr; }
.set-price .note { margin-top: 8px; }
.shiny-tease { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 70%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.shiny-tease .lock { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1rem; flex: none; }
.shiny-tease b { display: block; font-size: 0.95rem; }
.shiny-tease div { flex: 1; }
.shiny-tease div span { font-size: 0.84rem; color: var(--muted); }
.shiny { margin-top: 14px; font-size: 0.88rem; color: #d9c48a; }
.app-band h2 { margin-top: 10px; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.block { margin-top: 36px; }
.block > h2 { font-size: 1.3rem; margin-bottom: 14px; }
.attack { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.attack:last-child { border-bottom: 1px solid var(--line); }
.energy { display: flex; gap: 4px; padding-top: 2px; }
.energy i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font: 800 0.62rem var(--font-body); color: rgba(0, 0, 0, 0.7); font-style: normal; box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25); }
.attack b { font-size: 1.02rem; }
.attack p { color: var(--muted); font-size: 0.92rem; margin-top: 3px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 14px 16px; }
.facts dt { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.facts dd { margin: 3px 0 0; font-weight: 600; font-size: 0.95rem; }
.facts a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.names { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.names b { color: var(--text); font-weight: 600; }

/* ---------- illustrator page ---------- */
.ill-hero { padding: 36px 0 48px; }
.ill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 26px; }
.wall { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; transform: rotate(3deg); }
.wall .tcg:nth-child(odd) { transform: translateY(14px); }
.year-head { margin: 44px 0 20px; }
.year-head h2 { font-size: 2.2rem; }
.year-head h2 .count { margin-left: 10px; font-size: 0.9rem; font-weight: 500; color: var(--muted); font-family: var(--font-body); }
.year-head p, .year-head > span { display: block; margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- guide page ---------- */
.guide-hero { padding: 40px 0 24px; }
.guide-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; margin-top: 20px; }
.fan .tcg:only-child { transform: translate(-50%, -52%) rotate(-1.5deg); }
.guide-hero h1 { max-width: 18ch; }
.guide-sub { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--muted); margin-top: 10px; }
.byline { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 22px; font-size: 0.87rem; color: var(--muted); }
.byline .chip { min-height: 26px; font-size: 0.74rem; }
.guide-body { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; justify-content: center; padding: 64px 0; }
/* Below 960px .toc and .article share a single 1fr column; without this,
   either item's min-content (e.g. a long inline-gallery or table) floors
   the shared track wider than the viewport and centers the overflow. */
.guide-body > * { min-width: 0; }
.toc { position: sticky; top: 96px; align-self: start; min-width: 0; max-width: 100%; font-size: 0.88rem; display: grid; gap: 10px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 18px; }
.toc b { color: var(--text); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.toc a { overflow-wrap: anywhere; }
.toc a:hover { color: var(--text); }
.article { font-size: 1.08rem; line-height: 1.72; }
.article h2 { margin: 48px 0 16px; }
.article > :first-child > h2:first-child, .article > h2:first-child { margin-top: 0; }
.article p + p { margin-top: 18px; }
.answer { border-left: 3px solid var(--accent); background: var(--surface); padding: 18px 22px; border-radius: 0 12px 12px 0; margin-bottom: 36px; font-size: 1.05rem; }
.inline-gallery { display: grid; grid-template-columns: repeat(4, 1fr); justify-content: center; gap: 16px; margin: 28px -60px; }
.inline-gallery figcaption, .inline-gallery .tile-sub { font-size: 0.76rem; }
.two .inline-gallery { margin-left: 0; margin-right: 0; }
.inline-cta { margin: 40px -60px; padding: 26px 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; font-size: 1rem; line-height: 1.5; }
.inline-cta h3 { font-size: 1.3rem; margin-top: 6px; }
.inline-cta p { color: var(--muted); font-size: 0.93rem; margin-top: 6px; }
.inline-cta .cta-row { margin: 0; flex-direction: column; }
.inline-cta .store { height: 44px; }
.archive { list-style: none; margin: 0; padding: 0; }
.archive a { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.archive span { font-size: 0.78rem; }

/* ---------- overview pages (sets / illustrators / guides hubs) ---------- */
.hub-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
.latest { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.latest .set-tile-big { grid-column: 1 / -1; min-height: 210px; }
.latest .set-tile-big img.logo { height: 110px; }
.latest .set-tile { min-height: 150px; }
.series { scroll-margin-top: 140px; }
.series .year-head h2 { font-size: 1.7rem; }
.az-group { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); scroll-margin-top: 140px; }
.az-group h2 { font-size: 2rem; color: var(--accent-text); }
.az-list { columns: 4 200px; column-gap: 28px; }
.az-list a { display: block; padding: 5px 0; font-size: 0.95rem; break-inside: avoid; }
.az-list a:hover { color: var(--accent-text); }

/* ---------- species pages ---------- */
.species-portrait { display: grid; place-items: center; border-radius: 28px; padding: 32px; border: 1px solid var(--line); background: linear-gradient(150deg, color-mix(in srgb, var(--theme) 30%, var(--surface)), var(--surface) 78%); }
.species-portrait img { width: auto; height: auto; max-width: 100%; max-height: 320px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28)); }
.species-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.species-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: center; transition: transform 0.2s; }
.species-tile:hover { transform: translateY(-3px); }
.species-tile img { width: 72px; height: 72px; object-fit: contain; }
.species-tile b { font-size: 0.85rem; }
.species-tile .dex, .species-tile .num { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 80px; padding: 56px 0 40px; font-size: 0.9rem; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer h4 { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); }
.footer a:hover { color: var(--text); }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }
.footer-tagline { margin-top: 12px; max-width: 34ch; }
.footer-legal-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-legal-links { display: flex; gap: 16px; }
.footer-disclaimer { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- conversion components (store buttons, app band, sticky CTA) ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 14px; border-radius: 12px; background: #0d1e39; color: #fff; border: 1px solid #0d1e39; transition: transform 0.15s; }
.store:hover { transform: translateY(-2px); }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store-web svg { fill: none; }
.store span { display: grid; font-weight: 700; font-size: 1rem; line-height: 1.15; }
.store small { font-weight: 500; font-size: 0.66rem; opacity: 0.75; letter-spacing: 0.02em; }
.store-web { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fine { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
.qr { width: 84px; height: 84px; border-radius: 10px; flex: none; }
.qr-line { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: 0.85rem; color: #b9c4da; max-width: 46ch; }
.qr-line .qr { width: 72px; height: 72px; }
/* Light-surface variant of .qr-line, for a QR code on its own (not inside the dark .app-band). Desktop only, see the mobile media query. */
.qr-panel { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); max-width: 340px; }
.qr-panel span { color: var(--muted); font-size: 0.88rem; }
.set-hero .collect { max-width: 640px; }
.set-tile .num { white-space: nowrap; }
.collect-lead { margin-top: 10px; color: var(--muted); font-size: 0.95rem; max-width: 60ch; }
.collect { margin-top: 18px; padding: 22px 24px; border-radius: var(--radius); border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); scroll-margin-top: 110px; }
.collect-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.collect h2 { font-size: 1.3rem; }
.collect ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 0.93rem; color: var(--muted); }
.collect li b { color: var(--text); }
.collect li::before { content: "✓"; color: var(--accent-text); font-weight: 800; margin-right: 10px; }
.sticky-cta { position: fixed; z-index: 90; right: 20px; bottom: 20px; width: 330px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(41, 37, 36, 0.3); animation: rise 0.35s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sticky-cta .x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.sc-desktop { display: flex; gap: 14px; align-items: center; }
.sc-desktop b { display: block; font-size: 0.95rem; line-height: 1.25; padding-right: 14px; }
.sc-desktop span { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.sc-desktop a { font-size: 0.84rem; font-weight: 700; color: var(--accent-text); }
.sc-mobile { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .nav-web, .nav-search kbd { display: none; }
  .nav .wrap { gap: 18px; }
  .nav-links { gap: 16px; }
  .lookup .wrap { grid-template-columns: minmax(0, 1fr); }
  .inline-gallery, .inline-cta { margin-inline: 0; }
}
@media (max-width: 960px) {
  .nav-links, .nav-search kbd { display: none; }
  .home-hero .wrap, .guide-hero-grid, .set-hero-grid, .card-layout, .ill-grid, .two, .app-band, .guides { grid-template-columns: minmax(0, 1fr); }
  .nav .wrap { gap: 12px; }
  .nav .btn-primary, .nav-web { display: none; }
  /* No position: relative here on purpose: the panel below is positioned
     absolute against .nav (position: sticky) so it spans the full nav width,
     not just the hamburger button. */
  .nav-mobile { display: block; }
  .lookup .wrap, .steps, .inline-cta { grid-template-columns: minmax(0, 1fr); }
  .inline-cta { margin-inline: 0; }
  .inline-cta .cta-row { flex-direction: row; }
  .cta-row .store { flex: 1 1 150px; }
  .scan-chip { bottom: -8px; }
  .sticky-cta { left: 0; right: 0; bottom: 0; width: auto; border-radius: 16px 16px 0 0; padding: 10px 40px 10px 14px; }
  .sc-desktop { display: none; }
  .sc-mobile { display: flex; align-items: center; gap: 12px; }
  .sc-mobile div { flex: 1; min-width: 0; }
  .sc-mobile b { display: block; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sc-mobile span:not(.brand-mark) { font-size: 0.74rem; color: var(--muted); }
  .sticky-cta .x { top: 50%; transform: translateY(-50%); right: 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fan { height: 380px; }
  .fan .tcg { width: 190px; }
  .fan .tcg:nth-child(3) { width: 220px; }
  .card-stage { position: static; max-width: 340px; margin-inline: auto; }
  .card-layout { gap: 36px; }
  .strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 12px; }
  .tile-sub { display: none; }
  .toolbar .wrap { flex-wrap: wrap; }
  .toolbar input { flex: 1; }
  /* Tap targets: >=40px hit areas on mobile only, desktop keeps the tighter values above. */
  .chip, .byline .chip, .seg button, .seg a, .own-seg a, .toolbar input, .toolbar select { min-height: 40px; }
  .sticky-cta .x { width: 36px; height: 36px; }
  /* At this width .chips is alone on its own toolbar row (order: 3, full
     width), same context as .row, so it gets the same edge-to-edge bleed
     instead of clipping at the .wrap gutter. */
  .chips {
    order: 3;
    flex-basis: 100%;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .price-panel { grid-template-columns: 1fr; }
  .sources { grid-template-columns: 1fr; }
  .guide-body { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .inline-gallery { margin-inline: 0; grid-template-columns: repeat(2, 1fr); }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .phone { margin-bottom: -90px; }
  .app-band { padding: 32px 24px; }
  .wall { grid-template-columns: repeat(4, 1fr); }
  .checklist .hide-sm { display: none; }
  .hero-search input { padding: 0 16px; }
  .strip div { border-left: 0; border-top: 1px solid var(--line); padding: 16px 8px; }
  .strip div:nth-child(-n+2) { border-top: 0; }
  .strip div:nth-child(even) { border-left: 1px solid var(--line); }
  .byline { flex-wrap: wrap; gap: 4px 12px; }
  .fan-set { height: 300px; margin-top: 12px; }
  .home-hero { padding: 36px 0 48px; }
  .section { padding: 44px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row { grid-auto-columns: 44%; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .footer .cols > div:first-child { grid-column: 1 / -1; }
  .app-band h2 { font-size: 1.6rem; }
  .qr-line, .qr-panel { display: none; }
  .collect { padding: 18px; }
  .collect-head { align-items: flex-start; }
  .lang { padding: 5px 8px; font-size: 0.78rem; }
  .guides-3 { grid-template-columns: minmax(0, 1fr); }
  .hub-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .az-group { grid-template-columns: 44px 1fr; }
  .az-list { columns: 2 140px; }
  .latest .set-tile-big { min-height: 170px; }
}
@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .wrap { width: calc(100% - 32px); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
  .tile-name { font-size: 0.8rem; }
  .tile-sub { font-size: 0.7rem; }
  .nav-search input { padding-left: 34px; font-size: 0.82rem; }
  .cta-row .store { flex: 1 1 100%; }
  .cta-row .store:not(.store-web) { flex: 1 1 calc(50% - 5px); padding: 0 12px 0 10px; }
  .store span { font-size: 0.92rem; }
}
/* The hero/guide card fan positions its side cards with fixed-width transforms
   that overflow a narrow viewport; shrink the cards enough for both side
   cards to stay inside the column instead of just the centered one. */
@media (max-width: 480px) {
  .fan { height: 300px; overflow: hidden; }
  .fan .tcg { width: 130px; }
  .fan .tcg:nth-child(3) { width: 150px; }
  .fan-set { height: 220px; }
}

/* When the sticky CTA is visible, keep it clear of the footer's last links
   instead of floating over them once the visitor scrolls to the bottom. */
body:has(#sticky-cta:not([hidden])) .footer { padding-bottom: 96px; }
@media (max-width: 960px) {
  body:has(#sticky-cta:not([hidden])) .footer { padding-bottom: 96px; }
}

/* Tap targets: pad the hit area to >=40px on mobile without resizing the
   visible text (negative margin cancels the padding's effect on layout). */
@media (max-width: 768px) {
  .crumbs a { display: inline-block; padding-block: 11px; margin-block: -11px; }
  .footer-legal-links a { display: inline-block; padding-block: 11px; margin-block: -11px; }
  /* Footer "Browse" column is the 2nd child of .cols (brand, browse, app); same
     tap-target padding as .footer-legal-links a above, no markup change needed. */
  .footer .cols > div:nth-child(2) a { display: inline-block; padding-block: 11px; margin-block: -11px; }
  .lang { display: inline-flex; align-items: center; box-sizing: border-box; min-height: 40px; }
  .brand { min-height: 40px; }
}

/* Japanese headings break between phrases, not inside a word. */
:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; text-wrap: balance; }

/* ---------- page theme colour (API themecolor on <body> as --theme) ---------- */
::selection { background: color-mix(in srgb, var(--theme) 45%, transparent); }
.nav, .toolbar { border-color: color-mix(in srgb, var(--theme) 22%, var(--line)); }
.ambient .stat { background: color-mix(in srgb, var(--theme) 8%, var(--surface)); border-color: color-mix(in srgb, var(--theme) 24%, var(--line)); }
.ambient .chip { border-color: color-mix(in srgb, var(--theme) 30%, var(--line)); }
.facts { border-color: color-mix(in srgb, var(--theme) 24%, var(--line)); background: color-mix(in srgb, var(--theme) 24%, var(--line)); }
.price-panel { border-color: color-mix(in srgb, var(--theme) 24%, var(--line)); }
.faq details { border-color: color-mix(in srgb, var(--theme) 18%, var(--line)); }
.pager a:hover { border-color: color-mix(in srgb, var(--theme) 55%, var(--line)); }
.section-head h2::before, .year-head h2::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.45em; border-radius: 50%; background: var(--theme); vertical-align: 0.12em; }
