:root {
  --film: oklch(0.15 0.014 65);
  --film-2: oklch(0.19 0.016 65);
  --film-3: oklch(0.24 0.018 65);
  --cream: oklch(0.93 0.028 85);
  --cream-dim: oklch(0.78 0.03 82);
  --muted: oklch(0.72 0.03 80);
  --amber: oklch(0.76 0.13 72);
  --amber-hi: oklch(0.82 0.12 78);
  --amber-deep: oklch(0.3 0.06 60);
  --amber-ink: oklch(0.22 0.045 58);
  --night: oklch(0.33 0.065 225);
  --night-deep: oklch(0.22 0.045 228);
  --ink: oklch(0.47 0.15 258);
  --ink-hi: oklch(0.72 0.11 258);
  --gold: oklch(0.86 0.15 95);
  --rose: oklch(0.64 0.15 18);
  --rose-hi: oklch(0.76 0.12 18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Limelight", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Courier Prime", ui-monospace, monospace;
  --bar-h: 60px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--bar-h); }
body {
  margin: 0; background: var(--film); color: var(--cream);
  font: 400 1rem/1.55 var(--text); font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: 0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 3px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* grain over the whole page, film texture */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 10px 1.2em; border: 0; border-radius: 4px; cursor: pointer;
  font: 600 0.95rem/1 var(--text); letter-spacing: 0.02em; text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease), opacity 160ms;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn-lamp {
  background: radial-gradient(120% 140% at 50% 0%, var(--amber-hi), var(--amber) 55%, oklch(0.66 0.13 66));
  color: var(--amber-ink);
  box-shadow: 0 0 0 1px oklch(0.5 0.1 62) inset, 0 6px 22px -6px oklch(0.76 0.13 72 / 0.55);
}
.btn-lamp:hover { box-shadow: 0 0 0 1px oklch(0.5 0.1 62) inset, 0 10px 34px -6px oklch(0.8 0.13 75 / 0.75); transform: translateY(-1px); }
.btn-big { min-height: 58px; padding: 0 2.4em; font: 400 1.6rem/1 var(--display); letter-spacing: 0.04em; }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.35) inset; }
.btn-ghost:hover { box-shadow: 0 0 0 1px var(--cream) inset; background: oklch(0.93 0.028 85 / 0.06); }
.btn-ink { background: var(--amber-ink); color: var(--amber-hi); }
.btn-ink:hover { background: oklch(0.27 0.05 58); }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--amber-ink); border-right-color: transparent; animation: spin 700ms linear infinite; }
.btn-ghost.is-busy::after { border-color: var(--cream); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(1turn); } }
.linkish { background: none; border: 0; padding: 0.3em 0; cursor: pointer; color: var(--cream-dim); text-decoration: underline; text-decoration-color: oklch(0.93 0.028 85 / 0.35); text-underline-offset: 4px; font-weight: 500; min-height: 32px; }
.linkish:hover { color: var(--cream); text-decoration-color: var(--amber); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 24px; padding: 0 20px;
  background: linear-gradient(var(--film), oklch(0.15 0.014 65 / 0.92));
  border-bottom: 1px solid oklch(0.93 0.028 85 / 0.1);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-name { font: 400 1.2rem/1 var(--display); letter-spacing: 0.03em; white-space: nowrap; }
.brand-name b { font-weight: 400; color: var(--amber); }
.routes { display: flex; align-items: center; gap: 4px; }
.routes a, .routes .linkish { text-decoration: none; padding: 8px 12px; border-radius: 4px; color: var(--cream-dim); font-weight: 600; font-size: 0.95rem; }
.routes a:hover, .routes .linkish:hover { color: var(--cream); background: oklch(0.93 0.028 85 / 0.06); }
.routes a[aria-current="page"] { color: var(--amber); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  background: var(--film-2); border: 1px solid oklch(0.93 0.028 85 / 0.16); border-radius: 4px; cursor: pointer;
  font: 600 0.88rem/1 var(--text);
}
.chip:hover { border-color: var(--amber); }
.chip-img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.chip-sym { color: var(--amber); }
.chip-price { color: var(--cream); }
.chip-chg.up { color: oklch(0.8 0.12 150); }
.chip-chg.down { color: var(--rose-hi); }
#connectBtn { min-height: 40px; }
#connectBtn.connected { box-shadow: 0 0 0 1px var(--amber) inset; color: var(--amber-hi); font-family: var(--mono); font-weight: 400; }

/* ---------- arena ---------- */
.arena {
  position: relative; height: calc(100svh - var(--bar-h)); min-height: 520px; max-height: 1000px;
  background: #0d0b08; overflow: hidden; isolation: isolate;
}
#stage { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.arena.hunting #stage { cursor: crosshair; }

.title-card { position: absolute; left: clamp(20px, 4vw, 64px); top: clamp(20px, 5vh, 56px); z-index: 3; width: min(460px, calc(100% - 40px)); animation: iris-in 900ms var(--ease) both; }
@keyframes iris-in { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(80% at 50% 50%); } }
.tc-frame {
  position: relative; padding: 30px 30px 26px;
  background: radial-gradient(130% 100% at 50% 0%, oklch(0.22 0.02 65 / 0.94), oklch(0.13 0.012 65 / 0.96));
  box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.45), 0 0 0 7px oklch(0.13 0.012 65 / 0.9), 0 0 0 8px oklch(0.93 0.028 85 / 0.22), 0 30px 60px -20px oklch(0.08 0.01 65 / 0.65);
}
.tc-frame::before, .tc-frame::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--cream-dim);
}
.tc-frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.tc-frame::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.tc-frame.small { width: min(420px, calc(100vw - 40px)); text-align: center; }
.tc-kick { font: 600 0.85rem/1 var(--text); color: var(--amber); letter-spacing: 0.08em; }
.tc-title { font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 0.95; margin: 12px 0 14px; color: var(--cream); }
.tc-title.sm { font-size: 2.4rem; }
.tc-rule { color: var(--cream-dim); max-width: 38ch; }
.tc-frame.small .tc-rule { margin-inline: auto; }
.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.tc-frame.small .tc-actions { justify-content: center; }
.tc-proof { margin-top: 18px; padding-top: 14px; border-top: 1px dashed oklch(0.93 0.028 85 / 0.25); font-weight: 500; min-height: 2.6em; }
.tc-proof strong { font: 400 1.35rem/1 var(--display); color: var(--gold); margin-right: 4px; }
.tc-proof a { color: var(--cream); }
.tc-note { margin-top: 8px; color: var(--muted); font-size: 0.88rem; }
.tc-note.ok { color: var(--amber-hi); }

