@import url("https://fonts.googleapis.com/css2?family=Anton&family=Oswald:wght@400;600;700&family=Inter:wght@400;600;800&display=swap");

:root {
  --blue: #0b1ca8;
  --blue-dark: #060f6b;
  --blue-deep: #03052b;
  --gold: #ffcc00;
  --red: #ff4d5e;
  --green: #36e07f;
  --ink: #f4f6ff;
  --muted: #9aa3d6;
  --panel: #0d1340;
  --panel-2: #141c55;
  --line: #27307a;

  /* Everything a theme can change. Themes live in themes.css. */
  --f-display: Anton, Impact, sans-serif;
  --f-head: Oswald, sans-serif;
  --f-body: Inter, system-ui, sans-serif;
  --bg-tv: radial-gradient(ellipse at 50% 30%, #0c1790 0%, var(--blue-deep) 75%);
  --edge: #000;
  --shadow: #000;
  --on-gold: #000;
  --cat-bg: var(--blue);
  --cat-ink: var(--ink);
  --score-bg: linear-gradient(#1426c4, var(--blue-dark));
  --score-ring: #3a4ce0;
  --topbar: #070b33;
  --line-hi: #5563d8;
  --panel-hi: #1b2570;
  --field: #0a0f38;
  --used: #1a1f45;
  --used-ink: #454c85;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--blue-deep);
  color: var(--ink);
  font-family: var(--f-body);
}

button {
  font: inherit;
  cursor: pointer;
}

/* ================= TV ================= */

body.tv {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-tv);
}

.tv-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  position: relative;
}

.tv-scores {
  display: flex;
  gap: 1vw;
  padding: 1vh 2vw 2vh;
  justify-content: center;
}

.tv-score {
  flex: 1;
  max-width: 22vw;
  background: var(--score-bg);
  border: 0.3vh solid var(--edge);
  box-shadow: inset 0 0 0 0.3vh var(--score-ring);
  border-radius: 0.6vh;
  text-align: center;
  padding: 0.8vh 0.5vw;
  position: relative;
  transition: transform 0.2s;
}

.tv-score .name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 2.4vh;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-score .pts {
  font-family: var(--f-display);
  font-size: 4.6vh;
  color: var(--gold);
  line-height: 1.1;
}

.tv-score .pts.neg {
  color: var(--red);
}

.tv-score.bump {
  transform: scale(1.08);
}

.delta {
  position: absolute;
  top: -3vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-display);
  font-size: 4vh;
  animation: floatUp 1.8s ease-out forwards;
  pointer-events: none;
  text-shadow: 0 0.3vh 0 var(--shadow);
}

.delta.up {
  color: var(--green);
}

.delta.down {
  color: var(--red);
}

@keyframes floatUp {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -6vh);
  }
}

/* Board */

.board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1.25fr repeat(5, 1fr);
  gap: 0.6vh;
  background: var(--edge);
  padding: 0.6vh;
  border-radius: 0.6vh;
}

.cell {
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5vh 0.5vw;
  box-shadow: inset 0 0 2vh rgba(0, 0, 0, 0.45);
}

