:root {
  --ink: #1a120c;
  --ink-soft: #3e2d1e;
  --night: #120e0b;
  --night-2: #1c1612;
  --parchment: #f4e6cc;
  --parchment-2: #efe0c4;
  --cream: #fbf6ec;
  --gold: #c6a15a;
  --gold-2: #e7c98a;
  --gold-deep: #8d6a32;
  --lapis: #1f4b7a;
  --lapis-2: #3d74ad;
  --pomegranate: #8e2f3a;
  --cedar: #6e4b32;
  --olive: #3f6b45;
  --sea: #1f6f78;
  --line: rgba(110, 75, 50, 0.22);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  --serif: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(31, 75, 122, 0.45), transparent 60%),
    radial-gradient(700px 420px at 110% 0%, rgba(142, 47, 58, 0.28), transparent 55%),
    radial-gradient(640px 380px at 50% 120%, rgba(198, 161, 90, 0.14), transparent 50%),
    var(--night);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-2); }
img { max-width: 100%; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: 0.14;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  mix-blend-mode: overlay;
}

.week-wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.week-wash img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}
.week-wash::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 14, 11, 0.9) 0%, rgba(18, 14, 11, 0.72) 22%, rgba(18, 14, 11, 0.58) 48%, rgba(18, 14, 11, 0.86) 100%);
}
.week-banner[hidden],
.week-wash[hidden],
.rotate-hint[hidden],
#gate[hidden] { display: none !important; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar, .site-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 8px;
}
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 42px; height: 42px; color: var(--gold-2); flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; letter-spacing: -0.03em; font-size: 1.35rem; line-height: 1; }
.brand-name span { display: block; margin-top: 4px; font-size: 0.72rem; letter-spacing: 0.16em; font-family: var(--sans); font-weight: 600; color: var(--gold-2); }
.domain { color: rgba(251, 246, 236, 0.78); font-size: 0.85rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(231, 201, 138, 0.45);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--gold-2);
  background: rgba(18, 14, 11, 0.55);
  font-size: 0.85rem;
}
.pill i { width: 8px; height: 8px; border-radius: 99px; background: #8dbe86; display: block; }
.pill.off i { background: #c47a55; }
.icon-btn, .btn, .choice, .week-card, .player-chip { border: 0; }
.icon-btn {
  background: rgba(18, 14, 11, 0.45);
  color: var(--gold-2);
  border: 1px solid rgba(231, 201, 138, 0.45);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 44px;
}

.sheet {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 22%),
    repeating-linear-gradient(0deg, rgba(110, 75, 50, 0.035) 0 1px, transparent 1px 8px),
    var(--parchment);
  color: var(--ink);
  border-radius: 24px;
  border: 1px solid rgba(255, 236, 206, 0.22);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: clamp(20px, 3vw, 36px);
}

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a2432;
  font-weight: 700;
  margin: 0 0 8px;
}
h1, h2, .prompt { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 0.96; margin: 0 0 12px; }
h2 { margin: 0 0 8px; }
.lede { font-size: 1.12rem; line-height: 1.45; color: var(--ink-soft); max-width: 40rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: center;
}
.hero-art {
  margin: 0;
  background: var(--cream);
  border: 1px solid rgba(110, 75, 50, 0.18);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 16px 36px rgba(74, 42, 16, 0.12);
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #e7d3ae;
}
.hero-art figcaption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 6px 2px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.hero-art figcaption strong {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.mode-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 8px; }
.mode-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid rgba(198, 161, 90, 0.55);
  border-radius: 18px;
  padding: 14px;
  min-height: 112px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}
.mode-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mode-card span { display: block; margin-top: 3px; color: #3a2a1c; font-size: 0.92rem; line-height: 1.35; }
.mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--lapis);
  color: var(--cream);
}
.mode-icon svg { width: 30px; height: 30px; }
.mode-card.blank .mode-icon { background: var(--cedar); }
.mode-card.match .mode-icon { background: var(--pomegranate); }
.mode-card.truth .mode-icon { background: var(--olive); }

