:root {
  --night: #0b1328;
  --night-deep: #060914;
  --ink: #121827;
  --ivory: #fff8e8;
  --paper: #fffdf5;
  --muted: #aeb8c9;
  --gold: #f4bd45;
  --gold-soft: #ffe29a;
  --crimson: #b9272d;
  --blue: #2657c8;
  --aqua: #2ec8bd;
  --line: rgba(255, 255, 255, 0.18);
  --line-dark: rgba(21, 29, 47, 0.16);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(circle at 12% 18%, rgba(180, 39, 45, 0.22), transparent 25rem),
    linear-gradient(90deg, rgba(4, 7, 19, 0.93) 0%, rgba(10, 18, 39, 0.86) 48%, rgba(9, 12, 25, 0.42) 100%),
    url("biology-page-race-arena.png") center / cover fixed no-repeat;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 226, 154, 0.62);
  background: rgba(255, 255, 255, 0.16);
}

button:active {
  transform: translateY(0);
}

button.primary {
  border-color: rgba(255, 226, 154, 0.3);
  color: #1b0d09;
  background: linear-gradient(135deg, #fff0b7 0%, var(--gold) 56%, #d98b20 100%);
  box-shadow: 0 16px 38px rgba(244, 189, 69, 0.24);
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--ivory);
  background: rgba(7, 12, 27, 0.78);
  outline: none;
}

input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--gold);
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
  min-height: 100vh;
  padding: clamp(14px, 1.7vw, 26px);
}

.arena-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.event-mark {
  min-width: 0;
}

.event-season {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

h1 {
  margin: 2px 0 0;
  font-size: clamp(2.55rem, 4.7vw, 5.05rem);
  line-height: 1;
  font-weight: 950;
  text-wrap: balance;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.header-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 420px;
}

.header-metrics span {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 226, 154, 0.32);
  border-radius: 999px;
  color: var(--ivory);
  background: rgba(9, 16, 34, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  font-weight: 900;
}

.competition-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
  align-items: stretch;
  gap: clamp(14px, 2vw, 28px);
  min-height: 0;
}

.main-stage {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: clamp(10px, 1.35vw, 16px);
  min-height: 0;
  min-width: 0;
}

.stage-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 920px);
  min-height: 50px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 226, 154, 0.34);
  border-left: 8px solid var(--crimson);
  border-radius: 8px;
  background: rgba(8, 13, 29, 0.74);
  box-shadow: var(--shadow);
}

.stage-ribbon span {
  color: var(--gold-soft);
  font-size: 1.06rem;
  font-weight: 950;
}

.stage-ribbon strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-panel {
  position: relative;
  overflow: hidden;
  width: min(100%, 980px);
  min-height: clamp(280px, 43vh, 440px);
  padding: clamp(18px, 2.7vw, 38px);
  border: 1px solid rgba(255, 238, 194, 0.82);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 253, 245, 0.98), rgba(255, 246, 221, 0.94)),
    radial-gradient(circle at 88% 18%, rgba(244, 189, 69, 0.2), transparent 18rem);
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.42),
    inset 0 0 0 7px rgba(255, 255, 255, 0.44);
}

.question-panel.is-preparing {
  border-color: rgba(244, 189, 69, 0.95);
}

.question-panel::before {
  content: "";
  position: absolute;
  inset: 14px 16px auto auto;
  width: 96px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
}

.question-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(14px, 2vw, 24px);
  color: #7b251f;
  font-weight: 950;
}

.question-topline span {
  min-height: 32px;
  font-size: 1.1rem;
}

.question-text {
  margin: 0;
  max-width: 20em;
  color: #09101c;
  font-size: clamp(2.25rem, 4.25vw, 4.85rem);
  line-height: 1.12;
  font-weight: 950;
  text-wrap: balance;
}

.question-text.is-long {
  font-size: clamp(2rem, 3.45vw, 3.95rem);
  line-height: 1.16;
}

.question-text.is-very-long {
  font-size: clamp(1.7rem, 2.85vw, 3.25rem);
  line-height: 1.22;
}

.question-text.is-ultra-long {
  font-size: clamp(1.45rem, 2.35vw, 2.7rem);
  line-height: 1.28;
}

.question-source {
  margin-top: clamp(14px, 2vw, 24px);
  padding-top: 12px;
  border-top: 1px solid var(--line-dark);
  color: #3f4c60;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  font-weight: 800;
}

.countdown-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  color: var(--ivory);
  background:
    radial-gradient(circle at center, rgba(185, 39, 45, 0.42), transparent 18rem),
    rgba(7, 10, 22, 0.82);
  text-align: center;
}

.countdown-overlay span {
  display: block;
  color: var(--gold-soft);
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  font-weight: 950;
}

