:root {
  --cobalt: oklch(0.47 0.2 266);
  --cobalt-hi: oklch(0.53 0.2 265);
  --deep: oklch(0.33 0.15 268);
  --deeper: oklch(0.24 0.11 268);
  --white: oklch(0.97 0.012 250);
  --soft: oklch(0.88 0.06 252);
  --yellow: oklch(0.9 0.17 98);
  --yellow-lo: oklch(0.72 0.15 85);
  --red: oklch(0.6 0.22 27);
  --red-lo: oklch(0.45 0.18 27);
  --back: oklch(0.95 0.02 95);
  --back-2: oklch(0.9 0.03 95);
  --ink: oklch(0.28 0.08 266);
  --ink-2: oklch(0.42 0.07 266);
  --display: 'Chango', 'Arial Black', system-ui, sans-serif;
  --text: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Sometype Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bar-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--deeper); color: var(--white);
  font: 400 1rem/1.55 var(--text); font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
[hidden] { display: none !important; }

/* ---------- bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40; height: var(--bar-h);
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: color-mix(in oklch, var(--deeper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid oklch(0.4 0.12 268);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.01em; color: var(--yellow); white-space: nowrap; }
.routes { display: flex; gap: 4px; margin-left: 12px; }
.routes a { text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 700; color: var(--soft); transition: background 0.2s var(--ease), color 0.2s; }
.routes a:hover { background: oklch(0.32 0.13 268); color: var(--white); }
.routes a[aria-current="page"] { color: var(--ink); background: var(--yellow); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px;
  border-radius: 12px; border: 1px solid oklch(0.45 0.13 266); background: oklch(0.3 0.13 268);
  cursor: pointer; font-weight: 700; white-space: nowrap; transition: background 0.2s;
}
.chip:hover { background: oklch(0.36 0.15 267); }
.chip img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.chip-price { font-weight: 500; color: var(--soft); }
.chip-chg.up { color: oklch(0.86 0.15 150); }
.chip-chg.down { color: oklch(0.78 0.14 25); }
.btn {
  border: 0; cursor: pointer; border-radius: 12px; font-weight: 800;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.2s;
}
.btn-connect { height: 40px; padding: 0 16px; background: var(--white); color: var(--ink); box-shadow: 0 3px 0 oklch(0.7 0.05 260); }
.btn-connect:active { transform: translateY(2px); box-shadow: 0 1px 0 oklch(0.7 0.05 260); }
.btn-connect.connected { background: oklch(0.32 0.13 268); color: var(--white); box-shadow: none; border: 1px solid oklch(0.45 0.13 266); font-family: var(--mono); font-weight: 500; }
.btn[disabled] { cursor: default; opacity: 0.75; }

/* ---------- hero: the card on a peg wall ---------- */
.hero {
  position: relative; padding: 46px 20px 56px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, oklch(0.32 0.14 268 / 0.9), transparent 60%),
    radial-gradient(oklch(0.17 0.08 268) 2.4px, transparent 2.9px) 0 0 / 28px 28px,
    var(--deeper);
}
.card {
  position: relative; max-width: 1280px; margin: 0 auto; border-radius: 30px;
  background: var(--cobalt); isolation: isolate;
  box-shadow: 0 30px 60px oklch(0.12 0.08 268 / 0.6), 0 2px 0 oklch(0.6 0.18 265) inset;
  padding: 44px 44px 22px;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background:
    radial-gradient(circle at 55% 48%, oklch(0.56 0.2 264) 0%, transparent 55%),
    repeating-conic-gradient(from 0deg at 55% 48%, oklch(0.5 0.2 265) 0deg 6deg, oklch(0.44 0.2 267) 6deg 12deg);
}
.card::after {
  content: ""; position: absolute; inset: 12px; border-radius: 22px; pointer-events: none;
  border: 3px solid var(--yellow); z-index: 0;
}
.hangtab {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  width: 180px; height: 48px; background: var(--cobalt); border-radius: 22px 22px 0 0;
}
.hole { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 64px; height: 16px; border-radius: 8px; background: var(--deeper); box-shadow: inset 0 2px 3px oklch(0.1 0.05 268); }
.hole::after { content: ""; position: absolute; left: 50%; top: 3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: linear-gradient(135deg, oklch(0.9 0.01 250), oklch(0.55 0.02 250)); }
.card-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.25fr) minmax(240px, 0.7fr);
  gap: 28px; align-items: center;
}
.maker { font-weight: 700; color: var(--yellow); font-size: 0.95rem; }
.card-copy h1 {
  font-family: var(--display); font-weight: 400; color: var(--yellow);
  font-size: clamp(3.4rem, 7.2vw, 7.4rem); line-height: 0.88; letter-spacing: -0.01em; margin: 12px 0 20px;
  text-shadow: 5px 5px 0 var(--red), 5px 5px 0 var(--red);
}
.rule { font-size: 1.15rem; line-height: 1.5; max-width: 34ch; color: var(--white); font-weight: 500; }
.cta { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.btn-squeeze {
  display: grid; text-align: left; padding: 14px 26px 13px; min-width: 240px;
  background: var(--yellow); color: var(--ink); box-shadow: 0 7px 0 var(--yellow-lo), 0 12px 24px oklch(0.15 0.1 268 / 0.4);
}
.btn-squeeze .btn-label { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.btn-squeeze .btn-sub { font-size: 0.85rem; font-weight: 700; color: oklch(0.38 0.07 266); }
.btn-squeeze:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 9px 0 var(--yellow-lo), 0 16px 28px oklch(0.15 0.1 268 / 0.4); }
.btn-squeeze:active:not([disabled]) { transform: translateY(6px); box-shadow: 0 1px 0 var(--yellow-lo), 0 4px 10px oklch(0.15 0.1 268 / 0.4); }
.btn-squeeze.busy .btn-label::after { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 10px; border-radius: 50%; border: 3px solid var(--ink); border-right-color: transparent; animation: spin 0.7s linear infinite; vertical-align: 0.1em; }
.btn-squeeze.done { background: var(--white); box-shadow: 0 7px 0 oklch(0.75 0.04 260); }
@keyframes spin { to { transform: rotate(360deg); } }
.howlink { font-weight: 700; color: var(--white); text-underline-offset: 4px; }
.squeeze-msg { min-height: 1.5em; margin-top: 16px; font-weight: 700; color: var(--yellow); max-width: 36ch; }
.squeeze-msg.err { color: oklch(0.88 0.1 40); }

.odds { display: none; }
.fineline { font-size: 0.9rem; color: var(--soft); max-width: 38ch; line-height: 1.45; }
.sticker { position: absolute; left: -56px; bottom: -18px; margin: 0; width: 176px; padding: 8px 8px 6px; background: var(--white); border-radius: 12px; transform: rotate(-4deg); box-shadow: 0 10px 20px oklch(0.15 0.1 268 / 0.4); z-index: 2; }
.sticker img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.sticker figcaption { text-align: center; font-size: 0.72rem; font-weight: 800; color: var(--ink); margin-top: 3px; }
.band-wall { background: radial-gradient(oklch(0.17 0.08 268) 2.4px, transparent 2.9px) 0 0 / 28px 28px, var(--deeper); padding-top: clamp(80px, 10vw, 130px); }
.cardback {
  position: relative; border-radius: 30px; color: var(--ink); padding: clamp(36px, 5vw, 64px);
  background: repeating-linear-gradient(90deg, oklch(0.6 0.05 90 / 0.05) 0 1px, transparent 1px 5px), var(--back);
  box-shadow: 0 30px 60px oklch(0.12 0.08 268 / 0.6);
}
.cardback h2 { color: var(--ink); }
.back-tab { background: var(--back); }
.firstrun { list-style: none; padding: 12px 14px; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-radius: 14px; background: oklch(0.36 0.16 268 / 0.85); position: relative; }
.firstrun li { display: grid; font-size: 0.85rem; line-height: 1.3; counter-increment: fr; }
.firstrun li b { color: var(--yellow); }
.firstrun li b::before { content: counter(fr) ". "; }
.firstrun span { color: var(--soft); }
.firstrun .x { grid-column: 1 / -1; justify-self: end; background: none; border: 0; color: var(--white); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 2px 4px; min-height: 24px; }

.bubble-wrap { position: relative; }
.bubble {
  position: relative; height: clamp(420px, 56vh, 560px); border-radius: 46% 46% 40% 40% / 40% 40% 34% 34%;
  background:
    radial-gradient(ellipse at 30% 18%, oklch(1 0 0 / 0.32), transparent 36%),
    linear-gradient(160deg, oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.04) 50%, oklch(1 0 0 / 0.12));
  border: 2px solid oklch(1 0 0 / 0.42);
  box-shadow: inset 0 0 0 6px oklch(1 0 0 / 0.07), inset -18px -24px 40px oklch(0.2 0.1 268 / 0.25), 0 18px 30px oklch(0.2 0.12 268 / 0.35);
  overflow: hidden;
}
.bubble canvas { position: absolute; inset: 3% 3% 2%; width: 94%; height: 95%; touch-action: none; cursor: grab; }
.bubble canvas:active { cursor: grabbing; }
.shine { position: absolute; left: 12%; top: 8%; width: 16%; height: 44%; border-radius: 50%; background: linear-gradient(180deg, oklch(1 0 0 / 0.5), transparent); transform: rotate(18deg); pointer-events: none; }
.flash { position: absolute; right: -26px; top: -18px; width: 160px; height: 160px; display: grid; place-items: center; transform: rotate(10deg); z-index: 2; }
.flash svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 0 var(--red-lo)); }
.flash polygon { fill: var(--red); }
.flash-txt { position: relative; display: grid; text-align: center; line-height: 1; }
.flash-k { font-weight: 800; font-size: 0.8rem; color: var(--yellow); }
.flash-v { font-family: var(--display); font-size: 2.05rem; color: var(--white); margin: 4px 0; }
.flash.stamp { animation: stamp 0.5s var(--ease); }
@keyframes stamp { 0% { transform: rotate(10deg) scale(1.35); opacity: 0.4; } 100% { transform: rotate(10deg) scale(1); opacity: 1; } }

