/* Split or Steal — studio-at-night palette. Mint always means split, raspberry always
   means steal, amber only ever means burned. Nothing else on the page is saturated. */

:root {
  --stage: #1d1a3a;
  --stage-deep: #15122b;
  --spot: #3a3379;
  --panel: #28234f;
  --panel-2: #322c61;
  --line: #463f80;
  --ink: #f4f0ff;
  --muted: #b3abdb;
  --split: #3ee0b0;
  --split-ink: #052a1f;
  --steal: #ff4f7b;
  --steal-ink: #2e0513;
  --burn: #ffb547;
  --burn-ink: #2f1a00;

  --display: 'Bungee', 'Arial Black', Impact, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 42% at 50% -8%, var(--spot) 0%, transparent 70%),
    linear-gradient(var(--stage), var(--stage-deep));
  background-color: var(--stage);
  color: var(--ink);
  font: 400 1rem/1.5 var(--body);
}

h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

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

.help { color: var(--muted); font-size: 0.875rem; }

/* ---------- top bar ---------- */

.topbar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(var(--gutter), 4vw, 40px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.logo {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}
.logo-split { color: var(--split); }
.logo-steal { color: var(--steal); }
.logo-or { color: var(--muted); font-size: 0.55em; }

.live-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0;
}
.live-stats div { display: flex; flex-direction: column-reverse; align-items: center; }
.live-stats dt { color: var(--muted); font-size: 0.75rem; }
.live-stats dd { margin: 0; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.stat-burn dd { color: var(--burn); }
.stat-pool dd { color: var(--split); }

.me { display: flex; align-items: center; gap: 14px; }

/* Live token price. The dot pulses once each time a new price arrives. */
.ticker {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
a.ticker[href]:hover { border-color: var(--muted); }
.ticker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); align-self: center; flex: none; }
.ticker.stale .ticker-dot, .ticker.unavailable .ticker-dot { background: var(--muted); opacity: 0.5; }
.ticker.tick .ticker-dot { animation: tick 900ms ease-out; }
@keyframes tick { from { box-shadow: 0 0 0 0 rgb(244 240 255 / 0.75); } to { box-shadow: 0 0 0 9px rgb(244 240 255 / 0); } }
.ticker-sym { color: var(--muted); font-weight: 700; font-size: 0.875rem; }
.ticker-price { font-weight: 700; font-size: 1.0625rem; }
.ticker-change { font-size: 0.875rem; }
.ticker-note { color: var(--muted); font-size: 0.8125rem; }
.ticker-note:empty, .ticker-change:empty, .ticker-price:empty { display: none; }

.usd { color: var(--muted); font-size: 0.8125rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.usd-inline { font-size: inherit; }
.name-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px 4px 4px; font-weight: 700;
}
.name-btn:hover { border-color: var(--muted); }
.balance { white-space: nowrap; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.balance strong { color: var(--ink); font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.balance-credits { font-size: 0.875rem; }
.balance-credits strong { font-size: 0.9375rem; }

.conn-banner {
  text-align: center; padding: 8px var(--gutter);
  background: var(--panel-2); color: var(--ink); font-size: 0.875rem;
}

/* ---------- layout ---------- */

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px clamp(var(--gutter), 4vw, 40px) 56px; }

.footer { text-align: center; padding: 20px var(--gutter) 28px; color: var(--muted); font-size: 0.8125rem; }
.footer p { max-width: 72ch; margin-left: auto; margin-right: auto; }
.footer p + p { margin-top: 4px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 1.0625rem; transition: transform 80ms ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--stage); }
.btn-primary:hover:not(:disabled) { background: #ffffff; }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- avatars ---------- */

.avatar {
  --hue: 260;
  --lvl: 0;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: hsl(var(--hue) 32% 38%);
  color: var(--ink);
  font-weight: 700;
  flex: none;
}
.avatar-sm { width: 30px; height: 30px; font-size: 0.75rem; }
.avatar-lg {
  width: clamp(72px, 14vw, 104px); height: clamp(72px, 14vw, 104px);
  font-size: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 0 0 calc(3px + var(--lvl) * 10px) color-mix(in srgb, var(--ink) calc(var(--lvl) * 55%), transparent);
  transition: box-shadow 60ms linear;
}

/* ---------- lobby ---------- */

.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
  grid-template-areas: "hero play" "board play" "feed burns";
  column-gap: clamp(28px, 5vw, 64px);
  row-gap: 48px;
  align-items: start;
}
.hero { grid-area: hero; }
.play { grid-area: play; align-self: start; }
.board { grid-area: board; }
.feed { grid-area: feed; }
.burns { grid-area: burns; }

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 15ch;
  text-wrap: balance;
}
.lede { margin-top: 14px; font-size: 1.1875rem; color: var(--muted); max-width: 38ch; }