.cell.cat {
  background: var(--cat-bg);
  color: var(--cat-ink);
  font-family: var(--f-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 2.8vh;
  line-height: 1.1;
  text-shadow: 0.25vh 0.25vh 0 var(--shadow);
  border-bottom: 0.5vh solid var(--edge);
}

.cell.val {
  font-family: var(--f-display);
  color: var(--gold);
  font-size: var(--val, 7vh);
  text-shadow: 0.35vh 0.35vh 0 var(--shadow);
}

.cell.used {
  color: transparent;
  text-shadow: none;
}

/* Clue */

.clue {
  width: 100%;
  height: 100%;
  background: var(--blue);
  border: 0.8vh solid var(--edge);
  box-shadow: inset 0 0 8vh rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh 6vw;
  text-align: center;
  position: relative;
  animation: zoomIn 0.35s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.clue .tag {
  position: absolute;
  top: 3vh;
  left: 0;
  right: 0;
  font-family: var(--f-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 3vh;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.clue .tag b {
  color: var(--gold);
}

.clue .q {
  font-family: var(--f-head);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 6.4vh;
  line-height: 1.2;
  text-shadow: 0.4vh 0.4vh 0 var(--shadow);
  max-width: 85vw;
}

.clue .qimg {
  max-width: 80vw;
  max-height: 44vh;
  object-fit: contain;
  background: #fff;
  border: 0.6vh solid var(--edge);
  border-radius: 0.8vh;
  margin: 3vh 0;
  animation: slam 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
}

.clue.has-img .q {
  font-size: 4.6vh;
}

.clue .img-wait {
  color: var(--muted);
  font-size: 3vh;
  margin: 3vh 0;
}

.clue .q.long {
  font-size: 5vh;
}

.clue .q.huge {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 13vh;
  color: var(--gold);
  line-height: 1;
}

.kind-badge {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 3.4vh;
  padding: 0.4vh 1.4vw;
  margin-bottom: 3vh;
  background: var(--gold);
  color: var(--on-gold);
  transform: rotate(-3deg);
  letter-spacing: 0.05em;
}

.answer {
  margin-top: 4vh;
  font-family: var(--f-display);
  color: var(--gold);
  font-size: 7vh;
  text-shadow: 0.4vh 0.4vh 0 var(--shadow);
  animation: slam 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
}

.twist {
  margin-top: 3vh;
  background: var(--red);
  color: #fff;
  font-family: var(--f-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 4vh;
  padding: 1.2vh 2.5vw;
  border: 0.5vh solid var(--edge);
  transform: rotate(-1.5deg);
  animation: slam 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
}

@keyframes slam {
  from {
    transform: scale(2.5) rotate(-6deg);
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Splash */

.splash {
  text-align: center;
  max-width: 80vw;
}

.splash h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 12vh;
  line-height: 1;
  margin: 0 0 1vh;
  color: var(--gold);
  text-shadow: 0.6vh 0.6vh 0 var(--shadow);
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.splash h2 {
  font-family: var(--f-head);
  font-size: 4vh;
  margin: 0 0 4vh;
  text-transform: uppercase;
  color: var(--ink);
}

.splash ol {
  text-align: left;
  font-family: var(--f-head);
  font-size: 3.2vh;
  line-height: 1.5;
  margin: 0 auto;
  display: inline-block;
  color: var(--muted);
}

.splash ol li b {
  color: var(--ink);
}

/* Coin */

.result {
  font-family: var(--f-display);
  font-size: 9vh;
  line-height: 1.05;
  color: var(--gold);
  text-shadow: 0.4vh 0.4vh 0 var(--shadow);
  animation: slam 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
}


.coin-stage {
  text-align: center;
  perspective: 120vh;
}

.coin-label {
  font-family: var(--f-head);
  font-size: 5vh;
  text-transform: uppercase;
  margin-bottom: 6vh;
  font-weight: 700;
}

.coin {
  width: 34vh;
  height: 34vh;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
}

.coin .face {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: 9vh;
  color: #6b4a00;
  background: radial-gradient(circle at 35% 30%, #fff3a8, #ffcc00 45%, #c79200 100%);
  border: 1.2vh solid #b88400;
  backface-visibility: hidden;
}

.coin .face.tails {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 35% 30%, #f2f2f2, #c0c0c0 45%, #7d7d7d 100%);
  border-color: #6d6d6d;
  color: #333;
}

.coin-result {
  margin-top: 5vh;
  min-height: 10vh;
}

/* Leaderboard */

.leader {
  width: 60vw;
}

.leader h1 {
  font-family: var(--f-display);
  font-weight: 400;
  text-align: center;
  font-size: 9vh;
  margin: 0 0 3vh;
  color: var(--gold);
  text-shadow: 0.5vh 0.5vh 0 var(--shadow);
}

.leader .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--blue);
  border: 0.4vh solid var(--edge);
  padding: 1.5vh 2vw;
  margin-bottom: 1.2vh;
  font-family: var(--f-head);
  font-size: 5vh;
  font-weight: 700;
  text-transform: uppercase;
  animation: zoomIn 0.4s both;
}

.leader .row .pts {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--gold);
}

.leader .row .pts.neg {
  color: var(--red);
}

/* Start overlay */

.start-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  background: rgba(3, 5, 43, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vh;
  cursor: pointer;
  text-align: center;
}

.start-overlay .big {
  font-family: var(--f-display);
  font-size: 9vh;
  color: var(--gold);
}

.start-overlay .small {
  font-size: 2.6vh;
  color: var(--muted);
  max-width: 60vw;
}

/* ================= HOST ================= */

body.host {
  min-height: 100vh;
  font-size: 14px;
}

.host-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.host-top .brand {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--gold);
  margin-right: 8px;
}

.host-top .spacer {
  flex: 1;
}

.btn {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-weight: 600;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--line-hi);
  background: var(--panel-hi);
}

.btn.primary {
  background: var(--gold);
  color: var(--on-gold);
  border-color: var(--gold);
}

.btn.primary:hover {
  background: #ffe066;
}

.btn.good {
  background: #10753b;
  border-color: #1bb35b;
}

.btn.bad {
  background: #8e1224;
  border-color: #d7263d;
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 4px 8px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

select,
input[type="text"],
input[type="number"] {
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}

.host-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr);
  gap: 16px;
  padding: 16px;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.panel h3 {
  margin: 0 0 10px;
  font-family: var(--f-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel h3 .grow {
  flex: 1;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.row + .row {
  margin-top: 8px;
}

.hboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.hcell {
  background: var(--blue);
  border: 0;
  color: var(--gold);
  border-radius: 6px;
  min-height: 52px;
  font-family: var(--f-display);
  font-size: 20px;
  position: relative;
  padding: 4px;
}

.hcell:hover {
  outline: 2px solid var(--gold);
}

.hcell.cat {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ink);
  cursor: default;
  min-height: 44px;
  outline: none;
  background: var(--blue-dark);
}

.hcell.used {
  background: var(--used);
  color: var(--used-ink);
}

.hcell.live {
  outline: 3px solid var(--green);
}

.hcell .k {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 11px;
  font-family: var(--f-body);
}

.onair {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.hq {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  margin: 6px 0 12px;
}

.hmeta {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hpic {
  display: block;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}

.hanswer {
  background: #0c3b22;
  border: 1px solid #1bb35b;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.hanswer .lbl,
.hnote .lbl,
.htwist .lbl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.hanswer .txt {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
}

.hnote {
  background: #3a3000;
  border: 1px solid #806a00;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  color: #ffe98a;
}

.htwist {
  background: #3d0a14;
  border: 1px solid #8e1224;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  color: #ffb3bc;
}

body.blur .secret {
  filter: blur(9px);
  transition: filter 0.15s;
}

body.blur .secret:hover {
  filter: none;
}

.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.player:last-child {
  border-bottom: 0;
}

.player input.pname {
  width: 100%;
  font-weight: 700;
}

.player .score {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--gold);
  text-align: right;
}

.player .score.neg {
  color: var(--red);
}

.player .acts {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.player .acts input {
  width: 72px;
}

.tv-status {
  font-size: 12px;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hint kbd {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  font-family: inherit;
  color: var(--ink);
}

.landed {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--field);
  border: 1px dashed var(--line);
}

.landed b {
  color: var(--gold);
}

/* ---------- Host: phone-friendly bits ---------- */

a.btn {
  text-decoration: none;
  display: inline-block;
}

.spacer {
  flex: 1;
}

.btn.big {
  padding: 12px 18px;
  font-size: 16px;
}

.cast-btn.on {
  background: var(--gold);
  color: var(--on-gold);
  border-color: var(--gold);
}

.cast-wrap google-cast-launcher {
  display: inline-block;
  width: 30px;
  height: 30px;
  cursor: pointer;
  --connected-color: var(--gold);
  --disconnected-color: var(--ink);
  vertical-align: middle;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 16px;
}

.stepper b {
  min-width: 18px;
  text-align: center;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}

.sound-grid .btn {
  padding: 10px 6px;
}

.hcell.empty {
  background: transparent;
}

.gctl {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.gboard {
  display: grid;
  gap: 4px;
  background: #06104f;
  padding: 6px;
  border-radius: 10px;
  width: 100%;
}

.gcell {
  aspect-ratio: 1;
  border: 0;
  border-radius: 6px;
  background: #1a2266;
  color: var(--gold);
  font-family: var(--f-display);
  font-size: 26px;
  padding: 0;
}

.gcell.connect4 {
  border-radius: 50%;
  background: #0a0f38;
}

.gcell.connect4.pX {
  background: var(--red);
}

.gcell.connect4.pO {
  background: var(--gold);
}

.gcell.tictactoe.pO {
  color: #fff;
}

.swap-row {
  margin-top: 10px;
}

.swap-row select {
  flex: 1;
  min-width: 0;
}

/* Game board on the TV */

.tv-board {
  display: grid;
  gap: 1vh;
  background: #06104f;
  padding: 1.2vh;
  border-radius: 1.5vh;
  border: 0.5vh solid var(--edge);
  margin-top: 2vh;
}

.tv-cell {
  width: var(--cell);
  height: var(--cell);
  border-radius: 1vh;
  background: #1a2266;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: calc(var(--cell) * 0.7);
  color: var(--gold);
}

.tv-cell.pO {
  color: #fff;
}

.tv-board.connect4 .tv-cell {
  border-radius: 50%;
  background: #030627;
}

.tv-board.connect4 .tv-cell.pX {
  background: var(--red);
  animation: dropIn 0.35s ease-in;
}

.tv-board.connect4 .tv-cell.pO {
  background: var(--gold);
  animation: dropIn 0.35s ease-in;
}

@keyframes dropIn {
  from {
    transform: translateY(-30vh);
  }
  to {
    transform: none;
  }
}

.board-status {
  margin-top: 2vh;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 3.4vh;
  text-transform: uppercase;
}

.board-status.done {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 6vh;
  color: var(--gold);
  animation: slam 0.4s cubic-bezier(0.2, 1.8, 0.4, 1);
}

.quick-scores {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.qs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.qs-name {
  flex: 1;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qs-score {
  font-family: var(--f-display);
  color: var(--gold);
  min-width: 52px;
  text-align: right;
  margin-right: 4px;
}

.qs-score.neg {
  color: var(--red);
}

.qs .wager {
  width: 90px;
}

.qs .btn.small {
  padding: 8px 10px;
  min-width: 56px;
}

.sheet-actions {
  margin-top: 14px;
}

.live:empty {
  display: none;
}

.sheet-backdrop {
  display: none;
}

@media (max-width: 999px) {
  body.host {
    font-size: 15px;
  }

  .host-grid {
    padding: 10px;
    gap: 0;
  }

  .panel {
    padding: 12px;
    margin-bottom: 10px;
  }

  .hide-phone {
    display: none;
  }

  .hboard {
    gap: 3px;
  }

  .hcell {
    font-size: 16px;
    min-height: 46px;
    padding: 2px;
  }

  .hcell.cat {
    font-size: min(9.5px, 2.35vw);
    letter-spacing: 0;
    min-height: 40px;
    padding: 2px 1px;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .hcell .k {
    font-size: 9px;
    top: 1px;
    right: 2px;
  }

  /* The live question slides up from the bottom like a sheet. */
  .live.active {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 88vh;
    overflow-y: auto;
    z-index: 30;
    margin: 0;
    border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    animation: sheetUp 0.22s ease-out;
  }

  .sheet-backdrop.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 29;
  }

  body.sheet-open {
    overflow: hidden;
  }

  .hq {
    font-size: 18px;
  }
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 999px) and (hover: none) {
  body.blur .secret:active {
    filter: none;
  }
}



/* Pictures and game boards make the clue taller: keep it clear of the category line. */
.clue.has-img {
  padding-top: 3vh;
  justify-content: flex-start;
}

.clue.has-img .tag {
  position: static;
  margin-bottom: 2vh;
}

.clue.has-img .kind-badge {
  margin-bottom: 1.5vh;
  font-size: 2.6vh;
}

/* Room codes */

.room-big {
  font-family: var(--f-head);
  font-size: 5vh;
  color: var(--ink);
  margin: 2vh 0;
}

.room-big b {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 14vh;
  color: var(--gold);
  letter-spacing: 0.15em;
  display: block;
  line-height: 1.1;
  text-shadow: 0.5vh 0.5vh 0 var(--shadow);
}

.room-corner {
  position: fixed;
  right: 1.5vw;
  bottom: 0.6vh;
  font-size: 1.6vh;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--f-head);
  letter-spacing: 0.1em;
}

body.cast .room-corner {
  display: none;
}

.room-input {
  width: 7.5em;
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
}

.room-code {
  font-family: var(--f-display);
  font-size: 24px;
  letter-spacing: 0.15em;
  color: var(--gold);
}

.url {
  color: var(--ink);
  word-break: break-all;
}

/* Double points */

.hcell .x2 {
  position: absolute;
  left: 3px;
  top: 2px;
  font-family: var(--f-body);
  font-size: 10px;
  font-weight: 800;
  color: #ff9ad5;
}

.double-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #7a1fa2, #d7263d);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-weight: 800;
}

.double-screen {
  text-align: center;
  animation: zoomIn 0.35s ease-out;
}

.double-top {
  font-family: var(--f-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 4vh;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.double-big {
  font-family: var(--f-display);
  font-size: 20vh;
  line-height: 0.95;
  margin: 3vh 0;
  color: var(--gold);
  text-shadow: 0.8vh 0.8vh 0 #d7263d, 1.6vh 1.6vh 0 var(--shadow);
  animation: wobble 0.9s ease-in-out infinite alternate;
}

.double-sub {
  font-family: var(--f-head);
  font-size: 5vh;
  text-transform: uppercase;
}

.double-sub b {
  color: var(--gold);
}

@keyframes wobble {
  from {
    transform: rotate(-3deg) scale(1);
  }
  to {
    transform: rotate(3deg) scale(1.06);
  }
}

/* Title screen: bigger rules now that there's no subtitle. */
.splash h1 {
  margin-bottom: 4vh;
}

.splash ol {
  font-size: 4.2vh;
}

/* Big, easy-to-hit buttons on the question sheet */

.sfx-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.big-sfx {
  padding: 16px 10px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
}

.big-sfx.ding {
  background: #1d4ed8;
  border-color: #3b82f6;
}

.big-sfx.wrong {
  background: #8e1224;
  border-color: #d7263d;
}

.qs.big {
  padding: 6px 0;
}

.qs.big .qs-name {
  font-size: 17px;
}

.qs.big .qs-score {
  font-size: 20px;
}

.qs.big .btn.pts {
  padding: 14px 6px;
  min-width: 78px;
  font-size: 17px;
  font-weight: 800;
  border-radius: 12px;
}

/* Theme picker */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.theme-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  background: var(--panel-2);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 10px;
  text-align: left;
}

.theme-pick:hover {
  border-color: var(--line-hi);
}

.theme-pick.on {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

.theme-pick .swatch {
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
}

.theme-pick .swatch i {
  flex: 1;
}

.theme-pick .tname {
  font-size: 17px;
  line-height: 1.1;
}

/* "but I have brain damage" under the title */

.splash h1:has(+ .subtitle) {
  margin-bottom: 0;
}

.splash .subtitle {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 4.2vh;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  transform: rotate(-2deg);
  margin: 0 0 4vh;
}

/* ================= Fake "About Me" slides ================= */
/* Plain white slides in a default-looking font, like a deck made at 3am.
   Everything is sized off --u, one hundredth of the slide's width. */

body.intro-on .room-corner {
  display: none;
}

.gs-stage {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  --u: min(1vw, 1.7778vh);
}

.gs-stage.gs-crashing {
  pointer-events: none;
}

.gs-slide {
  position: relative;
  width: calc(var(--u) * 100);
  height: calc(var(--u) * 56.25);
  background: #fff;
  color: #222;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  box-sizing: border-box;
  padding: calc(var(--u) * 5) calc(var(--u) * 7);
  transform-origin: 0 0;
  text-align: left;
  line-height: 1.25;
}

.gs-w {
  display: inline-block;
  white-space: nowrap;
  transform-origin: 0 100%;
}

.gs-l {
  display: inline-block;
  white-space: pre;
}

.gs-title .gs-w,
.gs-head .gs-w {
  transform-origin: 0 80%;
}

.gs-count {
  position: absolute;
  right: calc(var(--u) * 2);
  bottom: calc(var(--u) * 1.4);
  font-size: calc(var(--u) * 1.6);
  opacity: 0.6;
}

/* Slide 1: title */
.gs-slide.gs-layout-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gs-slide.gs-layout-title .gs-title {
  font-size: calc(var(--u) * 7.5);
  border-bottom: calc(var(--u) * 0.25) solid #4285f4;
  padding-bottom: calc(var(--u) * 1.5);
  margin-bottom: calc(var(--u) * 2);
}
.gs-sub {
  font-size: calc(var(--u) * 3.2);
  color: #666;
}

/* Heading + bullet points */
.gs-head {
  font-size: calc(var(--u) * 4.6);
  margin-bottom: calc(var(--u) * 2.5);
}
.gs-bullets {
  margin: 0;
  padding-left: calc(var(--u) * 3);
  font-size: calc(var(--u) * 2.9);
}
.gs-bullets li {
  margin-bottom: calc(var(--u) * 1.3);
}

/* Small lonely text in the middle */
.gs-slide.gs-layout-crisis,
.gs-slide.gs-layout-big {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.gs-layout-crisis .gs-lines {
  font-size: calc(var(--u) * 2.4);
  text-transform: lowercase;
  line-height: 1.7;
}
.gs-layout-big .gs-lines {
  font-size: calc(var(--u) * 7);
  font-weight: 700;
}

/* The last slide: huge, then it falls off the screen */
.gs-slide.gs-layout-crash {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: calc(var(--u) * 8.5);
  font-weight: 700;
}

/* Host: the about-me slides panel */
.intro-panel.active {
  border-color: var(--gold);
}
.intro-nav .btn.big {
  flex: 1;
  min-height: 56px;
  font-size: 20px;
}

/* TV waiting screens and the click-to-start cover stay plain so nothing
   gives away the game before the about-me slides. */
.gs-wait {
  z-index: 1;
  color: #777;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(var(--u) * 2.2);
  text-align: center;
}
.gs-wait .room-slot {
  font-size: calc(var(--u) * 4);
  color: #ccc;
  margin-bottom: calc(var(--u) * 1.5);
}
.gs-wait-small {
  font-size: calc(var(--u) * 1.8);
}
body.tv .start-overlay {
  background: #000;
  font-family: Arial, Helvetica, sans-serif;
}
body.tv .start-overlay .big {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 5vh;
  color: #ccc;
}
body.tv .start-overlay .small {
  color: #777;
  font-size: 2.2vh;
}
body.tv .start-overlay .room-big {
  font-family: Arial, Helvetica, sans-serif;
  color: #999;
}
body.tv .start-overlay .room-big b,
.gs-wait .room-slot b {
  font-family: Arial, Helvetica, sans-serif;
  color: #eee;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-shadow: none;
}

/* Wrong-sound picker and the +100 tap tally */

.sub-h {
  margin: 16px 0 4px;
  font-family: var(--f-head);
  font-size: 15px;
}

.wrong-pick .btn.on {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
  color: var(--gold);
}

.tap-hint {
  margin-bottom: 4px;
}

.qs-given {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.qs-given.done {
  color: var(--green);
}

.qs-given.neg {
  color: var(--red);
}

/* Several pictures on one question sit side by side */

.clue .qimgs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2vw;
  margin: 3vh 0;
  max-width: 90vw;
}

.clue .qimgs .qimg,
.clue .qimgs .img-wait {
  margin: 0;
  min-width: 0;
}

.clue .qimgs.n2 .qimg {
  max-width: 43vw;
}

.clue .qimgs.n3 .qimg {
  max-width: 28vw;
  max-height: 38vh;
}

.clue .qimgs.n4 .qimg {
  max-width: 21vw;
  max-height: 34vh;
}