.gauge-panel { display: grid; gap: 14px; align-content: center; }
.gauge { width: 100%; max-width: 260px; overflow: visible; }
.g-track { fill: none; stroke: oklch(0.3 0.13 268); stroke-width: 22; stroke-linecap: butt; }
.g-red { fill: none; stroke: var(--red); stroke-width: 22; }
#gTicks line { stroke: var(--white); stroke-width: 2; }
#gTicks text { fill: var(--soft); font: 700 11px var(--text); text-anchor: middle; }
.needle { transform-origin: 110px 120px; transition: transform 1.2s var(--ease); }
.needle line { stroke: var(--yellow); stroke-width: 5; stroke-linecap: round; }
.needle circle { fill: var(--yellow); stroke: var(--deep); stroke-width: 3; }
.gauge-read { display: grid; }
.gr-v { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--white); }
.gr-k { font-weight: 700; color: var(--soft); }
.gauge-facts { display: grid; gap: 0; margin: 0; border-top: 2px solid oklch(1 0 0 / 0.25); }
.gauge-facts div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 2px solid oklch(1 0 0 / 0.25); gap: 12px; }
.gauge-facts dt { color: var(--soft); font-weight: 500; }
.gauge-facts dd { margin: 0; font-weight: 800; font-size: 1.1rem; }
#countdown { color: var(--yellow); font-family: var(--mono); font-weight: 500; }
.lastroll { position: relative; z-index: 1; text-align: center; margin: 18px auto 0; max-width: 72ch; padding-top: 12px; color: var(--soft); font-weight: 500; }
.lastroll b { color: var(--white); }

