:root {
  --bg: #0d1f1a;
  --felt: #12352b;
  --card: #163d32;
  --card-2: #1c4a3d;
  --line: #2a5e4f;
  --text: #f1efe6;
  --muted: #a9bfb5;
  --gold: #e8c15a;
  --gold-2: #f5d983;
  --red: #c8333a;
  --black: #1b1b1f;
  --green: #1f9d55;
  --t1: #3fae6a;
  --t2: #3b82d6;
  --t3: #9b5de5;
  --t0: #18c29c;
  --bad: #e05a5a;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #1b4a3c, var(--bg));
  background-color: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }

/* Header */
.top {
  max-width: 520px; margin: 0 auto; padding: 14px 16px 6px;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
}
.brand { text-align: center; }
/* Logo: gold embossed wordmark; the O in LONG is a spinning roulette wheel. */
.logo {
  margin: 0; display: flex; align-items: center; justify-content: center;
  font-family: "Bungee", Impact, "Arial Black", sans-serif; font-weight: 400;
  font-size: clamp(22px, 6.4vw, 31px); line-height: 1; letter-spacing: .01em; white-space: nowrap;
}
.logo-word {
  background: linear-gradient(180deg, #fff7d6 0%, #f5d983 32%, #e8c15a 55%, #b07a22 78%, #e8c15a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3d2a0c) drop-shadow(0 0 10px rgba(232, 193, 90, .35));
}
.logo .shot { margin-left: .3em; position: relative; }
.logo .shot::after { /* little red underline swoosh */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -5px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--red) 20%, var(--red) 80%, transparent);
}
.logo-o {
  width: .92em; height: .92em; margin: 0 .03em; flex: none;
  filter: drop-shadow(0 2px 0 #3d2a0c) drop-shadow(0 0 8px rgba(232, 193, 90, .4));
}
.logo-wheel, .logo-ball { transform-origin: 0 0; transform-box: view-box; }
.logo-wheel { animation: logo-spin 14s linear infinite; }
.logo-ball { animation: logo-spin 5s linear infinite reverse; }
@keyframes logo-spin { to { transform: rotate(360deg); } }
.sub { color: var(--muted); font-size: 12px; margin-top: 8px; letter-spacing: .06em; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 700;
}
.bank {
  display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #3a3315, #241f0c); border: 2px solid var(--gold);
  box-shadow: 0 0 14px rgba(232,193,90,.25); font-variant-numeric: tabular-nums;
}
.bank-text { display: flex; flex-direction: column; line-height: 1.05; }
.bank-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 700; }
#bankroll { font-size: 20px; font-weight: 800; color: #fff; }
.bank.up { animation: bank-up 1.2s ease-out; }
.bank.down { animation: bank-down 1.2s ease-out; }
@keyframes bank-up { 0%, 40% { border-color: #6be39a; box-shadow: 0 0 22px rgba(107,227,154,.8); transform: scale(1.08); } }
@keyframes bank-down { 0%, 40% { border-color: var(--bad); box-shadow: 0 0 22px rgba(224,90,90,.8); transform: scale(.95); } }
.chip-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-2) 30%, var(--gold) 32%, var(--gold) 55%, #b8902e 57%);
  box-shadow: 0 0 0 2px #b8902e inset;
}

