/* ============================================================
   DEFUSE THE BOMB
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #0b0e12;
  --panel: #11161c;
  --panel-2: #151c23;
  --panel-3: #1a222b;

  --line: #27313b;
  --line-strong: #3a4652;

  --text: #f2f0e9;
  --muted: #98a4af;
  --soft: #c8cfd5;

  --accent: #f1a45f;
  --accent-bright: #ffb878;
  --accent-dark: #2a1d13;

  --success: #6ac78e;
  --success-dark: #173222;

  --danger: #ef6b61;
  --danger-dark: #351c1b;

  --radius: 6px;
  --radius-lg: 10px;

  --sans: "Segoe UI", Arial, sans-serif;
  --mono: "Courier New", Consolas, monospace;
}

/* ============================================================
   1. GLOBAL
   Base styles are for phones.
   ============================================================ */

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;

  background: var(--bg);

  color: var(--text);
  font: 15px/1.55 var(--sans);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.eyebrow,
.panel-eyebrow {
  margin: 0;
  color: var(--accent);
  font: 700 10px/1.3 var(--mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

/* ============================================================
   2. SHARED BUTTONS
   ============================================================ */

.primary {
  min-height: 45px;
  padding: 11px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 1px solid var(--accent);
  border-radius: var(--radius);

  background: var(--accent);
  color: #17100a;

  font-weight: 800;

  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.primary:not(:disabled):hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  transform: translateY(-1px);
}

.primary:disabled {
  border-color: #2f3943;
  background: #202831;
  color: #6f7b86;
}

.secondary {
  min-height: 39px;
  padding: 8px 14px;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius);

  background: transparent;
  color: var(--soft);
}

.secondary:hover {
  background: #ffffff05;
  border-color: #61707d;
}

/* ============================================================
   3. HEADER
   ============================================================ */

.topbar {
  min-height: 58px;
  padding: 0 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  border-bottom: 1px solid var(--line);
  background: #0c1015;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  max-width: 118px;
  height: 30px;
  object-fit: contain;
}

.brand-logo[src=""] {
  display: none;
}

.brand:has(.brand-logo[src=""])::after {
  content: "DEFUSE // 05";
  color: var(--text);
  font: 800 11px/1 var(--mono);
  letter-spacing: 1.4px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sound-button,
.help-button {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
}

.sound-button {
  padding: 6px 8px;
  color: var(--accent);
  font: 700 10px/1 var(--mono);
}

.sound-button[aria-pressed="true"] {
  color: var(--muted);
}
.sound-button.muted {
  color: var(--muted);
}

.help-button {
  padding: 5px 8px;

  display: flex;
  align-items: center;
  gap: 6px;

  color: var(--muted);
}

.help-icon {
  width: 18px;
  height: 18px;

  display: grid;
  place-items: center;

  border: 1px solid #64717d;
  border-radius: 50%;

  font: 700 10px/1 var(--mono);
}

.help-text {
  display: none;
}

/* ============================================================
   4. PAGE LAYOUT
   Mobile-first: one column by default.
   ============================================================ */

main {
  width: 100%;
  margin: 20px auto 0;
  padding: 0 12px;
}

.page-heading {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.page-heading .eyebrow {
  margin-bottom: 8px;
}

.page-heading h1 {
  max-width: 520px;
  margin: 0;

  font-size: clamp(38px, 11vw, 48px);
  line-height: 0.98;
  letter-spacing: -2px;
}

.page-heading h1 em {
  color: var(--soft);
  font-style: normal;
  font-weight: 400;
}

.page-heading > p {
  max-width: 420px;
  margin: 14px 0 0;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================
   5. PANELS
   ============================================================ */

.setup-panel,
.game-panel {
  width: 100%;
  min-width: 0;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);

  background: var(--panel);
  box-shadow: 0 14px 38px #00000030;
}

.setup-panel {
  padding: 16px;
}

.game-panel {
  position: relative;
  overflow: hidden;
  padding: 15px 12px;
}

/* Small hardware-like corner detail */
.game-panel::before,
.game-panel::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid #4b5762;
  border-radius: 50%;
  background: #0b0f13;
}

.game-panel::before {
  top: 8px;
  left: 8px;
}

.game-panel::after {
  right: 8px;
  bottom: 8px;
}

/* ============================================================
   6. MISSION SETUP
   ============================================================ */

.setup-panel > .panel-eyebrow {
  color: var(--muted);
}

.setup-panel h2 {
  margin: 8px 0 22px;

  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.6px;
}

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

legend {
  margin-bottom: 10px;

  color: var(--accent);
  font: 700 11px/1.4 var(--mono);
}

legend span {
  margin-left: 6px;
  color: var(--soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

.topic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.topic-option {
  position: relative;
  min-height: 43px;
  padding: 0 12px;

  display: flex;
  align-items: center;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: #0e141a;

  cursor: pointer;

  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.topic-option:hover {
  border-color: #46535f;
  background: #111920;
}

.topic-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dark);
}

.topic-option:has(input:checked)::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 9px;

  border-radius: 50%;
  background: var(--accent);
}

.topic-option input,
.mode-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.topic-text {
  min-width: 0;
  display: block;
}

.topic-option strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.topic-option small {
  display: none;
}

.mode-switch {
  padding: 3px;
  display: flex;
  gap: 3px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: #0d1319;
}

.mode-switch label {
  width: 50%;
  cursor: pointer;
}

.mode-switch span {
  min-height: 37px;
  padding: 8px 5px;

  display: grid;
  place-items: center;

  border-radius: 3px;

  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.mode-switch input:checked + span {
  background: var(--panel-3);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mode-note {
  min-height: 38px;
  margin: -7px 0 14px;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.start-button {
  width: 100%;
  justify-content: space-between;
}
.start-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.request-error {
  margin-top: 12px;
  padding: 10px 11px;

  border-left: 3px solid var(--danger);
  background: var(--danger-dark);

  color: #ffd7d2;
  font-size: 12px;
}

.request-error p {
  margin: 0 0 8px;
}

.request-error button {
  padding: 5px 10px;

  border: 1px solid #975650;
  border-radius: var(--radius);

  background: transparent;
  color: #ffe4e0;
}

.scoring-note {
  margin-top: 22px;
  padding-top: 16px;

  display: flex;
  align-items: flex-start;
  gap: 9px;

  border-top: 1px solid var(--line);
}

.scoring-note > span {
  color: var(--accent);
  font-size: 21px;
}

.scoring-note p {
  margin: 0;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.scoring-note strong {
  color: var(--soft);
  font-weight: 600;
}

/* ============================================================
   7. GAME CONSOLE TOP AREA
   ============================================================ */

.console-topline {
  margin: 0 0 13px;
  padding: 4px 12px 10px;

  display: flex;
  justify-content: space-between;
  gap: 10px;

  border-bottom: 1px solid var(--line);

  color: #83909c;
  font: 700 8px/1.4 var(--mono);
  letter-spacing: 1px;
}

.console-topline > span:last-child {
  text-align: right;
}

.game-toolbar {
  padding: 0 2px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-topic {
  padding: 5px 8px;

  border: 1px solid #5a3c27;
  border-radius: 3px;

  background: #1d1611;
  color: var(--accent);

  font: 700 9px/1 var(--mono);
  letter-spacing: 1.2px;
}

.source-badge {
  color: var(--muted);
  font-size: 11px;
}

/* ============================================================
   8. TIMER
   ============================================================ */

.countdown-panel {
  margin-top: 14px;
  padding: 13px 12px;

  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "cap"
    "display"
    "status";
  gap: 9px;

  border: 1px solid #633433;
  border-radius: var(--radius);

  background: #090e13;
}

.bomb-cap {
  grid-area: cap;

  display: flex;
  align-items: center;
  gap: 7px;

  color: #7f8d99;
  font: 700 8px/1 var(--mono);
  letter-spacing: 1.2px;
}

.bomb-label {
  margin-left: auto;
  color: #65727f;
  font-size: 8px;
}

.bomb-led {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--danger);
  box-shadow: 0 0 6px #ef6b6177;

  animation: led-blink 1s steps(2, end) infinite;
}

.bomb-display {
  grid-area: display;
}

.timer-label {
  display: block;
  margin-bottom: 4px;

  color: #788692;
  font: 700 8px/1 var(--mono);
  letter-spacing: 1px;
}

#countdown {
  display: block;

  color: #ffffff;
  font: 800 42px/1 var(--mono);
  letter-spacing: -2px;
}

.clock-status {
  grid-area: status;
  padding-top: 10px;

  border-top: 1px solid #232c34;
}

.clock-status > span {
  color: #d8dde1;
  font: 700 9px/1.2 var(--mono);
  letter-spacing: 1px;
}

.clock-status p {
  margin: 5px 0 0;

  color: var(--muted);
  font-size: 10px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;

  border-radius: 50%;

  background: var(--success);
}

.time-track {
  height: 3px;
  margin: 9px 0 17px;

  overflow: hidden;

  background: #1e262e;
}

#time-fill {
  display: block;
  width: 100%;
  height: 100%;

  background: var(--accent);
}

/* ============================================================
   9. STATS + WIRES
   ============================================================ */

.stats {
  margin-bottom: 10px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stats > div {
  min-width: 0;
  padding: 9px 7px;

  border-right: 1px solid var(--line);
}

.stats > div:last-child {
  border-right: 0;
}

.stats > div > span {
  display: block;
  margin-bottom: 3px;

  color: #788591;
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.8px;
}
.stats strong {
  display: flex;
  align-items: baseline;
  gap: 4px;

  color: var(--text);
  font: 800 16px/1.1 var(--mono);
}

.stats strong > span {
  display: inline;
  margin: 0;

  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

.stats small {
  color: #6f7d89;
  font-size: 9px;
}

.progress-track {
  margin-bottom: 21px;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.progress-track i {
  position: relative;
  height: 24px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 3px;

  background: #0d1318;
  color: #667480;

  font-style: normal;
}

.progress-track i::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;

  width: 5px;
  height: 1px;

  background: var(--line);
}

.progress-track i:first-child::before {
  display: none;
}

.progress-track i span {
  font: 700 8px/1 var(--mono);
}

.progress-track i.current {
  border-color: var(--accent);
  background: #1c1713;
  color: var(--accent);
}

.progress-track i.complete {
  border-color: #3c6e4f;
  background: var(--success-dark);
  color: #a7e9bf;
}

/* ============================================================
   10. READY SCREEN
   ============================================================ */

.ready-screen {
  min-height: 340px;
  padding: 34px 10px 30px;

  display: grid;
  align-content: center;
  justify-items: start;
}

.ready-symbol {
  margin-bottom: 17px;

  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ready-symbol span {
  width: 28px;
  height: 32px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line-strong);
  background: #0e141a;

  color: var(--soft);
  font: 800 12px/1 var(--mono);
}

.ready-screen h2 {
  max-width: 500px;
  margin: 8px 0 10px;

  font-size: clamp(27px, 8vw, 36px);
  line-height: 1.08;
  letter-spacing: -1.2px;
}

.ready-screen > p:not(.eyebrow) {
  margin: 0 0 20px;

  color: var(--muted);
  font-size: 12px;
}

.ready-screen small {
  margin-top: 9px;

  color: #74818d;
  font-size: 10px;
}

/* ============================================================
   11. CLUE
   ============================================================ */

.clue-panel {
  margin-bottom: 20px;
  padding: 18px 2px;

  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;

  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clue-symbol {
  color: var(--accent);
  font:
    700 26px/1 Georgia,
    serif;
}

.clue-panel h2 {
  max-width: 700px;
  margin: 7px 0 0;

  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.7px;
}

/* ============================================================
   12. ANSWER + LETTER TILES
   ============================================================ */

.answer-heading {
  margin-bottom: 9px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  color: #95a1ac;
  font: 700 9px/1 var(--mono);
  letter-spacing: 1.1px;
}

#letter-count {
  color: #6e7b86;
  letter-spacing: 0.4px;
}

.answer-slots,
.letter-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.answer-slots {
  min-height: 46px;
}

.tile {
  width: 39px;
  height: 43px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line-strong);
  border-radius: 4px;

  background: #141b22;
  color: var(--text);

  font: 800 17px/1 var(--mono);

  transition:
    transform 90ms ease,
    border-color 90ms ease,
    background 90ms ease;
}

.answer-tile.empty {
  border-color: #2a343d;
  background:
    linear-gradient(#25303a, #25303a) bottom / 100% 3px no-repeat,
    #0d1318;
}

.answer-tile.filled {
  background: #202832;
  border-color: #53616d;
}

.answer-tile.filled:hover,
.bank-tile:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.bank-tile {
  background: #192129;
}

.bank-tile:disabled {
  border-color: #222a32;
  background: #10161b;
  color: #53606b;
}

.tile-instruction {
  margin: 9px 0 13px;

  color: #7d8994;
  font-size: 10px;
}

.tools {
  margin-top: 11px;

  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tools button {
  flex: 1 1 auto;
  min-height: 35px;
  padding: 7px 9px;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius);

  background: #121920;
  color: var(--soft);

  font-size: 11px;
}

.tools button:not(:disabled):hover {
  background: #18212a;
  border-color: #5d6a76;
}

.tools button:disabled {
  border-color: #27313a;
  color: #586570;
}

.tools #hint-button {
  border-color: #62462f;
  color: #f2c294;
}

.hint-box {
  margin: 13px 0 0;
  padding: 10px 11px;

  border-left: 3px solid var(--accent);

  background: #1c1713;
  color: #f0d1b4;

  font-size: 11px;
}

.feedback {
  min-height: 22px;
  margin: 14px 0 10px;

  color: var(--muted);
  font-size: 12px;
}

.feedback.success {
  color: #9cdeb6;
}

.feedback.error {
  color: #ffaaa3;
}

.check-button {
  width: 100%;
}

.keyboard-note {
  display: none;
}

/* ============================================================
   13. COMPLETION
   ============================================================ */

.completion {
  min-height: 350px;
  padding: 35px 16px 30px;

  display: grid;
  align-content: center;
  justify-items: center;

  text-align: center;
}

.completion-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 16px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  font: 800 21px/1 var(--mono);
}

.completion-icon.success {
  border: 1px solid #3e6f50;
  background: var(--success-dark);
  color: #a9e8bf;
}

.completion-icon.failed {
  border: 1px solid #8a3f3a;
  background: var(--danger-dark);
  color: #ff8c84;
}

.completion h2 {
  margin: 7px 0 5px;

  font-size: 34px;
  line-height: 1;
  letter-spacing: -1.4px;
}

.completion > p:not(.eyebrow) {
  margin: 0 0 17px;

  color: var(--muted);
  font-size: 12px;
}

#final-score {
  display: block;
  margin-top: 4px;

  color: var(--text);
  font: 800 44px/1 var(--mono);
}

#final-score + span {
  margin-top: 3px;

  color: #76838e;
  font: 700 8px/1 var(--mono);
  letter-spacing: 1px;
}

#final-detail {
  margin-top: 10px;
  color: var(--soft);
  font-size: 11px;
}

#again-button {
  width: 100%;
  margin-top: 16px;
}

