:root {
  --bg: #05151d;
  --bg-deep: #020a0f;
  --panel: #0a232d;
  --panel-2: #0d2c37;
  --panel-3: #123844;
  --line: rgba(113, 255, 202, 0.2);
  --line-strong: rgba(113, 255, 202, 0.5);
  --mint: #71ffca;
  --mint-deep: #1fbd8c;
  --gold: #ffd166;
  --red: #ff6b6b;
  --paper: #f5fbf9;
  --muted: #9ab3ba;
  --muted-2: #66828b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 3px;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 10% -10%, rgba(21, 164, 124, 0.24), transparent 36rem),
    radial-gradient(circle at 95% 30%, rgba(21, 98, 116, 0.14), transparent 28rem),
    linear-gradient(145deg, var(--bg), #06131a 68%, var(--bg-deep));
  font-family: var(--body);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(113, 255, 202, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 255, 202, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1540px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--mint);
  clip-path: polygon(50% 0, 96% 24%, 84% 80%, 50% 100%, 16% 80%, 4% 24%);
  background: rgba(113, 255, 202, 0.06);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  content: "";
  background: var(--mint);
}

.brand-mark::before {
  width: 12px;
  height: 2px;
  top: 13px;
}

.brand-mark::after {
  width: 2px;
  height: 13px;
  top: 13px;
}

.brand-mark span {
  width: 6px;
  height: 6px;
  top: 20px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.75);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.045em;
}

.brand-copy small,
.source-chip,
.kicker,
.panel-heading,
.question-index,
.results-code {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.14em;
}

.brand-copy small {
  color: var(--muted-2);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.source-chip {
  margin-right: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--mint);
  background: rgba(113, 255, 202, 0.04);
}

.icon-button,
.text-button,
.timer-actions button,
.facilitator-bar button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.76rem;
}

.icon-button:hover {
  border-color: var(--line);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.03);
}

main {
  width: min(1540px, calc(100% - 40px));
  margin: 0 auto;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.setup-screen.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.7fr);
  gap: clamp(42px, 7vw, 110px);
  align-items: center;
  min-height: calc(100vh - 79px);
  padding: 52px 3vw 74px;
}

.setup-hero {
  max-width: 850px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--mint);
  font-weight: 800;
}

.kicker span {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
}

.setup-hero h1,
.results-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 8.1vw, 8.5rem);
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.setup-hero h1 em,
.results-card h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-copy {
  max-width: 650px;
  margin: 30px 0 38px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
}

.rule-callout {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  max-width: 640px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.rule-callout:last-child {
  border-bottom: 1px solid var(--line);
}

.rule-number {
  color: var(--mint);
  font: 800 0.75rem/1 var(--mono);
  letter-spacing: 0.1em;
}

.rule-callout strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.rule-callout p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.8rem;
  line-height: 1.45;
}

.setup-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(12, 43, 54, 0.98), rgba(5, 24, 32, 0.98));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
}

.setup-panel::before,
.setup-panel::after {
  position: absolute;
  width: 18px;
  height: 18px;
  content: "";
  pointer-events: none;
}

.setup-panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--mint);
  border-left: 2px solid var(--mint);
}

.setup-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--mint);
  border-bottom: 2px solid var(--mint);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.status-dot {
  color: var(--mint);
}

.status-dot::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  content: "";
}

#setupForm {
  padding: 26px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset + fieldset {
  margin-top: 24px;
}

legend {
  margin-bottom: 5px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field-help {
  margin: 0 0 15px;
  color: var(--muted-2);
  font-size: 0.76rem;
}

.team-fields {
  display: grid;
  gap: 9px;
}

.team-input-row {
  display: grid;
  grid-template-columns: 37px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(1, 14, 20, 0.45);
}

.team-input-row span {
  display: grid;
  height: 100%;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--mint);
  font: 800 0.72rem/1 var(--mono);
}

.team-input-row input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: var(--paper);
  background: transparent;
}

.team-input-row:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 1px rgba(113, 255, 202, 0.16);
}

.team-input-row input:focus-visible {
  outline: 0;
}

.team-field-actions {
  display: flex;
  gap: 18px;
  margin-top: 12px;
}

.text-button {
  min-height: 44px;
  padding: 4px 0;
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 750;
}

.text-button:hover:not(:disabled) {
  color: var(--paper);
}

.text-button.is-muted {
  color: var(--muted-2);
}

.text-button:disabled {
  opacity: 0.38;
}

.rule-setting {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.toggle-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  cursor: pointer;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  font-size: 0.84rem;
}

.toggle-row small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.73rem;
  line-height: 1.4;
}

.toggle-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: 47px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  transition: 160ms ease;
}

.toggle::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: 160ms ease;
}