.payoff {
  margin-top: 32px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px;
  margin-left: -8px;
  table-layout: fixed;
}
.payoff thead th, .payoff thead td { padding: 0 4px 2px; font-weight: 700; text-align: left; font-size: 0.9375rem; }
.payoff thead td { width: 22%; background: none; padding: 0; }
.payoff tbody th { text-align: left; font-weight: 700; font-size: 0.9375rem; padding-right: 4px; vertical-align: middle; }
.col-split, .row-split { color: var(--split); }
.col-steal, .row-steal { color: var(--steal); }
.payoff td {
  background: var(--panel);
  border-radius: var(--r-md);
  padding: 16px 16px 14px;
  vertical-align: top;
}
.payoff td strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.payoff td .usd { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--ink); }
.payoff td .cell-note { display: block; margin-top: 6px; color: var(--muted); font-size: 0.875rem; line-height: 1.35; }
.payoff .cell-burn .usd { color: var(--burn); }
.payoff td .cell-bonus { display: block; margin-top: 8px; color: var(--split); font-weight: 700; font-size: 0.875rem; line-height: 1.35; }
.payoff td .cell-bonus:empty { display: none; }
.trust-explain { margin-top: 14px; color: var(--muted); font-size: 0.9375rem; max-width: 52ch; }
.payoff .cell-burn { background: color-mix(in srgb, var(--burn) 16%, var(--panel)); }
.payoff .cell-burn strong { color: var(--burn); }

.play {
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 26px;
  position: sticky;
  top: 24px;
}
.play .btn-primary { width: 100%; margin-top: 22px; }

.tiers { border: 0; padding: 0; margin: 0; }
.tiers legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.tier-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--stage); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 12px 12px 10px; text-align: left;
}
.tier:hover { border-color: var(--muted); }
.tier[aria-checked="true"] { border-color: var(--ink); background: var(--panel-2); }
.tier:disabled { opacity: 0.45; cursor: not-allowed; }
.tier-amount { font-family: var(--display); font-size: 1.375rem; line-height: 1.1; }
.tier-wait { color: var(--muted); font-size: 0.8125rem; }
.tier-usd { color: var(--ink); }

.voice-setting { margin-top: 24px; }
.switch {
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; padding: 0; font-weight: 700; text-align: left;
}
.switch-track {
  width: 46px; height: 28px; border-radius: 999px; background: var(--stage);
  border: 1.5px solid var(--line); position: relative; flex: none; transition: background 120ms;
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--muted); transition: transform 120ms, background 120ms;
}
.switch[aria-checked="true"] .switch-track { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); background: var(--stage); }
.voice-setting .help { margin-top: 6px; padding-left: 58px; }
.mic-meter { margin-top: 10px; padding-left: 58px; display: flex; align-items: center; gap: 10px; }
.mic-meter .help { margin: 0; padding: 0; white-space: nowrap; }
.meter-track { flex: 1; height: 6px; border-radius: 3px; background: var(--stage); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--ink); border-radius: 3px; transition: width 60ms linear; }

.funds-note { margin-top: 12px; }

.searching { text-align: center; padding: 18px 0 6px; }
.searching-title { font-family: var(--display); font-size: 1.5rem; margin-top: 18px; }
.searching .help { margin-top: 6px; }
.searching .btn { margin-top: 22px; min-width: 160px; }
.searching-dots { display: inline-flex; gap: 10px; }
.searching-dots span {
  width: 14px; height: 14px; border-radius: 50%; background: var(--split);
  animation: bob 1.1s ease-in-out infinite;
}
.searching-dots span:nth-child(2) { background: var(--muted); animation-delay: 0.15s; }
.searching-dots span:nth-child(3) { background: var(--steal); animation-delay: 0.3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-8px); opacity: 1; } }