/* ============================================================
   14. LOADING
   ============================================================ */

.loading {
  min-height: 340px;
  padding: 42px 15px;

  display: grid;
  align-content: center;
  justify-items: center;

  text-align: center;
}

.spinner {
  width: 30px;
  height: 30px;
  margin-bottom: 16px;

  border: 3px solid #29333c;
  border-top-color: var(--accent);
  border-radius: 50%;

  animation: spin 700ms linear infinite;
}

.loading h2 {
  margin: 0;
  font-size: 23px;
}

.loading p {
  max-width: 360px;
  margin: 7px 0 0;

  color: var(--muted);
  font-size: 11px;
}

/* ============================================================
   15. FOOTER
   ============================================================ */

footer {
  margin: 24px 0 30px;
  padding-top: 14px;

  display: flex;
  flex-direction: column;
  gap: 4px;

  border-top: 1px solid var(--line);

  color: #66737f;
  font: 700 8px/1.6 var(--mono);
  letter-spacing: 0.7px;
}

/* ============================================================
   16. DIALOG
   ============================================================ */

dialog {
  width: min(500px, calc(100% - 24px));
  padding: 23px;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);

  background: #121920;
  color: var(--text);

  box-shadow: 0 30px 90px #000b;
}

dialog::backdrop {
  background: #05080ccd;
}