.veil { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: oklch(0.13 0.012 65 / 0.62); }
#loadVeil { background: transparent; pointer-events: none; }
#loadVeil .tc-rule { font: 400 1.4rem/1.2 var(--display); color: var(--cream); background: var(--film); padding: 14px 22px; box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.35); }
#loadVeil.error .tc-rule { color: var(--rose-hi); pointer-events: auto; }

.hud {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: stretch; gap: 0; pointer-events: none;
  background: oklch(0.13 0.012 65 / 0.82); box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.3);
}
.hud-cell { display: grid; padding: 8px 16px 9px; min-width: 88px; text-align: center; border-left: 1px solid oklch(0.93 0.028 85 / 0.14); position: relative; }
.hud-cell:first-child { border-left: 0; }
.hud-k { font: 600 0.72rem/1 var(--text); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.hud-v { font: 400 1.75rem/1.1 var(--display); color: var(--cream); margin-top: 3px; }
.hud-time .hud-v.low { color: var(--rose-hi); }
.hud-score .hud-v { color: var(--amber-hi); min-width: 4ch; }
.hud-combo .hud-v { color: var(--cream-dim); }
.hud-combo.live .hud-v { color: var(--gold); }
.combo-bar { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 3px; background: oklch(0.93 0.028 85 / 0.12); }
.combo-bar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.hud-v.bump { animation: bump 260ms var(--ease); }
@keyframes bump { 0% { transform: scale(1.25); color: var(--gold); } 100% { transform: scale(1); } }
.hud-pause { pointer-events: auto; border: 0; background: transparent; color: var(--cream); width: 52px; cursor: pointer; border-left: 1px solid oklch(0.93 0.028 85 / 0.14); }
.hud-pause svg { width: 20px; height: 20px; margin: auto; }
.hud-pause:hover { color: var(--amber); }
.arena-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 3; width: max-content; max-width: calc(100% - 32px); text-align: center; font-size: 0.85rem; color: var(--cream-dim); background: oklch(0.13 0.012 65 / 0.7); padding: 6px 12px; pointer-events: none; }