.week-card {
  width: 100%;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid rgba(110, 75, 50, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(80, 50, 20, 0.06);
}
.week-card strong { display: block; font-size: 1.02rem; color: var(--ink); }
.week-card span { color: var(--ink-soft); font-size: 0.9rem; }
.week-card:hover { border-color: var(--lapis); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(40, 24, 8, 0.12);
}
.btn-gold { background: linear-gradient(#f3d7a2, #c6a15a); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-sea { background: var(--sea); color: white; }
.btn-pom { background: var(--pomegranate); color: white; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid rgba(26, 18, 12, 0.28); box-shadow: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.site-footer, .disclaimer {
  color: rgba(251, 246, 236, 0.78);
  font-size: 0.82rem;
  padding: 18px 0 28px;
  line-height: 1.45;
}
.site-footer p { margin: 0; }
.maker-credit {
  margin-top: 8px;
  max-width: 40rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(251, 246, 236, 0.62);
}
.maker-credit-tiny {
  margin-top: 6px;
  font-size: 0.65rem;
  color: rgba(251, 246, 236, 0.55);
}

#shell,
#gate { position: relative; z-index: 1; }
.week-banner {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: center;
  margin: 8px auto 12px;
  padding: 0 12px 0 0;
  background: #1c1612;
  border: 1px solid rgba(231, 201, 138, 0.5);
  border-radius: 16px;
  overflow: hidden;
  color: #fbf6ec;
}
.week-banner img {
  width: 128px;
  height: 84px;
  object-fit: cover;
  display: block;
}
.week-copy { padding: 8px 8px 8px 0; }
.week-copy .kicker { color: var(--gold-2); margin: 0 0 4px; }
.week-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fbf6ec;
}
.week-copy span { display: block; margin-top: 2px; color: #f3e2c2; font-size: 0.92rem; }

.code-board { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 22px; align-items: center; }
.code-letters { display: flex; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
.code-letter {
  width: clamp(64px, 10vw, 108px);
  height: clamp(78px, 12vw, 128px);
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  box-shadow: inset 0 0 0 2px rgba(231, 201, 138, 0.45);
}
.code-inline { letter-spacing: 0.14em; font-family: var(--serif); }
.qr-card {
  background: var(--cream);
  border-radius: 18px;
  padding: 12px;
  text-align: center;
  color: var(--ink);
  border: 1px solid rgba(110, 75, 50, 0.16);
}
.qr-card img { width: min(100%, 230px); height: auto; display: block; margin: 0 auto; border-radius: 8px; }
.qr-card p { margin: 8px 0 0; font-size: 0.85rem; color: var(--ink-soft); word-break: break-all; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.field span { font-size: 0.82rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cedar); }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--cream);
  border: 1px solid rgba(110, 75, 50, 0.32);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  min-height: 48px;
}
textarea { min-height: 140px; resize: vertical; }
.hint { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.4; }
.warn { color: var(--pomegranate); font-size: 0.95rem; }
.cast-card {
  margin-top: 16px;
  background: var(--cream);
  border: 1px solid rgba(110, 75, 50, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
}
.cast-card p { margin: 0 0 8px; }
.cast-steps { margin: 8px 0 14px; padding-left: 1.2rem; }
.cast-steps li { margin: 6px 0; }

.player-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; min-height: 48px; }
.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  box-shadow: 0 8px 20px rgba(80, 50, 20, 0.08);
  animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1);
}
.player-chip.off { opacity: 0.45; }
.emblem {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  flex: none;
}
.emblem .motif { width: 22px; height: 22px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 14px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 600; }

.stage-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.time-num { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 0.9; color: var(--lapis); }
.time-num.urgent { color: var(--pomegranate); }
.timer { height: 14px; border-radius: 99px; background: rgba(26, 18, 12, 0.1); overflow: hidden; margin: 12px 0; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--pomegranate)); transform-origin: left center; }
.prompt { font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.15; margin: 8px 0 18px; }
.blank-slot {
  display: inline-block;
  min-width: 4.2ch;
  border-bottom: 3px solid var(--pomegranate);
  transform: translateY(-2px);
}
.blank-slot.filled { color: var(--olive); padding: 0 6px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  text-align: left;
  background: var(--cream);
  border-radius: 16px;
  min-height: 74px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  border: 1px solid rgba(110, 75, 50, 0.2);
}
.choice .letter {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--lapis);
  color: white;
  font-weight: 700;
}
.choice.is-correct { border-color: var(--olive); background: #e5f3e4; }
.choice.is-yours { box-shadow: inset 0 0 0 2px var(--gold-deep); }
.choice.is-wrong { border-color: rgba(142, 47, 58, 0.55); }
.count { margin-left: auto; font-weight: 700; color: var(--ink-soft); }
.banner-stage { min-height: 280px; display: grid; place-items: center; text-align: center; gap: 8px; }
.banner-stage .motif { width: min(168px, 28vw); height: min(168px, 28vw); color: var(--lapis); }
.banner-stage h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; }