dialog h2 {
  margin: 7px 0 17px;
  font-size: 27px;
}

dialog ol {
  padding-left: 20px;
  color: var(--soft);
}

dialog li {
  margin-bottom: 8px;
}

dialog > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 11px;
}

.close-button {
  position: absolute;
  top: 11px;
  right: 11px;

  width: 31px;
  height: 31px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: transparent;
  color: var(--muted);
}

#got-it {
  width: 100%;
  margin-top: 9px;
}

/* ============================================================
   17. ANIMATIONS
   ============================================================ */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes led-blink {
  50% {
    opacity: 0.35;
  }
}

/* ============================================================
   18. TABLET
   Enhancements only. Base remains mobile.
   ============================================================ */

@media (min-width: 700px) {
  .topbar {
    min-height: 64px;
    padding: 0 20px;
  }

  .brand-logo {
    max-width: 145px;
    height: 34px;
  }

  .brand:has(.brand-logo[src=""])::after {
    font-size: 12px;
  }

  .help-text {
    display: inline;
    font-size: 11px;
  }

  main {
    max-width: 760px;
    margin-top: 30px;
    padding: 0 18px;
  }

  .page-heading {
    margin-bottom: 24px;
    padding-bottom: 22px;
  }

  .page-heading h1 {
    font-size: 58px;
    letter-spacing: -2.7px;
  }

  .page-heading > p {
    font-size: 13px;
  }

  .setup-panel {
    padding: 20px;
  }

  .game-panel {
    padding: 20px;
  }

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

  .topic-option {
    justify-content: center;
    text-align: center;
  }

  .topic-option:has(input:checked)::before {
    display: none;
  }

  .topic-option:has(input:checked) {
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .countdown-panel {
    padding: 14px 16px;

    grid-template-columns: 1fr auto;
    grid-template-areas:
      "cap cap"
      "display status";

    align-items: end;
    gap: 10px 22px;
  }

  .clock-status {
    min-width: 170px;
    padding: 0 0 0 14px;

    border-top: 0;
    border-left: 1px solid #252e36;
  }

  #countdown {
    font-size: 50px;
  }

  .stats > div {
    padding: 10px 12px;
  }

  .stats span {
    font-size: 9px;
  }

  .stats strong {
    font-size: 18px;
  }

  .progress-track i {
    height: 27px;
  }

  .ready-screen {
    min-height: 380px;
    padding: 42px 20px;
  }

  .ready-screen h2 {
    font-size: 40px;
  }

  .clue-panel {
    grid-template-columns: 27px minmax(0, 1fr);
    padding: 20px 2px;
  }

  .clue-symbol {
    font-size: 31px;
  }

  .clue-panel h2 {
    font-size: 31px;
  }

  .tile {
    width: 44px;
    height: 48px;
    font-size: 19px;
  }

  .tools button {
    flex: 0 0 auto;
    padding-inline: 12px;
  }

  .check-button {
    max-width: 280px;
  }

  .keyboard-note {
    display: block;
    margin: 11px 0 0;

    color: #697681;
    font: 9px/1.5 var(--mono);
  }

  #again-button {
    width: auto;
  }

  #got-it {
    width: auto;
  }

  footer {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }

  footer span:last-child {
    text-align: right;
  }
}

