@font-face {
  font-family: Geist;
  src: url('../assets/fonts/Geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Galmuri11;
  src: url('../assets/fonts/Galmuri11-latin.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: Galmuri11Bold;
  src: url('../assets/fonts/Galmuri11-Bold-latin.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: light;
  --sky: #6db3f2;
  --sky-deep: #2f86de;
  --sky-light: #bfe0fb;
  --panel: #d3e8fb;
  --panel-strong: #eaf4fd;
  --glass: rgba(255, 255, 255, .66);
  --ink: #0f2540;
  --ink-2: #2c4a72;
  --ink-3: #4d6b92;
  --fire: #e8472b;
  --fire-deep: #b83519;
  --cream: #ffe8a8;
  --leaf: #4fb84a;
  --gold: #f2b632;
  --line: rgba(15, 37, 64, .1);
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 24px 50px -24px rgba(10, 50, 100, .5), 0 2px 0 rgba(255, 255, 255, .35) inset;
  --shadow-sm: 0 10px 24px -14px rgba(10, 50, 100, .45);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Motion by purpose (DESIGN.md Motion): a press, a hover, a state change, a move, an arrival. */
  --t-press: 90ms;
  --t-hover: 180ms;
  --t-state: 260ms;
  --t-move: 320ms;
  --t-enter: 420ms;
  --pixel: Galmuri11, ui-monospace, monospace;
  --pixel-bold: Galmuri11Bold, Galmuri11, ui-monospace, monospace;
  font-family: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--sky);
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; overflow-x: clip; -webkit-font-smoothing: antialiased; line-height: 1.55; background: var(--sky); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, canvas { display: block; max-width: 100%; }
img { object-fit: contain; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--fire); outline-offset: 4px; border-radius: 999px; }
::selection { background: var(--fire); color: #fff; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--sky-light); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 3px solid var(--sky-light); border-radius: 999px; }
html { scrollbar-color: var(--ink-3) var(--sky-light); }

.px { font-family: var(--pixel); font-weight: 400; letter-spacing: .03em; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.wrap-narrow { width: min(760px, calc(100% - 32px)); }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 14px 20px; border-radius: 999px; background: var(--ink); color: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.no-script { margin: 24px auto; max-width: 720px; padding: 20px; border-radius: var(--radius-sm); background: var(--panel); line-height: 1.6; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; vertical-align: middle; flex: none; }
.dot-live { background: var(--leaf); box-shadow: 0 0 0 3px rgba(79, 184, 74, .25); }
.dot-gold { background: var(--gold); box-shadow: 0 0 0 3px rgba(242, 182, 50, .28); }

/* Pills and tags */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease), background var(--t-hover) var(--ease); }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(1px) scale(.98); transition-duration: var(--t-press); }
.pill-fire { background: var(--fire); color: #fff; box-shadow: 0 14px 28px -12px rgba(184, 53, 25, .75), inset 0 -2px 0 rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25); }
.pill-fire:hover { background: #f0512f; box-shadow: 0 18px 32px -12px rgba(184, 53, 25, .8), inset 0 -2px 0 rgba(0, 0, 0, .14); }
.pill-glass { background: var(--glass); color: var(--ink); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), var(--shadow-sm); }
.pill-glass:hover { background: rgba(255, 255, 255, .86); }
.pill-white { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.pill-lg { min-height: 58px; padding: 0 30px; font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.tag-live { background: #fff; color: var(--ink); }
.tag-ink { background: var(--ink); color: #fff; }
.tag-next { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ticker { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 12px; letter-spacing: .08em; color: #fff; }
.ticker-fire { background: #ee6650; }
.ticker-grass { background: #7fae3f; }
.ticker-water { background: #4d94cf; }
.ticker-steel { background: #8f96a8; }
.ticker-psychic { background: #9a78bd; }
/* The company mark rides beside the ticker and never replaces it. It is an <img>
   rather than a CSS mask on purpose: a mask that fails to load leaves a solid
   white block on the chip, while an image that fails to load leaves the chip
   reading exactly as it did before. Each file now carries its brand fill, so a
   mark on a pale surface arrives in the company's own colour with no filter;
   only the coloured family chips override it, where brand red on fire red would
   be unreadable. */
.mark { flex: none; image-rendering: auto; }
.ticker .mark { width: 13px; height: 13px; filter: brightness(0) invert(1); }
.cell-stock .company { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 3vw, 40px) 14px; transition: background .3s var(--ease); }
.site-header.is-scrolled { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; background: linear-gradient(rgba(109, 179, 242, .92), rgba(109, 179, 242, 0)); }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 96px; height: auto; filter: drop-shadow(0 6px 10px rgba(10, 50, 100, .25)); transition: transform .3s var(--ease); }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }
.pill-nav { justify-self: center; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), var(--shadow-sm); }
.pill-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; transition: background .2s var(--ease), color .2s var(--ease); }
.pill-nav a:hover { background: rgba(255, 255, 255, .6); }
.pill-nav a.is-active { background: #fff; box-shadow: 0 4px 12px -6px rgba(10, 50, 100, .4); }
.header-actions { justify-self: end; display: flex; gap: 8px; }
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; isolation: isolate; padding: calc(118px + env(safe-area-inset-top)) 0 48px; overflow: clip; background: linear-gradient(180deg, var(--sky-deep) 0%, #4f9fea 28%, #8fc5f4 58%, var(--sky) 100%); }
.hero::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: min(52vw, 560px); background: url('../assets/landing/panorama.png') center bottom / cover no-repeat; image-rendering: pixelated; mask-image: linear-gradient(180deg, transparent 0%, #000 42%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 42%); }
.hero::after { content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, rgba(109, 179, 242, 0), var(--sky)); }
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cloud { position: absolute; height: auto; opacity: .96; filter: drop-shadow(0 18px 18px rgba(20, 70, 130, .18)); animation: drift var(--dur, 60s) ease-in-out infinite alternate; }
.cloud-a { width: clamp(180px, 22vw, 320px); top: 9%; left: -3%; --dur: 58s; }
.cloud-b { width: clamp(140px, 17vw, 250px); top: 6%; right: 4%; --dur: 74s; animation-delay: -20s; }
.cloud-c { width: clamp(110px, 12vw, 180px); top: 34%; right: -2%; --dur: 66s; animation-delay: -40s; }
.cloud-d { width: clamp(120px, 14vw, 200px); top: 40%; left: 5%; --dur: 80s; animation-delay: -10s; opacity: .9; }
.cloud-e { width: clamp(90px, 10vw, 150px); top: 20%; left: 38%; --dur: 90s; animation-delay: -55s; opacity: .8; }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(6%); } }
.floaters { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.floater { position: absolute; display: grid; place-items: center; gap: 2px; width: 168px; padding: 14px 0 12px; border-radius: 44px; background: var(--glass); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 30px 44px -20px rgba(10, 50, 100, .6); animation: bob 7s ease-in-out infinite; }
.floater-mon { width: 128px; height: 128px; image-rendering: pixelated; -webkit-user-drag: none; user-select: none; }
/* Loops that are off screen stop (src/landing.js). */
.is-paused .cloud, .is-paused .floater, .is-paused .tcg-foil, .is-paused .tcg-art::after { animation-play-state: paused; }
/* With a mouse the medallion sprites are toys (src/landing-toys.js): pulled away, they spring home.
   The logo's box then lets pointers through to them, and a held one rises above it. */
@media (hover: hover) and (pointer: fine) and (min-width: 721px) and (prefers-reduced-motion: no-preference) {
  .floater-mon { pointer-events: auto; cursor: grab; }
  .floater.is-held .floater-mon { cursor: grabbing; }
  .floaters.has-held { z-index: 2; }
  .hero-inner { pointer-events: none; }
  .hero-inner > :not(.hero-actions), .hero-actions > * { pointer-events: auto; }
}
/* Ticker and company mark sit on glass, so the mark keeps its own black path
   instead of the white-out the coloured chips use. */
.floater-ticker { display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; font-family: var(--pixel-bold); font-size: 15px; letter-spacing: .12em; color: var(--ink); }
.floater-ticker .mark { width: 16px; height: 16px; }
.floater small { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.floater-fire { top: 10%; right: 6%; transform: rotate(6deg); animation-delay: -1s; }
.floater-grass { top: 35%; left: 4%; transform: rotate(-7deg); animation-delay: -3s; }
.floater-water { top: 30%; right: 4%; transform: rotate(-4deg); animation-delay: -5s; }
/* Five families, five logos. The steel card only appears where there is room
   for it beside the logo without crowding the buttons. */
.floater-steel { display: none; top: 21%; left: 1.5%; transform: rotate(4deg); animation-delay: -4s; }
@media (min-width: 1240px) { .floater-steel { display: grid; } }
.floater-psychic { top: 5%; left: 8%; transform: rotate(-3deg); animation-delay: -6s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.hero-inner { position: relative; z-index: 1; width: min(920px, calc(100% - 32px)); margin-inline: auto; text-align: center; }
.hero-logo { margin: 0 auto; width: min(640px, 86vw); }
.hero-logo img { width: 100%; height: auto; filter: drop-shadow(0 30px 30px rgba(20, 60, 120, .35)); animation: land 1.1s var(--ease) both; }
@keyframes land { from { opacity: 0; translate: 0 -24px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
.hero-line { margin: 26px auto 0; max-width: 34ch; color: #fff; font-size: clamp(18px, 2.3vw, 26px); font-weight: 500; line-height: 1.35; text-shadow: 0 2px 12px rgba(20, 70, 130, .35); text-wrap: balance; }
.hero-line .px { display: block; margin-top: 8px; font-family: var(--pixel-bold); color: var(--cream); font-size: clamp(16px, 2.1vw, 26px); line-height: 1.4; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero-note { display: inline-flex; align-items: center; gap: 10px; margin: 22px auto 0; padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(15, 37, 64, .28); color: #fff; font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.token-strip { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 22px auto 0; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), var(--shadow-sm); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.token-strip + .hero-note { margin-top: 10px; }
.token-symbol { font-family: var(--pixel-bold); color: var(--fire); font-size: 15px; }
.token-ca { font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
/* A full contract address is one 42-character word; it breaks anywhere rather than push a phone page sideways. */
.ca { overflow-wrap: anywhere; word-break: break-all; }
.token-copy, .token-link { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 11px; line-height: 32px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: rgba(255, 255, 255, .8); cursor: pointer; text-decoration: none; transition: background .2s var(--ease), transform .2s var(--ease); }
.token-link:first-of-type { background: var(--fire); color: #fff; }
.token-copy:hover, .token-link:hover { transform: translateY(-1px); }
.token-copy:focus-visible, .token-link:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; }
.live-card { position: relative; z-index: 1; width: min(1120px, calc(100% - 32px)); margin: 64px auto 0; padding: 14px; border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), var(--shadow); }
.live-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-bottom { padding: 12px 8px 2px; font-size: 13px; color: var(--ink-2); }
.live-bottom .px { color: var(--ink); font-size: 13px; }
/* The live card's encounter (src/landing-encounter.js): the row keeps one height at rest and in battle. */
.live-bottom > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; }
.live-bottom > div[hidden] { display: none; }
.live-card.has-encounter .live-bottom { min-height: 96px; }
.encounter-rest-actions, .encounter-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.encounter-walk, .encounter-actions .pill { min-height: 42px; padding: 0 18px; font-size: 12px; }
.encounter-text { min-width: 0; flex: 1 1 320px; }
.encounter-text:focus { outline: none; }
.encounter-line { width: fit-content; max-width: 100%; margin: 0; color: var(--ink); font-size: 14px; }
.encounter-detail { margin: 3px 0 0; max-width: 64ch; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.encounter-detail:empty { display: none; }
#landing-world { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 18px; background: #86bb76; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgba(15, 37, 64, .08); }
.facts { list-style: none; margin: 18px auto 0; padding: 0; width: min(1120px, calc(100% - 32px)); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.facts li { display: inline-flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm); color: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.facts b { font-family: var(--pixel); font-weight: 400; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Sections */
.section { padding-top: clamp(64px, 9vw, 120px); }
.kicker { margin: 0 0 14px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .88); }
.kicker-ink { color: var(--ink-3); text-align: left; }
.title { margin: 0 0 34px; text-align: center; color: #fff; font-size: clamp(34px, 5.4vw, 66px); font-weight: 700; line-height: 1; letter-spacing: -.035em; text-shadow: 0 2px 0 rgba(10, 50, 100, .12), 0 16px 32px rgba(10, 50, 100, .25); text-wrap: balance; }
.title .px { display: block; margin-top: .22em; font-family: var(--pixel-bold); font-size: .62em; line-height: 1.15; letter-spacing: .02em; color: var(--cream); text-shadow: 0 2px 0 rgba(10, 50, 100, .18), 0 10px 24px rgba(10, 50, 100, .3); }
.panel { padding: clamp(24px, 4vw, 56px); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel .title { color: var(--ink); text-shadow: none; }
.panel .title .px { color: var(--fire); text-shadow: none; }
.panel-what .three { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 32px; max-width: 980px; margin-inline: auto; }
.panel-what p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.panel-what b { color: var(--ink); }
/* Type to company, spelled out once. The game already pairs them on the dex
   entry and the shard ledger; the landing should not make a reader guess. */
.type-map { list-style: none; margin: 34px auto 0; padding: 26px 0 0; max-width: 980px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px 12px; border-top: 1px solid var(--line); }
.type-map li { display: grid; justify-items: center; gap: 7px; text-align: center; }
.type-map .type-mon { width: 48px; height: 48px; image-rendering: pixelated; }
.type-map b { font-size: 14px; color: var(--ink); }
.type-map small { font-size: 12px; color: var(--ink-3); }

/* Battles: three rules as three cards, then the two screens that prove them. */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.rule { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; align-content: start; padding: 28px 26px 26px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.rule-number { position: static; display: block; font-size: 22px; line-height: 1; color: var(--fire); margin-bottom: 10px; }
.rule h3 { margin: 0 0 10px; padding-right: 0; line-height: 1.2; font-size: 21px; letter-spacing: -.01em; color: var(--ink); }
.rule p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.rule b { color: var(--ink); }
.rule-facts { list-style: none; margin: 16px 0 0; padding: 16px 0 0; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.rule-facts li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--ink-3); }
.rule-facts li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--fire); }
.battle-proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 18px; }
.battle-proof figure { margin: 0; }
.battle-proof img { width: 100%; height: auto; border-radius: var(--radius-sm); image-rendering: pixelated; box-shadow: var(--shadow); }
.battle-proof figcaption { margin-top: 10px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(20, 70, 130, .3); }
.caption { margin: 18px 0 0; max-width: 72ch; text-align: left; font-size: 13.5px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(20, 70, 130, .3); }
.caption-ink { color: var(--ink-3); text-shadow: none; }
/* A one-line hint under the thing it describes is centered; it shows where the table scrolls. */
.table-hint { display: none; margin-top: 10px; text-align: center; }
.caption-link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.step { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.step > img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); }
.step-body { padding: 22px 24px 26px; }
.step-number { display: block; color: var(--fire); font-size: 22px; line-height: 1; }
.step h3 { margin: 10px 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.step p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* First taste: the first real stock a player sees, told in three steps beside the screen that says it. */
.taste { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
/* Panel head rows: a status tag first, then its note, on one baseline. */
.taste-state, .vault-head > div, .board-head, .cards-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.taste-state { margin: 0 0 20px; }
.board-head p, .cards-state-note { font-size: 14px; color: var(--ink-2); }
.taste-copy h3 { margin: 0 0 22px; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.taste-flow { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.taste-flow li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.taste-flow p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.taste-flow strong { color: var(--ink); }
.taste-limits { margin: 0; }
.taste-proof { margin: 0; display: grid; gap: 12px; }
.taste-proof > img { width: 100%; height: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); image-rendering: pixelated; }
.receipt { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.receipt b { color: var(--ink); font-variant-numeric: tabular-nums; }
.receipt .ticker { flex: none; }
.receipt-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Rewards table */
.table-card { border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
th { padding: 20px 18px 14px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 26px; }
.cell-mon { color: var(--ink); white-space: nowrap; }
.cell-mon img { display: inline-block; width: 40px; height: 40px; margin-right: 12px; vertical-align: middle; image-rendering: pixelated; }
.cell-mon b { vertical-align: middle; }
.milestones { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.milestones li { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px 6px 16px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.milestones li::after { content: attr(data-unit); }
.milestones b { color: var(--ink); }
.milestones li { font-variant-numeric: tabular-nums; }

/* Vault */
.vault-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.vault-stats { display: flex; gap: 36px; margin: 0; text-align: right; }
.vault-stats div { display: flex; flex-direction: column; }
.vault-stats dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.vault-stats dd { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.vault-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vault-tiles li { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 4px; border-right: 1px solid var(--line); color: var(--ink-3); filter: grayscale(1); }
.vault-tiles li:last-child { border-right: 0; }
.vault-tiles img { width: 40px; height: 40px; image-rendering: pixelated; opacity: .55; }
.vault-tiles span { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.vault-tiles b { color: var(--ink-2); font-size: 14px; }
.vault-tiles small { font-size: 12px; }
.vault-tiles small a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.vault-tiles em { font-style: normal; font-weight: 700; }
.vault-note { margin: 20px 0 0; max-width: 78ch; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.vault-note code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .6); font-size: 13px; }

/* Champion */
.badges { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.badges li { display: grid; align-content: start; justify-items: center; text-align: center; }
.badges img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(10, 50, 100, .25)); transition: transform .35s var(--ease); }
.badges li:hover img { transform: translateY(-6px) rotate(-6deg); }
.badges b { margin-top: 10px; font-family: var(--pixel); font-weight: 400; font-size: 13px; color: var(--ink); }
.badges small { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.champion-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.champion-copy h3 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.champion-copy p { margin: 0 0 18px; font-size: 15px; color: var(--ink-2); }

/* Top trainers: ten rows read live from /api/leaderboard (src/landing.js). */
.board { display: grid; gap: 18px; }
.board-head p { margin: 0; max-width: 70ch; }
.board-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.board-row { display: grid; grid-template-columns: 40px 56px minmax(0, 1fr) 218px 92px; align-items: center; gap: 14px; padding: 10px 12px 10px 4px; border-bottom: 1px solid var(--line); }
.board-row.is-you { border-radius: var(--radius-sm); border-bottom-color: transparent; background: rgba(255, 255, 255, .7); box-shadow: var(--shadow-sm); }
.board-rank { font-family: var(--pixel); font-size: 18px; color: var(--fire); text-align: right; font-variant-numeric: tabular-nums; }
.board-sprite { width: 56px; height: 56px; image-rendering: pixelated; filter: drop-shadow(0 6px 6px rgba(10, 50, 100, .18)); }
.board-who { min-width: 0; }
.board-wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.board-partner { display: block; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-badges { display: flex; align-items: center; gap: 6px; }
.board-badges img { width: 22px; height: 22px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(10, 50, 100, .18)); }
.board-slot { width: 10px; height: 10px; margin: 6px; border-radius: 50%; background: var(--line); }
.board-champ, .board-holder { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.board-champ { background: var(--ink); color: #fff; }
.board-holder { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.board-count { display: none; }
.board-power { display: grid; justify-items: end; line-height: 1.1; }
.board-power small { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--ink-2); }
.board-power b { font-family: var(--pixel); font-weight: 400; font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.board-state { margin: 0; padding: 8px 0; font-size: 15px; color: var(--ink-2); }
.board-you { margin: 0; padding: 14px 18px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); font-size: 15px; color: var(--ink-2); }
.board-you b { color: var(--ink); }
.board-foot { margin: 0; font-size: 14px; color: var(--ink-2); }
.journal-shot { width: 100%; height: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
/* Cards: four example tiers fanned out. The card face itself lives in src/cards.css and
   src/card-face.js, shared with the in-game CARD screen; this is only the fan and the tiers. */
.cards-panel { display: grid; gap: 30px; }
.cards-state { margin: 0; }
.card-fan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 30px); padding: 8px clamp(0px, 2vw, 24px) 10px; }
.card-fan .tcg:nth-child(1) { --lean: -5deg; }
.card-fan .tcg:nth-child(2) { --lean: -1.5deg; --lift: -10px; }
.card-fan .tcg:nth-child(3) { --lean: 1.5deg; --lift: -10px; }
.card-fan .tcg:nth-child(4) { --lean: 5deg; }
.card-fan .tcg:hover, .card-fan .tcg.is-tilting, .card-fan .tcg:focus-visible { --lean: 0deg; --lift: -14px; }
.card-hint { display: none; margin: -12px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tiers li { display: grid; grid-template-rows: auto 1fr auto; align-content: normal; gap: 6px; padding: 18px 18px 16px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85); }
.tiers b { font-family: var(--pixel); font-weight: 400; font-size: 15px; color: var(--fire); letter-spacing: .04em; }
.tiers p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tiers small { margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.cards-note { margin: 0; max-width: 78ch; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.cards-note b { color: var(--ink); }

/* Dex */
.dex-head { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px 20px; margin-bottom: 20px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.dex { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 14px 8px; }
.dex li { display: grid; justify-items: center; text-align: center; }
.dex img { width: 64px; height: 64px; image-rendering: pixelated; }
.dex span { margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.dex .locked img { filter: grayscale(1) brightness(1.15) contrast(.8); opacity: .5; }
.dex .locked span { color: var(--ink-3); opacity: .8; }
.dex-note { margin: 22px 0 0; text-align: left; font-size: 14px; color: var(--ink-2); }

/* Roadmap */
.roads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.road { padding: 22px 24px 26px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.road header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.road header .kicker { margin: 0; }
.road h3, .road-sub { text-wrap: pretty; }
.road h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }
.road-sub { margin: 0 0 10px; color: var(--fire); font-size: 13px; }
.road p:last-child { margin: 0; font-size: 14px; color: var(--ink-2); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 22px; background: var(--panel); box-shadow: var(--shadow-sm); padding: 0 22px; }
.faq summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 0; font-weight: 700; font-size: 16px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ''; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--fire), var(--fire)) center / 14px 2px no-repeat, linear-gradient(var(--fire), var(--fire)) center / 2px 14px no-repeat; transition: transform .3s var(--ease); }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq p { margin: 0 0 20px 28px; font-size: 15px; color: var(--ink-2); }
.faq a { color: var(--fire-deep); text-decoration: underline; text-underline-offset: 3px; }

/* Final call and footer */
.play-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--panel-strong); }
.play-panel .title { text-align: left; margin-bottom: 14px; font-size: clamp(32px, 4.4vw, 54px); }
.play-copy > p { margin: 0 0 22px; font-size: 16px; color: var(--ink-2); max-width: 40ch; }
.play-actions { justify-content: flex-start; margin-top: 0; }
.play-actions .pill { flex: 1 1 auto; }
.play-panel .caption { margin-top: 14px; }
.play-shot { width: 100%; height: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow); transform: rotate(2deg); }
.site-footer { padding: clamp(64px, 9vw, 120px) 0 max(32px, env(safe-area-inset-bottom)); }
.footer-panel { display: grid; justify-items: center; text-align: center; gap: 22px; }
.footer-panel > img { width: 140px; height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.footer-nav a { padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color .2s; }
.footer-nav a:hover { border-color: var(--fire); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; width: 100%; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; }
.footer-cols h4 { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.footer-cols p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.footer-legal { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); width: 100%; max-width: none; padding-inline: max(0px, calc((100% - 72ch) / 2)); font-size: 13px; color: var(--ink-2); }
.footer-copy { margin: 0; font-size: 12px; color: var(--ink-3); }

/* Wallet dialog */
dialog { width: min(440px, calc(100% - 32px)); margin: auto; padding: 26px 26px 24px; border: 0; border-radius: 28px; background: var(--panel-strong); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(10, 40, 80, .6); }
dialog::backdrop { background: rgba(10, 40, 80, .45); backdrop-filter: blur(8px); }
dialog[open] { animation: sheet .4s var(--ease); }
@keyframes sheet { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
.wallet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wallet-top img { width: 84px; height: auto; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.icon-button:hover { transform: rotate(90deg); }
dialog h2 { margin: 0 0 8px; font-size: 30px; line-height: 1.05; letter-spacing: -.03em; }
#wallet-description { margin: 0 0 14px; font-size: 15px; color: var(--ink-2); }
#wallet-status { min-height: 22px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .7); font-size: 14px; font-weight: 500; color: var(--ink-2); }
#wallet-status:empty { display: none; }
#wallet-status[data-error='true'] { color: var(--fire-deep); background: #ffe6df; }
#wallet-options { display: grid; gap: 8px; }
.wallet-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-radius: 16px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.wallet-option:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.wallet-option-primary { background: var(--fire); color: #fff; box-shadow: none; }
.wallet-option-label { display: flex; align-items: center; gap: 12px; }
.wallet-option-label img { width: 26px; height: 26px; border-radius: 6px; }
.wallet-option svg { flex: none; }
.wallet-address { padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .7); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: var(--ink-2); }
.wallet-secondary { margin-top: 10px; width: 100%; min-height: 44px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.wallet-secondary:hover { background: rgba(255, 255, 255, .6); }
.wallet-footnote { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* Reveal and motion preferences */
html.js [data-reveal] { translate: 0 14px; transition: translate var(--t-enter) var(--ease); }
html.js [data-reveal].is-in { translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .cloud, .floater, .hero-logo img, dialog[open] { animation: none; }
  html.js [data-reveal] { translate: 0 0; transition: none; }
  .pill, .badges img, .brand img, .icon-button { transition: none; }
}

/* Responsive */
/* Between the full hero and the phone, two small medallions sit at the outer edges, clear of the logo and the pills. */
@media (max-width: 1400px) { .floater-grass { top: 24%; left: 1%; } }
@media (max-width: 1180px) {
  .floater { width: 132px; padding: 10px 0 8px; border-radius: 34px; }
  .floater-mon { width: 64px; height: 64px; }
  .floater-ticker { font-size: 12px; gap: 5px; }
  .floater-ticker .mark { width: 12px; height: 12px; }
  .floater small { letter-spacing: .04em; }
  .floater-fire { top: 6%; right: 1%; }
  .floater-water, .floater-psychic { display: none; }
}
@media (max-width: 1080px) {
  .pill-nav a { padding: 0 12px; font-size: 10px; }
  .floater-psychic { display: none; }
}
@media (max-width: 960px) {
  .card-fan { display: flex; width: auto; margin-inline: calc(-1 * clamp(24px, 4vw, 56px)); padding: 18px 18% 46px; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .card-fan::-webkit-scrollbar { display: none; }
  /* A card fills most of the row, so it must let a sideways swipe scroll the row (cards.css keeps pan-y for a card on its own). */
  .card-fan .tcg, .card-fan .tcg:nth-child(n) { flex: 0 0 min(64vw, 280px); scroll-snap-align: center; --lean: 0deg; --lift: 0px; touch-action: pan-x pan-y; }
  .card-hint { display: block; margin-top: -32px; }
  .vault-tiles { grid-template-columns: 1fr; }
  .vault-tiles li { border-right: 0; border-bottom: 1px solid var(--line); }
  .vault-tiles li:last-child { border-bottom: 0; }
  .site-header { grid-template-columns: auto 1fr; }
  .pill-nav { display: none; position: absolute; top: calc(100% - 4px); right: clamp(16px, 3vw, 40px); flex-direction: column; align-items: stretch; width: min(320px, calc(100vw - 32px)); padding: 8px; border-radius: 22px; }
  .site-header.menu-open .pill-nav { display: flex; }
  .pill-nav a { justify-content: center; min-height: 44px; }
  .menu-toggle { display: inline-flex; }
  /* The pixel logo takes most of the width here, so the two remaining cards
     move to the outer edges and out of its band rather than sitting behind it. */
  .champion-grid { grid-template-columns: 1fr; }
  .taste { grid-template-columns: 1fr; gap: 28px; }
  .play-panel { grid-template-columns: 1fr; }
  .play-shot { transform: none; }
}
/* The encounter row stacks once its words and buttons no longer share a line. */
@media (max-width: 800px) {
  .live-card.has-encounter .live-bottom { min-height: 150px; align-items: start; }
  .encounter-rest { align-items: start; align-self: center; }
  .encounter-actions, .encounter-rest-actions { width: 100%; }
  .encounter-walk { flex: 1; }
  .table-hint { display: block; }
  .encounter-actions .pill { flex: 1 1 0; min-height: 46px; padding: 0 10px; letter-spacing: .08em; }
}
@media (max-width: 360px) {
  .live-card.has-encounter .live-bottom { min-height: 172px; }
  .encounter-actions .pill { white-space: normal; line-height: 1.2; }
}
@media (max-width: 720px) {
  .board-row { grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 10px; padding: 10px 8px 10px 0; }
  .board-rank { font-size: 15px; }
  .board-sprite { width: 44px; height: 44px; }
  .board-wallet { font-size: 15px; }
  .board-badges { display: none; }
  .board-count { display: block; font-size: 13px; color: var(--ink-2); }
  .board-wallet .board-champ { display: none; }
  .board-power b { font-size: 22px; }
  .hero { padding-top: calc(112px + env(safe-area-inset-top)); }
  .floaters { display: none; }
  .cloud-c { top: 76%; right: -6%; }
  .cloud-d { top: 84%; left: -4%; }
  .hero-actions { gap: 10px; }
  .hero-actions .pill-fire.pill-lg { width: 100%; }
  .hero-actions .pill-glass.pill-lg { flex: 1 1 40%; min-height: 46px; padding: 0 14px; font-size: 11px; }
  .live-card { margin-top: 44px; padding: 10px; }
  .facts { gap: 6px; }
  .facts li { min-height: 34px; padding: 4px 12px; font-size: 10px; }
  .facts b { font-size: 16px; }
  .badges { grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
  .badge-sep { display: none; }
  .badge-lv { display: block; }
  .badges img { width: 56px; height: 56px; }
  .vault-stats { width: 100%; justify-content: space-between; text-align: left; gap: 16px; }
  .vault-stats dd { font-size: 28px; }
  .dex { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .dex img { width: 56px; height: 56px; }
  .type-map { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 8px; }
  .type-map li { flex: 0 0 96px; }
  .hero-note { text-align: left; border-radius: var(--radius-sm); }
  .milestones { display: grid; }
  .milestones li { flex-wrap: wrap; row-gap: 2px; border-radius: var(--radius-sm); }
  dialog { width: calc(100% - 16px); padding: 22px 18px 20px; border-radius: 24px; }
}
.vault-tiles b { display: flex; align-items: center; gap: 6px; }
.vault-tiles .mark { width: 14px; height: 14px; }