.toggle-row input:checked + .toggle {
  border-color: var(--mint);
  background: rgba(113, 255, 202, 0.14);
}

.toggle-row input:checked + .toggle::after {
  left: 25px;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(113, 255, 202, 0.6);
}

.toggle-row input:focus-visible + .toggle {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.form-error {
  min-height: 19px;
  margin: 16px 0 3px;
  color: var(--red);
  font-size: 0.76rem;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid var(--mint);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.primary-button {
  color: var(--bg-deep);
  background: var(--mint);
  box-shadow: 0 8px 28px rgba(44, 229, 172, 0.16);
}

.primary-button:hover {
  background: #a0ffdc;
}

.secondary-button {
  justify-content: center;
  margin-top: 10px;
  color: var(--mint);
  background: transparent;
}

.secondary-button:hover {
  color: var(--paper);
  border-color: var(--paper);
}

/* Game board */

.board-screen.is-active {
  padding: 30px 0 44px;
}

.round-header {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 370px);
  gap: 40px;
  align-items: end;
  margin-bottom: 25px;
}

.round-header .kicker {
  margin-bottom: 10px;
}

.round-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 5.3rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font: 700 0.66rem/1 var(--mono);
  letter-spacing: 0.1em;
}

.progress-label strong {
  color: var(--gold);
}

.progress-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--mint-deep), var(--mint));
  box-shadow: 0 0 10px rgba(113, 255, 202, 0.5);
  transition: width 300ms ease;
}

.score-section {
  margin-bottom: 20px;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.section-label-row h2 {
  margin: 0;
  color: var(--muted);
  font: 750 0.68rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label-row p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.68rem;
}

.active-key {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 9px;
}

.team-card {
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(8, 31, 40, 0.82);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.team-card.is-active {
  border-color: var(--mint);
  background: linear-gradient(135deg, rgba(25, 91, 88, 0.68), rgba(8, 31, 40, 0.92));
  box-shadow: inset 3px 0 var(--mint), 0 0 24px rgba(39, 209, 158, 0.07);
}

.team-select {
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.team-select small,
.team-select strong {
  display: block;
}

.team-select small {
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-select strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.team-card.is-active .team-select small {
  color: var(--mint);
}

.score-controls {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid var(--line);
}

.score-controls button {
  width: 44px;
  min-height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.score-controls button + button {
  border-top: 1px solid var(--line);
}

.score-controls button:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.05);
}

.board-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: var(--mint-deep) rgba(255, 255, 255, 0.05);
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(162px, 1fr));
  min-width: 860px;
  gap: 8px;
}

.category-column {
  display: grid;
  grid-template-rows: 76px repeat(5, minmax(78px, 1fr));
  gap: 8px;
  min-width: 0;
}

.category-title {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  margin: 0;
  padding: 12px 13px;
  overflow: hidden;
  border-top: 1px solid var(--mint);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(19, 57, 68, 0.98), rgba(8, 33, 43, 0.98));
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.category-title::after {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
  content: "";
}

.clue-button {
  position: relative;
  display: grid;
  min-height: 80px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--gold);
  background:
    linear-gradient(145deg, rgba(18, 58, 70, 0.98), rgba(6, 29, 39, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
  letter-spacing: -0.04em;
  transition: 150ms ease;
}

.clue-button::before {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 5px;
  height: 5px;
  border-top: 1px solid var(--mint);
  border-left: 1px solid var(--mint);
  content: "";
  opacity: 0.6;
}

.clue-button:hover:not(:disabled),
.clue-button:focus-visible {
  z-index: 1;
  border-color: var(--mint);
  color: #ffe39a;
  background: linear-gradient(145deg, rgba(22, 77, 85, 1), rgba(9, 41, 50, 1));
  box-shadow: 0 0 0 1px rgba(113, 255, 202, 0.13), 0 12px 26px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.clue-button.is-used {
  color: transparent;
  border-style: dashed;
  background:
    linear-gradient(135deg, transparent 49.4%, rgba(113, 255, 202, 0.08) 49.5%, rgba(113, 255, 202, 0.08) 50.5%, transparent 50.6%),
    rgba(4, 21, 29, 0.72);
  opacity: 0.5;
}

.clue-button.is-used::after {
  position: absolute;
  color: var(--muted-2);
  content: "CLEARED";
  font: 700 0.58rem/1 var(--mono);
  letter-spacing: 0.14em;
}

.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.board-footer p {
  margin: 0;
}

/* Question view */

.question-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  padding: 24px;
  background: rgba(1, 8, 12, 0.94);
  backdrop-filter: blur(12px);
}

.question-shell {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  width: min(1250px, 100%);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 96% 3%, rgba(35, 149, 125, 0.17), transparent 27rem),
    linear-gradient(155deg, rgba(10, 37, 47, 0.99), rgba(3, 18, 25, 0.99));
  box-shadow: var(--shadow);
}

.question-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.question-meta,
.answering-team {
  display: grid;
  gap: 4px;
}

.question-meta span,
.answering-team span {
  color: var(--muted-2);
  font: 700 0.61rem/1 var(--mono);
  letter-spacing: 0.12em;
}

.question-meta strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.15rem;
}