/* ============================================================
   19. DESKTOP
   Two-column workspace only starts here.
   ============================================================ */

@media (min-width: 1024px) {
  .topbar {
    min-height: 68px;

    padding-left: max(20px, calc((100vw - 1180px) / 2 + 20px));

    padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px));
  }

  main {
    max-width: 1180px;
    margin-top: 42px;
    padding: 0 20px;
  }

  .page-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: end;
    gap: 42px;

    margin-bottom: 29px;
    padding-bottom: 24px;
  }

  .page-heading h1 {
    max-width: 700px;
    font-size: clamp(62px, 6vw, 78px);
  }

  .page-heading > p {
    margin: 0;
  }

  .workspace {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }

  .setup-panel {
    position: sticky;
    top: 18px;
    padding: 22px;
  }

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

  .topic-option {
    justify-content: flex-start;
    text-align: left;
  }

  .topic-option:has(input:checked) {
    box-shadow: none;
  }

  .topic-option:has(input:checked)::before {
    display: block;
  }

  .game-panel {
    padding: 24px;
  }

  .console-topline {
    font-size: 9px;
  }

  .ready-screen {
    min-height: 410px;
    padding-left: 24px;
  }

  .clue-panel h2 {
    font-size: 35px;
  }

  .completion {
    min-height: 410px;
  }

  .loading {
    min-height: 410px;
  }
}