.countdown-overlay strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(6rem, 14vw, 12rem);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  text-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
}

.answer-dock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "label answer"
    "reveal reveal";
  align-items: center;
  gap: 12px 20px;
  width: min(100%, 980px);
  min-height: 132px;
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid rgba(255, 226, 154, 0.42);
  border-radius: 8px;
  background: rgba(9, 14, 29, 0.82);
  box-shadow: var(--shadow);
}

.answer-label {
  grid-area: label;
  color: var(--gold-soft);
  font-size: 1.08rem;
  font-weight: 950;
}

#page-answer {
  grid-area: answer;
  min-width: 0;
  color: #ffffff;
  font-size: clamp(2.45rem, 5.4vw, 6rem);
  line-height: 1;
  font-weight: 950;
  text-align: right;
  overflow-wrap: anywhere;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

#page-answer.is-long-answer {
  font-size: clamp(2rem, 4.2vw, 4.6rem);
  line-height: 1.02;
}

#page-answer.is-very-long-answer {
  font-size: clamp(1.55rem, 3.3vw, 3.55rem);
  line-height: 1.08;
}

.answer-reveal {
  grid-area: reveal;
  display: grid;
  min-width: 0;
}

.reveal-button {
  min-height: 54px;
  border-color: rgba(255, 238, 194, 0.8);
  color: #1a0c07;
  background: linear-gradient(135deg, #fff4c5 0%, var(--gold) 48%, #d8841f 100%);
  box-shadow:
    0 14px 34px rgba(244, 189, 69, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  font-size: clamp(1.18rem, 1.7vw, 1.45rem);
}

.reveal-button:disabled {
  transform: none;
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 248, 232, 0.56);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: default;
}

.reveal-slide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 238, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.reveal-slide span {
  color: var(--gold-soft);
  font-size: 1.08rem;
  font-weight: 950;
  white-space: nowrap;
}

.reveal-slide input[type="range"] {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--gold);
  appearance: none;
}

.reveal-slide input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua), var(--gold), var(--crimson));
}

.reveal-slide input[type="range"]::-webkit-slider-thumb {
  width: 42px;
  height: 42px;
  margin-top: -15px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8df, var(--gold));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  appearance: none;
}

.reveal-slide input[type="range"]::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua), var(--gold), var(--crimson));
}

.reveal-slide input[type="range"]::-moz-range-thumb {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8df, var(--gold));
}

.reveal-slide input[type="range"]:disabled {
  opacity: 0.46;
}

.answer-dock.revealed {
  border-color: rgba(255, 226, 154, 0.92);
  background:
    linear-gradient(135deg, rgba(112, 24, 28, 0.88), rgba(134, 75, 20, 0.84)),
    rgba(9, 14, 29, 0.82);
}

.presenter-console {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: clamp(12px, 1.4vw, 18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 18, 37, 0.88), rgba(7, 10, 22, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.control-row {
  display: grid;
  gap: 5px;
}

.control-row label {
  color: #f6e5ba;
  font-size: 1.02rem;
  font-weight: 900;
}

.rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 226, 154, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.rule-row span {
  display: block;
  color: #f6e5ba;
  font-size: 0.9rem;
  font-weight: 900;
}

.rule-row strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ivory);
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-row button {
  min-width: 82px;
}

.timer-panel {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 226, 154, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(9, 16, 34, 0.72);
}

.timer-panel span {
  color: var(--gold-soft);
  font-size: 0.9rem;
  font-weight: 950;
}

.timer-panel strong {
  color: #fff6d4;
  font-size: clamp(3.05rem, 5.1vw, 4.35rem);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  text-align: center;
}

.timer-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

#timer-progress {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--gold), var(--crimson));
  transition: width 220ms linear;
}

.timer-panel.is-urgent {
  border-color: rgba(185, 39, 45, 0.72);
  box-shadow: 0 0 0 1px rgba(185, 39, 45, 0.18), 0 0 36px rgba(185, 39, 45, 0.22);
}

.primary-actions,
.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.score-tile {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.score-tile span {
  display: block;
  color: #d8e9ff;
  font-size: 0.95rem;
  font-weight: 900;
}

.score-tile strong {
  display: block;
  margin-top: 8px;
  color: var(--ivory);
  font-size: 2.15rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 7, 19, 0.72);
  backdrop-filter: blur(12px);
}