/* ---------- bands ---------- */
.band { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.band h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; }
.band-deep { background: var(--deeper); }
.band-cobalt { background: linear-gradient(180deg, var(--cobalt), oklch(0.42 0.2 267)); }
.band-back {
  background:
    repeating-linear-gradient(90deg, oklch(0.6 0.05 90 / 0.05) 0 1px, transparent 1px 5px),
    var(--back);
  color: var(--ink);
}
.band-back h2 { color: var(--ink); }

/* strip */
.strip-head { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 24px; align-items: end; margin-bottom: 36px; }
.strip-head h2 { color: var(--yellow); }
.strip-head p { color: var(--soft); font-size: 1.05rem; }
.strip { height: 260px; position: relative; border-bottom: 2px solid oklch(0.45 0.12 266); }
.strip svg { width: 100%; height: 100%; display: block; overflow: visible; }
.strip .bar-held { fill: oklch(0.5 0.16 265); }
.strip .bar-pop { fill: var(--yellow); }
.strip .bar-dry { fill: var(--red); }
.strip .pline { fill: none; stroke: var(--white); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }
.strip .parea { fill: oklch(0.97 0.012 250 / 0.13); }
.strip .bar-pop { filter: drop-shadow(0 0 6px oklch(0.9 0.17 98 / 0.8)); }
.pop-mark.dry { background: var(--white); color: var(--red-lo); }
.pop-mark { position: absolute; margin-top: -40px; transform: translateX(-50%) rotate(-8deg); background: var(--red); color: var(--yellow); font-family: var(--display); font-size: 0.8rem; padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.strip .col { cursor: pointer; }
.strip .col:hover rect, .strip .col:focus rect { filter: brightness(1.35); }
.strip-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--soft); padding: 20px; }
.strip-tip { position: absolute; top: -8px; transform: translate(-50%, -100%); background: var(--white); color: var(--ink); padding: 8px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 700; white-space: nowrap; pointer-events: none; z-index: 3; }
.strip-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 18px; color: var(--soft); font-weight: 500; align-items: center; }
.strip-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.lg-zone { background: oklch(0.97 0.012 250 / 0.25); border-top: 2px dashed var(--white); }
.lg-held { background: oklch(0.5 0.16 265); } .lg-pop { background: var(--yellow); } .lg-dry { background: var(--red); }
.strip-legend a { margin-left: auto; font-weight: 700; color: var(--white); text-underline-offset: 4px; }