/* ---------- bands ---------- */
section.band-night, section.band-amber, section.band-film { padding: clamp(64px, 10vw, 128px) 0; position: relative; }
.band-night { background: radial-gradient(120% 80% at 20% 0%, oklch(0.36 0.07 225), var(--night-deep) 70%); }
.band-film { background: var(--film); }
.band-amber {
  background: radial-gradient(90% 120% at 70% 30%, oklch(0.82 0.13 78), var(--amber) 50%, oklch(0.66 0.13 64));
  color: var(--amber-ink);
}
.band-title { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1; }
.band-title.dark { color: var(--amber-ink); }
.band-sub { color: var(--cream-dim); margin-top: 12px; max-width: 52ch; }

/* how-to reel */
.how .band-title { margin-bottom: 36px; }
.reel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: #0d0b08; padding: 26px 0; position: relative; }
.reel::before, .reel::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14px;
  background: repeating-linear-gradient(90deg, transparent 0 14px, oklch(0.3 0.03 65) 14px 30px, transparent 30px 44px);
}
.reel::before { top: 6px; } .reel::after { bottom: 6px; }
.frame { margin: 0 10px; position: relative; }
.frame svg { width: 100%; height: auto; aspect-ratio: 4 / 3; background: radial-gradient(70% 70% at 50% 45%, oklch(0.38 0.07 222), oklch(0.2 0.045 228)); }
.frame figcaption { padding: 14px 4px 0; }
.frame .cap-t { font: 400 1.45rem/1.1 var(--display); color: var(--cream); display: block; }
.frame .cap-b { color: var(--cream-dim); font-size: 0.95rem; display: block; margin-top: 6px; max-width: 34ch; }
.how-sheet .reel { margin-top: 20px; }
.how-sheet .frame .cap-t { font-size: 1.15rem; }
.how-sheet .frame .cap-b { font-size: 0.88rem; }

/* tonight */
.tonight-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 6vw, 88px); align-items: start; }
.tonight-sub { margin-top: 14px; max-width: 36ch; font-weight: 500; }
.countdown { margin: 28px 0 24px; display: grid; }
.cd-k { font-weight: 600; font-size: 1.1rem; }
.cd-v { font: 400 clamp(3rem, 7vw, 5.4rem)/1 var(--display); letter-spacing: 0.02em; }
.board-list { list-style: none; margin: 0; padding: 0; counter-reset: r; border-top: 2px solid var(--amber-ink); }
.board-list li {
  display: grid; grid-template-columns: 3ch 1fr auto; align-items: center; gap: 14px;
  padding: 11px 4px; border-bottom: 1px solid oklch(0.22 0.045 58 / 0.25); min-height: 52px;
}
.board-list li.me { background: oklch(0.22 0.045 58 / 0.12); box-shadow: inset 0 0 0 1.5px var(--amber-ink); padding-inline: 10px; }
.board-list .r { font: 400 1.4rem/1 var(--display); }
.board-list li:first-child .r { font-size: 2rem; }
.board-list .who { font-family: var(--mono); font-size: 1rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.board-list .who a { text-decoration: none; }
.board-list .who a:hover { text-decoration: underline; }
.board-list .pts { font: 400 1.5rem/1 var(--display); text-align: right; }
.board-list .sub { display: block; font: 500 0.8rem/1.2 var(--text); opacity: 0.8; text-align: right; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 3px; flex: none; color: var(--ink-hi); font: 600 0.72rem/1 var(--text); letter-spacing: 0.04em; }
.badge svg { width: 18px; height: 18px; }
.badge svg { color: var(--ink-hi); }
.band-amber .badge { color: var(--amber-ink); }
.band-amber .badge svg { color: var(--ink); }
.board-empty { padding: 28px 4px; font-weight: 500; border-bottom: 1px solid oklch(0.22 0.045 58 / 0.25); }
.board-empty strong { display: block; font: 400 1.6rem/1.1 var(--display); margin-bottom: 6px; }
.me-box { margin-bottom: 22px; font-weight: 500; }
.me-box .me-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; }
.me-box .me-big { font: 400 1.8rem/1 var(--display); }
.me-box .btn { margin-top: 10px; }
.band-amber .btn-ghost { color: var(--amber-ink); box-shadow: 0 0 0 1.5px var(--amber-ink) inset; }
.me-box.wide { padding: 18px 20px; background: var(--film-2); box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.12); margin: 22px 0; }

