:root {
  color-scheme: dark;
  --bg: #08070d;
  --surface: #111018;
  --surface-strong: #17151f;
  --surface-soft: #201d29;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f4f8;
  --muted: #a6a1ad;
  --accent: #ee243c;
  --accent-deep: #a80f28;
  --gold: #ffc857;
  --mint: #48d6a1;
  --blue: #7ca7ff;
  --danger: #ff6b75;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(238, 36, 60, 0.16), transparent 42%),
    linear-gradient(180deg, #09080e 0%, #07070b 100%);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(124, 167, 255, 0.78);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.12;
  pointer-events: none;
}

.ambient-one {
  top: 10%;
  left: -180px;
  background: var(--accent);
}

.ambient-two {
  right: -220px;
  bottom: -100px;
  background: #5539ff;
}

.app-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px;
}

.setup-screen {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-lockup,
.game-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  margin: 0 0 24px 4px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--accent);
  box-shadow: 0 10px 34px rgba(238, 36, 60, 0.36);
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: -0.08em;
  transform: skew(-5deg);
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 1.2rem;
}

.brand-lockup h1 {
  margin: 1px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.05em;
}

.kicker,
.show-index {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 14, 21, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.setup-panel {
  padding: clamp(28px, 5vw, 64px);
}

.setup-intro {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(238, 36, 60, 0.15), transparent 44%),
    repeating-linear-gradient(120deg, transparent 0 34px, rgba(255, 255, 255, 0.018) 34px 35px);
}

.setup-intro::after {
  content: "?";
  position: absolute;
  right: -28px;
  bottom: -88px;
  color: rgba(255, 255, 255, 0.025);
  font-size: 26rem;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.setup-intro h2 {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 22px 0;
  font-size: clamp(2.7rem, 6vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.setup-intro h2 em {
  color: var(--accent);
  font-style: normal;
}

.setup-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 0 0 42px;
  color: #c8c3cc;
  font-size: 1.06rem;
  line-height: 1.65;
}

.round-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.round-preview li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.028);
}

.round-preview li > span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
}

.round-preview strong {
  font-size: 1rem;
}

.round-preview small {
  color: var(--muted);
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  background: rgba(7, 7, 11, 0.46);
}

.field-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group > label,
.field-group > legend,
.field-heading legend {
  display: block;
  margin-bottom: 10px;
  color: #ddd8e1;
  font-size: 0.88rem;
  font-weight: 750;
}

input[type="text"],
input[type="number"],
.field-group > input {
  width: 100%;
  min-height: 49px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease;
}

input:hover,
input:focus {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.065);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: flex;
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  transition: 160ms ease;
}