/* Tabs */
.tabs { max-width: 520px; margin: 6px auto 0; padding: 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab {
  padding: 10px 6px; border: 1px solid var(--line); background: transparent; border-radius: 10px;
  color: var(--muted); font-weight: 600; cursor: pointer; font-size: 14px; white-space: nowrap;
}
.tab.active { background: var(--card); color: var(--text); border-color: var(--gold); }

main { max-width: 520px; margin: 0 auto; padding: 12px 16px 48px; }
.view { display: grid; gap: 14px; }
.view[hidden] { display: none; }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
h2 { margin: 0; }
.q { font-size: 22px; line-height: 1.25; margin: 8px 0 14px; }
.letter {
  display: inline-grid; place-items: center; min-width: 1.4em; padding: 0 .2em; border-radius: 8px;
  background: var(--gold); color: #1a1a1a; font-weight: 800;
}

/* Question timer */
.timer { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.timer-track { flex: 1; height: 8px; border-radius: 999px; background: #0e2a22; overflow: hidden; }
.timer-bar { height: 100%; background: var(--gold); transform-origin: left; transition: transform .1s linear, background .3s; }
.timer-num { min-width: 2ch; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); }
.timer.low .timer-bar { background: var(--bad); }
.timer.low .timer-num { color: var(--bad); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* Progress */
.progress { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.progress:empty { display: none; }
/* 10-question days and theme packs: smaller pips so they fit on a phone. */
.progress:has(.pip:nth-child(7)) { gap: 6px; }
.progress:has(.pip:nth-child(7)) .pip { width: 28px; height: 28px; font-size: 12px; }

/* Long Shot Plus */
.plus-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: none; color: #1d1a10; background: var(--gold);
}
.plus-teaser {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--gold);
  background: rgba(232, 193, 90, .06);
}
.plus-teaser p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.lb-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 4px; }
.lb-opt {
  padding: 7px; border: 1px solid var(--line); background: transparent; border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer;
}
.lb-opt.active { background: var(--card-2); color: var(--text); border-color: var(--gold); }
.vip-switch { margin: 0; }
.vip-cta { margin-top: 10px; border-color: var(--gold); color: var(--gold-2); font-weight: 700; }
.pip {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700; background: var(--card);
}
.pip.cur { border-color: var(--gold); color: var(--gold); }
.pip.done { font-size: 15px; }

/* Tags */
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.tag.t1 { background: var(--t1); } .tag.t2 { background: var(--t2); }
.tag.t3 { background: var(--t3); } .tag.t0 { background: var(--t0); color: #062; }

/* Buttons & inputs */
.btn {
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2);
  font-weight: 700; cursor: pointer;
}
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1d1a10; }
.btn.primary:hover { background: var(--gold-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 16px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; }

.answer-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.answer-row input, .name-row input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #0e2a22; outline: none; min-width: 0;
}
.answer-row input:focus, .name-row input:focus { border-color: var(--gold); }
.suggest {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px;
  border-radius: 10px; background: #0e2a22; border: 1px dashed var(--gold); font-size: 14px; color: var(--muted);
  animation: pop .2s ease-out;
}
.suggest[hidden] { display: none; }
.sugg {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gold); background: transparent;
  color: var(--gold-2); font-weight: 700; cursor: pointer;
}
.sugg:hover { background: var(--gold); color: #1d1a10; }
.sugg-or { font-size: 12px; }
.fixed { color: var(--muted); font-size: 13px; }
.meta-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.strikes { display: flex; gap: 6px; }
.strike { color: var(--line); font-weight: 800; }
.strike.on { color: var(--bad); }

/* Reveal */
.reveal {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px;
  background: #0e2a22; border-left: 5px solid var(--line);
  animation: pop .35s ease-out;
}
.reveal.slim { margin-top: 14px; }
.reveal .pts { font-size: 34px; font-weight: 800; min-width: 74px; }
.reveal .verdict { font-weight: 800; font-size: 18px; }
.reveal .pts .unit { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-top: -4px; }
.reveal .said { color: var(--muted); }
.reveal.t1 { border-color: var(--t1); } .reveal.t1 .pts { color: var(--t1); }
.reveal.t2 { border-color: var(--t2); } .reveal.t2 .pts { color: var(--t2); }
.reveal.t3 { border-color: var(--t3); } .reveal.t3 .pts { color: var(--t3); }
.reveal.t0 { border-color: var(--t0); background: #0c3a30; } .reveal.t0 .pts { color: var(--t0); }
.reveal.miss { border-color: var(--bad); } .reveal.miss .pts { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

.choices { display: grid; gap: 8px; }
.choice {
  text-align: left; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #0e2a22; cursor: pointer; font-weight: 600;
}
.choice:hover:not(:disabled) { border-color: var(--gold); }
.choice.right { background: #1d5e3a; border-color: var(--t1); }
.choice.wrong { background: #5a2424; border-color: var(--bad); }
.choice.dim { opacity: .55; }

/* Summary */
.total { font-size: 56px; font-weight: 800; color: var(--gold); line-height: 1.1; margin-top: 6px; }
.total span { font-size: 18px; color: var(--muted); margin-left: 6px; }
.emoji-row { font-size: 26px; letter-spacing: 4px; margin: 6px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats div { background: #0e2a22; border-radius: 10px; padding: 8px; }
.stats b { display: block; font-size: 22px; }
.stats span { font-size: 12px; color: var(--muted); }
.gems { margin-top: 16px; display: grid; gap: 6px; }
.gem-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 8px 10px; background: #0e2a22; border-radius: 10px; }
.gem-row span { color: var(--muted); }
.gem-row .letter { font-size: 12px; min-width: 1.5em; color: #1a1a1a; }
.gem-row b.got { color: var(--t0); }
.fine { color: var(--muted); font-size: 13px; }
.center { text-align: center; }

/* Table */
.table-card { background: radial-gradient(400px 300px at 50% 40%, #1d6047, var(--felt)); }
.table-head { display: flex; justify-content: space-between; align-items: center; }
.spins { display: flex; gap: 6px; margin-top: 4px; }
.spin-pip { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); }
.spin-pip.used { background: transparent; border: 2px solid var(--line); }
.last { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.up { color: #6be39a; } .down { color: var(--bad); }

/* Only the top half of the wheel shows; the pointer sits at 12 o'clock, so the result is still visible. */
.wheel-wrap {
  position: relative; width: min(340px, 88vw); aspect-ratio: 2 / 1; margin: 8px auto 12px;
  overflow: hidden; border-bottom: 3px solid var(--gold);
  -webkit-mask-image: linear-gradient(#000 85%, rgba(0,0,0,.55));
          mask-image: linear-gradient(#000 85%, rgba(0,0,0,.55));
}
#wheel { width: 100%; height: auto; aspect-ratio: 1; display: block; }
#wheel .rim { fill: #5b3a1c; stroke: var(--gold); stroke-width: 3; }
#wheel .pocket { stroke: #d9c690; stroke-width: .6; }
#wheel .pocket.red { fill: var(--red); }
#wheel .pocket.black { fill: var(--black); }
#wheel .pocket.green { fill: var(--green); }
#wheel .pocket-num { fill: #fff; font-size: 11px; font-weight: 700; }
#wheel .inner { fill: #2b1d10; stroke: var(--gold); stroke-width: 2; }
.pointer {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--gold-2); filter: drop-shadow(0 2px 2px rgba(0,0,0,.5));
}
.hub {
  position: absolute; bottom: 10px; left: calc(50% - 33px); width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; font-weight: 800; z-index: 2;
  background: #3a2815; border: 3px solid var(--gold); color: var(--gold-2);
}
.hub.red { background: var(--red); color: #fff; }
.hub.black { background: var(--black); color: #fff; }
.hub.green { background: var(--green); color: #fff; }
.hub.pop { animation: pop .4s ease-out; }

/* Betting layout */
.spot-info { text-align: center; font-size: 13px; color: var(--muted); min-height: 20px; margin-bottom: 4px; }
.rtable {
  --felt-line: rgba(232, 214, 160, .75);
  display: grid; grid-template-columns: 44px 36px repeat(3, 1fr); grid-template-rows: repeat(14, 38px);
  border: 2px solid var(--felt-line); border-radius: 6px; background: #136347; position: relative;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.spot {
  position: relative; border: 1px solid var(--felt-line); margin: 0; padding: 0; background: transparent;
  color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; display: grid; place-items: center; min-width: 0;
}
.spot.num.red .lbl, .spot.num.black .lbl {
  display: grid; place-items: center; width: 30px; height: 26px; border-radius: 6px;
}
.spot.num.red .lbl { background: var(--red); }
.spot.num.black .lbl { background: var(--black); }
.spot.num.green { background: var(--green); font-size: 18px; border-radius: 40px 40px 0 0; }
.spot.out { font-size: 12px; letter-spacing: .04em; }
.spot.vert .lbl { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.spot.col { font-size: 12px; }
.diamond { display: block; width: 16px; height: 24px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.diamond.red { background: var(--red); } .diamond.black { background: var(--black); }
.spot:hover, .spot.hl { background-color: rgba(255,255,255,.14); }
.spot.num.green.hl { background-color: #2bbf6c; }
.spot.win { box-shadow: inset 0 0 0 3px var(--gold-2); }
.spot.win .lbl { animation: pop .5s ease-out; }

.hot-layer { position: relative; pointer-events: none; z-index: 2; }
.hot {
  position: absolute; width: 18px; height: 18px; transform: translate(-50%, -50%); padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent; pointer-events: auto; cursor: pointer;
}
.hot:hover { background: rgba(255,255,255,.45); }

/* Chips (on the layout and in the tray) */
.stack {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 3;
  display: none; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-size: 10px; font-weight: 800; color: #fff;
}
.stack.on { display: grid; animation: drop .18s ease-out; }
.hot .stack { width: 22px; height: 22px; font-size: 9px; }
.won .stack { box-shadow: 0 0 0 3px var(--gold-2), 0 0 14px var(--gold-2); }
.lost .stack { opacity: .25; transition: opacity .6s; }

.chip, .stack.on {
  background: var(--chip, #ddd);
  border: 3px dashed rgba(255,255,255,.85);
  box-shadow: 0 0 0 2px var(--chip, #ddd), 0 3px 5px rgba(0,0,0,.45);
}
.c1 { --chip: #e9e6dc; color: #222 !important; border-color: #9a948a !important; }
.c5 { --chip: #c8333a; }
.c10 { --chip: #2f6fd6; }
.c25 { --chip: #1f9d55; }
.c100 { --chip: #222226; }
.c500 { --chip: #7b3fc4; }

.tray { display: flex; justify-content: center; gap: 8px; margin: 16px 0 10px; flex-wrap: wrap; }
.chip {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-weight: 800; font-size: 13px; color: #fff;
  padding: 0; transition: transform .12s;
}
.chip.sel { transform: translateY(-5px); box-shadow: 0 0 0 2px var(--chip), 0 0 0 5px var(--gold-2), 0 6px 10px rgba(0,0,0,.5); }
.chip:disabled { opacity: .3; cursor: default; }
.bet-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mini { padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #0e2a22; cursor: pointer; font-size: 13px; font-weight: 700; }
.mini:disabled { opacity: .4; cursor: default; }
/* Sticky dock: bet total, bankroll left and Spin stay visible while placing chips */
.dock {
  position: sticky; bottom: 0; z-index: 5; margin: 14px -18px -18px; padding: 12px 18px 16px;
  background: rgba(16, 52, 41, .96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--gold); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 -8px 20px rgba(0,0,0,.35);
}
.dock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-box {
  display: flex; flex-direction: column; align-items: center; padding: 8px 6px; border-radius: 12px;
  background: #0e2a22; border: 2px solid var(--line);
}
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.stat-val { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-box.bet { border-color: var(--gold); background: linear-gradient(180deg, #3a3315, #1f1b0a); }
.stat-box.bet .stat-val { color: var(--gold-2); }
.stat-box.bet.empty { border-color: var(--line); background: #0e2a22; }
.stat-box.bet.empty .stat-val { color: var(--muted); }
.stat-box.left .stat-val { color: #fff; }
.stat-box.left.low { border-color: var(--bad); }
.stat-box.left.low .stat-val { color: #ff8a8a; }
.stat-val.bump { animation: bump .25s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }
.dock .spin-btn { margin-top: 10px; }
@keyframes drop { 0% { transform: translate(-50%, -80%) scale(1.2); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

.spin-btn { font-size: 18px; letter-spacing: .05em; }
.locked { text-align: center; }
.locked p { margin: 6px 0 12px; }

.history { display: flex; justify-content: center; gap: 12px; margin: 12px 0 0; flex-wrap: wrap; }
.h-item { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.num-badge {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-size: 13px; font-weight: 800; color: #fff;
}
.num-badge.red { background: var(--red); } .num-badge.black { background: var(--black); border: 1px solid #444; } .num-badge.green { background: var(--green); }

/* Sign up / log in */
[hidden] { display: none !important; }
.auth-wrap { max-width: 420px; margin: 18px auto 48px; padding: 0 16px; }
.auth-wrap[hidden] { display: none; }
.landing-boards { margin-top: 14px; }
.landing-cols { display: grid; gap: 14px; }
.landing-board-title { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.landing-boards .board li.gap { font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #0e2a22; margin-bottom: 18px; }
.auth-tab { padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.auth-tab.active { background: var(--gold); color: #1d1a10; }
.field { display: grid; gap: 5px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #0e2a22; outline: none; min-width: 0; font-size: 16px;
}
.field input:focus { border-color: var(--gold); }
.field-hint { color: var(--muted); font-weight: 400; font-size: 12px; }
.pw-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.pw-toggle { padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #0e2a22; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.auth-error { min-height: 20px; color: #ff8a8a; font-size: 14px; font-weight: 600; margin: -4px 0 8px; }
.auth-error:empty { min-height: 0; margin: 0; }
.loading { text-align: center; color: var(--muted); padding: 60px 16px; }
.account-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.account-row b { color: var(--text); }
.saved { color: #6be39a; margin: 0 0 12px; }
.bank-err { margin: 0 0 12px; padding: 10px; border-radius: 10px; background: #4a1f1f; color: #ffd0d0; font-size: 14px; }
.bank-err .link { color: #fff; }

/* Leaderboard */
.lb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lb-head h2 { font-size: 18px; }
.demo-tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px dashed var(--muted); color: var(--muted); }
.name-row { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #0e2a22; align-items: center; }
.board li.you { background: #3a3315; border: 1px solid var(--gold); }
.board li.gap { background: none; text-align: center; display: block; color: var(--muted); padding: 0; }
.board .rank { color: var(--muted); font-weight: 700; }
.board li:nth-child(1) .rank { color: var(--gold); }
.board .who em { color: var(--gold); font-style: normal; font-size: 12px; }
.board .amt { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Dialog + toast */
dialog {
  max-width: min(460px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); padding: 20px;
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { color: var(--gold); margin-bottom: 6px; }
dialog h3 { margin: 14px 0 4px; font-size: 15px; }
dialog p, dialog li { font-size: 14px; }
dialog ul { padding-left: 18px; }
dialog li { margin-bottom: 6px; }
dialog form { margin-top: 12px; }
dialog .btn { width: 100%; }

/* Badges */
.account-row .link { font-size: 13px; }
.board .who { min-width: 0; overflow-wrap: anywhere; }
.lb-badge { margin-right: 6px; }
#badgeDlg { width: min(460px, calc(100vw - 32px)); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; }
.badge-tile {
  display: grid; justify-items: center; gap: 3px; padding: 12px 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; background: #0e2a22; color: var(--text); font: inherit; cursor: pointer;
}
.badge-tile.locked { opacity: .55; cursor: default; }
.badge-tile.earned:hover { border-color: var(--gold); }
.badge-tile.wearing { border: 2px solid var(--gold); background: #3a3315; }
.badge-emoji { font-size: 28px; line-height: 1.1; }
.badge-name { font-weight: 800; font-size: 13px; }
.badge-desc { font-size: 11px; color: var(--muted); line-height: 1.3; }
.badge-prog { font-size: 11px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.badge-wearing { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: #f1efe6; color: #1a1a1a; padding: 10px 16px; border-radius: 999px; font-weight: 700;
  transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pop { 0% { transform: scale(.92); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }

/* Spin result announcement */
.spin-result {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow: hidden;
  cursor: pointer; animation: sr-fade .2s ease-out;
}
.spin-result.win  { background: radial-gradient(circle at 50% 45%, rgba(92, 72, 20, .92), rgba(6, 16, 12, .94) 65%); }
.spin-result.lose { background: radial-gradient(circle at 50% 45%, rgba(80, 22, 22, .9), rgba(6, 16, 12, .93) 65%); }
.spin-result.push { background: rgba(6, 16, 12, .9); }
.spin-result.out { opacity: 0; transition: opacity .3s; }
.sr-card { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; padding: 0 16px; text-align: center; }
.sr-ball {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-size: 28px; font-weight: 800; color: #fff; border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.5);
  animation: sr-drop .45s cubic-bezier(.3, 1.6, .5, 1);
}
.sr-ball.red { background: var(--red); } .sr-ball.black { background: var(--black); } .sr-ball.green { background: var(--green); }
.sr-title {
  font-family: "Bungee", system-ui, sans-serif; font-size: clamp(34px, 11vw, 64px); line-height: 1; letter-spacing: .02em;
  white-space: nowrap;
  animation: sr-slam .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: .08s;
}
.win .sr-title {
  background: linear-gradient(180deg, #fff6d0 0%, var(--gold-2) 35%, var(--gold) 60%, #b8862a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #6b4a12) drop-shadow(0 0 18px rgba(245, 217, 131, .7));
}
.win.huge .sr-title { font-size: clamp(40px, 12.5vw, 84px); animation: sr-slam .5s cubic-bezier(.2, 1.4, .4, 1) both, sr-glow 1s ease-in-out .5s infinite alternate; }
.lose .sr-title { color: #ff8a8a; text-shadow: 0 3px 0 #5a1d1d, 0 0 16px rgba(224, 90, 90, .55); animation: sr-slam .45s ease-out both, sr-shake .45s ease-in-out .45s; }
.push .sr-title { color: var(--text); }
.sr-amount {
  font-size: clamp(34px, 10vw, 52px); font-weight: 800; font-variant-numeric: tabular-nums;
  animation: sr-rise .4s ease-out .25s both;
}
.win .sr-amount { color: #8ff0b4; text-shadow: 0 0 14px rgba(107, 227, 154, .6); }
.lose .sr-amount { color: #ffb3b3; }
.sr-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); animation: sr-rise .4s ease-out .35s both; }
.sr-rays {
  position: absolute; left: 50%; top: 45%; width: 160vmax; height: 160vmax; translate: -50% -50%;
  background: repeating-conic-gradient(rgba(245, 217, 131, .16) 0 9deg, transparent 9deg 22.5deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 55%); mask-image: radial-gradient(circle, #000 10%, transparent 55%);
  animation: sr-spin 9s linear infinite;
}
.sr-coin {
  position: absolute; left: 50%; top: 45%; width: 18px; height: 18px; margin: -9px; border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, .85); box-shadow: 0 2px 4px rgba(0,0,0,.4);
  animation: sr-burst 1.3s cubic-bezier(.15, .7, .3, 1) both;
}
.sr-coin.gold { background: var(--gold); border-color: #fff3c4; }
.sr-coin.red { background: var(--red); } .sr-coin.black { background: #2a2a30; } .sr-coin.green { background: var(--green); }
@keyframes sr-fade { from { opacity: 0; } }
@keyframes sr-drop { from { transform: translateY(-60px) scale(.6); opacity: 0; } }
@keyframes sr-slam { 0% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sr-rise { from { transform: translateY(14px); opacity: 0; } }
@keyframes sr-shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes sr-glow { to { filter: drop-shadow(0 3px 0 #6b4a12) drop-shadow(0 0 34px rgba(255, 230, 150, 1)); } }
@keyframes sr-spin { to { rotate: 360deg; } }
@keyframes sr-burst {
  0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 120px)) scale(1) rotate(var(--rot)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .sr-coin, .sr-rays { display: none; }
}
