:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #141417;
  --surface-2: #1d1d22;
  --line: #2a2a31;
  --text: #f5f5f6;
  --muted: #8e8e98;
  --gold: #f5c518;
  --win: #3ddc84;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: Barlow, system-ui, sans-serif;
  --cell: 116px;
  --roller-h: 150px;
}

* { box-sizing: border-box; }
button { font: inherit; color: inherit; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

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

.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  max-width: 1280px; margin: 0 auto; padding: 18px 24px 14px;
}
.wordmark { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 26px; letter-spacing: .5px; text-transform: uppercase; }
.wordmark b { margin-left: 2px; color: var(--muted); font-weight: 800; }
.wordmark span { margin-left: 10px; font-weight: 600; font-style: normal; font-size: 15px; letter-spacing: 3px; color: var(--muted); }

.scorebug { display: flex; align-items: stretch; height: 40px; transform: skewX(-10deg); }
.scorebug { background: var(--surface-2); }
.sb-name-wrap { display: flex; align-items: center; gap: 7px; padding: 0 12px; cursor: text; transition: background .15s; }
.sb-name-wrap:hover, .sb-name-wrap:focus-within { background: #26262d; }
.sb-name {
  min-width: 0; background: none; border: 0; outline: 0; color: var(--text); padding: 2px 0;
  font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px dashed rgba(255,255,255,.3); border-radius: 0;
}
.sb-name::placeholder { color: var(--muted); opacity: 1; }
.sb-name:focus { border-bottom: 1px solid var(--text); }
#name0 { text-align: right; }
.pencil { flex: none; width: 14px; height: 14px; color: var(--muted); stroke-width: 2.2; }
.sb-name-wrap:hover .pencil, .sb-name-wrap:focus-within .pencil { color: var(--text); }
.sb-score {
  display: grid; place-items: center; min-width: 40px; background: var(--text); color: var(--bg);
  font-family: var(--display); font-weight: 800; font-size: 24px;
}
.sb-score + .sb-score { border-left: 1px solid #c9c9cf; }

.top-actions { justify-self: end; display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px;
  background: transparent; border: 1px solid var(--line); cursor: pointer; color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: #45454f; }
#soundBtn .ico-off, #soundBtn.muted .ico-on { display: none; }
#soundBtn.muted .ico-off { display: block; }

/* ---------- modes ---------- */

.modes { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.mode-tabs { display: flex; gap: 4px; }
.mode .short { display: none; }
.mode {
  position: relative; background: none; border: 0; cursor: pointer; white-space: nowrap;
  padding: 12px 14px; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted); transition: color .15s;
}
.mode:hover { color: var(--text); }
.mode.active { color: var(--text); }
.mode.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--text); }
.mode.custom svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; fill: none; }
.mode-info { color: var(--muted); font-size: 14px; padding-bottom: 13px; white-space: nowrap; }
.mode-info b { color: var(--text); font-weight: 600; }
.mode-info.empty b { color: #ff6b6b; }

/* ---------- stage ---------- */

.stage {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  max-width: 1280px; margin: 20px auto 0; padding: 0 24px; gap: 4px;
}
.half {
  position: relative; overflow: hidden; isolation: isolate; min-height: 540px;
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); padding: 22px 28px 24px;
  --c1: #2a2a31; --c2: #3a3a44;
}
.half[data-p="0"] { border-radius: 14px 0 0 14px; }
.half[data-p="1"] { border-radius: 0 14px 14px 0; }