.segmented-control small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.segmented-control input:checked + span {
  border-color: rgba(238, 36, 60, 0.74);
  background: rgba(238, 36, 60, 0.11);
  box-shadow: inset 0 0 0 1px rgba(238, 36, 60, 0.24);
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-button {
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.player-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.player-input-row {
  display: flex;
  gap: 6px;
}

.player-input-row input {
  min-width: 0;
}

.remove-player {
  width: 46px;
  flex: 0 0 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-action,
.secondary-action,
.danger-action,
.ghost-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 19px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 820;
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease;
}

.primary-action:hover,
.secondary-action:hover,
.danger-action:hover,
.ghost-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.primary-action {
  border: 1px solid var(--accent);
  color: white;
  background: linear-gradient(135deg, #f42a43, #bd112c);
  box-shadow: 0 10px 30px rgba(238, 36, 60, 0.22);
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
}

.ghost-action {
  border: 1px solid var(--line);
  color: #d9d4dc;
  background: transparent;
}

.danger-action {
  border: 1px solid rgba(255, 107, 117, 0.3);
  color: #ffabb1;
  background: rgba(255, 107, 117, 0.08);
}

.start-action {
  width: 100%;
  min-height: 56px;
  margin-top: auto;
  font-size: 1rem;
}

.start-action span {
  margin-left: auto;
  font-size: 1.4rem;
}

/* Game */
.game-screen {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.game-header,
.moderator-dock {
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 15, 22, 0.88);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.game-header {
  grid-template-columns: 1fr auto 1fr;
  min-height: 68px;
  padding: 10px 16px;
}

.game-brand strong,
.game-brand small {
  display: block;
}

.game-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.round-status {
  text-align: center;
}

.round-status span,
.round-status strong {
  display: block;
}

.round-status span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.round-status strong {
  margin-top: 2px;
  font-size: 1.05rem;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.timer,
.icon-action {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.timer {
  display: flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.timer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.timer.is-running .timer-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(238, 36, 60, 0.12);
  animation: pulse 1.4s ease-in-out infinite;
}

.timer.is-low {
  border-color: rgba(255, 200, 87, 0.45);
  color: var(--gold);
}

@keyframes pulse {
  50% { opacity: 0.42; }
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  cursor: pointer;
  color: #dcd7e0;
}

.game-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}

.scoreboard,
.stage {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 14, 20, 0.78);
}

.scoreboard {
  overflow: auto;
  padding: 14px;
}

.scoreboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 5px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-score {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  margin-bottom: 8px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
}

.player-score.is-active {
  border-color: rgba(238, 36, 60, 0.62);
  background: linear-gradient(90deg, rgba(238, 36, 60, 0.13), rgba(255, 255, 255, 0.025));
}

.player-score.is-answered::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #06110d;
  background: var(--mint);
  font-size: 0.7rem;
  font-weight: 900;
}

.player-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--player-color, #4f46e5);
  font-weight: 900;
}

.player-score-name {
  min-width: 0;
}

.player-score-name strong,
.player-score-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.player-points {
  padding-right: 3px;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.stage {
  position: relative;
  display: flex;
  min-height: 570px;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(238, 36, 60, 0.07), transparent 38%),
    radial-gradient(circle at 72% 110%, rgba(84, 57, 255, 0.13), transparent 45%),
    #0e0d14;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  pointer-events: none;
}

.stage-topline {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.phase-pill {
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffbbc3;
  background: rgba(238, 36, 60, 0.1);
  font-weight: 820;
  letter-spacing: 0.04em;
}

.stage-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 72px);
}

.round-intro {
  max-width: 900px;
}

.round-number {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.round-intro h2,
.end-screen h2 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.round-intro p,
.end-screen p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #c6c0ca;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.weight-badge {
  display: inline-flex;
  margin-top: 30px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 200, 87, 0.28);
  border-radius: 9px;
  color: var(--gold);
  background: rgba(255, 200, 87, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
}

.question-card {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.question-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.question-card h2 {
  margin: 0;
  text-wrap: balance;
  font-size: clamp(2rem, 5.3vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.answer-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 38px;
}

.answer-status {
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.028);
}

button.answer-status {
  cursor: pointer;
}

button.answer-status:hover {
  border-color: rgba(238, 36, 60, 0.65);
  background: rgba(238, 36, 60, 0.08);
}

.answer-status.is-done {
  border-color: rgba(72, 214, 161, 0.32);
  background: rgba(72, 214, 161, 0.06);
}

.answer-status strong,
.answer-status small {
  display: block;
}

.answer-status small {
  margin-top: 9px;
  color: var(--muted);
}

.answer-status:disabled {
  cursor: default;
  opacity: 0.72;
}

.inline-answer-panel,
.moderator-verdict {
  width: min(880px, 100%);
  margin: 18px auto 0;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(6, 6, 10, 0.54);
}

.inline-answer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.inline-answer-heading span,
.submitted-answer span,
.solution-peek span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.inline-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.inline-response-input {
  min-width: 0;
  min-height: 52px;
  font-size: 1rem;
}

.inline-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.inline-choice {
  display: grid;
  min-height: 58px;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.inline-choice:hover {
  border-color: rgba(238, 36, 60, 0.62);
  background: rgba(238, 36, 60, 0.08);
}

.inline-choice b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #ffb9c2;
  background: rgba(238, 36, 60, 0.12);
}

.inline-answer-note {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
}

.moderator-verdict {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-color: rgba(255, 200, 87, 0.3);
}

.submitted-answer,
.solution-peek {
  min-width: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.submitted-answer strong,
.submitted-answer span,
.solution-peek strong,
.solution-peek span {
  display: block;
}

.submitted-answer strong,
.solution-peek strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.solution-peek {
  border: 1px solid rgba(255, 200, 87, 0.24);
}

.solution-peek strong {
  color: var(--gold);
}

.verdict-actions {
  display: flex;
  gap: 7px;
}

.correct-action {
  border-color: rgba(72, 214, 161, 0.55);
  background: linear-gradient(135deg, #16a677, #08704f);
  box-shadow: none;
}

.suspense-screen {
  text-align: center;
}

.suspense-screen .count-mark {
  display: grid;
  width: clamp(150px, 25vw, 260px);
  aspect-ratio: 1;
  margin: 0 auto 28px;
  place-items: center;
  border: 2px solid rgba(238, 36, 60, 0.52);
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle, rgba(238, 36, 60, 0.16), transparent 64%);
  box-shadow: 0 0 90px rgba(238, 36, 60, 0.13);
  font-size: clamp(5rem, 13vw, 9rem);
  font-weight: 950;
}

.suspense-screen h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

.suspense-screen p {
  color: var(--muted);
}

.reveal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.reveal-option {
  position: relative;
  min-height: 76px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.028);
}

.reveal-option.is-correct {
  border-color: rgba(72, 214, 161, 0.68);
  background: linear-gradient(135deg, rgba(72, 214, 161, 0.16), rgba(72, 214, 161, 0.04));
}

.reveal-option strong,
.reveal-option small {
  display: block;
}

.reveal-option small {
  margin-top: 5px;
  color: var(--muted);
}

.source-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.estimate-results,
.score-deltas {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.estimate-result,
.score-delta {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.028);
}

.estimate-result:first-child,
.score-delta.is-positive {
  border-color: rgba(72, 214, 161, 0.34);
}

.estimate-result b {
  color: var(--muted);
  font-size: 0.8rem;
}

.delta-positive { color: var(--mint); }
.delta-negative { color: var(--danger); }

.turn-banner {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 13px;
  width: min(1050px, 100%);
  margin: 0 auto 16px;
  padding: 12px 14px;
  border: 1px solid rgba(238, 36, 60, 0.52);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(238, 36, 60, 0.15), rgba(255, 255, 255, 0.025));
}

.turn-banner span,
.turn-banner strong {
  display: block;
}

.turn-banner span {
  color: #ffabb5;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn-banner strong {
  margin-top: 2px;
  font-size: 1.08rem;
}

.turn-banner p {
  margin: 0;
  color: var(--muted);
}

.grid-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(1050px, 100%);
  margin: 0 auto;
}