.lb { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lb-row, .podium-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--cream);
  border: 1px solid rgba(110, 75, 50, 0.12);
  border-radius: 14px;
  padding: 8px 12px;
}
.rank-no { font-family: var(--serif); font-size: 1.4rem; width: 2ch; }
.who small { display: block; color: var(--ink-soft); }
.score { font-variant-numeric: tabular-nums; font-weight: 700; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 18px; }
.podium-card { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 150px; justify-content: center; }
.podium-card:nth-child(1) { background: linear-gradient(#fffaf3, #f3e2b4); }
.explain { background: var(--cream); border-radius: 14px; padding: 12px 14px; color: var(--ink-soft); border: 1px solid rgba(110, 75, 50, 0.12); }

.phone-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.phone .sheet { display: flex; flex-direction: column; }
.chip-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 650; }
.chip-name small { font-weight: 500; color: var(--ink-soft); font-size: 0.75rem; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.choice.big { min-height: 68px; font-size: 1.05rem; }
.result-banner {
  border-radius: 16px;
  padding: 14px;
  background: #e7f5ea;
  color: var(--ink);
  margin-bottom: 12px;
}
.result-banner.miss { background: #f8e6e4; }
.result-banner strong { font-family: var(--serif); font-size: 1.8rem; display: block; }
.locked-note { margin-top: auto; text-align: center; color: var(--ink-soft); padding: 12px; }

.admin-grid { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.q-item, .stat-row {
  width: 100%;
  text-align: left;
  background: var(--cream);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--ink);
  border: 1px solid rgba(110, 75, 50, 0.16);
}
.q-item.on { border-color: var(--lapis); box-shadow: inset 0 0 0 1px var(--lapis); }
.tag {
  display: inline-block;
  border-radius: 99px;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--gold-2);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag.sample { background: var(--pomegranate); color: white; }
.bar { height: 8px; border-radius: 99px; background: rgba(26, 18, 12, 0.1); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--pomegranate); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-edit { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.error {
  background: #f8e6e4;
  color: var(--pomegranate);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
}
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 999px;
  z-index: 5;
  box-shadow: var(--shadow);
}

.landing { padding-top: 12px; }
.sample-flag { margin-left: 8px; }

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 9, 7, 0.72);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-card {
  width: min(680px, 100%);
  max-height: min(92dvh, 860px);
  overflow: auto;
}
.modal-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.modal-card h3 { font-family: var(--serif); font-size: 1.25rem; margin: 16px 0 6px; }
.rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: rgba(18, 14, 11, 0.94);
  color: var(--cream);
}
.rotate-hint h2 { font-size: clamp(2rem, 8vw, 3.2rem); margin: 0 0 12px; }
.rotate-hint p { max-width: 34rem; margin: 0 auto 16px; line-height: 1.45; }
.rotate-hint .kicker { color: var(--gold-2); }

.tv-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
}
.tv-gate-card { width: min(880px, 100%); }
.tv-code {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4.2rem);
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}
body.tv-page:not(.tv-watching) #shell { display: none; }
body.ios-immersive {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: auto;
}