.feed h2 { font-size: 1.125rem; margin-bottom: 10px; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.feed-list li:last-child { border-bottom: 0; }
.feed-list time { color: var(--muted); font-size: 0.8125rem; white-space: nowrap; }
.feed-split { color: var(--split); }
.feed-steal { color: var(--steal); }
.feed-burn { color: var(--burn); }

/* ---------- match ---------- */

.match { max-width: 760px; margin: 0 auto; }

.phase-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.phase-label { font-size: 1.5rem; }
.timer { font-family: var(--display); font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.phase-track { margin-top: 12px; height: 6px; border-radius: 3px; background: var(--panel); overflow: hidden; }
.phase-fill { height: 100%; width: 100%; background: var(--muted); border-radius: 3px; transform-origin: left; }
.phase[data-phase="decide"] .phase-fill { background: var(--ink); }
.phase.urgent .timer { color: var(--burn); }

.table-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
}
.seat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.seat .avatar { margin-bottom: 8px; }
.seat-name { font-weight: 700; font-size: 1.125rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-sub { color: var(--muted); font-size: 0.875rem; }
.seat-badge {
  margin-top: 6px; padding: 3px 12px; border-radius: 999px;
  background: var(--ink); color: var(--stage); font-weight: 700; font-size: 0.8125rem;
}
.seat .seat-badge[hidden] { display: block !important; visibility: hidden; } /* keep seats aligned */
.seat.offline .avatar { opacity: 0.4; }

.pot { display: flex; flex-direction: column; align-items: center; padding: clamp(14px, 3.5vw, 24px) clamp(8px, 3vw, 28px) 0; }
.pot-amount { font-family: var(--display); font-size: clamp(2.2rem, 7vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.pot-usd { margin-top: 6px; font-size: 0.9375rem; color: var(--ink); }
.pot-label { color: var(--muted); font-size: 0.875rem; margin-top: 2px; }

.trust-line {
  margin: 22px auto 0; padding: 10px 16px; max-width: 560px; text-align: center;
  border-radius: var(--r-md); background: color-mix(in srgb, var(--split) 14%, var(--panel));
  color: var(--split); font-weight: 700;
}
.trust-line.off { background: var(--panel); color: var(--muted); font-weight: 400; font-size: 0.9375rem; }
.decide { margin-top: 28px; text-align: center; }
.decide-prompt { color: var(--muted); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.choice {
  min-height: clamp(96px, 18vw, 136px);
  border: 0; border-radius: var(--r-lg);
  font-family: var(--display); font-size: clamp(2rem, 6vw, 3rem);
  transition: transform 90ms ease, opacity 160ms ease;
}
.choice:active { transform: scale(0.97); }
.choice-split { background: var(--split); color: var(--split-ink); }
.choice-steal { background: var(--steal); color: var(--steal-ink); }
.choice:disabled { cursor: default; }
.choices.chosen .choice:not(.picked) { opacity: 0.22; }
.choices.chosen .choice.picked { box-shadow: 0 0 0 4px var(--stage), 0 0 0 7px var(--ink); }
.locked { margin-top: 14px; color: var(--muted); font-size: 0.9375rem; }
.locked strong { color: var(--ink); }
.locked code { font-size: 0.8125rem; color: var(--ink); background: var(--panel); padding: 2px 6px; border-radius: 6px; }

.talk { margin-top: 28px; background: var(--panel); border-radius: var(--r-lg); padding: 14px; }
.chat {
  list-style: none; margin: 0; padding: 4px 4px 10px;
  height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  overscroll-behavior: contain;
}
.chat li { max-width: 78%; padding: 8px 12px; border-radius: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.chat .from-opp { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.chat .from-you { align-self: flex-end; background: var(--ink); color: var(--stage); border-bottom-right-radius: 4px; }
.chat .from-system { align-self: center; max-width: 100%; color: var(--muted); font-size: 0.8125rem; padding: 2px 8px; text-align: center; }
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1; min-width: 0; min-height: 42px; padding: 0 14px;
  background: var(--stage); border: 1.5px solid var(--line); border-radius: 999px;
}
.chat-form input:focus-visible { outline: none; border-color: var(--ink); }
.chat-form input:disabled { opacity: 0.5; }
.chat-form .btn { background: var(--ink); color: var(--stage); }

.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ctl {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: transparent; border: 1.5px solid var(--line); font-weight: 700; font-size: 0.9375rem;
}
.ctl:hover { border-color: var(--muted); }
.ctl[aria-pressed="true"] { background: var(--ink); color: var(--stage); border-color: var(--ink); }
.ctl:disabled { opacity: 0.4; cursor: default; }
.ctl-quiet { margin-left: auto; color: var(--muted); }
.voice-status { margin-top: 10px; min-height: 1.4em; }
#tap-audio { margin-top: 8px; }

/* ---------- result ---------- */

.result { max-width: 640px; margin: 0 auto; text-align: center; }
.reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; perspective: 900px; }
.reveal-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; border-radius: var(--r-lg); background: var(--panel); padding: 16px;
}
.reveal-who { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reveal-pick { font-family: var(--display); font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.1; }
.reveal-card.pick-split { background: var(--split); color: var(--split-ink); }
.reveal-card.pick-steal { background: var(--steal); color: var(--steal-ink); }
.reveal-card.pick-none .reveal-pick { font-family: var(--body); font-weight: 700; font-size: 1.25rem; color: var(--muted); }

.r-head { margin-top: 34px; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6.4vw, 3.2rem); line-height: 1.05; }
.r-head.tone-good { color: var(--split); }
.r-head.tone-bad { color: var(--steal); }
.r-head.tone-burn { color: var(--burn); }
.r-sub { margin: 14px auto 0; color: var(--muted); font-size: 1.125rem; max-width: 40ch; }
.r-delta { margin-top: 18px; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.r-delta .usd { font-size: 1.125rem; margin-left: 6px; }
.r-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.r-report { margin-top: 22px; color: var(--muted); font-size: 0.875rem; }

/* The one orchestrated moment: the two choices flip over, yours first. */
.reveal.animate .reveal-card { animation: flip-in 520ms cubic-bezier(.2,.8,.3,1.2) both; }
.reveal.animate .reveal-card + .reveal-card { animation-delay: 650ms; }
.result.animate .r-head, .result.animate .r-sub, .result.animate .r-delta { animation: fade 300ms ease both; animation-delay: 1250ms; }
@keyframes flip-in { from { transform: rotateY(90deg); opacity: 0.2; } to { transform: rotateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- dialogs & toasts ---------- */

.dialog {
  border: 0; border-radius: var(--r-lg); padding: 26px; width: min(440px, calc(100vw - 32px));
  background: var(--panel); color: var(--ink);
}
.dialog::backdrop { background: rgb(10 8 24 / 0.7); }
.dialog h2 { font-size: 1.375rem; margin-bottom: 10px; }
.dialog p + p { margin-top: 8px; }
.dialog input:not([type]) , .dialog input[type="text"] {
  width: 100%; margin-top: 10px; min-height: 46px; padding: 0 14px;
  background: var(--stage); border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.reasons { border: 0; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.reasons label { display: flex; gap: 10px; align-items: flex-start; }
.reasons input { margin-top: 4px; accent-color: var(--ink); }

.toasts {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 10;
  width: min(480px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--stage); padding: 10px 16px; border-radius: var(--r-md);
  font-weight: 700; font-size: 0.9375rem; box-shadow: 0 8px 24px rgb(0 0 0 / 0.35); text-align: center;
}
.toast.error { background: var(--steal); color: var(--steal-ink); }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .topbar { grid-template-columns: auto 1fr auto; row-gap: 12px; }
  .ticker { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

@media (max-width: 860px) {
  .lobby { grid-template-columns: 1fr; grid-template-areas: "hero" "play" "board" "feed" "burns"; row-gap: 32px; }
  .play { position: static; }
  .live-stats { gap: 18px; }
}

@media (max-width: 640px) {
  main { padding-top: 24px; }
  .topbar { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .ticker { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; }
  .live-stats { grid-column: 1 / -1; grid-row: 3; justify-content: space-between; gap: 8px; }
  .live-stats div { flex-direction: column-reverse; align-items: center; }
  .live-stats dt { white-space: nowrap; }
  .live-stats .usd-inline { display: none; }
  .logo { font-size: 1.25rem; }
  .balance { font-size: 0.875rem; }
  #me-name { display: none; }
  .name-btn { padding: 3px; }
  .payoff { border-spacing: 6px; margin-left: -6px; }
  .payoff thead td { width: 25%; }
  .payoff td { padding: 12px 10px 10px; }
  .payoff td span { font-size: 0.8125rem; }
  .play { padding: 20px; }
  .voice-setting .help, .mic-meter { padding-left: 0; }
  .chat { height: 190px; }
  .ctl-quiet { margin-left: 0; }
}

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

/* ---------- modes, sign-up, contest ---------- */

.mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 22px;
  background: var(--stage); border-radius: 999px;
}
.mode-switch [role="tab"] {
  min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 0.9375rem;
}
.mode-switch [role="tab"][aria-selected="true"] { background: var(--panel-2); color: var(--ink); }
.mode-switch [role="tab"]:hover { color: var(--ink); }

.gate { text-align: left; }
.gate-title { font-weight: 700; font-size: 1.0625rem; }
.gate .help { margin-top: 6px; }
.gate .btn { width: 100%; margin-top: 16px; }

.access-note {
  margin-bottom: 16px; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--stage); color: var(--muted); font-size: 0.9375rem;
}

.wallet-line { display: flex; flex-direction: column; gap: 10px; }
.wallet-line p { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big-num { font-family: var(--display); font-weight: 400; font-size: 2.25rem; line-height: 1; font-variant-numeric: tabular-nums; }
.btn-claim {
  width: 100%; min-height: 48px; background: var(--split); color: var(--split-ink);
}
.btn-claim:hover:not(:disabled) { background: color-mix(in srgb, var(--split) 88%, white); }
.btn-claim:disabled { background: var(--stage); color: var(--muted); opacity: 1; border: 1.5px solid var(--line); }
.claim-note { margin-top: -2px; }
.stake-line { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }
.stake-line strong { color: var(--ink); }
#play-unlocked .tiers { margin-top: 18px; }
#match-controls { margin-top: 4px; }

.board h2, .burns h2 { font-size: 1.125rem; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.prize-note { margin-top: 8px; font-size: 0.9375rem; }
.prize-note.practice { color: var(--muted); }
.board-list { list-style: none; margin: 12px 0 0; padding: 0; }
.board-list li {
  display: grid; grid-template-columns: 2.2em 1fr auto; gap: 10px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.board-list li:last-child { border-bottom: 0; }
.board-list li.you { color: var(--split); font-weight: 700; }
.board-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-points { font-weight: 700; font-variant-numeric: tabular-nums; }
.board-you { margin-top: 10px; font-weight: 700; }
.milestone { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--panel); }
.milestone p { font-size: 0.9375rem; }
.milestone .meter-track { margin-top: 10px; background: var(--stage); }
.milestone-fill { background: var(--split); }
.burns .feed-list { margin-top: 10px; }
#burns-label { margin-top: 8px; }

.pot-mode { color: var(--muted); font-size: 0.8125rem; font-weight: 700; margin-bottom: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-weight: 700; font-size: 0.9375rem; }
.field input, .field select {
  min-height: 46px; padding: 0 12px; font-weight: 400;
  background: var(--stage); border: 1.5px solid var(--line); border-radius: var(--r-sm); color: var(--ink);
}
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--ink); }
.field[hidden] { display: none; }
.form-error { margin-top: 14px; color: var(--steal); font-weight: 700; font-size: 0.9375rem; }
#profile-dialog .help { margin-top: 2px; }

/* ---------- burning (exact amount to the incinerator) ---------- */

.burn { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.burn-title { font-size: 1rem; margin-bottom: 10px; }
.burn-closed { margin: 0; }
.burn-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.burn-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px; border-radius: var(--r-md); background: var(--stage);
  border: 1.5px solid var(--line); text-align: left;
}
.burn-option:hover:not(:disabled) { border-color: var(--burn); }
.burn-option:disabled { opacity: 0.5; cursor: progress; }
.burn-usd { font-weight: 700; color: var(--burn); }
.burn-gets { font-size: 0.8125rem; color: var(--muted); }

.quote {
  background: var(--stage); border-radius: var(--r-md); padding: 14px;
  border: 1.5px solid color-mix(in srgb, var(--burn) 45%, var(--line));
}
.quote-step { font-size: 0.875rem; color: var(--muted); margin: 0 0 6px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.copy-row code {
  flex: 1; min-width: 0; overflow-wrap: anywhere;
  font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  background: var(--panel); padding: 8px 10px; border-radius: var(--r-sm);
}
.quote-amount { font-size: 1.0625rem; font-weight: 700; color: var(--burn); }
.quote-address { font-size: 0.8125rem; }
.btn-copy { flex: none; min-height: 38px; padding: 0 14px; background: var(--ink); color: var(--stage); }
.quote-wait { font-size: 0.875rem; margin: 2px 0 10px; }
.quote-rules { margin: 0 0 10px; padding-left: 18px; color: var(--muted); font-size: 0.8125rem; display: grid; gap: 4px; }
.quote-cancel { font-size: 0.875rem; color: var(--muted); }

@media (max-width: 640px) {
  .copy-row { flex-direction: column; align-items: stretch; }
  .btn-copy { width: 100%; }
}
