/* RiskyRoll: playful tabletop look. Colours come from the theme (content/themes/*.json) as CSS
   variables; nothing communicates by colour alone (dice states also use symbols and shape). */
:root {
  --bg: #f5efe2; --bg2: #e9dcc0; --surface: #fffdf8; --surface2: #f3ead8; --ink: #2a2117; --muted: #6f604c; --line: #d9c9a8;
  --accent: #c2410c; --accent-ink: #fff; --accent2: #0f766e; --felt: #1f6f50; --felt2: #14543b; --good: #15803d; --bad: #c81e1e; --warn: #b45309; --gold: #b8860b;
  --die: #fbf7ee; --pip: #1f1a14; --pattern: none;
  --font-display: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 16px; --r-sm: 10px; --shadow: 0 2px 0 rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.08);
  --tap: 44px;
  color-scheme: light;
  font-size: 16px;
}
:root.dark { color-scheme: dark; --shadow: 0 2px 0 rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); }
:root.large-text { font-size: 19px; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body); color: var(--ink); background: var(--bg);
  background-image: var(--pattern), linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
h1, h2, h3, .logo, .btn-main, .tb-num, .room-code, .fx-text, .jp-amount, .tv-at-risk .num, .lb-score, .big-clock { font-family: var(--font-display); }
h1 { font-size: 1.7rem; margin: .3em 0; } h2 { font-size: 1.15rem; margin: 0 0 .5em; } h3 { font-size: 1rem; margin: 1em 0 .4em; }
a { color: var(--accent2); }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .center { text-align: center; }
.bad { color: var(--bad); } .good { color: var(--good); }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; border-radius: 6px; }