/* directions */
.back-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; }
.directions h2 { margin-bottom: 34px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 34px; counter-reset: st; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; counter-increment: st; }
.steps li::before { content: counter(st); grid-row: span 2; font-family: var(--display); font-size: 2.8rem; line-height: 1; color: var(--red); text-shadow: 2px 2px 0 var(--ink); }
.steps svg { display: none; width: 64px; height: 64px; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.steps h3 { font-size: 1.15rem; font-weight: 800; }

.steps p { color: var(--ink-2); }
.steps b { color: var(--ink); }
.insert { margin: 0; transform: rotate(-3deg); }
.insert-cut { padding: 14px; border: 2px dashed var(--ink-2); border-radius: 20px; background: var(--back); }
.insert-cut img { border-radius: 10px; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.insert figcaption { margin-top: 12px; text-align: center; font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }

/* contents */
.contents-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.contents-panel { background: var(--white); color: var(--ink); border-radius: 22px; padding: 30px 30px 24px; border: 4px solid var(--ink); }
.contents-panel h2 { color: var(--ink); border-bottom: 10px solid var(--ink); padding-bottom: 10px; }
.contents-sub { margin: 12px 0 8px; color: var(--ink-2); font-weight: 500; }
.split { list-style: none; margin: 0; padding: 0; }
.split li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 2px solid oklch(0.28 0.08 266 / 0.2); }
.split li:last-child { border-bottom: 0; }
.split .sl-name { font-weight: 800; }
.split .sl-pct { font-weight: 800; font-size: 1.2rem; }
.split .sl-note { grid-column: 1 / -1; font-size: 0.88rem; color: var(--ink-2); }
.split .sl-bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: oklch(0.28 0.08 266 / 0.12); overflow: hidden; }
.split .sl-bar i { display: block; height: 100%; background: var(--cobalt); border-radius: 4px; }
.split li.bp .sl-bar i { background: var(--red); }
.vault-row { display: grid; gap: 22px; }
.vault { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.v-burst { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.v-burst svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vault-pot .v-burst svg polygon { fill: var(--yellow); }
.vault-burn .v-burst svg polygon { fill: var(--red); }
.vault-pot .v-burst { transform: rotate(-6deg); }
.vault-burn .v-burst { transform: rotate(5deg); }
.v-bal { position: relative; font-family: var(--display); font-size: 1.25rem; line-height: 1.05; text-align: center; max-width: 100px; }
.vault-pot .v-bal { color: var(--ink); }
.vault-burn .v-bal { color: var(--white); }
.vault h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--yellow); }
.vault .v-meta { color: var(--soft); margin-top: 4px; }
.vault .v-meta a { color: var(--white); font-weight: 700; }
.spends-title { margin: 30px 0 10px; font-size: 1.1rem; font-weight: 800; }
.spends { list-style: none; margin: 0; padding: 0; }
.spends li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid oklch(1 0 0 / 0.2); }
.spends .s-kind { font-weight: 800; color: var(--ink); background: var(--yellow); border-radius: 8px; padding: 2px 8px; font-size: 0.82rem; }
.spends .s-kind.burn { background: var(--red); color: var(--white); }
.spends .s-note { color: var(--soft); font-size: 0.95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.spends .s-note b { color: var(--white); }
.spends .s-right { text-align: right; font-size: 0.88rem; color: var(--soft); white-space: nowrap; }
.spends .s-right a { color: var(--white); font-weight: 700; }
.spends .empty, .empty { color: var(--soft); padding: 16px 0; display: block; }
.band-back .empty { color: var(--ink-2); }
.sk { height: 48px; border-radius: 10px; background: linear-gradient(90deg, oklch(1 0 0 / 0.06), oklch(1 0 0 / 0.14), oklch(1 0 0 / 0.06)); background-size: 200% 100%; animation: sk 1.4s linear infinite; margin: 8px 0; border: 0 !important; }
.band-back .sk, .page .sk.light { background: linear-gradient(90deg, oklch(0.28 0.08 266 / 0.06), oklch(0.28 0.08 266 / 0.13), oklch(0.28 0.08 266 / 0.06)); background-size: 200% 100%; }
@keyframes sk { to { background-position: -200% 0; } }

/* squeezers */
.sq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.sq-sub { margin: 16px 0 24px; color: var(--ink-2); font-size: 1.05rem; max-width: 44ch; }
.me-card { border-radius: 20px; background: var(--ink); color: var(--white); padding: 22px; display: grid; gap: 10px; }
.me-card h3 { font-weight: 800; font-size: 1.1rem; }
.me-card p { color: var(--soft); }
.me-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.me-stats div { display: grid; }
.me-stats b { font-family: var(--display); font-weight: 400; font-size: 1.8rem; color: var(--yellow); line-height: 1.1; }
.me-stats span { color: var(--soft); font-size: 0.88rem; }
.me-card .btn { justify-self: start; height: 44px; padding: 0 18px; background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--yellow-lo); }
.board { list-style: none; margin: 0; padding: 0; counter-reset: bd; }
.board li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 2px solid oklch(0.28 0.08 266 / 0.14); counter-increment: bd; }
.board li::before { content: counter(bd); font-family: var(--display); color: var(--cobalt); font-size: 1.1rem; }
.board .b-w { font-family: var(--mono); font-size: 0.95rem; }
.board .b-streak { font-weight: 800; }
.board .b-tot { color: var(--ink-2); font-size: 0.9rem; min-width: 76px; text-align: right; }
.board li.me { background: oklch(0.9 0.17 98 / 0.45); border-radius: 10px; }
.board .tag { font-size: 0.75rem; font-weight: 800; background: var(--cobalt); color: var(--white); border-radius: 6px; padding: 1px 6px; margin-left: 8px; font-family: var(--text); }