/* maps */
.maps-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 36px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 368px); gap: 18px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x mandatory; scrollbar-color: var(--film-3) transparent; }
.map-card { scroll-snap-align: start; text-decoration: none; display: block; transition: transform 220ms var(--ease); }
.map-card canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.15); background: #14110c; }
.map-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.map-card:hover canvas { box-shadow: 0 0 0 1px var(--amber), 0 18px 40px -18px oklch(0.76 0.13 72 / 0.5); }
.map-card .mc-meta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-top: 12px; font-size: 0.9rem; color: var(--cream-dim); white-space: nowrap; }
.map-card .mc-meta .mc-who { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); min-width: 0; overflow: hidden; }
.map-card .mc-meta b { font: 400 1.3rem/1 var(--display); color: var(--amber-hi); }
.strip-empty { grid-column: 1 / -1; padding: 40px 28px; box-shadow: 0 0 0 1px dashed oklch(0.93 0.028 85 / 0.2); border: 1px dashed oklch(0.93 0.028 85 / 0.3); color: var(--cream-dim); max-width: 560px; }
.strip-empty strong { display: block; font: 400 1.5rem/1.1 var(--display); color: var(--cream); margin-bottom: 6px; }
.skel { display: inline-block; height: 1em; border-radius: 2px; background: linear-gradient(90deg, oklch(0.93 0.028 85 / 0.08), oklch(0.93 0.028 85 / 0.16), oklch(0.93 0.028 85 / 0.08)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; vertical-align: middle; }
.band-amber .skel { background: linear-gradient(90deg, oklch(0.22 0.045 58 / 0.1), oklch(0.22 0.045 58 / 0.2), oklch(0.22 0.045 58 / 0.1)); background-size: 200% 100%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* fees */
.fees-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.fees-plain { margin-top: 22px; font-weight: 600; color: var(--cream); max-width: 40ch; }
.split-film { position: relative; }
.split-film svg { width: 100%; height: auto; }
.split-legend { display: grid; grid-template-columns: 9fr 1fr; gap: 0; margin-top: 16px; }
.split-legend div { padding-right: 12px; }
.split-legend .pct { font: 400 clamp(2rem, 4vw, 3.2rem)/1 var(--display); display: block; }
.split-legend .lbl { display: block; font-weight: 600; margin-top: 6px; }
.split-legend .amt { display: block; color: var(--cream-dim); font-size: 0.9rem; margin-top: 2px; }
.split-legend .burn .pct { color: var(--amber-hi); }
.split-legend .burn { text-align: right; padding-right: 0; white-space: nowrap; }

/* faq */
.fair-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(28px, 6vw, 88px); }
.faq { margin: 0; display: grid; gap: 0; }
.faq > div { padding: 22px 0; border-top: 1px solid oklch(0.93 0.028 85 / 0.14); display: grid; grid-template-columns: 16ch 1fr; gap: 10px 32px; }
.faq dt { font: 400 1.2rem/1.2 var(--display); color: var(--amber-hi); }
.faq dd { margin: 0; color: var(--cream-dim); max-width: 60ch; }

/* ---------- pages ---------- */
.page { min-height: calc(100svh - var(--bar-h)); padding-top: clamp(40px, 6vw, 80px) !important; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }
.page-title { font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 0.95; }
.tabs { display: inline-flex; box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.3); border-radius: 4px; padding: 3px; }
.tabs button { border: 0; background: transparent; padding: 10px 18px; min-height: 40px; border-radius: 3px; cursor: pointer; font-weight: 600; color: var(--cream-dim); }
.tabs button[aria-selected="true"] { background: var(--amber); color: var(--amber-ink); }
.table-wrap { margin-top: 10px; }
.board-table { width: 100%; border-collapse: collapse; }
.board-table thead th { position: sticky; top: var(--bar-h); background: var(--film); z-index: 2; text-align: left; font: 600 0.78rem/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px; border-bottom: 1px solid oklch(0.93 0.028 85 / 0.25); }
.board-table td { padding: 14px 10px; border-bottom: 1px solid oklch(0.93 0.028 85 / 0.1); }
.board-table .num { text-align: right; }
.board-table .c-rank { width: 4ch; }
.board-table td.rank { font: 400 1.3rem/1 var(--display); color: var(--cream-dim); }
.board-table tr:nth-child(-n+3) td.rank { color: var(--gold); }
.board-table td.pts { font: 400 1.35rem/1 var(--display); color: var(--amber-hi); }
.board-table td.who { font-family: var(--mono); }
.board-table td.who span { display: inline-flex; align-items: center; gap: 8px; }
.board-table tr.me td { background: oklch(0.76 0.13 72 / 0.1); }
.board-table a.maplink { color: var(--cream-dim); font-weight: 600; font-size: 0.9rem; }
.board-table a.maplink:hover { color: var(--amber); }
.board-table .empty td { padding: 48px 10px; color: var(--cream-dim); text-align: left; }
.board-table .empty strong { display: block; font: 400 1.6rem/1.1 var(--display); color: var(--cream); margin-bottom: 6px; }

