/* Hızlı Parmak (plan 97 §3.3, §7, §8): the quiz-show stage. The blue half (side 0) and the orange half
   (side 1) frame one shared question card; each half holds its name, score, pad and options. Colours come
   from tokens.css (light, dark, high contrast). Only transform, opacity and colour animate; no filter, no
   animated shadows; cards and halves are contained. Reduced motion stops everything on the stage. */

#arenaBody:has(> .buzzer-arena) { display: flex; flex-direction: column; overflow: hidden; padding: 12px 16px; }
.buzzer-arena { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; }
.buzzer-arena > #arenaPlay.arena-play--buzzer { display: flex; flex: 1; min-height: 0; margin: 0; padding: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }

.buzzer-stage {
  display: grid;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

/* ---------- Top bar: question count, ten result dots, the phase and the navy clock capsule ---------- */
.buzzer-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 44px; pointer-events: none; }
.buzzer-bar__round { margin: 0; padding: 6px 14px; color: var(--ink); background: var(--gold-tint); border: 2px solid var(--gold-base); border-radius: 999px; font-size: 16px; font-weight: 900; white-space: nowrap; }
.buzzer-stage[data-sudden-death="true"] .buzzer-bar__round { color: #fff; background: var(--red-base); border-color: var(--red-base); }
.buzzer-dots { display: flex; justify-content: flex-start; gap: 7px; margin: 0; padding: 0; list-style: none; }
.buzzer-dots li { width: 14px; height: 14px; background: var(--surface); border: 2px solid var(--line-strong); border-radius: 50%; transition: background-color .25s ease, border-color .25s ease, transform .25s ease; }
.buzzer-dots li.is-current { border-color: var(--ink); transform: scale(1.25); }
.buzzer-dots li[data-result="none"], .buzzer-dots li[data-result="missed"] { background: var(--surface-3); border-style: dashed; }
.buzzer-dots li[data-side="0"] { background: var(--player-a); border-color: var(--player-a); }
.buzzer-dots li[data-side="1"] { background: var(--player-b); border-color: var(--player-b); }
.buzzer-dots li[data-result="steal"] { border-color: var(--gold-base); }
.buzzer-bar__phase { margin: 0; color: var(--ink-2); font-size: 17px; font-weight: 850; white-space: nowrap; }
.buzzer-stage[data-phase="open"] .buzzer-bar__phase { color: var(--ink); }
.buzzer-timer { position: relative; display: grid; min-width: 132px; justify-items: center; gap: 4px; }
.buzzer-timer strong { min-width: 5ch; padding: 5px 16px 6px; color: var(--on-inverse, #fff); background: var(--inverse); border: 3px solid var(--bg); border-radius: 999px; box-shadow: var(--shadow-sm); font-size: 24px; font-weight: 900; line-height: 1; text-align: center; }
.buzzer-timer__track { width: 100%; height: 6px; overflow: hidden; background: var(--surface-3); border-radius: 999px; }
.buzzer-timer__track i { display: block; width: 100%; height: 100%; background: var(--brand, var(--primary)); transform-origin: left center; }
.buzzer-stage[data-phase="answering"][data-owner="0"] .buzzer-timer__track i, .buzzer-stage[data-phase="steal"][data-owner="1"] .buzzer-timer__track i { background: var(--player-a); }
.buzzer-stage[data-phase="answering"][data-owner="1"] .buzzer-timer__track i, .buzzer-stage[data-phase="steal"][data-owner="0"] .buzzer-timer__track i { background: var(--player-b); }
.buzzer-timer.is-urgent strong { background: var(--red-base); }
.buzzer-stage[data-phase="reading"] .buzzer-timer, .buzzer-stage[data-phase="reveal"] .buzzer-timer { opacity: .55; }

/* ---------- Three columns: blue half · shared card · orange half ---------- */
.buzzer-grid { display: grid; grid-template-columns: minmax(250px, 24%) minmax(0, 1fr) minmax(250px, 24%); gap: 14px; min-height: 0; }

.buzzer-side {
  --side: var(--player-a);
  --side-ink: var(--player-a-ink);
  --side-tint: var(--player-a-tint);
  --side-line: var(--player-a-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--side-tint), color-mix(in srgb, var(--side-tint) 40%, var(--surface)));
  border: 2px solid var(--side-line);
  border-radius: 22px;
  contain: layout paint;
  transition: opacity .25s ease, border-color .25s ease, background-color .25s ease;
}
.buzzer-side.side-1 { --side: var(--player-b); --side-ink: var(--player-b-ink); --side-tint: var(--player-b-tint); --side-line: var(--player-b-line); }
.buzzer-side.is-owner, .buzzer-side.is-stealing { border-color: var(--side); background: var(--side-tint); }
.buzzer-side.is-stealing { border-color: var(--gold-line); }
.buzzer-side.is-waiting { opacity: .55; }
.buzzer-side__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-height: 48px; }
.buzzer-side__who { display: grid; min-width: 0; gap: 2px; }
.buzzer-side__name { overflow: hidden; color: var(--side-ink); font-size: clamp(17px, 1.5vw, 21px); font-weight: 900; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
.buzzer-side__role { justify-self: start; padding: 1px 8px; color: var(--side-ink); background: var(--surface); border: 1.5px solid var(--side-line); border-radius: 999px; font-size: 12px; font-weight: 800; }
.buzzer-side__points { position: relative; display: grid; justify-items: end; }
.buzzer-side__score { color: var(--ink); font-size: clamp(20px, 1.9vw, 28px); font-weight: 900; line-height: 1.05; white-space: nowrap; }
.buzzer-side__score.is-negative { color: var(--red-ink); }
.buzzer-side__delta { position: absolute; top: 100%; right: 0; color: var(--green-ink); font-size: 18px; font-weight: 900; opacity: 0; pointer-events: none; }
.buzzer-side__delta.is-minus { color: var(--red-ink); }
.buzzer-side__delta.is-on { animation: buzzer-delta 1.1s ease-out both; }
@keyframes buzzer-delta { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 18% { opacity: 1; transform: translateY(0) scale(1.15); } 70% { opacity: 1; transform: translateY(-4px) scale(1); } 100% { opacity: 0; transform: translateY(-10px); } }

/* The pad: a big button in the side's colour. Dim while reading, glowing while open, gold-ringed when it won. */
.buzzer-pad {
  position: relative;
  display: grid;
  flex: none;
  width: 100%;
  min-height: clamp(84px, 14vh, 124px);
  place-items: center;
  padding: 8px 16px;
  color: var(--side-ink);
  background: var(--surface);
  border: 3px solid var(--side-line);
  border-radius: 26px;
  box-shadow: 0 6px 0 var(--side-line);
  font: inherit;
  cursor: pointer;
  touch-action: none;
  transition: transform .12s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.buzzer-pad__label { font-size: clamp(22px, 2.3vw, 34px); font-weight: 900; letter-spacing: .02em; line-height: 1; }
.buzzer-pad__key { position: absolute; top: 8px; right: 10px; min-width: 26px; padding: 2px 6px; color: var(--side-ink); background: var(--surface); border: 1.5px solid var(--side-line); border-bottom-width: 3px; border-radius: 7px; font: 800 13px/1.2 var(--font-sans); text-align: center; }
.buzzer-pad__ring { position: absolute; inset: -2px; border: 4px solid var(--side); border-radius: inherit; opacity: 0; pointer-events: none; }
.buzzer-side.is-open .buzzer-pad { color: #fff; background: var(--side); border-color: var(--side); box-shadow: 0 6px 0 var(--side-ink); }
.buzzer-side.is-open .buzzer-pad__key { color: var(--side-ink); }
.buzzer-side.is-open .buzzer-pad__ring { animation: buzzer-ring 1.1s ease-out infinite; }
@keyframes buzzer-ring { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06, 1.16); } }
.buzzer-side.is-owner .buzzer-pad { color: var(--ink); background: var(--gold-tint); border-color: var(--gold-base); box-shadow: 0 6px 0 var(--gold-base); animation: buzzer-press .32s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes buzzer-press { 0% { transform: translateY(5px) scale(.97); } 100% { transform: none; } }
.buzzer-side.is-stealing .buzzer-pad { color: var(--gold-ink); background: var(--gold-tint); border-color: var(--gold-base); box-shadow: 0 6px 0 var(--gold-base); }
html[data-input="mouse"] .buzzer-side.is-open .buzzer-pad:hover { transform: translateY(-2px); }
.buzzer-side.is-open .buzzer-pad:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--side-ink); }
.buzzer-pad:disabled { cursor: default; }
.buzzer-side.is-bot .buzzer-pad { min-height: clamp(64px, 10vh, 92px); border-style: dashed; }
.buzzer-side.is-bot.is-open .buzzer-pad { color: var(--side-ink); background: var(--surface); border-color: var(--side); box-shadow: 0 6px 0 var(--side-line); }
.buzzer-side.is-bot .buzzer-pad__label { font-size: clamp(17px, 1.6vw, 22px); }

/* The side note and the early-press note share one slot, so the lock never moves the layout. */
.buzzer-side__notes { display: grid; }
.buzzer-side__notes > * { grid-area: 1 / 1; }
.buzzer-side__note { min-height: 1.35em; margin: 0; color: var(--ink-2); font-size: 15px; font-weight: 800; line-height: 1.3; }
.buzzer-side__note:empty { visibility: hidden; }
.buzzer-side__note[data-tone="correct"] { color: var(--green-ink); }
.buzzer-side__note[data-tone="wrong"] { color: var(--red-ink); animation: buzzer-shake .36s ease-in-out; }
.buzzer-side__note[data-tone="steal"] { color: var(--gold-ink); }
@keyframes buzzer-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

/* Early-press lockout: pressing during "Hazır…" locks that half for half a second. Hatched, dashed, red-edged and
   labelled "Kilitli", so it never reads as the glowing "BAS!" pad and never depends on colour alone. */
.buzzer-lock-note { align-self: center; margin: 0; padding: 2px 10px; color: var(--red-ink); background: var(--red-tint); border: 1.5px solid var(--red-base); border-radius: 999px; font-size: 14px; font-weight: 850; line-height: 1.3; text-align: center; }
.buzzer-lock-note:empty { display: none; }
.buzzer-side.is-locked .buzzer-pad { color: var(--red-ink); background: repeating-linear-gradient(135deg, var(--red-tint) 0 10px, var(--surface) 10px 20px); border: 3px dashed var(--red-base); box-shadow: 0 6px 0 var(--red-base); cursor: not-allowed; animation: buzzer-lock .28s ease-in-out; }
.buzzer-side.is-locked .buzzer-pad__label::before { content: "\1F512\00A0"; }
.buzzer-side.is-locked .buzzer-pad__key { color: var(--red-ink); border-color: var(--red-base); }
@keyframes buzzer-lock { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

/* Options: only the half that may answer shows them, as large key-cap buttons. */
.buzzer-options { display: grid; flex: 1; align-content: start; gap: 8px; min-height: 0; }
.buzzer-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--side-line);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--side-line);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: none;
  animation: buzzer-pop .26s cubic-bezier(.2, 1.4, .4, 1) both;
  animation-delay: calc(var(--k, 0) * 45ms);
  transition: transform .1s ease, background-color .15s ease, border-color .15s ease;
}
.buzzer-option kbd { flex: none; display: grid; width: 32px; height: 32px; place-items: center; color: #fff; background: var(--side); border-radius: 9px; font: 900 16px/1 var(--font-sans); }
.buzzer-option__text { min-width: 0; overflow-wrap: anywhere; font-size: clamp(18px, 1.65vw, 25px); font-weight: 850; line-height: 1.15; }
html[data-input="mouse"] .buzzer-option:not(:disabled):hover { border-color: var(--side); background: var(--side-tint); }
.buzzer-option:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--side-line); }
.buzzer-option:focus-visible, .buzzer-pad:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.buzzer-option:disabled { cursor: default; opacity: .8; }
.buzzer-side.is-stealing .buzzer-option { border-color: var(--gold-line); box-shadow: 0 4px 0 var(--gold-line); }
@keyframes buzzer-pop { from { opacity: 0; transform: translateY(8px); } }