.answering-team {
  text-align: right;
}

.answering-team strong {
  color: var(--mint);
  font-size: 0.86rem;
}

.question-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: clamp(28px, 6vw, 92px);
  align-items: center;
  padding: clamp(30px, 5vw, 64px) clamp(25px, 6vw, 80px) 24px;
}

.question-index {
  margin: 0 0 15px;
  color: var(--mint);
}

.question-copy h2 {
  max-width: 970px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 3.35rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.turn-message {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  margin-top: 18px;
  padding: 7px 10px;
  border-left: 2px solid var(--mint);
  color: var(--muted);
  background: rgba(113, 255, 202, 0.055);
  font: 700 0.7rem/1.35 var(--mono);
  letter-spacing: 0.045em;
}

.turn-message.is-wrong {
  border-color: var(--red);
  color: #ffc0c0;
  background: rgba(255, 107, 107, 0.08);
}

.timer-panel {
  display: grid;
  justify-items: center;
  gap: 13px;
}

.timer-ring {
  --progress: 100%;
  --timer-color: var(--mint);
  position: relative;
  display: grid;
  width: 138px;
  height: 138px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--timer-color) var(--progress), rgba(255, 255, 255, 0.08) 0);
  filter: drop-shadow(0 0 15px rgba(113, 255, 202, 0.16));
}

.timer-ring::before {
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}

.timer-ring > div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.timer-ring span {
  font-family: var(--display);
  font-size: 2.45rem;
  letter-spacing: -0.05em;
}

.timer-ring small {
  margin-top: -3px;
  color: var(--muted-2);
  font: 700 0.54rem/1 var(--mono);
  letter-spacing: 0.16em;
}

.timer-ring.is-warning {
  --timer-color: var(--gold);
}

.timer-ring.is-critical {
  --timer-color: var(--red);
  animation: timer-pulse 850ms ease-in-out infinite;
}

.timer-actions {
  display: flex;
  gap: 14px;
}

.timer-actions button {
  min-width: 58px;
  min-height: 44px;
  padding: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.timer-actions button:hover:not(:disabled) {
  color: var(--paper);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 18px clamp(25px, 6vw, 80px) clamp(28px, 4vw, 48px);
}

.answer-button {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px;
  align-items: stretch;
  min-height: 82px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  background: rgba(10, 44, 55, 0.76);
  cursor: pointer;
  transition: 150ms ease;
}

.answer-letter {
  display: grid;
  height: 100%;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--mint);
  background: rgba(113, 255, 202, 0.035);
  font: 900 0.9rem/1 var(--mono);
}

.answer-text {
  align-self: center;
  padding: 15px 16px;
  color: var(--paper);
  font-size: clamp(0.85rem, 1.25vw, 1rem);
  font-weight: 680;
  line-height: 1.35;
}

.answer-button:hover:not(:disabled) {
  border-color: var(--mint);
  background: rgba(17, 67, 75, 0.92);
  transform: translateY(-1px);
}

.answer-button.is-wrong {
  border-color: rgba(255, 107, 107, 0.62);
  background: rgba(102, 35, 42, 0.42);
}

.answer-button.is-wrong .answer-letter {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.35);
}

.answer-button.is-wrong .answer-text {
  color: #d7a9ad;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.answer-button.is-correct {
  border-color: var(--mint);
  background: rgba(32, 125, 99, 0.32);
  box-shadow: inset 3px 0 var(--mint);
}

.answer-button:disabled {
  cursor: default;
}

.answer-button:not(.is-wrong):not(.is-correct):disabled {
  opacity: 0.5;
}

.resolution-panel {
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, 240px);
  gap: 20px;
  align-items: center;
  margin: 0 clamp(25px, 6vw, 80px) 28px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 51, 57, 0.76);
}

.resolution-panel.is-visible {
  display: grid;
}

.resolution-panel.is-failed {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(75, 28, 35, 0.5);
}

.resolution-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--mint);
  border-radius: 50%;
  color: var(--mint);
  font-size: 1.35rem;
  font-weight: 900;
}

.resolution-panel.is-failed .resolution-mark {
  border-color: var(--red);
  color: var(--red);
}

.resolution-label {
  margin: 0 0 4px;
  color: var(--mint);
  font: 800 0.61rem/1 var(--mono);
  letter-spacing: 0.12em;
}

.resolution-panel.is-failed .resolution-label {
  color: var(--red);
}