.grid-column {
  display: grid;
  gap: 8px;
}

.grid-category {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(238, 36, 60, 0.4);
  border-radius: 12px;
  text-align: center;
  background: linear-gradient(135deg, rgba(238, 36, 60, 0.23), rgba(113, 16, 44, 0.13));
  font-weight: 850;
}

.grid-tile {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 900;
  transition: 140ms ease;
}

.grid-tile:hover:not(:disabled) {
  border-color: rgba(255, 200, 87, 0.55);
  background: rgba(255, 200, 87, 0.08);
  transform: translateY(-2px);
}

.grid-tile:disabled {
  color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.01);
  cursor: not-allowed;
}

.chooser-callout {
  margin: 0 auto 22px;
  color: var(--muted);
  text-align: center;
}

.chooser-callout strong {
  color: var(--text);
}

.moderator-dock {
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 16px;
  min-height: 74px;
  padding: 10px 12px 10px 18px;
}

.dock-context span,
.dock-context strong {
  display: block;
}

.dock-context span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dock-context strong {
  margin-top: 3px;
  font-size: 0.86rem;
}

.dock-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dock-actions button {
  min-height: 42px;
}

.grid-answer-results {
  display: grid;
  gap: 9px;
  margin-top: 28px;
}

.grid-answer-result {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 2fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.028);
}

.grid-answer-result span {
  color: var(--muted);
  font-size: 0.78rem;
}

.grid-answer-result.is-correct {
  border-color: rgba(72, 214, 161, 0.46);
}

.grid-answer-result.is-correct b {
  color: var(--mint);
}

.grid-answer-result.is-wrong {
  border-color: rgba(255, 107, 117, 0.38);
}

.grid-answer-result.is-wrong b {
  color: var(--danger);
}

.end-screen {
  text-align: center;
}