.loading { display: grid; place-items: center; min-height: 60vh; gap: 1rem; color: var(--muted); font-weight: 600; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ buttons and controls */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: var(--tap);
  padding: .55rem 1.1rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); transition: transform .08s, box-shadow .08s, opacity .15s; text-decoration: none; text-align: center;
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.danger, .btn.ghost.danger { color: var(--bad); }
.btn.btn.danger:not(.ghost) { background: var(--bad); color: #fff; }
.btn.small { min-height: 36px; padding: .35rem .85rem; font-size: .9rem; }
.btn.big { min-height: 60px; flex: 1; border-radius: 20px; font-size: 1.15rem; }
.btn-main { font-size: 1.1em; line-height: 1.1; }
.btn-sub { font-size: .68rem; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.btn.bank { background: var(--good); box-shadow: 0 3px 0 color-mix(in srgb, var(--good) 60%, #000); }
.btn.pass { background: var(--accent2); min-width: 84px; flex: 0 0 auto; box-shadow: 0 3px 0 color-mix(in srgb, var(--accent2) 60%, #000); }
.btn.holding { background-image: linear-gradient(90deg, rgba(255,255,255,.35) 0 0); background-size: 0 100%; background-repeat: no-repeat; animation: hold .65s linear forwards; }
@keyframes hold { to { background-size: 100% 100%; } }
.icon-btn { min-width: var(--tap); min-height: var(--tap); border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; border-radius: 12px; }
.icon-btn.small { min-width: 32px; min-height: 32px; font-size: .95rem; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.link { background: none; border: 0; color: var(--accent2); text-decoration: underline; cursor: pointer; padding: 0 .3rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 34px; padding: .25rem .75rem; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .85rem; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.ghost { border-style: dashed; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips.wrap { flex-wrap: wrap; }
input[type=text], input[type=number], select, textarea {
  font: inherit; min-height: var(--tap); padding: .45rem .7rem; border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%;
}
textarea { width: 100%; }
input.switch { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: 0 0 auto; transition: background .15s; margin: 0; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
input.switch:checked { background: var(--good); }
input.switch:checked::after { left: 23px; }
input.switch.small { width: 40px; height: 24px; } input.switch.small::after { width: 18px; height: 18px; } input.switch.small:checked::after { left: 19px; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ------------------------------------------------------------ layout: phone */
.phone { max-width: 560px; margin: 0 auto; padding: 0 .75rem calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .6rem; }
.topbar, .w-topbar { display: flex; align-items: center; gap: .4rem; padding: .5rem 0 0; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 70%, transparent); }
.tb-mid { flex: 1; min-width: 0; }
.tb-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub { font-size: .8rem; color: var(--muted); }
.tb-score { text-align: right; } .tb-score-n { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; line-height: 1; } .tb-score-l { font-size: .72rem; color: var(--muted); }
.conn:not(:empty) { color: var(--warn); font-weight: 700; margin-left: .4rem; }
.offline .table-area { opacity: .6; }
.card, .panel { background: var(--surface); border-radius: var(--r); padding: .9rem; box-shadow: var(--shadow); }
.panel { padding: .55rem .9rem; } .panel > summary { cursor: pointer; font-weight: 800; min-height: 32px; display: flex; align-items: center; }
.panel[open] > summary { margin-bottom: .4rem; }
.center-card { text-align: center; }
.chips-row { list-style: none; margin: 0; padding: 0 0 .2rem; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.score-chip { display: flex; align-items: center; gap: .35rem; padding: .3rem .6rem .3rem .35rem; border-radius: 999px; background: var(--surface); border: 2px solid transparent; white-space: nowrap; font-size: .85rem; box-shadow: var(--shadow); }
.score-chip.active { border-color: var(--accent); }
.score-chip.me .sc-name { font-weight: 800; }
.score-chip.out { opacity: .45; text-decoration: line-through; }
.sc-score { font-weight: 900; font-family: var(--font-display); }
.team-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); display: inline-block; flex: 0 0 auto; } .team-dot.big { width: 28px; height: 28px; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); flex: 0 0 auto; }
.avatar.sm { width: 26px; height: 26px; font-size: .9rem; } .avatar.md { width: 38px; height: 38px; font-size: 1.3rem; } .avatar.lg { width: 60px; height: 60px; font-size: 2rem; }
.bot-tag, .host-tag, .away-tag { font-size: .6rem; font-weight: 900; padding: .1rem .35rem; border-radius: 6px; background: var(--surface2); color: var(--muted); letter-spacing: .05em; }
.host-tag { background: var(--gold); color: #fff; }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: 12px; background: var(--surface); font-weight: 700; box-shadow: var(--shadow); }
.status-line.mine { background: var(--accent); color: var(--accent-ink); }
.status-line.duel { background: color-mix(in srgb, var(--accent2) 18%, var(--surface)); }
.status-line.blitz { background: var(--ink); color: var(--bg); }
.status-line.warn { background: var(--warn); color: #fff; }
.coop-line { font-size: .85rem; font-weight: 700; padding: .35rem .8rem; color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; padding: .1rem .5rem; border-radius: 8px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.timer.urgent { background: var(--bad); color: #fff; animation: throb .5s ease-in-out infinite alternate; }
@keyframes throb { to { transform: scale(1.08); } }

/* ------------------------------------------------------------ the table */
.table-area { background: radial-gradient(ellipse at 50% 30%, var(--felt), var(--felt2)); border-radius: 24px; padding: .8rem .6rem; min-height: 190px; display: flex; flex-direction: column; gap: .5rem; box-shadow: inset 0 3px 12px rgba(0,0,0,.35), var(--shadow); position: relative; }
.kept-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.kept-set { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .2rem .35rem; border-radius: 10px; background: rgba(0,0,0,.18); }
.kept-set.cyc1 { background: rgba(255,170,0,.18); }
.kept-dice { display: flex; gap: 2px; }
.kept-pts { font-size: .7rem; font-weight: 800; color: #fff; }
.dice-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; padding: .3rem 0; }
.tray-empty { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; min-height: 110px; color: rgba(255,255,255,.85); font-weight: 700; text-align: center; }
.tray-empty.hot .die.ghost { border-color: var(--gold); animation: hotglow 1s ease-in-out infinite alternate; }
.tray-hint { flex-basis: 100%; }
.tray-empty.cooldown { font-size: 1.2rem; }
.selchip { align-self: center; padding: .35rem .8rem; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; font-weight: 700; font-size: .88rem; text-align: center; }
.selchip.good { background: var(--good); } .selchip.bad { background: var(--bad); } .selchip.hint { background: rgba(0,0,0,.25); font-weight: 600; }
.selchip .muted { color: rgba(255,255,255,.8); }

/* ------------------------------------------------------------ dice */
.die {
  --size: 58px; width: var(--size); height: var(--size); position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
  border-radius: 22%; border: 0; padding: 0; cursor: default; color: var(--pip);
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--die) 70%, #fff), var(--die) 55%, color-mix(in srgb, var(--die) 82%, #000));
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--die) 70%, #000), inset 0 2px 1px rgba(255,255,255,.7), 0 4px 0 rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.25);
  transition: transform .15s, box-shadow .15s, filter .2s;
}
button.die { cursor: pointer; }
.die.xl { --size: 128px; }
.phone .die.lg { --size: min(58px, calc((100vw - 4.2rem) / 6.7)); } .die.lg { --size: 58px; } .die.md { --size: 46px; } .die.sm { --size: 34px; } .die.xs { --size: 22px; border-radius: 18%; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 1px 0 rgba(0,0,0,.3); }
.die.ghost { background: transparent; border: 3px dashed rgba(255,255,255,.35); box-shadow: none; }
.die-face { position: absolute; inset: 12%; display: grid; place-items: center; }
.pips { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.pip { width: 62%; height: 62%; margin: auto; border-radius: 50%; background: var(--pip); box-shadow: inset 0 2px 2px rgba(0,0,0,.35); }
.p1 { grid-area: 1/1; } .p2 { grid-area: 1/2; } .p3 { grid-area: 1/3; } .p4 { grid-area: 2/1; } .p5 { grid-area: 2/2; } .p6 { grid-area: 2/3; } .p7 { grid-area: 3/1; } .p8 { grid-area: 3/2; } .p9 { grid-area: 3/3; }
.die[data-face="1"] .p5 { width: 72%; height: 72%; }
.die-num { font-family: var(--font-display); font-weight: 900; font-size: calc(var(--size) * .55); line-height: 1; color: var(--pip); }
.die-badge { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: var(--ink); color: var(--bg); font-size: .75rem; display: grid; place-items: center; font-weight: 900; }
.die.s-scoring { box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--die) 70%, #000), 0 0 0 3px rgba(255,255,255,.55), 0 4px 0 rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.25); }
.die.s-scoring::after { content: ''; position: absolute; bottom: -9px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #fff; opacity: .85; }
.die.s-selected { transform: translateY(-10px) scale(1.06); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--die) 70%, #000), 0 0 0 4px var(--gold), 0 14px 20px rgba(0,0,0,.35); }
.die.s-selected .die-badge { background: var(--good); color: #fff; }
.die.s-held { filter: saturate(.4) brightness(1.08); box-shadow: inset 0 0 0 4px #9ad7ff, 0 4px 0 rgba(0,0,0,.25); }
.die.s-held .die-badge { background: #5bb8f5; }
.die.s-dim { filter: grayscale(.8) brightness(.8); }
.die.s-kept { box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 1px 0 rgba(0,0,0,.3); }
.die.s-kept .pip { box-shadow: none; }
/* Materials */
.die[data-material="glass"], [data-material="glass"] .die:not([data-material]) { background: linear-gradient(145deg, color-mix(in srgb, var(--die) 75%, #fff), color-mix(in srgb, var(--die) 85%, #000)); opacity: .96; }
.die[data-material="metal"], [data-material="metal"] .die:not([data-material]) { background: linear-gradient(135deg, #f4f4f4, var(--die) 40%, #8e8e8e 60%, #e8e8e8); }
.die[data-material="wood"], [data-material="wood"] .die:not([data-material]) { background: repeating-linear-gradient(100deg, var(--die) 0 6px, color-mix(in srgb, var(--die) 85%, #000) 6px 9px); }
.die[data-material="marble"], [data-material="marble"] .die:not([data-material]) { background: radial-gradient(circle at 20% 30%, rgba(0,0,0,.08) 0 10%, transparent 11%), linear-gradient(120deg, var(--die), color-mix(in srgb, var(--die) 80%, #888) 50%, var(--die)); }
.die[data-material="neon"], [data-material="neon"] .die:not([data-material]) { box-shadow: 0 0 0 2px var(--pip), 0 0 14px var(--pip), inset 0 0 12px color-mix(in srgb, var(--pip) 50%, transparent); }
.die[data-material="neon"] .pip, [data-material="neon"] .die:not([data-material]) .pip { box-shadow: 0 0 6px var(--pip); }
.die[data-material="pixel"], [data-material="pixel"] .die:not([data-material]) { border-radius: 4px; box-shadow: 0 0 0 3px var(--pip), 4px 4px 0 rgba(0,0,0,.35); }
.die[data-material="pixel"] .pip, [data-material="pixel"] .die:not([data-material]) .pip { border-radius: 0; box-shadow: none; }
.die[data-material="frost"], [data-material="frost"] .die:not([data-material]) { background: linear-gradient(160deg, #fff, var(--die) 50%, #d6ecf7); }
.die[data-material="matte"], [data-material="matte"] .die:not([data-material]) { background: var(--die); }
.die[data-material="bone"], [data-material="bone"] .die:not([data-material]) { background: radial-gradient(circle at 30% 25%, #fffaf0, var(--die) 60%, color-mix(in srgb, var(--die) 75%, #7a5a2a)); }
/* Rolling */
.die.rolling { animation: tumble var(--dur, .8s) cubic-bezier(.2,.7,.3,1) var(--delay, 0s) both; }
@keyframes tumble {
  0% { transform: translate(var(--dx), -60px) rotateX(var(--rx)) rotateY(var(--ry)) scale(.7); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translate(calc(var(--dx) * -.3), 6px) rotateX(0) rotateY(0) scale(1.04); }
  100% { transform: none; }
}
.die.landed { animation: land .35s ease-out; }
@keyframes land { 30% { transform: scale(1.12, .9); } 60% { transform: scale(.96, 1.04); } }
:root[data-motion="steps"] .die.rolling { animation-timing-function: steps(6); }
.mini-face { display: inline-block; width: 18px; height: 18px; position: relative; }

/* ------------------------------------------------------------ turn box, ladder, advisor */
.turnbox { display: flex; align-items: center; gap: .8rem; background: var(--surface); border-radius: var(--r); padding: .6rem .9rem; box-shadow: var(--shadow); }
.tb-big { flex: 0 0 auto; } .tb-label { font-size: .75rem; color: var(--muted); font-weight: 700; } .tb-num { font-size: 2.1rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tb-facts { display: flex; flex-wrap: wrap; gap: .3rem; }
.fact { font-size: .74rem; font-weight: 800; padding: .2rem .5rem; border-radius: 8px; background: var(--surface2); }
.fact.ok { background: color-mix(in srgb, var(--good) 20%, var(--surface)); }
.fact.good { background: color-mix(in srgb, var(--good) 18%, var(--surface)); }
.fact.mult { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.fact.hot { background: color-mix(in srgb, #ff6a00 25%, var(--surface)); }
.fact.gold { background: color-mix(in srgb, var(--gold) 30%, var(--surface)); }
.ladder { display: flex; align-items: center; gap: 3px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.ladder-label { font-size: 1.1rem; margin-right: 2px; }
.rung { flex: 1 0 auto; text-align: center; min-width: 44px; padding: .3rem .3rem; border-radius: 8px; background: var(--surface); font-weight: 900; font-size: .85rem; color: var(--muted); border: 2px solid var(--line); }
.rung.done { background: color-mix(in srgb, var(--accent) 25%, var(--surface)); color: var(--ink); border-color: transparent; }
.rung.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: scale(1.08); }
.rung.now::after { content: ' ◀'; font-size: .65em; }
.rung.next { border-style: dashed; color: var(--ink); }
.ladder.compact .rung { min-width: 38px; font-size: .78rem; }
.pulse { animation: pulse .6s ease-out; }
@keyframes pulse { 40% { transform: scale(1.25); } }
.advisor .adv-band { font-weight: 800; padding: .3rem .5rem; border-radius: 8px; }
.adv-band.low { background: color-mix(in srgb, var(--good) 20%, var(--surface)); }
.adv-band.moderate { background: color-mix(in srgb, #e0b000 25%, var(--surface)); }
.adv-band.high { background: color-mix(in srgb, #ff7a00 25%, var(--surface)); }
.adv-band.extreme { background: color-mix(in srgb, var(--bad) 25%, var(--surface)); }
.adv-grid { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; margin: .4rem 0; font-size: .88rem; }
.adv-note { font-size: .72rem; color: var(--muted); }
.suggest-row { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
.suggestion { flex-direction: column; align-items: flex-start; gap: 0; border-radius: 12px; padding: .3rem .7rem; flex: 0 0 auto; }
.sg-label { font-size: .65rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.sg-pts { font-size: 1rem; font-weight: 900; } .sg-left { font-size: .7rem; color: var(--muted); }
.token-row { display: flex; align-items: center; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.row-label { font-size: 1.1rem; }
.token { display: inline-flex; align-items: center; gap: .3rem; min-height: var(--tap); padding: .3rem .7rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 800; cursor: pointer; flex: 0 0 auto; }
.token.r-rare { border-color: var(--accent2); } .token.r-legendary { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, var(--surface)); }
.token.picking { background: var(--accent); color: var(--accent-ink); }
.token:disabled { opacity: .5; cursor: default; }
.tk-icon { font-size: 1.2rem; } .tk-n { font-size: .75rem; color: var(--muted); }
.rarity { font-size: .65rem; text-transform: uppercase; font-weight: 900; padding: .05rem .35rem; border-radius: 5px; background: var(--surface2); }
.rescue { padding: .7rem .9rem; border-radius: var(--r); background: color-mix(in srgb, var(--bad) 15%, var(--surface)); font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.duelbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem .8rem; border-radius: 12px; background: color-mix(in srgb, var(--accent2) 20%, var(--surface)); font-weight: 700; font-size: .9rem; }
.duelbar .pot { margin-left: auto; font-weight: 900; }
.breakdown { background: var(--surface); border-radius: var(--r); padding: .6rem .9rem; box-shadow: var(--shadow); font-size: .88rem; border-left: 5px solid var(--accent2); }
.bd-head { display: flex; justify-content: space-between; align-items: center; }
.breakdown ol { margin: .3rem 0; padding-left: 1.2rem; }

/* ------------------------------------------------------------ contracts, jackpot, feed */
.contract-list { display: flex; flex-direction: column; gap: .5rem; }
.contract { border: 2px solid var(--line); border-radius: 12px; padding: .5rem .7rem; background: var(--surface); }
.contract.pending { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.k-head { display: flex; align-items: center; gap: .4rem; }
.k-name { font-weight: 800; flex: 1; } .k-scope { font-size: .65rem; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.k-reward { font-weight: 900; color: var(--good); font-size: .85rem; }
.k-diff { font-size: 1rem; } .d-legendary .k-diff { color: var(--gold); }
.k-text { font-size: .88rem; margin-top: .15rem; }
.k-progress { position: relative; height: 16px; border-radius: 8px; background: var(--surface2); margin-top: .35rem; overflow: hidden; font-size: .68rem; font-weight: 800; text-align: center; line-height: 16px; }
.k-progress i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--good) 45%, transparent); }
.k-progress span { position: relative; }
.k-pending { font-weight: 800; color: var(--gold); font-size: .8rem; margin-top: .2rem; }
.jackpot { display: flex; align-items: center; gap: .8rem; background: var(--surface); border-radius: var(--r); padding: .6rem .9rem; box-shadow: var(--shadow); }
.jar { width: 40px; height: 52px; border-radius: 10px 10px 14px 14px; border: 3px solid var(--gold); position: relative; overflow: hidden; flex: 0 0 auto; background: var(--surface2); }
.jar::before { content: ''; position: absolute; top: -3px; left: 6px; right: 6px; height: 7px; background: var(--gold); border-radius: 3px; z-index: 1; }
.jar-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--gold) 85%, #000), var(--gold)); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.jackpot.hot .jar { animation: jarglow 1.4s ease-in-out infinite alternate; }
@keyframes jarglow { to { box-shadow: 0 0 18px var(--gold); } }
.jp-label { font-size: .72rem; text-transform: uppercase; font-weight: 800; color: var(--muted); letter-spacing: .05em; }
.jp-amount { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.jp-tiers { font-size: .72rem; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; font-size: .86rem; display: flex; flex-direction: column; gap: .25rem; }
.feed li.big { font-weight: 800; }

/* ------------------------------------------------------------ action bar */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: .55rem; padding: .6rem max(.75rem, env(safe-area-inset-left)) calc(.6rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 25%); max-width: 560px; margin: 0 auto; }
.action-bar .btn.ghost { flex: 0 0 auto; }
.action-bar p { margin: auto; }

/* ------------------------------------------------------------ home and lobby */
.home { max-width: 520px; margin: 0 auto; padding: 1rem .9rem 3rem; display: flex; flex-direction: column; gap: .9rem; }
.home.center { text-align: center; align-items: center; justify-content: center; min-height: 80vh; }
.home-head { text-align: center; }
.logo { display: inline-flex; align-items: center; gap: .3rem; font-weight: 900; font-size: 1.3rem; letter-spacing: -.02em; }
.logo.big { font-size: 2.6rem; color: var(--accent); }
.logo.small { font-size: 1.1rem; }
.logo-die { display: inline-block; transform: rotate(-12deg); }
.tagline { margin: .2rem 0 .6rem; font-weight: 700; color: var(--muted); }
.hero-dice { display: flex; justify-content: center; gap: .6rem; }
.die.hero { animation: bob 2.4s ease-in-out infinite; }
.die.hero.d1 { animation-delay: .2s; } .die.hero.d2 { animation-delay: .4s; } .die.hero.d3 { animation-delay: .6s; } .die.hero.d4 { animation-delay: .8s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(6deg); } }
.name-row, .join-row { display: flex; gap: .5rem; align-items: center; }
.name-row input { flex: 1; font-size: 1.1rem; }
.code-input { width: 9ch; letter-spacing: .12em; padding-left: .3rem; padding-right: .3rem; text-transform: uppercase; font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; letter-spacing: .2em; text-align: center; }
.code-input.big { width: 9ch; font-size: 2.4rem; }
.join-row .btn { flex: 1; }
.avatar-pick { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface2); font-size: 1.6rem; cursor: pointer; flex: 0 0 auto; }
.emoji-pop, .emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .25rem; padding: .4rem; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.emoji { border: 2px solid transparent; background: none; font-size: 1.4rem; min-height: 40px; border-radius: 10px; cursor: pointer; }
.emoji.on { border-color: var(--accent); }
.divider { text-align: center; color: var(--muted); font-size: .8rem; margin: .6rem 0; }
.card > .btn { width: 100%; }
.links { display: flex; flex-wrap: wrap; gap: .5rem; } .links .btn { flex: 1 1 140px; }
.invite .inv-main { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.room-code { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; letter-spacing: .14em; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.room-code.big { font-size: 3.4rem; text-align: center; } .room-code.huge { font-size: 9rem; line-height: 1; }
.room-code.long { font-size: .9rem; letter-spacing: 0; word-break: break-all; }
.qr { width: 96px; height: 96px; background: #fff; border-radius: 10px; padding: 4px; }
.qr.big { width: 300px; height: 300px; }
.qr-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.lobby-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.lobby-list li { display: flex; align-items: center; gap: .5rem; min-height: 46px; padding: .2rem .4rem; border-radius: 12px; }
.lobby-list li.me { background: var(--surface2); }
.lobby-list li.away { opacity: .55; }
.lp-name { flex: 1; font-weight: 700; }
.add-bot select { flex: 1; min-width: 0; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; padding: .6rem .7rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; min-height: 88px; }
.preset.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.p-icon { font-size: 1.4rem; } .p-name { font-weight: 900; } .p-tag { font-size: .75rem; color: var(--muted); }
.chosen { padding: .6rem; border-radius: 12px; background: var(--surface2); margin: .6rem 0; display: flex; flex-direction: column; gap: .35rem; }
.estimate { font-size: .82rem; color: var(--muted); margin: .2rem 0; } .stars { color: var(--gold); letter-spacing: .05em; }
.issues { list-style: none; margin: .4rem 0; padding: 0; font-size: .85rem; display: flex; flex-direction: column; gap: .2rem; }
.issues li.warning { color: var(--warn); } .issues li.error { color: var(--bad); font-weight: 700; } .issues li.info { color: var(--muted); }
.pick-list { display: flex; flex-direction: column; gap: .5rem; } .pick-list.row { flex-direction: row; } .pick-list.wrap { flex-wrap: wrap; }
.pick-list.row .btn { flex: 1 1 auto; }
.face-btn { background: transparent; box-shadow: none; padding: .2rem; }
.lib-row { display: flex; gap: .4rem; } .lib-row .btn { flex: 1; }

/* ------------------------------------------------------------ sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.3); animation: up .2s ease-out; }
.sheet.wide { max-width: 860px; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: .7rem .9rem; background: var(--bg); z-index: 1; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; }
.sheet-body { padding: .9rem; display: flex; flex-direction: column; gap: .7rem; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-height: var(--tap); flex-wrap: wrap; }
.set-row > span { flex: 1 1 140px; font-weight: 700; } .set-row small, .f-label small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.set-row.stack { flex-direction: column; align-items: stretch; }
.settings h3 { border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; }
.swatch { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; }
.swatch.on { outline: 3px solid var(--accent); }
.swatch.none { background: var(--surface2); }
.rules .lead, .lead { font-weight: 700; }
.score-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.score-table td { padding: .35rem .3rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.score-table .num { text-align: right; font-weight: 800; }
.score-table tr.inactive { opacity: .45; }
.score-table.edit input[type=number] { width: 90px; min-height: 36px; }
.byface { display: flex; flex-wrap: wrap; gap: .3rem; }
.byface label { display: flex; flex-direction: column; font-size: .7rem; font-weight: 700; }
.byface input { width: 74px; min-height: 34px; padding: .2rem .4rem; }
.advanced .cat { border-radius: 14px; background: var(--surface); padding: .3rem .8rem; margin-bottom: .45rem; box-shadow: var(--shadow); }
.advanced .cat > summary { cursor: pointer; font-weight: 800; min-height: var(--tap); display: flex; align-items: center; gap: .4rem; }
.advanced .cat.disabled { opacity: .5; }
.badge { font-size: .7rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: .05rem .45rem; }
.field { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .45rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.field.stack { flex-direction: column; align-items: stretch; }
.field.changed .f-label > span::after { content: ' •'; color: var(--accent); }
.f-label { flex: 1 1 200px; font-weight: 700; } .f-label .warn { color: var(--warn); }
.f-control { display: flex; align-items: center; gap: .3rem; }
.num-input { display: inline-flex; align-items: center; gap: .3rem; } .num-input input { width: 110px; } .unit { font-size: .75rem; color: var(--muted); }
.adv-foot { position: sticky; bottom: 0; background: var(--bg); padding: .6rem 0 .2rem; display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--line); }
.tiers .tier { border: 2px dashed var(--line); border-radius: 12px; padding: .5rem; margin-bottom: .5rem; }
.custom-rule { margin-top: .5rem; } .custom-rule summary { cursor: pointer; font-weight: 700; color: var(--accent2); }
.custom-rule .set-row input { flex: 1; min-width: 80px; }
.table-scroll { overflow-x: auto; }
.stats { border-collapse: collapse; font-size: .82rem; min-width: 100%; } .stats th, .stats td { padding: .3rem .45rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; } .stats td:first-child, .stats th:first-child { text-align: left; }

/* ------------------------------------------------------------ toasts and fx */
.toasts { position: fixed; top: max(.6rem, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: .4rem; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: .6rem .9rem; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--shadow); animation: up .2s; transition: opacity .3s, transform .3s; }
.toast.bad { background: var(--bad); color: #fff; } .toast.good { background: var(--good); color: #fff; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.fx { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.fx-card { padding: 1.2rem 2rem; border-radius: 28px; background: var(--ink); color: var(--bg); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; max-width: 90vw; }
.fx.out .fx-card { animation: unpop .3s ease-in forwards; }
.fx-text { font-size: clamp(2rem, 9vw, 4.5rem); font-weight: 900; line-height: 1; }
.fx-sub { font-size: clamp(1rem, 4vw, 1.6rem); font-weight: 700; margin-top: .3rem; opacity: .9; }
.fx-riskout .fx-card { background: var(--bad); color: #fff; animation: shake .5s both; }
.fx-hot .fx-card { background: linear-gradient(135deg, #ff6a00, #ffb400); color: #fff; }
.fx-jackpot .fx-card { background: linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 60%, #fff)); color: #2a1800; }
.fx-contract .fx-card, .fx-token .fx-card { background: var(--accent2); color: #fff; }
.fx-mult .fx-card { background: var(--accent); color: var(--accent-ink); }
.fx-victory .fx-card { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.fx-duel .fx-card { background: #2b2b40; color: #fff; }
@keyframes pop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
@keyframes unpop { to { transform: scale(.8); opacity: 0; } }
@keyframes shake { 0% { transform: scale(.5); opacity: 0; } 30% { transform: scale(1.1) rotate(-3deg); opacity: 1; } 45% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 75% { transform: rotate(2deg); } 100% { transform: none; } }
@keyframes hotglow { to { box-shadow: 0 0 16px #ffb400; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ------------------------------------------------------------ results */
.results { text-align: center; display: flex; flex-direction: column; gap: .7rem; padding-top: .8rem; }
.res-title { font-size: 1.8rem; } .res-reason { color: var(--muted); font-weight: 700; margin: 0; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: .6rem; margin: .6rem 0; }
.pod { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 90px; }
.pod-name { font-weight: 800; } .pod-score { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.pod-step { width: 100%; border-radius: 12px 12px 0 0; background: var(--c); color: #fff; font-weight: 900; font-size: 1.6rem; display: grid; place-items: center; }
.pod.p1 .pod-step { height: 110px; } .pod.p2 .pod-step { height: 80px; } .pod.p3 .pod-step { height: 56px; }
.coop-final { font-family: var(--font-display); font-size: 2.4rem; font-weight: 900; }
.standings { text-align: left; margin: 0 auto; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.award { background: var(--surface); border-radius: 14px; padding: .6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.award.mine { outline: 3px solid var(--gold); }
.aw-title { font-weight: 900; font-size: .9rem; } .aw-who { display: flex; gap: .3rem; align-items: center; font-weight: 700; } .aw-value { font-size: .8rem; font-weight: 800; color: var(--accent); } .aw-blurb { font-size: .72rem; color: var(--muted); }
.res-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .82rem; text-align: left; display: flex; flex-direction: column; gap: .2rem; max-height: 50vh; overflow: auto; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; } .timeline li.big { font-weight: 800; }
.replay { max-width: 760px; margin: 0 auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.replay-stage { background: radial-gradient(ellipse at 50% 30%, var(--felt), var(--felt2)); color: #fff; border-radius: 24px; padding: 1.2rem; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; text-align: center; }
.rp-text { font-size: 1.2rem; font-weight: 700; } .rp-text.big { font-size: 1.6rem; font-weight: 900; } .rp-scores { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; } .rp-scores .chip { color: var(--ink); }

/* ------------------------------------------------------------ big screen */
.tv { min-height: 100vh; display: flex; flex-direction: column; padding: 1.2vw 1.6vw; gap: 1vw; font-size: clamp(14px, 1.15vw, 30px); }
.tv-head { display: flex; align-items: center; gap: 2vw; }
.tv-head .logo { font-size: 2.2em; color: var(--accent); }
.tv-title { flex: 1; } .tv-preset { font-weight: 900; font-size: 1.4em; } .tv-goal { color: var(--muted); font-weight: 700; } .tv-round { font-weight: 800; }
.big-clock { font-size: 3.2em; font-weight: 900; font-variant-numeric: tabular-nums; } .big-clock .urgent { color: var(--bad); }
.tv-body { flex: 1; display: grid; grid-template-columns: minmax(260px, 24%) 1fr minmax(260px, 24%); gap: 1.2vw; align-items: start; }
.tv-card { background: var(--surface); border-radius: 22px; padding: 1em 1.2em; box-shadow: var(--shadow); }
.tv-right { display: flex; flex-direction: column; gap: 1vw; }
.leaderboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45em; }
.lb-row { display: flex; align-items: center; gap: .6em; padding: .45em .6em; border-radius: 14px; border: 3px solid transparent; transition: background .3s, transform .3s; }
.lb-row.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); transform: scale(1.02); }
.lb-row.out { opacity: .4; }
.lb-place { font-weight: 900; width: 1.4em; text-align: center; color: var(--muted); }
.lb-main { flex: 1; min-width: 0; } .lb-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lb-members { font-size: .75em; color: var(--muted); }
.lb-bar { height: 7px; border-radius: 4px; background: var(--surface2); overflow: hidden; margin: .2em 0; } .lb-bar i { display: block; height: 100%; background: var(--c, var(--accent)); transition: width .8s; }
.lb-extra { display: flex; gap: .5em; font-size: .8em; }
.lb-score { font-size: 1.5em; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; } .lb-score small { font-size: .45em; color: var(--muted); }
.tv-center { min-width: 0; }
.tv-turn { background: radial-gradient(ellipse at 50% 30%, var(--felt), var(--felt2)); border-radius: 30px; padding: 1.4em; color: #fff; display: flex; flex-direction: column; gap: 1em; min-height: 60vh; box-shadow: inset 0 4px 20px rgba(0,0,0,.4), var(--shadow); }
.tv-turn.compact { min-height: 0; padding: 1em; gap: .6em; }
.tv-turn.ph-riskOut { animation: shake .5s; }
.tt-head { display: flex; align-items: center; gap: .8em; } .tt-name { font-size: 1.8em; font-weight: 900; } .tt-sub { opacity: .85; font-weight: 700; } .tt-head .timer { margin-left: auto; background: rgba(0,0,0,.3); }
.tv-dice { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4vw; min-height: 9vw; align-items: center; }
.tv-turn.compact .tv-dice { gap: .6vw; min-height: 0; }
.tv .die.xl { --size: clamp(64px, 6.2vw, 170px); } .tv .die.lg { --size: clamp(48px, 5vw, 130px); } .tv .die.md { --size: clamp(40px, 3.4vw, 90px); } .tv .die.sm { --size: clamp(26px, 2vw, 54px); }
.tv .kept-pts { font-size: .8em; }
.tv-sel { text-align: center; font-weight: 800; font-size: 1.3em; min-height: 1.5em; }
.tv-at-risk { display: flex; align-items: baseline; justify-content: center; gap: .6em; flex-wrap: wrap; }
.tv-at-risk .label { font-weight: 800; opacity: .8; } .tv-at-risk .num { font-size: 3.6em; font-weight: 900; line-height: 1; } .tv-at-risk .mult { font-weight: 900; color: #ffd27a; font-size: 1.4em; }
.tv .ladder { justify-content: center; } .tv .rung { min-width: 3.4em; font-size: 1em; }
.tv-banner { text-align: center; font-weight: 900; font-size: 1.3em; padding: .5em; border-radius: 14px; margin-bottom: .6em; background: color-mix(in srgb, var(--accent2) 25%, var(--surface)); }
.tv .jackpot.big .jar { width: 3.2em; height: 4.2em; } .tv .jackpot.big .jp-amount { font-size: 2.6em; }
.join-mini { display: flex; align-items: center; gap: 1em; } .join-mini .room-code { font-size: 2.2em; cursor: default; }
.ticker .feed { flex-direction: row; gap: 2em; font-size: 1em; color: var(--muted); overflow: hidden; white-space: nowrap; }
.ticker .feed li:first-child { color: var(--ink); font-weight: 800; }
.ticker { min-height: 1.6em; }
.center-card.join { display: flex; flex-direction: column; align-items: center; gap: .8em; padding: 2em; }
.join-label { font-size: 1.8em; font-weight: 900; } .join-url { font-size: 1.4em; font-weight: 800; color: var(--accent2); }
.get-ready { font-size: 3em; }
.tv-duel { display: flex; flex-direction: column; gap: 1em; } .duel-head { display: flex; gap: 1.2em; align-items: center; justify-content: center; font-weight: 900; font-size: 1.5em; } .duel-head .pot { color: var(--gold); }
.duel-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; } .duel-side.active .tv-turn { outline: 5px solid var(--accent); } .duel-side.winner .tv-turn { outline: 5px solid var(--gold); }
.duel-score { font-size: 3em; font-weight: 900; text-align: center; } .duel-result { text-align: center; font-size: 2em; font-weight: 900; }
.blitz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 17vw, 420px), 1fr)); gap: 1vw; }
.blitz-card { background: radial-gradient(ellipse at 50% 30%, var(--felt), var(--felt2)); color: #fff; border-radius: 20px; padding: .8em; display: flex; flex-direction: column; gap: .4em; border-top: 6px solid var(--c); min-height: 11vw; transition: transform .2s; }
.blitz-card.ph-riskOut, .blitz-card.cooling { filter: grayscale(.6); }
.bc-head { display: flex; align-items: center; gap: .4em; font-weight: 800; } .bc-name { flex: 1; } .bc-streak, .bc-rolls { font-size: .8em; background: rgba(0,0,0,.3); padding: .1em .4em; border-radius: 6px; }
.bc-score { font-size: 2.4em; font-weight: 900; font-family: var(--font-display); line-height: 1; }
.bc-risk { font-size: .85em; opacity: .9; min-height: 1.2em; }
.big-num { font-size: 3em; font-weight: 900; }
.coop-num { font-size: 2em; font-weight: 900; font-family: var(--font-display); }
.results.tv { font-size: 1.2em; } .results.tv .pod { min-width: 12vw; } .results.tv .pod.p1 .pod-step { height: 22vh; } .results.tv .pod.p2 .pod-step { height: 15vh; } .results.tv .pod.p3 .pod-step { height: 10vh; }
.tv.results-mode .tv-body { grid-template-columns: 1fr; }
.tv.blitz-mode .tv-body { grid-template-columns: minmax(240px, 20%) 1fr minmax(240px, 20%); }
/* Spectators on phones: one column. */
@media (max-width: 900px) {
  .tv { font-size: 15px; padding: .6rem; }
  .tv-body { grid-template-columns: 1fr !important; }
  .tv-head .logo { font-size: 1.4em; }
  .room-code.huge { font-size: 4rem; } .qr.big { width: 200px; height: 200px; }
  .duel-sides { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ reduced motion */
:root.reduce-motion *, :root.reduce-motion *::before, :root.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
:root.reduce-motion .die.s-selected { transform: none; }
@media (prefers-reduced-motion: reduce) { .die.hero { animation: none; } }