/* ---------- The shared card: navy→sky stripe, the prompt, the visual, the reveal ---------- */
.buzzer-centre { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.buzzer-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px 20px 14px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  contain: layout paint;
  pointer-events: none;
  transition: border-color .25s ease;
}
.buzzer-card::before { position: absolute; top: 0; right: 0; left: 0; height: 6px; background: var(--brand-sheen, linear-gradient(90deg, #0b1b33, #1d4f9f 55%, #1ba3dd)); content: ""; }
.buzzer-stage[data-owner="0"] .buzzer-card { border-color: var(--player-a); }
.buzzer-stage[data-owner="1"] .buzzer-card { border-color: var(--player-b); }
.buzzer-card.is-new { animation: buzzer-card-in .34s cubic-bezier(.2, .9, .3, 1); }
@keyframes buzzer-card-in { from { opacity: 0; transform: translateY(8px); } }
.buzzer-card__head { display: flex; align-items: center; gap: 10px; }
.buzzer-card__tag { padding: 3px 11px; color: var(--gold-ink); background: var(--gold-tint); border: 1.5px solid var(--gold-base); border-radius: 999px; font-size: 13px; font-weight: 900; }
.buzzer-card__pack { color: var(--ink-3); font-size: 13px; font-weight: 800; }
.buzzer-card__prompt { margin: 0; color: var(--ink); font-size: clamp(19px, 1.7vw, 25px); font-weight: 780; line-height: 1.3; letter-spacing: -.005em; }
.buzzer-card__prompt.is-big { margin-block: auto; font-size: clamp(24px, 2.5vw, 36px); line-height: 1.28; text-align: center; }
.buzzer-card__prompt.is-long { font-size: clamp(17px, 1.45vw, 21px); }
.buzzer-blank { display: inline-block; min-width: 1.3em; padding: 0 .12em; color: var(--ink-3); border: 2px dashed var(--ink-3); border-radius: 6px; line-height: 1.1; text-align: center; }

/* Visuals */
.buzzer-visual { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; align-items: center; min-height: 0; margin: 0; }
.buzzer-visual svg { display: block; width: 100%; height: 100%; min-height: 0; max-height: 400px; overflow: visible; font-family: var(--font-sans); }
.buzzer-model { flex: 0 1 auto; margin-bottom: auto; }
.buzzer-model svg { max-height: 150px; }
.buzzer-card[data-figure="bar"] .buzzer-card__prompt, .buzzer-card[data-figure="grid"] .buzzer-card__prompt { margin-top: auto; }
.buzzer-card[data-figure="grid"] .buzzer-model { flex: 1 1 auto; }
.buzzer-model--grid svg { width: auto; max-width: 100%; max-height: 340px; aspect-ratio: 1; }
.buzzer-grid-line { stroke: var(--line); stroke-width: 1; }
.buzzer-axis { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.buzzer-axis-tick { fill: var(--ink-3); font-size: 15px; font-weight: 750; }
.buzzer-axis-label { fill: var(--ink-2); font-size: 16px; font-weight: 850; }
.buzzer-zero { stroke: var(--ink-2); stroke-width: 2; }
.buzzer-series { --c: var(--chart-1); }
.buzzer-series.c2 { --c: var(--chart-2); } .buzzer-series.c3 { --c: var(--chart-3); } .buzzer-series.c4 { --c: var(--chart-4); }
.buzzer-series-line { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; }
.buzzer-mark { fill: var(--c, var(--chart-1)); stroke: var(--surface); stroke-width: 2; }
.buzzer-series-label { fill: var(--ink); font-size: 18px; font-weight: 900; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.buzzer-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 4px 0 0; padding: 0; color: var(--ink); list-style: none; font-size: 15px; font-weight: 850; }
.buzzer-legend b { margin-right: 5px; }
.buzzer-legend .c1 b { color: var(--chart-1); } .buzzer-legend .c2 b { color: var(--chart-2); } .buzzer-legend .c3 b { color: var(--chart-3); } .buzzer-legend .c4 b { color: var(--chart-4); }
.buzzer-bar__fill { fill: var(--chart-1); }
.buzzer-bar__value { fill: var(--ink); font-size: 16px; font-weight: 850; }
.buzzer-bar__label { fill: var(--ink-2); font-size: 15px; font-weight: 800; }
.buzzer-slice { fill: var(--chart-1); stroke: var(--surface); stroke-width: 2; }
.c2 > .buzzer-slice, .buzzer-slice.c2 { fill: var(--chart-2); } .c3 > .buzzer-slice, .buzzer-slice.c3 { fill: var(--chart-3); }
.c4 > .buzzer-slice, .buzzer-slice.c4 { fill: var(--chart-4); } .c5 > .buzzer-slice, .buzzer-slice.c5 { fill: var(--chart-5); } .c6 > .buzzer-slice, .buzzer-slice.c6 { fill: var(--chart-6); }
.buzzer-slice__value { fill: #fff; font-size: 16px; font-weight: 900; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 3px; }
.buzzer-pie-key__label { fill: var(--ink); font-size: 17px; font-weight: 800; }
.buzzer-pie-key__value { fill: var(--ink); font-size: 17px; font-weight: 900; }
.buzzer-part { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.5; }
.buzzer-part.is-shaded { fill: var(--chart-1); }
.buzzer-model__lines { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.buzzer-model__frame { fill: none; stroke: var(--ink); stroke-width: 2.5; }

/* Tables: two rows (x over y), A–D stacked; a letter tag leads each table. */
.buzzer-tables { gap: 8px; justify-content: flex-start; }
.buzzer-tables.is-many { justify-content: space-evenly; }
.buzzer-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; font-size: clamp(16px, 1.45vw, 21px); }
.buzzer-tables:not(.is-many) .buzzer-table { font-size: clamp(19px, 1.8vw, 26px); }
.buzzer-table th, .buzzer-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.buzzer-table tr:last-child th, .buzzer-table tr:last-child td { border-bottom: 0; }
.buzzer-table td { font-weight: 850; border-left: 1px solid var(--line); }
.buzzer-table__head { width: 1%; color: var(--ink-2); background: var(--surface-2); font-size: .8em; font-weight: 850; text-align: left !important; }
.buzzer-table__tag { width: 1%; padding-inline: 12px !important; color: var(--on-inverse, #fff); background: var(--inverse); font-size: 1.05em; font-weight: 900; }

/* The reveal docks under the visual for 2,5 s; the graph or chart shrinks to make room, so nothing is covered. */
.buzzer-reveal { flex: none; gap: 4px; margin-top: auto; padding: 12px 16px; color: var(--ink); background: var(--green-tint); border: 2px solid var(--green-base); border-radius: 18px; box-shadow: var(--shadow-md); }
.buzzer-reveal:not([hidden]) { display: grid; animation: buzzer-reveal .32s cubic-bezier(.2, .9, .3, 1); }
@keyframes buzzer-reveal { from { opacity: 0; transform: translateY(16px); } }
.buzzer-reveal p { margin: 0; }
.buzzer-reveal__answer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.buzzer-reveal__answer span { color: var(--green-ink); font-size: 14px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.buzzer-reveal__answer strong { font-size: clamp(24px, 2.3vw, 32px); font-weight: 900; }
.buzzer-reveal__who { color: var(--ink); font-size: 16px; font-weight: 850; }
.buzzer-reveal__why { color: var(--ink-2); font-size: 15px; font-weight: 650; line-height: 1.35; }

/* The empty option area before a buzz: the scoring in three quiet lines. */
.buzzer-hint { display: grid; gap: 6px; margin: 4px 0 0; padding: 12px 14px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1.5px dashed var(--side-line); border-radius: 14px; list-style: none; font-size: 15px; font-weight: 700; line-height: 1.3; }
.buzzer-hint b { color: var(--ink); font-weight: 900; }
.buzzer-hint kbd { padding: 0 6px; color: var(--side-ink); background: var(--surface); border: 1.5px solid var(--side-line); border-bottom-width: 3px; border-radius: 6px; font: 800 13px/1.4 var(--font-sans); }

/* Dark theme: dark text on the lighter dark-theme pad colours, a lifted clock capsule. */
html[data-theme="dark"] .buzzer-side.is-open .buzzer-pad { color: #0b1628; }
html[data-theme="dark"] .buzzer-timer strong { color: var(--ink); background: var(--surface-3); border-color: var(--line-strong); }
html[data-theme="dark"] .buzzer-option kbd { color: #0b1628; }

/* ---------- Referee and pause ---------- */
.buzzer-arena > .referee-region { position: absolute; z-index: 8; pointer-events: none; }
#arenaDialog:not([data-referee-phase="playing"]) .buzzer-arena > .referee-region, #arenaDialog .buzzer-arena > .referee-region[data-count] { top: 50%; left: 50%; display: grid; width: min(300px, calc(100% - 24px)); padding: 12px 16px; gap: 6px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 30px rgba(15, 23, 42, .18); transform: translate(-50%, -50%); }
#arenaDialog:not([data-referee-phase="playing"]) .buzzer-arena > .referee-region .referee-art, #arenaDialog .buzzer-arena > .referee-region[data-count] .referee-art { width: 176px; margin: 0 auto; }
#arenaDialog .buzzer-arena > .referee-region[data-count]:not([data-count="BAŞLA!"]) .referee-art { translate: calc(-.2 * 176px) 0; }
#arenaDialog .buzzer-arena > .referee-region .referee-message { min-height: 0; font-size: 14px; text-align: center; }
#arenaDialog[data-referee-phase="playing"] .buzzer-arena > .referee-region:not([data-count]) { top: -2px; left: 50%; width: 46px; transform: translateX(-50%); }
#arenaDialog[data-referee-phase="playing"] .buzzer-arena > .referee-region:not([data-count]) .referee-art { width: 46px; }
#arenaDialog[data-referee-phase="playing"] .buzzer-arena > .referee-region:not([data-count]) .referee-message { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#arenaDialog.is-finished .buzzer-arena > .referee-region { display: none; }
.buzzer-arena > .arena-paused { position: absolute; top: 50%; left: 50%; z-index: 9; width: min(360px, calc(100% - 32px)); padding: 22px 20px; background: var(--glass-strong); border: 2px solid var(--line-strong); border-radius: 22px; box-shadow: var(--shadow-lg); transform: translate(-50%, -50%); }
.buzzer-arena > .arena-paused h3 { margin: 0 0 12px; }
.buzzer-arena.is-paused .buzzer-stage { opacity: .6; }
.arena-dialog.live-surface .buzzer-arena > .arena-paused { pointer-events: auto; }

/* Pre-game plates sit over each half; they never widen the dialog, and on phones they shrink to the half. */
#arenaDialog:has(.buzzer-arena) > .pregame-plates { overflow: hidden; }

/* ---------- Result ---------- */
.buzzer-chart__zero line { stroke: var(--ink-3); stroke-dasharray: none; }

/* ---------- High contrast: solid outlines for the active half, dashed for the waiting one ---------- */
body.high-contrast .buzzer-side, body.high-contrast .buzzer-card, body.high-contrast .buzzer-option, body.high-contrast .buzzer-pad { border-color: var(--ink); }
body.high-contrast .buzzer-side.is-owner, body.high-contrast .buzzer-side.is-stealing { outline: 4px solid var(--ink); outline-offset: 2px; }
body.high-contrast .buzzer-side.is-waiting { opacity: 1; border-style: dashed; }
body.high-contrast .buzzer-side.is-open .buzzer-pad { color: #fff; background: var(--ink); }
body.high-contrast .buzzer-side.is-locked .buzzer-pad { color: var(--ink); background: repeating-linear-gradient(135deg, var(--ink) 0 3px, #fff 3px 14px); border: 4px dashed var(--ink); }
body.high-contrast .buzzer-side.is-locked .buzzer-pad__label { padding: 2px 10px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 10px; }
body.high-contrast .buzzer-lock-note { color: var(--ink); background: #fff; border: 2px solid var(--ink); }
body.high-contrast .buzzer-reveal { background: #fff; border: 3px solid var(--ink); }
body.high-contrast .buzzer-part.is-shaded, body.high-contrast .buzzer-bar__fill { fill: var(--ink); }

/* ---------- Smaller screens: the card on top, the two halves side by side below ---------- */
@media (max-width: 900px) {
  #arenaBody:has(> .buzzer-arena) { overflow: auto; padding: 8px; }
  .buzzer-stage { gap: 8px; }
  .buzzer-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; min-height: 0; }
  .buzzer-dots { display: none; }
  .buzzer-bar__round { padding: 4px 10px; font-size: 14px; }
  .buzzer-bar__phase { overflow: hidden; font-size: 14px; text-overflow: ellipsis; }
  .buzzer-timer { min-width: 0; }
  .buzzer-timer strong { padding: 4px 12px; font-size: 19px; }
  .buzzer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "card card" "s0 s1"; gap: 8px; }
  .buzzer-centre { grid-area: card; }
  #buzzerSide0 { grid-area: s0; }
  #buzzerSide1 { grid-area: s1; }
  .buzzer-card { flex: none; padding: 12px 12px 10px; border-radius: 18px; }
  .buzzer-card__prompt, .buzzer-card__prompt.is-long { font-size: 16px; }
  .buzzer-card__prompt.is-big { font-size: 20px; }
  .buzzer-visual svg { max-height: 260px; }
  .buzzer-table { font-size: 13px; border-radius: 10px; }
  .buzzer-tables:not(.is-many) .buzzer-table { font-size: 15px; }
  .buzzer-table th, .buzzer-table td { padding: 4px 3px; }
  .buzzer-table__tag { padding-inline: 6px !important; }
  .buzzer-table__head { white-space: normal; font-size: .75em; }
  .buzzer-reveal { right: 8px; bottom: 8px; left: 8px; padding: 8px 10px; }
  .buzzer-reveal__why { font-size: 13px; }
  .buzzer-side { gap: 6px; padding: 8px; border-radius: 16px; }
  .buzzer-side__head { flex-direction: column; align-items: stretch; min-height: 0; gap: 2px; }
  .buzzer-side__points { justify-items: start; }
  /* The points row spans the narrow half, so the delta rides its right end, inside the lane. */
  .buzzer-side__delta { top: 0; }
  .buzzer-pad { min-height: 56px; border-radius: 18px; }
  .buzzer-pad__label { font-size: 20px; }
  .buzzer-side.is-bot .buzzer-pad { min-height: 48px; }
  .buzzer-side__note { font-size: 12px; }
  .buzzer-lock-note { padding: 1px 6px; font-size: 12px; }
  .buzzer-option { gap: 6px; min-height: 48px; padding: 6px 8px; border-radius: 12px; }
  .buzzer-option kbd { width: 24px; height: 24px; font-size: 13px; }
  .buzzer-option__text { font-size: 16px; }
  .buzzer-hint { padding: 8px; font-size: 12px; }
  .buzzer-pad__key { display: none; }
  #arenaDialog[data-referee-phase="playing"] .buzzer-arena > .referee-region:not([data-count]) { display: none; }
  #arenaDialog:has(.buzzer-arena) .pregame-plate { overflow: hidden; padding: 6px 10px; }
  #arenaDialog:has(.buzzer-arena) .pregame-plate__line { font-size: 20px; }
  #arenaDialog:has(.buzzer-arena) .pregame-plate small { font-size: 11px; }
}

/* ---------- Reduced motion (setting or OS): nothing on the stage transitions or animates ---------- */
body.reduced-motion .buzzer-stage, body.reduced-motion .buzzer-stage *, body.reduced-motion .buzzer-stage *::before, body.reduced-motion .buzzer-stage *::after { transition: none !important; animation: none !important; }
body.reduced-motion .buzzer-side.is-open .buzzer-pad { outline: 4px solid var(--side); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .buzzer-stage, .buzzer-stage *, .buzzer-stage *::before, .buzzer-stage *::after { transition: none !important; animation: none !important; }
  .buzzer-side.is-open .buzzer-pad { outline: 4px solid var(--side); outline-offset: 3px; }
}
