:root {
  --bg: #0a0d13;
  --panel: #121722;
  --panel-2: #181f2d;
  --grid: #1f2736;
  --text: #e8edf5;
  --muted: #7d8799;
  --long: #1fd286;
  --short: #ff4d6d;
  --pause: #8b93a7;
  --brand: #ffd400;
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }

.up { color: var(--long); }
.down { color: var(--short); }
.c-long { color: var(--long); }
.c-short { color: var(--short); }
.c-pause { color: var(--pause); }

/* Pages are drawn edge to edge (viewport-fit=cover), so leave room for the status bar and
   gesture bar: in the Android app, and on notched iPhones. Zero everywhere else. */
.screen { display: none; min-height: 100dvh; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.screen.active { display: flex; flex-direction: column; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--grid);
  background: var(--panel-2);
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.08s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:active { transform: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #111; }

/* ---------- start ---------- */
.start-wrap, .result-wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}
.logo {
  font-size: 44px;
  letter-spacing: -1px;
  margin: 12px 0 8px;
  line-height: 1;
}
.tape {
  background: var(--brand);
  color: #111;
  padding: 0 10px;
  display: inline-block;
  transform: rotate(-2deg);
  border-radius: 3px;
}
.tagline { color: var(--muted); font-size: 18px; line-height: 1.4; margin: 16px 0 24px; }

.board h2 { font-size: 16px; margin: 0 0 10px; }
.board h2 small { color: var(--muted); font-weight: 500; }
.board ol { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.board li {
  counter-increment: r;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--grid);
  font-size: 14px;
}
.board li::before { content: counter(r); color: var(--muted); font-family: var(--mono); }
.board li.empty { display: block; color: var(--muted); }
.board li.empty::before { content: none; }
.board .tk { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.board b { font-family: var(--mono); }

/* ---------- game ---------- */
#screen-game {
  height: 100dvh;
  max-width: 900px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  user-select: none;
}
.hud { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.mystery { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.mystery .bar { color: #2a3243; letter-spacing: -1px; }
.date { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-top: 4px; }
.hud-right { text-align: right; }
.balance { font-family: var(--mono); font-size: 28px; font-weight: 700; line-height: 1; }
.pnl { font-family: var(--mono); font-size: 16px; margin-top: 4px; color: var(--muted); }
.pnl.up { color: var(--long); }
.pnl.down { color: var(--short); }

.timebar {
  position: relative;
  height: 22px;
  margin: 12px 0 8px;
  background: var(--panel);
  border-radius: 999px;
  overflow: hidden;
}
#timebar-fill { height: 100%; width: 0; background: var(--brand); opacity: 0.9; }
#timebar-fill.late { background: var(--short); }
#hud-timer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  mix-blend-mode: difference;
}

.chart-wrap { position: relative; flex: 1; min-height: 200px; }
.chart-wrap canvas, .result-chart canvas { width: 100%; height: 100%; display: block; }
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 96px;
  font-weight: 700;
  color: var(--brand);
  pointer-events: none;
  opacity: 0;
}
.countdown.show { animation: pop 0.7s ease-out; }
@keyframes pop {
  0% { opacity: 0; transform: scale(1.6); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}
.pos-tag {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
}
.pos-tag.long { background: var(--long); color: #0a0d13; }
.pos-tag.short { background: var(--short); color: #0a0d13; }
.pos-tag.pause { background: var(--pause); color: #0a0d13; }
.pos-tag.flash { animation: flash 0.9s ease-out; }
@keyframes flash { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* 3-position switch: BUY | PAUSE | SHORT */
.switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
  border: 1px solid var(--grid);
  border-radius: 18px;
  padding: 6px;
  margin-top: 12px;
  touch-action: none;
}
.switch .thumb {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 13px;
  background: var(--pause);
  transition: transform 0.14s cubic-bezier(0.3, 0.7, 0.3, 1), background 0.14s;
}
.switch[data-pos='1'] .thumb { transform: translateX(0); background: var(--long); }
.switch[data-pos='0'] .thumb { transform: translateX(100%); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--pause); }
.switch[data-pos='-1'] .thumb { transform: translateX(200%); background: var(--short); }
.opt {
  position: relative;
  border: 0;
  background: none;
  padding: 16px 4px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  display: grid;
  gap: 2px;
  color: var(--muted);
  transition: color 0.14s;
}
.opt small { font-size: 11px; font-weight: 500; opacity: 0.8; }
.switch[data-pos='1'] .long, .switch[data-pos='-1'] .short { color: #0a0d13; }
.switch[data-pos='0'] .pause { color: var(--text); }
.keys { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
@media (pointer: coarse) { .keys { display: none; } }

/* ---------- result ---------- */
.reveal-label { color: var(--muted); margin: 0; }
.reveal-name {
  font-size: 32px;
  margin: 6px 0 4px;
  animation: unredact 0.9s ease-out;
}
@keyframes unredact {
  0% { background: var(--brand); color: var(--brand); }
  60% { background: var(--brand); color: var(--brand); }
  100% { background: transparent; }
}
.reveal-meta { color: var(--muted); font-family: var(--mono); font-size: 13px; margin: 0 0 20px; }
.score { text-align: center; padding: 20px; background: var(--panel); border-radius: var(--radius); }
.score-main { font-family: var(--mono); font-size: 56px; font-weight: 700; line-height: 1; }
.score-sub { color: var(--muted); font-family: var(--mono); margin-top: 8px; }
.result-chart { height: 200px; margin: 10px 0; background: var(--panel); border-radius: var(--radius); padding: 6px; }
.share-card { background: var(--panel); border-radius: var(--radius); padding: 16px; margin: 10px 0; }
.share-buttons, .result-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-buttons { margin-top: 16px; }
.ad {
  border: 1px dashed var(--grid);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 10px 0;
}
.ad p { margin: 6px 0 0; }
.ad-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.ad-fine { color: var(--muted); font-size: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--brand);
  color: #111;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .result-wrap { max-width: 560px; }
  .result-chart { height: 240px; }
}


/* ---------- ready card (before the clock starts) ---------- */
.ready {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 34px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  display: none;
}
.ready.show { display: block; animation: rise 0.25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.ready p { margin: 0 0 6px; }
.ready-mode { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--brand); }
.ready-range { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.ready-prior { color: var(--muted); font-size: 14px; }
.ready-prior b { font-family: var(--mono); }
.ready-hint { color: var(--muted); font-size: 13px; line-height: 1.4; }
.btn.play { width: 100%; margin-top: 8px; font-size: 20px; padding: 14px; }
@media (min-width: 700px) {
  .ready { left: auto; right: 80px; bottom: auto; top: 50%; transform: translateY(-50%); width: 320px; }
  .ready.show { animation: none; }
}

.score-mode { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--brand); margin-bottom: 8px; }


/* ---------- guess the stock ---------- */
.guess {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(4px);
  text-align: center;
}
.guess.show { display: flex; animation: rise 0.25s ease-out; }
.guess-title { font-size: 24px; font-weight: 700; margin: 0; }
.guess-sub { color: var(--muted); margin: 6px 0 16px; font-size: 14px; }
.guess-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 440px; }
.guess-options button {
  background: var(--panel-2);
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 16px 10px;
  font-weight: 700;
  font-size: 15px;
  min-height: 64px;
  transition: transform 0.08s, background 0.15s;
}
.guess-options button:active { transform: scale(0.97); }
.guess-options button.right { background: var(--long); color: #0a0d13; border-color: var(--long); }
.guess-options button.wrong { background: var(--short); color: #0a0d13; border-color: var(--short); }
.guess-skip { background: none; border: 0; color: var(--muted); margin-top: 14px; text-decoration: underline; }

.guess-result { margin: -12px 0 16px; font-weight: 700; color: var(--muted); }
.guess-result.up { color: var(--long); }

.result-chart { height: 240px; }

.share-soon {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px dashed var(--grid);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.share-soon em { font-style: normal; font-family: var(--sans); font-size: 11px; background: var(--brand); color: #111; padding: 2px 6px; border-radius: 4px; }
.nowrap { white-space: nowrap; }

/* ---------- homepage: hero · play card · stats band ---------- */
#screen-start .start-wrap { padding-top: 0; padding-bottom: 0; }
#screen-start .hero { padding-top: 36px; }
.how {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 8px;
}
.how b { display: block; font-family: var(--mono); font-size: 15px; }
.how span { color: var(--muted); font-size: 12px; }

.section-tape {
  position: absolute;
  top: -11px;
  left: 14px;
  background: var(--brand);
  color: #111;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  transform: rotate(-1.5deg);
}

/* Shown above the play card once today's round is spent: with the daily button
   greyed out, this is the strongest thing left to press. */
.brag {
  background: var(--panel-2);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  text-align: center;
}
.brag[hidden] { display: none; }
.brag-line { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.brag-line b { font-family: var(--mono); }
.brag .btn { width: 100%; }

.play-card {
  position: relative;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: var(--radius);
  padding: 22px 14px 14px;
  margin-bottom: 40px;
}
.play-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.play-row input {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--grid);
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 16px;
}
.play-row input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg button {
  background: var(--bg);
  border: 1px solid var(--grid);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--muted);
}
.seg button[aria-pressed='true'] { border-color: var(--brand); color: var(--text); background: var(--panel-2); }
.start-buttons { display: grid; gap: 8px; }
.name-locked { margin: -4px 0 10px; color: var(--muted); font-size: 11px; }
.name-locked[hidden] { display: none; }

.stats-band {
  flex: 1;
  background: var(--panel);
  border-top: 1px solid var(--grid);
}
#screen-start .stats-band .start-wrap { position: relative; padding-top: 30px; padding-bottom: 28px; }
.stats-band .section-tape { left: 16px; }
.my-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ms { display: grid; gap: 2px; text-align: center; }
.ms span { color: var(--muted); font-size: 12px; }
.ms b { font-family: var(--mono); font-size: 18px; color: var(--muted); }
.soon-tag {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 6px 0 0;
  font-size: 11px;
  color: #111;
  background: var(--brand);
  border-radius: 6px;
  padding: 3px 8px;
}
.account {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--grid);
}
.acc-title { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.acc-title b { font-family: var(--mono); font-weight: 500; overflow-wrap: anywhere; }
.acc-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.acc-note a { color: var(--muted); }
.acc-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 10px 0 8px; }
.acc-form input {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--grid);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;
}
.acc-form input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.acc-form .btn { white-space: nowrap; padding: 11px 14px; font-size: 14px; }
.acc-form[hidden] { display: none; }
.acc-actions { display: flex; gap: 16px; margin-top: 10px; }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.linklike.danger { color: var(--short); }
.linklike[data-armed='1'] { color: var(--short); font-weight: 700; text-decoration: none; }

.stats-band .board { margin-top: 22px; }
.stats-band .board li { padding: 10px 4px; }
.fine { color: var(--muted); font-size: 12px; text-align: center; margin: 24px 0 0; }
.fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.fine a:hover { color: var(--text); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- results ---------- */
.score-label { color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; }
.panel b { font-family: var(--mono); }
.vs-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.vs-row b { font-size: 18px; }
.vs-verdict { font-size: 17px; font-weight: 700; margin: 8px 0 2px; }
.vs-note { color: var(--muted); font-size: 13px; margin: 0; }
.vs-challenge { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--grid); font-size: 14px; }

.traded h3 { font-size: 15px; margin: 0 0 10px; }
.split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--grid); }
.split i { display: block; height: 100%; }
.split .l { background: var(--long); }
.split .h { background: #3a4252; }
.split .s { background: var(--short); }
.split-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin: 6px 0 4px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 10px 0 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-weight: 700; }

.share-card { border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.sc-caption { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.share-preview {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.sc-head { font-weight: 700; font-size: 17px; }
.sc-head .tape { font-size: 15px; padding: 0 6px; }
.sc-num { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.sc-line { font-size: 15px; margin: 10px 0 4px; }
.sc-line b { font-family: var(--mono); }
.sc-grid { font-size: 22px; letter-spacing: 2px; margin: 6px 0; line-height: 1.2; }
.sc-sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.sc-dare { font-size: 17px; font-weight: 700; margin: 0 0 12px; }

.challenge-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 14px;
  line-height: 1.4;
}
.challenge-banner b { font-family: var(--mono); }
.share-card .share-buttons { grid-template-columns: 2fr 1fr; }

/* ---------- phase 1: how to play, sound toggle, juice ---------- */
.howto-link {
  display: block;
  margin: -24px auto 32px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.howto {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(4px);
}
.howto[hidden] { display: none; }
.howto-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: var(--radius);
  padding: 22px 18px 18px;
  animation: rise 0.25s ease-out;
}
.howto-card h2 { margin: 0 0 6px; font-size: 22px; }
.howto-intro { color: var(--muted); margin: 0 0 16px; font-size: 15px; line-height: 1.45; }
.howto-pos { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.howto-pos li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; font-size: 15px; }
.howto-pos li > b { font-family: var(--mono); }
.howto-rules { margin: 0 0 18px; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.howto-card .btn { width: 100%; }

.mute {
  background: none;
  border: 0;
  padding: 0 8px 0 0;
  font-size: 15px;
  line-height: 1;
  vertical-align: -1px;
}

.hud-right { position: relative; }
.pop {
  position: absolute;
  right: 0;
  top: 100%;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  pointer-events: none;
  animation: pop-up 1.1s ease-out forwards;
}
@keyframes pop-up {
  0% { opacity: 0; transform: translateY(6px); }
  15% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-26px); }
}

.chart-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
}
.chart-wrap.pulse-good::after { box-shadow: inset 0 0 0 3px var(--long), inset 0 0 40px color-mix(in srgb, var(--long) 35%, transparent); animation: pulse 0.6s ease-out; }
.chart-wrap.pulse-bad::after { box-shadow: inset 0 0 0 3px var(--short), inset 0 0 40px color-mix(in srgb, var(--short) 35%, transparent); animation: pulse 0.6s ease-out; }
.chart-wrap.pulse-neutral::after { box-shadow: inset 0 0 0 2px var(--pause); animation: pulse 0.6s ease-out; }
@keyframes pulse { 0% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .pop, .chart-wrap::after, .howto-card, .countdown.show { animation: none !important; }
}

/* ---------- leaderboard ---------- */
.board li.you { background: color-mix(in srgb, var(--brand) 12%, transparent); border-radius: 6px; }
.board-more {
  width: 100%;
  margin-top: 12px;
  background: var(--panel-2);
  border: 1px solid var(--grid);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.board-wrap { padding-block: 32px 40px; }
.board-title { font-size: 22px; margin: 0 0 12px; }
.board-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; }
.board-tabs button {
  background: var(--panel);
  border: 1px solid var(--grid);
  border-radius: 10px;
  padding: 9px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.board-tabs button[aria-selected='true'] { border-color: var(--brand); color: var(--text); background: var(--panel-2); }
.board-num { font-family: var(--mono); color: var(--muted); font-size: 15px; }
.board-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
#board-full { list-style: none; margin: 0; padding: 0; counter-reset: none; }
#board-full li, .board li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--grid);
  font-size: 14px;
}
#board-full li::before, .board li::before { content: attr(value); color: var(--muted); font-family: var(--mono); }
#board-full li.you { background: color-mix(in srgb, var(--brand) 12%, transparent); border-radius: 6px; }
#board-full li.empty, .board li.empty { display: block; color: var(--muted); }
#board-full li.empty::before, .board li.empty::before { content: none; }
#board-full b, .board b { font-family: var(--mono); }
.board-you {
  margin: 16px 0 0;
  padding: 12px;
  background: var(--panel);
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
}
.score-rank { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.score-rank[hidden] { display: none; }

.next-chart {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.next-chart[hidden] { display: none; }

.sc-stats { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.sc-stats[hidden] { display: none; }

.sc-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  border-radius: 10px;
  border: 1px solid var(--grid);
  margin-bottom: 14px;
  background: var(--bg);
}
.sc-save {
  width: 100%;
  margin-top: 8px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sc-save[hidden] { display: none; }

/* ---------- the privacy page ---------- */
.prose { padding-bottom: 60px; max-width: 640px; }
.prose h2 { font-size: 26px; margin: 0 0 4px; }
.prose h3 { font-size: 15px; margin: 28px 0 8px; color: var(--brand); }
.prose p, .prose li { color: var(--text); font-size: 15px; line-height: 1.6; }
.prose ul { margin: 0; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose code { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.prose a { color: var(--brand); }
.prose .updated { color: var(--muted); font-size: 12px; margin: 0 0 22px; }
.prose .back { margin-top: 36px; }