@keyframes pop {
  from { transform: translateY(8px) scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 860px) {
  .hero, .code-board, .admin-grid, .choice-grid, .podium { grid-template-columns: 1fr; }
  .mode-row { grid-template-columns: 1fr 1fr; }
  .hero-art { order: -1; }
  .code-letters { justify-content: center; }
  .topbar { padding-top: 12px; align-items: flex-start; }
  body.host-page .actions {
    position: sticky;
    bottom: 0;
    padding: 10px 0 4px;
    background: linear-gradient(180deg, rgba(244, 230, 204, 0), var(--parchment) 30%);
  }
}
@media (max-width: 560px) {
  .mode-row { grid-template-columns: 1fr; }
  .week-banner { grid-template-columns: 112px 1fr; }
  .week-banner img { width: 112px; height: 76px; }
}

@media (orientation: landscape) and (max-height: 520px) and (min-width: 640px) {
  body.host-page,
  body.tv-page.tv-watching {
    height: 100dvh;
    overflow: hidden;
  }
  body.host-page #shell,
  body.tv-page.tv-watching #shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 4px 10px 2px;
    gap: 2px;
  }
  body.host-page .topbar,
  body.tv-page.tv-watching .topbar,
  body.host-page .wrap,
  body.tv-page.tv-watching .wrap,
  body.host-page .site-footer,
  body.tv-page.tv-watching .site-footer,
  body.host-page .week-banner,
  body.tv-page.tv-watching .week-banner {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  body.host-page .topbar,
  body.tv-page.tv-watching .topbar { padding: 0; }
  body.host-page .site-footer,
  body.tv-page.tv-watching .site-footer { padding: 0; font-size: 0.68rem; }
  body.host-page .week-banner,
  body.tv-page.tv-watching .week-banner { grid-template-columns: 84px 1fr; }
  body.host-page .week-banner img,
  body.tv-page.tv-watching .week-banner img { width: 72px; height: 36px; }
  body.host-page .kicker,
  body.tv-page.tv-watching .kicker { margin-bottom: 2px; }
  body.host-page .week-copy strong,
  body.tv-page.tv-watching .week-copy strong { font-size: 0.95rem; }
  body.host-page #app,
  body.tv-page.tv-watching #app { flex: 1; min-height: 0; display: flex; }
  body.host-page #app > .sheet,
  body.tv-page.tv-watching #app > .sheet {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 6px 10px 4px;
    display: flex;
    flex-direction: column;
  }
  body.host-page h1,
  body.tv-page.tv-watching h1 { font-size: 1.35rem; margin: 0; }
  body.host-page .prompt,
  body.tv-page.tv-watching .prompt { font-size: 1.05rem; line-height: 1.15; margin: 0 0 4px; }
  body.host-page .time-num,
  body.tv-page.tv-watching .time-num { font-size: 1.45rem; }
  body.host-page .timer,
  body.tv-page.tv-watching .timer { height: 6px; margin: 4px 0; }
  body.host-page .choice-grid,
  body.tv-page.tv-watching .choice-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  body.host-page .choice,
  body.tv-page.tv-watching .choice { min-height: 36px; padding: 4px 8px; font-size: 0.92rem; }
  body.host-page .choice .letter,
  body.tv-page.tv-watching .choice .letter { width: 26px; height: 26px; }
  body.host-page .btn,
  body.tv-page.tv-watching .btn { min-height: 36px; }
  body.host-page .actions,
  body.tv-page.tv-watching .actions { position: static; margin-top: 4px; background: none; }
  body.host-page .hint,
  body.tv-page.tv-watching .hint { margin: 2px 0; }
}