.resolution-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.resolution-panel p:not(.resolution-label) {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.resolution-panel small {
  display: inline-block;
  margin-top: 7px;
  color: var(--muted-2);
  font: 700 0.6rem/1 var(--mono);
}

.primary-button.compact {
  min-height: 44px;
}

.facilitator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  align-self: end;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font: 700 0.59rem/1 var(--mono);
  letter-spacing: 0.12em;
}

.facilitator-bar div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.facilitator-bar button {
  min-height: 44px;
  padding: 8px 4px;
  color: var(--muted);
  font-family: var(--body);
  font-size: 0.7rem;
  letter-spacing: 0;
}

.facilitator-bar button:hover:not(:disabled) {
  color: var(--paper);
}

.facilitator-bar button:disabled {
  opacity: 0.35;
}

/* Results */

.results-screen.is-active {
  display: grid;
  min-height: calc(100vh - 79px);
  place-items: center;
  padding: 48px 0 70px;
}

.results-card {
  width: min(900px, 100%);
  padding: clamp(28px, 6vw, 70px);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 100% 0, rgba(113, 255, 202, 0.13), transparent 25rem),
    rgba(6, 29, 38, 0.92);
  box-shadow: var(--shadow);
}

.results-card h1 {
  font-size: clamp(3.3rem, 8vw, 7rem);
}

.results-code {
  margin: 0 0 20px;
  color: var(--muted-2);
}

.winner-banner {
  margin: 34px 0 16px;
  padding: 22px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 209, 102, 0.07);
}

.winner-banner small,
.winner-banner strong {
  display: block;
}

.winner-banner small {
  margin-bottom: 6px;
  color: var(--gold);
  font: 800 0.64rem/1 var(--mono);
  letter-spacing: 0.13em;
}

.winner-banner strong {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.final-standings {
  display: grid;
  gap: 7px;
  margin-bottom: 25px;
}

.standing-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.standing-row span:first-child {
  color: var(--muted-2);
  font: 800 0.7rem/1 var(--mono);
}

.standing-row strong:last-child {
  color: var(--gold);
  font-family: var(--display);
}

.results-actions {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 10px;
}

.results-actions .secondary-button {
  margin: 0;
}

/* Status helpers */

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100% - 48px));
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  background: rgba(8, 38, 47, 0.96);
  box-shadow: var(--shadow);
  font-size: 0.76rem;
  line-height: 1.4;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes timer-pulse {
  50% {
    filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.55));
  }
}

@media (max-width: 980px) {
  .setup-screen.is-active {
    grid-template-columns: 1fr;
    padding-top: 55px;
  }

  .setup-hero {
    max-width: 760px;
  }

  .setup-panel {
    width: min(650px, 100%);
  }

  .question-main {
    grid-template-columns: 1fr 145px;
    gap: 30px;
  }

  .resolution-panel {
    grid-template-columns: auto 1fr;
  }

  .resolution-panel .primary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .topbar {
    width: calc(100% - 24px);
  }

  .brand-copy small,
  .source-chip,
  .icon-button span:last-child {
    display: none;
  }

  .icon-button {
    min-width: 38px;
    justify-content: center;
  }

  main {
    width: calc(100% - 24px);
  }

  .setup-screen.is-active {
    padding: 38px 0 54px;
  }

  .setup-hero h1 {
    font-size: clamp(3.55rem, 17vw, 5.6rem);
  }

  #setupForm {
    padding: 20px;
  }

  .round-header {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-column {
    grid-template-rows: 70px repeat(5, 72px);
  }

  .board-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .question-overlay {
    padding: 0;
  }

  .question-shell {
    min-height: 100vh;
    border: 0;
  }

  .question-header {
    padding: 13px 15px;
  }

  .question-main {
    grid-template-columns: 1fr;
    padding: 25px 18px 16px;
  }

  .timer-panel {
    grid-template-columns: auto 1fr;
    justify-items: start;
  }

  .timer-ring {
    width: 96px;
    height: 96px;
  }

  .timer-ring span {
    font-size: 1.85rem;
  }

  .timer-actions {
    align-self: center;
  }

  .answer-grid {
    grid-template-columns: 1fr;
    padding: 12px 18px 24px;
  }

  .answer-button {
    min-height: 70px;
  }

  .resolution-panel {
    grid-template-columns: 1fr;
    margin: 0 18px 22px;
  }

  .resolution-mark {
    width: 38px;
    height: 38px;
  }

  .facilitator-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-card {
    border-right: 0;
    border-left: 0;
  }

  .results-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .scoreboard {
    grid-template-columns: 1fr;
  }

  .section-label-row p {
    display: none;
  }

  .question-copy h2 {
    font-size: 1.55rem;
  }

  .timer-panel {
    justify-content: space-between;
  }
}

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