.card-page { display: grid; grid-template-columns: minmax(0, 520px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.card-canvas-wrap canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.2), 0 40px 80px -30px oklch(0.08 0.01 65); background: #14110c; }
.card-side h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; }
.card-side .cs-score { font: 400 clamp(3rem, 7vw, 5rem)/1 var(--display); color: var(--amber-hi); margin: 18px 0 6px; }
.card-side .cs-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--cream-dim); font-weight: 500; }
.card-side .cs-facts b { font: 400 1.3rem/1 var(--display); color: var(--cream); margin-right: 4px; }
.card-side .cs-who { margin-top: 14px; font-family: var(--mono); color: var(--cream-dim); display: flex; align-items: center; gap: 8px; }
.card-side .cs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.card-side .cs-note { margin-top: 18px; color: var(--muted); font-size: 0.9rem; max-width: 44ch; }

/* ---------- footer ---------- */
.foot { background: #0d0b08; padding: 56px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid oklch(0.93 0.028 85 / 0.1); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 28px; align-items: start; }
.foot-line { margin-top: 12px; color: var(--cream-dim); }
.foot-nav { display: grid; gap: 6px; justify-items: start; }
.foot-nav a { text-decoration: none; font-weight: 600; color: var(--cream-dim); min-height: 32px; display: inline-flex; align-items: center; }
.foot-nav a:hover { color: var(--amber); }
.foot-meta { display: grid; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.foot-meta code, .ca { font-family: var(--mono); color: var(--cream); }
.copy { border: 0; background: var(--film-3); color: var(--cream); padding: 4px 10px; min-height: 28px; border-radius: 3px; cursor: pointer; font: 600 0.8rem/1 var(--text); margin-left: 6px; }
.copy:hover { background: var(--amber); color: var(--amber-ink); }
.copy.done { background: var(--amber); color: var(--amber-ink); }

/* ---------- sheets ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: oklch(0.1 0.01 65 / 0.72); display: grid; place-items: center; padding: 20px; animation: fade 200ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; background: var(--film-2); box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.25), 0 40px 90px -30px oklch(0.08 0.01 65); max-height: calc(100svh - 40px); overflow: auto; animation: rise 320ms var(--ease); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.sheet-title { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; }
.sheet-close { position: absolute; top: 12px; right: 12px; border: 0; background: transparent; color: var(--cream-dim); cursor: pointer; font-weight: 600; padding: 8px 10px; min-height: 36px; }
.sheet-close:hover { color: var(--cream); }
.result-sheet { width: min(900px, 100%); display: grid; grid-template-columns: minmax(0, 400px) 1fr; }
.result-card { background: #0d0b08; padding: 18px; }
.result-card canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.result-side { padding: 44px 32px 32px; display: flex; flex-direction: column; }
.result-score { font: 400 clamp(3rem, 6vw, 4.6rem)/1 var(--display); color: var(--amber-hi); margin-top: 14px; }
.result-status { margin-top: 12px; color: var(--cream-dim); min-height: 3em; }
.result-status.ok { color: var(--cream); }
.result-status.err { color: var(--rose-hi); }
.result-status .stamp { display: inline-block; font: 400 1rem/1 var(--display); color: var(--gold); border: 2px solid var(--gold); padding: 6px 10px; transform: rotate(-4deg); margin-right: 8px; animation: stamp 420ms var(--ease) both; }
@keyframes stamp { from { transform: rotate(-4deg) scale(1.8); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 24px; }
.result-actions .btn-lamp { grid-column: 1 / -1; min-height: 52px; font: 400 1.3rem/1 var(--display); }
.coin-sheet { width: min(440px, 100%); padding: 28px; }
.how-sheet { width: min(960px, 100%); padding: 32px; }
.how-sheet .tc-rule { max-width: 60ch; margin-top: 10px; }
.coin-head { display: flex; align-items: center; gap: 14px; }
.coin-head img, .coin-head svg { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.coin-head h2 { font-size: 1.8rem; }
.coin-head p { color: var(--cream-dim); font-size: 0.9rem; }
.coin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 14px; }
.coin-stats div { display: grid; }
.coin-stats .k { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.coin-stats .v { font: 400 1.25rem/1.2 var(--display); }
.spark { width: 100%; height: 64px; margin: 6px 0 14px; }
.ca-row { display: flex; align-items: center; gap: 6px; background: var(--film); padding: 10px 12px; font-family: var(--mono); font-size: 0.9rem; word-break: break-all; }
.buy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.buy-row .btn { padding: 0 6px; }
.coin-note { margin-top: 14px; color: var(--cream-dim); font-size: 0.9rem; }
.coin-note a { color: var(--amber-hi); }

/* toasts */
.toasts { position: fixed; z-index: 95; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(360px, calc(100vw - 40px)); }
.toast { background: var(--film-3); color: var(--cream); padding: 14px 16px; box-shadow: 0 0 0 1px oklch(0.93 0.028 85 / 0.25), 0 18px 40px -16px oklch(0.08 0.01 65); animation: rise 260ms var(--ease); font-weight: 500; }
.toast.err { box-shadow: 0 0 0 1px var(--rose), 0 18px 40px -16px oklch(0.08 0.01 65); }
.toast a { color: var(--amber-hi); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .routes .linkish { display: none; }
  .tonight-grid, .fees-grid, .fair-grid, .card-page { grid-template-columns: 1fr; }
  .faq > div { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .result-sheet { grid-template-columns: 1fr; }
  .result-card { padding: 12px 12px 0; }
  .result-card canvas { max-height: 46svh; width: auto; margin: 0 auto; }
  .result-side { padding: 18px 20px 22px; }
  .result-score { margin-top: 6px; }
}
@media (max-width: 640px) {
  :root { --bar-h: 56px; }
  .bar { gap: 8px; padding: 0 12px; }
  .brand-name { display: none; }
  .brand { flex: none; }
  .chip-chg { display: none; }
  .chip-img { width: 18px; height: 18px; }
  .routes a { padding: 8px 8px; }
  .chip { padding: 0 8px; gap: 6px; }
  .chip-sym { display: none; }
  #connectBtn { padding: 0 12px; }
  .arena { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; }
  #stage { position: relative; inset: auto; height: 50svh; min-height: 300px; flex: none; }
  .arena.hunting #stage { height: calc(100svh - var(--bar-h)); }
  .title-card { position: relative; left: auto; top: auto; margin: -34px 10px 14px; width: auto; }
  .tc-title br { display: none; }
  .tc-frame { padding: 20px 20px 18px; }
  .tc-title { font-size: 2.5rem; margin: 8px 0 10px; }
  .tc-rule { font-size: 0.95rem; }
  .tc-actions { margin-top: 14px; }
  .tc-actions .btn-big { flex: 1; }
  .tc-proof { margin-top: 12px; padding-top: 10px; }
  .hud { top: 8px; left: 8px; right: 8px; transform: none; }
  .hud-cell { min-width: 0; flex: 1; padding: 6px 6px 8px; }
  .hud-v { font-size: 1.35rem; }
  .hud-k { font-size: 0.66rem; }
  .hud-pause { width: 44px; }
  .reel { grid-template-columns: 1fr; padding: 22px 0; gap: 22px; }
  .how-sheet { padding: 22px 18px; }
  .how-sheet .reel { grid-template-columns: 1fr; }
  .how-sheet .frame { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
  .how-sheet .frame figcaption { padding: 0; }
  .sheet-back { padding: 0; align-items: end; }
  .sheet { width: 100% !important; max-height: 92svh; }
  .hide-sm { display: none; }
  .split-legend { grid-template-columns: 1fr 1fr; }
  .buy-row { grid-template-columns: repeat(3, 1fr); }
  .toasts { right: 10px; left: 10px; bottom: 10px; width: auto; }
}

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