@media (min-aspect-ratio: 29/20) and (min-width: 1000px) and (min-height: 640px) {
  body.host-page,
  body.tv-page.tv-watching {
    height: 100dvh;
    overflow: hidden;
  }
  body.host-page #shell,
  body.tv-page.tv-watching #shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 1.5vh 2.4vw 1vh;
    gap: 1vh;
  }
  body.host-page .topbar,
  body.tv-page.tv-watching .topbar,
  body.host-page .wrap,
  body.tv-page.tv-watching .wrap,
  body.host-page .site-footer,
  body.tv-page.tv-watching .site-footer,
  body.host-page .week-banner,
  body.tv-page.tv-watching .week-banner {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  body.host-page .topbar,
  body.tv-page.tv-watching .topbar { padding: 0; }
  body.host-page .site-footer,
  body.tv-page.tv-watching .site-footer { padding: 0.4vh 0 0; font-size: 1.5vh; }
  body.host-page .week-banner,
  body.tv-page.tv-watching .week-banner { grid-template-columns: 22vh 1fr; }
  body.host-page .week-banner img,
  body.tv-page.tv-watching .week-banner img { width: 22vh; height: 12vh; }
  body.host-page .week-copy strong,
  body.tv-page.tv-watching .week-copy strong { font-size: 2.8vh; }
  body.host-page .week-copy span,
  body.tv-page.tv-watching .week-copy span,
  body.host-page .kicker,
  body.tv-page.tv-watching .kicker { font-size: 1.6vh; }
  body.host-page #app,
  body.tv-page.tv-watching #app {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.host-page #app > .sheet,
  body.tv-page.tv-watching #app > .sheet {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    padding: 2vh 2.2vw;
  }
  body.host-page h1,
  body.tv-page.tv-watching h1 { font-size: 5.6vh; }
  body.host-page .prompt,
  body.tv-page.tv-watching .prompt { font-size: 4.8vh; margin: 0.6vh 0 1.2vh; }
  body.host-page .time-num,
  body.tv-page.tv-watching .time-num { font-size: 8vh; }
  body.host-page .choice-grid,
  body.tv-page.tv-watching .choice-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2vh;
    flex: 1;
    min-height: 0;
    align-content: stretch;
  }
  body.host-page .choice,
  body.tv-page.tv-watching .choice { min-height: 0; font-size: 3.2vh; padding: 1.4vh 1.8vh; }
  body.host-page .choice .letter,
  body.tv-page.tv-watching .choice .letter { width: 4.8vh; height: 4.8vh; font-size: 2.2vh; }
  body.host-page .code-board,
  body.tv-page.tv-watching .code-board { grid-template-columns: 1.4fr 0.7fr; }
  body.host-page .code-letter,
  body.tv-page.tv-watching .code-letter {
    width: 11vh;
    height: 13vh;
    font-size: 7vh;
  }
  body.host-page .qr-card img,
  body.tv-page.tv-watching .qr-card img { width: min(100%, 22vh); }
  body.host-page .btn,
  body.tv-page.tv-watching .btn { min-height: 6vh; font-size: 2.2vh; }
  body.host-page .banner-stage,
  body.tv-page.tv-watching .banner-stage { display: grid; place-items: center; }
  body.host-page .banner-stage .motif,
  body.tv-page.tv-watching .banner-stage .motif { width: 18vh; height: 18vh; }
  body.host-page .banner-stage h2,
  body.tv-page.tv-watching .banner-stage h2 { font-size: 6vh; }
  body.host-page .podium,
  body.tv-page.tv-watching .podium { grid-template-columns: repeat(3, 1fr); }
  body.host-page .actions,
  body.tv-page.tv-watching .actions { position: static; background: none; margin-top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