/* fine print */
.fine h2 { color: var(--yellow); margin-bottom: 30px; }
.fine-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.fine details { border-top: 2px solid oklch(0.42 0.12 266); padding: 16px 0; }
.fine summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.fine summary::-webkit-details-marker { display: none; }
.fine summary::after { content: "+"; font-family: var(--display); color: var(--yellow); }
.fine details[open] summary::after { content: "−"; }
.fine details p { margin-top: 10px; color: var(--soft); max-width: 60ch; }

/* ---------- pages ---------- */
.view[data-view="rolls"], .view[data-view="board"] { background: var(--back); color: var(--ink); min-height: calc(100vh - var(--bar-h)); }
.page { padding: 48px 0 90px; }
.page-head { margin-bottom: 30px; display: grid; gap: 10px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; color: var(--cobalt); }
.page-head p { color: var(--ink-2); font-size: 1.05rem; max-width: 60ch; }
.pops { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 36px; }
.pop-ticket { background: var(--cobalt); color: var(--white); border-radius: 18px; padding: 18px 20px; position: relative; overflow: hidden; }
.pop-ticket::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; background: repeating-conic-gradient(var(--yellow) 0 10deg, transparent 10deg 20deg); opacity: 0.25; border-radius: 50%; }
.pop-ticket .pt-amt { font-family: var(--display); font-size: 2rem; color: var(--yellow); line-height: 1.1; }
.pop-ticket .pt-w { font-family: var(--mono); }
.pop-ticket .pt-meta { color: var(--soft); font-size: 0.88rem; margin-top: 6px; }
.pop-ticket a { color: var(--white); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 2px solid oklch(0.28 0.08 266 / 0.18); background: oklch(0.97 0.015 95); max-height: 70vh; overflow-y: auto; }
table.rolls { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.rolls th { position: sticky; top: 0; background: var(--ink); color: var(--white); text-align: left; padding: 12px 14px; font-weight: 800; z-index: 1; }
.rolls td { padding: 11px 14px; border-top: 1px solid oklch(0.28 0.08 266 / 0.12); white-space: nowrap; }
.rolls td.num { font-family: var(--mono); }
.rolls .res { font-weight: 800; border-radius: 6px; padding: 2px 8px; font-size: 0.82rem; }
.res.held { background: oklch(0.47 0.2 266 / 0.14); color: var(--cobalt); }
.res.pop { background: var(--yellow); color: var(--ink); }
.res.dry { background: var(--red); color: var(--white); }
.rolls .proof { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.copy { border: 1px solid oklch(0.28 0.08 266 / 0.3); background: transparent; border-radius: 8px; padding: 3px 9px; font-size: 0.8rem; font-weight: 700; cursor: pointer; min-height: 26px; }
.band-deep .copy, .band-cobalt .copy, .foot .copy, .sheet .copy { border-color: oklch(1 0 0 / 0.4); color: var(--white); }
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.col-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; }
.holders { list-style: none; margin: 0; padding: 0; counter-reset: hd; }
.holders li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 2px solid oklch(0.28 0.08 266 / 0.14); counter-increment: hd; }
.holders li::before { content: counter(hd); font-weight: 800; color: var(--ink-2); }
.holders .h-w { font-family: var(--mono); font-size: 0.95rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.holders .h-bar { grid-column: 2 / -1; height: 6px; background: oklch(0.28 0.08 266 / 0.1); border-radius: 3px; overflow: hidden; }
.holders .h-bar i { display: block; height: 100%; background: var(--cobalt); }
.holders .h-r { text-align: right; font-weight: 700; }
.holders .h-r small { display: block; color: var(--ink-2); font-weight: 500; }
.holders li.me { background: oklch(0.9 0.17 98 / 0.45); border-radius: 10px; }

/* ---------- footer ---------- */
.foot { background: oklch(0.2 0.09 268); padding: 48px 0 110px; color: var(--soft); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 30px; align-items: start; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand b { color: var(--yellow); font-family: var(--display); font-weight: 400; }
.foot nav { display: grid; gap: 6px; }
.foot nav a { font-weight: 700; color: var(--white); text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot-ca { display: grid; gap: 8px; }
.foot-ca .ca { font-family: var(--mono); font-size: 0.85rem; color: var(--white); word-break: break-all; }
.foot-note { margin-top: 30px; font-size: 0.88rem; max-width: min(1200px, 100% - 40px); }
.foot-note { text-wrap: pretty; }
@media (min-width: 900px) { .foot-note { padding-right: 45%; } }

/* ---------- tab bar (phone) ---------- */
.tabbar { display: none; }

/* ---------- sheet ---------- */
.sheet-scrim { position: fixed; inset: 0; background: oklch(0.12 0.06 268 / 0.55); z-index: 60; animation: fade 0.2s var(--ease); }
.sheet {
  position: fixed; z-index: 61; right: 20px; top: calc(var(--bar-h) + 8px); width: min(400px, calc(100% - 24px));
  background: var(--white); color: var(--ink); border-radius: 22px; padding: 20px 22px 22px;
  box-shadow: 0 30px 70px oklch(0.1 0.08 268 / 0.5); animation: sheetIn 0.25s var(--ease);
  max-height: calc(100vh - var(--bar-h) - 24px); overflow-y: auto;
}
.sheet-grip { display: none; }
@keyframes sheetIn { from { transform: translateY(-8px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sh-head { display: flex; gap: 14px; align-items: center; }
.sh-head img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.sh-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.05; color: var(--cobalt); }
.sh-head p { color: var(--ink-2); font-weight: 700; }
.sh-price { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 4px; }
.sh-price b { font-size: 1.8rem; font-weight: 800; }
.sh-price .up { color: oklch(0.5 0.15 150); font-weight: 800; } .sh-price .down { color: var(--red-lo); font-weight: 800; }
.spark { width: 100%; height: 70px; display: block; margin: 6px 0 12px; }
.spark path.l { fill: none; stroke: var(--cobalt); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.spark path.a { fill: oklch(0.47 0.2 266 / 0.12); }
.sh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.sh-stats div { background: var(--back); border-radius: 12px; padding: 10px 12px; }
.sh-stats dt { font-size: 0.8rem; color: var(--ink-2); font-weight: 700; }
.sh-stats dd { margin: 0; font-weight: 800; font-size: 1.05rem; }
.sh-ca { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: var(--back); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.sh-ca span { font-family: var(--mono); font-size: 0.85rem; }
.sheet .copy { border-color: oklch(0.28 0.08 266 / 0.3); color: var(--ink); }
.buy { display: grid; gap: 8px; }
.buy label { font-weight: 800; font-size: 0.9rem; }
.buy-row { display: flex; gap: 8px; }
.buy-in { flex: 1; display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 12px; padding: 0 12px; background: var(--white); }
.buy-in input { flex: 1; min-width: 0; border: 0; outline: 0; font: 700 1.1rem var(--text); color: var(--ink); background: transparent; height: 46px; font-variant-numeric: tabular-nums; }
.buy-in span { font-weight: 800; color: var(--ink-2); }
.buy-in:focus-within { outline: 3px solid var(--yellow); outline-offset: 1px; }
.presets { display: flex; gap: 6px; }
.presets button { flex: 1; border: 2px solid oklch(0.28 0.08 266 / 0.2); background: var(--back); border-radius: 10px; min-height: 34px; font-weight: 700; cursor: pointer; }
.btn-buy { height: 48px; padding: 0 18px; background: var(--cobalt); color: var(--white); box-shadow: 0 4px 0 var(--deep); }
.btn-buy:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--deep); }
.buy-err { color: var(--red-lo); font-weight: 700; font-size: 0.9rem; min-height: 1.3em; }
.sh-links { display: flex; gap: 16px; margin-top: 12px; font-weight: 700; font-size: 0.9rem; }
.sh-soon { background: var(--back); border-radius: 14px; padding: 14px; margin-top: 14px; color: var(--ink-2); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); }
.toast { background: var(--white); color: var(--ink); border-radius: 14px; padding: 12px 16px; font-weight: 700; box-shadow: 0 16px 40px oklch(0.1 0.08 268 / 0.45); display: flex; gap: 12px; justify-content: space-between; align-items: center; animation: toastIn 0.3s var(--ease); border-left: 0; }
.toast.err { background: var(--red); color: var(--white); }
.toast.pop { background: var(--yellow); }
.toast a { color: inherit; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

/* new rows */
.flashin { animation: flashin 1.2s var(--ease); }
@keyframes flashin { 0% { background: oklch(0.9 0.17 98 / 0.6); transform: translateY(-6px); } 100% { background: transparent; transform: none; } }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: hang 0.8s var(--ease) both; transform-origin: 50% -30px; }
  .card-copy > *, .gauge-panel > * { animation: rise 0.6s var(--ease) both; }
  .card-copy > :nth-child(2), .gauge-panel > :nth-child(2) { animation-delay: 0.06s; }
  .card-copy > :nth-child(3), .gauge-panel > :nth-child(3) { animation-delay: 0.12s; }
  .card-copy > :nth-child(4) { animation-delay: 0.18s; }
  .flash { animation: stamp 0.6s 0.3s var(--ease) both; }
}
@keyframes hang { from { transform: rotate(-1.4deg) translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .card-inner { grid-template-columns: 1fr 1.1fr; }
  .gauge-panel { grid-column: 1 / -1; grid-template-columns: 220px 1fr 1.4fr; align-items: center; }
}
@media (max-width: 860px) {
  .back-grid, .contents-grid, .sq-grid, .board-grid, .strip-head { grid-template-columns: 1fr; }
  .insert { max-width: 380px; justify-self: center; }
  .foot-grid { grid-template-columns: 1fr; }
  .fine-cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --bar-h: 56px; }
  .bar { gap: 8px; padding: 0 10px; }
  .routes { display: none; }
  .brand span { display: none; }
  .chip { padding: 0 8px 0 4px; gap: 6px; height: 38px; }
  .chip-chg { display: none; }
  .btn-connect { height: 38px; padding: 0 12px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: oklch(0.2 0.09 268); border-top: 1px solid oklch(0.4 0.12 268); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; text-decoration: none; font-size: 0.75rem; font-weight: 700; color: var(--soft); padding: 4px 0; border-radius: 10px; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .tabbar a[aria-current="page"] { color: var(--yellow); background: oklch(0.3 0.13 268); }
  .toasts { bottom: 84px; }
  .hero { padding: 30px 8px 34px; }
  .card { padding: 26px 16px 14px; border-radius: 24px; }
  .card::after { inset: 7px; border-radius: 18px; border-width: 2px; }
  .hangtab { width: 130px; height: 40px; top: -24px; }
  .hole { width: 48px; top: 10px; }
  .card-inner { grid-template-columns: 1fr 1fr; gap: 12px 12px; }
  .card-copy { display: contents; }
  .maker { display: none; }
  .card-copy h1 { grid-column: 1 / -1; order: 1; font-size: 2.7rem; margin: 4px 0 0; text-shadow: 3px 3px 0 var(--red); }
  .card-copy h1 br { display: none; }
  .rule { grid-column: 1 / -1; order: 2; font-size: 1rem; }
  .rule-long { display: none; }
  .odds { display: block; grid-column: 1 / -1; order: 4; font-weight: 700; color: var(--soft); text-align: center; margin-top: 2px; }
  .odds b { color: var(--yellow); font-size: 1.15rem; }
  .fineline { display: none; }
  .sticker { width: 92px; left: -4px; bottom: -8px; padding: 5px 5px 3px; }
  .sticker figcaption { font-size: 0.62rem; }
  .cardback { border-radius: 22px; padding: 30px 18px; }
  .band-wall { padding-left: 0; padding-right: 0; }
  .bubble-wrap { grid-column: 1 / -1; order: 3; }
  .bubble { height: 262px; }
  .hero { padding-top: 26px; }
  .btn-squeeze { padding: 11px 20px 10px; }
  .btn-squeeze .btn-label { font-size: 1.4rem; }
  .flash { width: 112px; height: 112px; right: -6px; top: -14px; }
  .flash-v { font-size: 1.4rem; }
  .flash-k { font-size: 0.7rem; }
  .cta { grid-column: 1 / -1; order: 5; margin-top: 4px; }
  .btn-squeeze { width: 100%; text-align: center; }
  .howlink { display: none; }
  .squeeze-msg { grid-column: 1 / -1; order: 6; margin: 0; min-height: 0; }
  .squeeze-msg:empty { display: none; }
  .firstrun { grid-column: 1 / -1; order: 7; }
  .gauge-panel { grid-column: 1 / -1; order: 7; grid-template-columns: 130px 1fr; gap: 6px 14px; }
  .gauge { grid-row: span 2; }
  .gauge-read { display: none; }
  .gauge { grid-row: auto; max-width: 200px; justify-self: center; grid-column: 1 / -1; }
  .gauge-facts { grid-column: 1 / -1; }
  .gauge-facts div { padding: 7px 0; }
  .lastroll { font-size: 0.88rem; }
  .strip { height: 190px; }
  .strip-legend a { margin-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .vault { grid-template-columns: 112px 1fr; gap: 14px; }
  .v-burst { width: 112px; height: 112px; }
  .v-bal { font-size: 0.95rem; max-width: 76px; }
  .vault h3 { font-size: 1.2rem; }
  .spends li { grid-template-columns: auto 1fr; }
  .spends .s-right { grid-column: 1 / -1; text-align: left; }
  .contents-panel { padding: 22px 18px; }
  .board li { grid-template-columns: 28px 1fr auto; }
  .board .b-tot { display: none; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; border-radius: 22px 22px 0 0; max-height: 86vh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation: sheetUp 0.28s var(--ease); }
  .sheet-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: oklch(0.28 0.08 266 / 0.25); margin: -6px auto 12px; }
  .foot { padding-bottom: 110px; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