.wash {
  position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s ease;
  background:
    linear-gradient(115deg, transparent 64%, color-mix(in oklab, var(--c2) 75%, transparent) 64% 67%, transparent 67% 70%, color-mix(in oklab, var(--c2) 40%, transparent) 70% 71%, transparent 71%),
    radial-gradient(120% 80% at 50% 25%, color-mix(in oklab, var(--c1) 88%, black), color-mix(in oklab, var(--c1) 30%, #050506) 75%);
}
.half[data-p="1"] .wash {
  background:
    linear-gradient(245deg, transparent 64%, color-mix(in oklab, var(--c2) 75%, transparent) 64% 67%, transparent 67% 70%, color-mix(in oklab, var(--c2) 40%, transparent) 70% 71%, transparent 71%),
    radial-gradient(120% 80% at 50% 25%, color-mix(in oklab, var(--c1) 88%, black), color-mix(in oklab, var(--c1) 30%, #050506) 75%);
}
.watermark {
  position: absolute; z-index: -1; width: 520px; height: 520px; object-fit: contain; right: -150px; bottom: -130px;
  opacity: 0; filter: grayscale(1) brightness(2); mix-blend-mode: overlay; transition: opacity .8s ease; pointer-events: none;
}
.half[data-p="1"] .watermark { right: auto; left: -150px; }
.half.landed .wash { opacity: 1; }
.half.landed .watermark { opacity: .14; }

.half-head { align-self: stretch; display: flex; align-items: center; gap: 10px; }
.half[data-p="1"] .half-head { flex-direction: row-reverse; }
.tag {
  font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 1px;
  padding: 2px 7px; border-radius: 4px; background: rgba(255,255,255,.1); color: var(--muted);
}
.who { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .5px; }

.stack { flex: 1; align-self: stretch; display: grid; }
.stack > * { grid-area: 1 / 1; }

/* roller */
.roller {
  align-self: center; position: relative; height: var(--roller-h); margin: 0 -28px; overflow: hidden;
  transition: opacity .35s ease, transform .35s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.strip { position: absolute; top: 0; left: 0; height: 100%; display: flex; will-change: transform; }
.cell { flex: none; width: var(--cell); height: 100%; display: grid; place-items: center; }
.cell img { width: 84px; height: 84px; object-fit: contain; opacity: .55; transition: opacity .2s, transform .2s; }
body[data-phase="idle"] .cell img { opacity: .22; filter: grayscale(.6); }
.cell.hit img { opacity: 1; transform: scale(1.18); }
.marker { position: absolute; top: 10px; bottom: 10px; left: 50%; width: var(--cell); transform: translateX(-50%); border: 2px solid var(--text); border-radius: 12px; pointer-events: none; }
.marker::before, .marker::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
.marker::before { top: -2px; border-top-color: var(--text); }
.marker::after { bottom: -2px; border-bottom-color: var(--text); }
body[data-phase="idle"] .marker { border-color: rgba(255,255,255,.18); }
body[data-phase="idle"] .marker::before { border-top-color: rgba(255,255,255,.18); }
body[data-phase="idle"] .marker::after { border-bottom-color: rgba(255,255,255,.18); }
.stack { position: relative; }
body[data-phase="idle"] .stack::after {
  content: "Spin to draw a club"; position: absolute; left: 0; right: 0; top: calc(50% + var(--roller-h) / 2 + 18px);
  text-align: center; color: var(--muted); font-size: 15px;
}
.half.landed .roller { opacity: 0; transform: scale(.96); pointer-events: none; }

/* reveal */
.reveal {
  display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 10px;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.half.landed .reveal { opacity: 1; pointer-events: auto; }
.crest { width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
.half.landed .crest { animation: crest-in .7s cubic-bezier(.2,1.4,.35,1) both; }
@keyframes crest-in { from { transform: scale(.5) rotate(-6deg); opacity: 0; } }
.team-name {
  margin: 14px 0 0; font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(34px, 4.4vw, 58px); line-height: .92; letter-spacing: .3px; text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.half.landed .team-name { animation: rise .5s .12s cubic-bezier(.2,.9,.3,1) both; }
.team-meta { margin-top: 8px; color: rgba(255,255,255,.72); font-size: 15px; font-weight: 500; }
.half.landed .team-meta, .half.landed .rating-row, .half.landed .bars, .half.landed .stars-line { animation: rise .5s .22s cubic-bezier(.2,.9,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.stars-line { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.stars { color: var(--gold); font-size: 22px; letter-spacing: 3px; line-height: 1; }
.stars .dim { color: rgba(255,255,255,.2); }
.stars .half-star { background: linear-gradient(90deg, var(--gold) 50%, rgba(255,255,255,.2) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.edge {
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; background: rgba(0,0,0,.35);
}
.edge.fav { color: var(--win); }
.edge.dog { color: #ffb3b3; }

.rating-row { margin-top: 18px; display: flex; align-items: center; gap: 22px; }
.ovr { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: .8; }
.ovr small { display: block; font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,.65); margin-top: 6px; font-weight: 700; }
.bars { display: grid; gap: 7px; width: 190px; }
.bar { display: grid; grid-template-columns: 32px 1fr 24px; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.bar span:first-child { color: rgba(255,255,255,.65); text-align: left; }
.bar i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.bar i::after { content: ""; display: block; height: 100%; width: var(--w); background: var(--text); border-radius: 3px; transform-origin: left; }
.half.landed .bar i::after { animation: grow .8s .3s cubic-bezier(.2,.9,.3,1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar b { text-align: right; }
.stars-players { margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.72); }
.stars-players b { color: var(--text); font-weight: 600; }

.veto {
  margin-top: 14px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; visibility: hidden;
}
.veto:hover:not(:disabled) { border-color: var(--text); }
.veto:disabled { opacity: .4; cursor: default; }
body[data-phase="done"] .veto { visibility: visible; }

.seam {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
  pointer-events: none;
}
.seam span {
  display: grid; place-items: center; width: 64px; height: 64px; background: var(--bg); border-radius: 50%;
  font-family: var(--display); font-weight: 800; font-style: italic; font-size: 26px; letter-spacing: 1px;
  box-shadow: 0 0 0 6px var(--bg);
}
body[data-phase="spinning"] .seam span { animation: beat .55s ease-in-out infinite alternate; }
@keyframes beat { to { transform: scale(1.12); } }

/* ---------- cta ---------- */

.cta { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 24px 8px; }
.spin {
  position: relative; border: 0; cursor: pointer; background: var(--text); color: var(--bg);
  font-family: var(--display); font-weight: 800; font-style: italic; font-size: 30px; letter-spacing: 3px; text-transform: uppercase;
  padding: 12px 64px; transform: skewX(-10deg); transition: transform .12s ease, opacity .2s;
}
.spin span { display: inline-block; transform: skewX(10deg); }
.spin:hover { transform: skewX(-10deg) translateY(-2px); }
.spin:active { transform: skewX(-10deg) translateY(1px) scale(.98); }
.spin:disabled { opacity: .35; cursor: default; transform: skewX(-10deg); }
body[data-phase="done"] .spin { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--text); font-size: 22px; padding: 9px 44px; }
.cta-msg { margin: 0; min-height: 20px; color: var(--muted); font-size: 14px; }
.cta-msg.warn { color: #ff8a8a; }

.result-bar { display: none; flex-direction: column; align-items: center; gap: 10px; }
.rb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rb-or { color: var(--muted); font-size: 14px; margin-right: 4px; }
.score-inputs { display: inline-flex; align-items: center; gap: 6px; }
.dash { color: var(--muted); font-weight: 600; }
.goal {
  width: 52px; height: 42px; text-align: center; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font-family: var(--display); font-weight: 800; font-size: 24px;
  -moz-appearance: textfield; appearance: textfield;
}
.goal::-webkit-outer-spin-button, .goal::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.goal::placeholder { color: var(--muted); }
.goal:focus { outline: none; border-color: var(--text); }
.save-btn { background: var(--text); color: var(--bg); border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; }
.save-btn:disabled { opacity: .3; cursor: default; }
body[data-phase="done"] .result-bar.open { display: flex; animation: rise .4s ease both; }
.rb-label { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.win {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-weight: 600;
}
.win img { width: 22px; height: 22px; object-fit: contain; }
.win:hover { border-color: var(--text); }

/* ---------- history ---------- */

.history { max-width: 760px; margin: 34px auto 0; padding: 0 24px; }
.history-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.history h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 1.5px; text-transform: uppercase; }
.text-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--text); }
.history ol { list-style: none; margin: 0; padding: 0; }
.history h2 small { margin-left: 10px; font-family: var(--body); font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.history li { border-bottom: 1px solid var(--line); }
.history li:first-child { animation: rise .35s ease both; }
.h-row {
  width: 100%; display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 10px;
  padding: 10px 6px; background: none; border: 0; cursor: pointer; text-align: left; font-size: 15px; border-radius: 8px;
}
.h-row:hover { background: var(--surface); }
li.open .h-row { background: var(--surface); border-radius: 8px 8px 0 0; }
.h-mid.score { color: var(--text); font-size: 20px; }
.h-mid.pending { font-size: 12px; }
.h-edit { background: var(--surface); border-radius: 0 0 8px 8px; padding: 6px 12px 14px; display: grid; gap: 12px; justify-items: center; }
.h-edit .chips { justify-content: center; }
.h-actions { display: flex; align-items: center; gap: 16px; }
.h-actions .danger { color: #ff8a8a; }
.h-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-side.right { flex-direction: row-reverse; text-align: right; }
.h-side img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.h-side div { min-width: 0; }
.h-side b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-side small { color: var(--muted); font-size: 13px; }
.h-side.won b { color: var(--win); }
.h-mid { text-align: center; font-family: var(--display); font-weight: 700; letter-spacing: 1px; color: var(--muted); font-size: 14px; }
.history-empty { color: var(--muted); font-size: 14px; margin: 14px 0; }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 40px 24px 32px; opacity: .7; }

/* ---------- drawer ---------- */

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 41;
  background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.9,.3,1);
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2, .field h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.drawer-head h2 { font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; }
.field { padding: 16px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field h3 { font-size: 15px; color: var(--muted); margin-bottom: 12px; display: flex; gap: 12px; align-items: baseline; }
#ovrLabel { color: var(--text); }
.drawer-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); }
.drawer-foot b { color: var(--text); }
.done-btn { background: var(--text); color: var(--bg); border: 0; border-radius: 8px; padding: 10px 22px; font-weight: 600; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
  padding: 7px 11px; font-size: 14px; font-weight: 500; transition: background .12s, border-color .12s;
}
.chip:hover { border-color: #45454f; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip small { margin-left: 5px; opacity: .55; }
#leagueChips { max-height: 300px; overflow-y: auto; }
.search { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 9px 11px; margin-bottom: 10px; font: inherit; font-size: 14px; }

.toggle { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; font-size: 15px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: var(--line); transition: background .15s; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + span { background: var(--text); }
.toggle input:checked + span::after { transform: translateX(16px); background: var(--bg); }
.toggle input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.range2 { position: relative; height: 28px; }
.range2::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--line); }
.range2 input { position: absolute; inset: 0; width: 100%; margin: 0; appearance: none; background: none; pointer-events: none; }
.range2 input::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--text); cursor: pointer; border: 4px solid var(--surface); }
.range2 input::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--text); cursor: pointer; border: 4px solid var(--surface); }

/* ---------- small screens ---------- */

@media (max-width: 800px) {
  :root { --cell: 92px; --roller-h: 112px; }
  .topbar { grid-template-columns: 1fr auto; padding: 12px 16px 10px; }
  .wordmark span { display: none; }
  .scorebug { grid-column: 1 / -1; grid-row: 2; justify-self: center; height: 36px; }
  .top-actions { grid-column: 2; grid-row: 1; }
  .sb-name { font-size: 18px; }
  .modes { padding: 0 8px; flex-direction: column; align-items: stretch; gap: 0; }
  .modes { border-bottom: 0; padding: 0 12px; }
  .mode-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .mode {
    padding: 9px 4px; font-size: 15px; letter-spacing: .5px; border-radius: 8px;
    background: var(--surface); border: 1px solid var(--line);
  }
  .mode.active { background: var(--text); color: var(--bg); border-color: var(--text); }
  .mode.active::after { display: none; }
  .mode .long { display: none; }
  .mode .short { display: inline; }
  .mode.custom { grid-column: span 2; }
  .mode-info { padding: 10px 2px 0; font-size: 13px; text-align: center; }

  .stage { grid-template-columns: 1fr; padding: 0 12px; margin-top: 12px; gap: 4px; }
  body[data-phase="idle"] .stack::after { display: none; }
  .half { min-height: 0; padding: 14px 16px 16px; }
  .half[data-p="0"] { border-radius: 14px 14px 0 0; }
  .half[data-p="1"] { border-radius: 0 0 14px 14px; }
  .half[data-p="1"] .half-head { flex-direction: row; }
  .stack { min-height: var(--roller-h); }
  .roller { margin: 0 -16px; }
  .reveal { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; text-align: left; align-items: center; padding-top: 4px; }
  .crest { width: 96px; height: 96px; grid-row: 1 / span 4; }
  .team-name { margin: 0; font-size: 30px; }
  .team-meta { margin-top: 4px; font-size: 13px; }
  .stars-line { margin-top: 6px; gap: 8px; }
  .stars { font-size: 16px; letter-spacing: 2px; }
  .edge { font-size: 12px; }
  .rating-row { margin-top: 8px; gap: 14px; }
  .ovr { font-size: 40px; }
  .ovr small { font-size: 11px; margin-top: 4px; }
  .bars { width: auto; flex: 1; gap: 4px; }
  .bar { font-size: 12px; grid-template-columns: 28px 1fr 20px; }
  .stars-players { display: none; }
  .veto { margin-top: 10px; align-self: flex-end; padding: 6px 12px; font-size: 13px; }
  .watermark { width: 300px; height: 300px; right: -80px; bottom: -90px; }
  .half[data-p="1"] .watermark { left: auto; right: -80px; }
  .half[data-p="1"] .wash { background:
    linear-gradient(115deg, transparent 64%, color-mix(in oklab, var(--c2) 75%, transparent) 64% 67%, transparent 67% 70%, color-mix(in oklab, var(--c2) 40%, transparent) 70% 71%, transparent 71%),
    radial-gradient(120% 80% at 50% 25%, color-mix(in oklab, var(--c1) 88%, black), color-mix(in oklab, var(--c1) 30%, #050506) 75%); }
  .seam span { width: 46px; height: 46px; font-size: 19px; box-shadow: 0 0 0 4px var(--bg); }

  .cta { position: sticky; bottom: 0; z-index: 20; padding: 14px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
  body[data-phase="done"] .cta { position: static; background: none; }
  .spin { font-size: 26px; padding: 10px 56px; }
  .rb-label { width: 100%; text-align: center; margin: 0; font-size: 15px; }
  .win { padding: 7px 12px; }
  .rb-or { width: 100%; text-align: center; margin: 0; }
  .history h2 small { display: block; margin: 4px 0 0; }
  .cta-msg:empty { display: none; }
  .history { padding: 0 16px; margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; }
}