.settings-dialog {
  width: min(100%, 560px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 226, 154, 0.34);
  border-radius: 8px;
  color: var(--ivory);
  background: linear-gradient(180deg, rgba(12, 18, 37, 0.98), rgba(7, 10, 22, 0.96));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

.settings-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.settings-dialog header span {
  color: var(--gold-soft);
  font-size: 0.92rem;
  font-weight: 950;
}

.settings-dialog h2 {
  margin: 4px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-grid label {
  display: grid;
  gap: 7px;
  color: #f6e5ba;
  font-weight: 900;
}

.settings-grid label > span {
  font-size: 1rem;
}

.toggle-row {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.settings-dialog footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

@media (min-width: 760px) {
  html,
  body {
    overflow: hidden;
  }

  .app-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .presenter-console {
    max-height: 100%;
    overflow: hidden;
  }

  button {
    min-height: 42px;
    font-size: 1.06rem;
  }

  select {
    min-height: 42px;
    font-size: 1.06rem;
  }
}

@media (min-width: 760px) and (max-height: 780px) {
  .app-shell {
    gap: 8px;
    padding: 12px 20px;
  }

  .event-season {
    min-height: 20px;
  }

  h1 {
    font-size: clamp(2.2rem, 4.2vw, 4.5rem);
  }

  .header-metrics span {
    min-height: 36px;
    padding: 8px 14px;
  }

  .question-panel {
    min-height: 275px;
    padding: 18px 34px;
  }

  .question-text {
    font-size: clamp(2.1rem, 4vw, 4.25rem);
  }

  .question-text.is-long {
    font-size: clamp(1.82rem, 3.15vw, 3.55rem);
  }

  .question-text.is-very-long {
    font-size: clamp(1.58rem, 2.6vw, 3rem);
  }

  .question-text.is-ultra-long {
    font-size: clamp(1.38rem, 2.25vw, 2.48rem);
  }

  .answer-dock {
    min-height: 116px;
    gap: 8px 16px;
  }

  #page-answer {
    font-size: clamp(2.2rem, 4.8vw, 5rem);
  }

  .timer-panel {
    padding: 10px 14px;
  }

  .timer-panel strong {
    font-size: clamp(2.75rem, 4.6vw, 3.75rem);
  }

  .presenter-console {
    gap: 6px;
    padding: 10px 12px;
  }

  .primary-actions button,
  .secondary-actions button,
  .reveal-button {
    min-height: 38px;
  }

  .reveal-slide {
    min-height: 42px;
    padding: 5px 10px;
  }

  .control-row {
    gap: 2px;
  }

  .control-row label,
  .rule-row span,
  .timer-panel span,
  .score-tile span {
    font-size: 0.86rem;
  }

  .rule-row {
    min-height: 54px;
    padding: 8px 10px;
  }

  .timer-panel {
    gap: 6px;
    padding: 8px 12px;
  }

  .score-tile {
    min-height: 58px;
    padding: 9px 10px;
  }

  .score-tile strong {
    margin-top: 4px;
    font-size: 1.85rem;
  }
}

@media (min-width: 1500px) {
  .competition-layout {
    grid-template-columns: minmax(0, 1fr) 430px;
  }

  .main-stage,
  .question-panel,
  .answer-dock,
  .stage-ribbon {
    width: min(100%, 1120px);
  }
}

@media (max-width: 759px) {
  body {
    background-position: 62% center;
  }

  .competition-layout {
    grid-template-columns: 1fr;
  }

  .presenter-console {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .control-row,
  .rule-row,
  .timer-panel,
  .scoreboard,
  .primary-actions,
  .secondary-actions {
    grid-column: 1 / -1;
  }

  .timer-panel,
  .scoreboard,
  .primary-actions,
  .secondary-actions,
  .primary-actions,
  .secondary-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  body {
    background-attachment: scroll;
    background-position: 68% center;
  }

  .app-shell {
    height: auto;
    padding: 14px;
  }

  .arena-header {
    flex-direction: column;
  }

  .header-metrics {
    justify-content: flex-start;
    max-width: none;
  }

  .header-metrics span {
    flex: 1 1 150px;
  }

  .main-stage {
    grid-template-rows: auto auto auto;
  }

  .stage-ribbon,
  .answer-dock {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .answer-dock {
    grid-template-areas:
      "label"
      "answer"
      "reveal";
  }

  .stage-ribbon {
    display: grid;
  }

  .stage-ribbon strong {
    white-space: normal;
  }

  .question-panel {
    min-height: 300px;
    padding: 24px;
  }

  .question-text {
    max-width: none;
    font-size: clamp(1.9rem, 8.8vw, 2.9rem);
    line-height: 1.22;
  }

  #page-answer {
    text-align: left;
  }

  .reveal-slide {
    grid-template-columns: 1fr;
  }

  .presenter-console,
  .primary-actions,
  .secondary-actions {
    grid-template-columns: 1fr;
  }

  .timer-panel,
  .scoreboard,
  .primary-actions,
  .secondary-actions,
  .scoreboard {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 2.35rem;
  }

  .event-season {
    font-size: 0.76rem;
  }

  .header-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scoreboard {
    grid-template-columns: 1fr;
  }
}

/* 主站整合包：手机端也保持单屏比赛台，不产生整页滚动。 */
@media (max-width: 720px) {
  html,
  body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body { background-attachment: fixed; }

  .app-shell {
    height: 100dvh;
    min-height: 0;
    gap: 7px;
    overflow: hidden;
    padding: 9px 10px;
  }

  .arena-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px;
    align-items: center;
    gap: 8px;
  }

  .event-season { min-height: 16px; font-size: .58rem; }
  h1 { margin-top: 0; font-size: clamp(1.55rem, 7.2vw, 2rem); line-height: 1.02; }

  .header-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    width: 94px;
  }

  .header-metrics span {
    min-height: 25px;
    padding: 4px 7px;
    overflow: hidden;
    font-size: .66rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .competition-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.58fr) minmax(0, .9fr);
    gap: 7px;
    min-height: 0;
    overflow: hidden;
  }

  .main-stage {
    grid-template-rows: 34px minmax(0, 1fr) 90px;
    gap: 6px;
    overflow: hidden;
  }

  .stage-ribbon {
    display: flex;
    min-height: 0;
    padding: 4px 9px;
    border-left-width: 5px;
  }

  .stage-ribbon span,
  .stage-ribbon strong { font-size: .72rem; white-space: nowrap; }

  .question-panel {
    min-height: 0;
    height: 100%;
    padding: 11px 13px;
  }

  .question-panel::before { inset: 9px 10px auto auto; width: 62px; height: 6px; }
  .question-topline { margin-bottom: 5px; }
  .question-topline span { min-height: 18px; font-size: .72rem; }
  .question-text { font-size: clamp(1.45rem, 6.3vw, 1.9rem); line-height: 1.12; }
  .question-text.is-long { font-size: clamp(1.2rem, 5.2vw, 1.55rem); line-height: 1.16; }
  .question-text.is-very-long { font-size: clamp(1.04rem, 4.45vw, 1.34rem); line-height: 1.18; }
  .question-text.is-ultra-long { font-size: clamp(.9rem, 3.85vw, 1.15rem); line-height: 1.2; }
  .question-source { margin-top: 7px; padding-top: 6px; font-size: .7rem; }

  .answer-dock {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "label answer" "reveal reveal";
    align-items: center;
    gap: 4px 8px;
    min-height: 0;
    padding: 6px 8px;
  }

  .answer-label { font-size: .72rem; }
  #page-answer { overflow: hidden; font-size: 1.45rem; line-height: 1.05; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
  #page-answer.is-long-answer { font-size: 1.08rem; }
  #page-answer.is-very-long-answer { font-size: .86rem; }
  .answer-reveal { min-height: 0; }
  .reveal-button { min-height: 32px; padding: 3px 8px; font-size: .74rem; }
  .reveal-slide { grid-template-columns: auto minmax(0, 1fr); gap: 7px; min-height: 32px; padding: 2px 7px; }
  .reveal-slide span { font-size: .65rem; }
  .reveal-slide input[type="range"] { min-height: 28px; }
  .reveal-slide input[type="range"]::-webkit-slider-runnable-track { height: 8px; }
  .reveal-slide input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -10px; }

  .presenter-console {
    align-self: stretch;
    align-items: stretch;
    display: grid;
    grid-template-columns: .92fr 1fr 1fr;
    grid-template-rows: 52px minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
  }

  .control-row { grid-column: 1; grid-row: 1; gap: 2px; }
  .control-row label,
  .rule-row span,
  .timer-panel span,
  .score-tile span { font-size: .58rem; }
  select { min-height: 32px; padding: 0 6px; font-size: .68rem; }

  .rule-row {
    grid-column: 2 / 4;
    grid-row: 1;
    min-height: 0;
    gap: 4px;
    padding: 4px 6px;
  }

  .rule-row strong { margin-top: 1px; font-size: .68rem; }
  .rule-row button { min-width: 48px; min-height: 32px; font-size: .68rem; }

  .timer-panel {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 0;
    padding: 5px 7px;
  }

  .timer-panel strong { font-size: clamp(1.45rem, 7vw, 2rem); }
  .timer-track { height: 6px; }

  .primary-actions,
  .secondary-actions { grid-template-columns: 1fr 1fr; gap: 4px; }
  .primary-actions { grid-column: 2 / 4; grid-row: 2; }
  .secondary-actions { grid-column: 2 / 4; grid-row: 3; }
  .primary-actions button,
  .secondary-actions button { min-height: 0; padding: 2px 4px; font-size: .67rem; }

  .scoreboard {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
  }

  .score-tile { min-height: 0; padding: 5px 3px; text-align: center; }
  .score-tile strong { margin-top: 3px; font-size: 1rem; }
}