.winner-card {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 34px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  border-radius: 15px;
  background: rgba(255, 200, 87, 0.08);
}

.winner-card .player-avatar {
  width: 50px;
  height: 50px;
}

.winner-card strong,
.winner-card small {
  display: block;
  text-align: left;
}

.winner-card small {
  color: var(--gold);
}

.exit-stage {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(14, 13, 20, 0.9);
  cursor: pointer;
}

body.stage-only .app-shell {
  width: 100%;
  padding: 0;
}

body.stage-only .game-screen {
  min-height: 100vh;
  grid-template-rows: 1fr;
  gap: 0;
}

body.stage-only .game-header,
body.stage-only .scoreboard,
body.stage-only .moderator-dock {
  display: none;
}

body.stage-only .game-layout {
  display: block;
}

body.stage-only .stage {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

body.stage-only .stage-content {
  padding: clamp(36px, 7vw, 110px);
}

body.stage-only .exit-stage {
  display: block !important;
}

@media (max-width: 980px) {
  .app-shell { padding: 18px; }
  .setup-screen { min-height: calc(100vh - 36px); }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-intro { border-right: 0; border-bottom: 1px solid var(--line); }
  .setup-intro h2 { font-size: clamp(3rem, 11vw, 5.5rem); }
  .game-screen { min-height: calc(100vh - 36px); }
  .game-layout { grid-template-columns: 1fr; }
  .scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
  }
  .scoreboard-heading { grid-column: 1 / -1; }
  .player-score { margin: 0; }
  .moderator-dock { grid-template-columns: 1fr; }
  .dock-actions { justify-content: flex-start; }
  .moderator-verdict { grid-template-columns: 1fr 1fr; }
  .verdict-actions { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .app-shell { padding: 10px; }
  .setup-screen { min-height: calc(100vh - 20px); }
  .brand-lockup { margin-top: 12px; }
  .setup-panel { padding: 24px 20px; }
  .setup-intro h2 { font-size: 3.15rem; }
  .round-preview li { grid-template-columns: 34px 1fr; }
  .round-preview small { display: none; }
  .segmented-control,
  .player-inputs,
  .reveal-options,
  .inline-choice-grid,
  .inline-input-row,
  .moderator-verdict { grid-template-columns: 1fr; }
  .game-header { grid-template-columns: 1fr auto; }
  .round-status { display: none; }
  .action-label { display: none; }
  .game-layout { gap: 10px; }
  .scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; }
  .player-score { grid-template-columns: 34px 1fr; min-height: 56px; padding: 7px; }
  .player-avatar { width: 34px; height: 34px; border-radius: 9px; font-size: 0.8rem; }
  .player-points { grid-column: 2; font-size: 0.82rem; }
  .player-score-name small { display: none; }
  .stage { min-height: 540px; }
  .stage-content { padding: 24px 18px; }
  .question-card h2 { font-size: 2.2rem; }
  .answer-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; }
  .grid-board { grid-template-columns: 1fr; }
  .grid-column { grid-template-columns: repeat(4, 1fr); }
  .grid-category { grid-column: 1 / -1; min-height: 48px; }
  .grid-tile { min-height: 52px; font-size: 1rem; }
  .turn-banner { grid-template-columns: 42px 1fr; }
  .turn-banner p { display: none; }
  .verdict-actions { grid-column: auto; }
  .grid-answer-result { grid-template-columns: 1fr auto; }
  .grid-answer-result strong { grid-column: 1 / -1; grid-row: 2; }
  .moderator-dock { padding: 12px; }
  .dock-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock-actions button { width: 100%; padding: 0 10px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.online-test-banner {
  margin-bottom: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(238, 36, 60, 0.34);
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(238, 36, 60, 0.15), rgba(22, 141, 255, 0.08));
}

.online-test-banner span,
.online-test-banner strong { display: block; }
.online-test-banner > div > span { margin-bottom: 4px; color: var(--red); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; }
.online-test-banner a { flex: 0 0 auto; padding: 12px 16px; border-radius: 10px; color: white; background: var(--red); font-weight: 850; text-decoration: none; }

@media (max-width: 680px) {
  .online-test-banner { align-items: stretch; flex-direction: column; }
  .online-test-banner a { text-align: center; }
}
