@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  --ink: #05070c;
  --panel: #080a0e;
  --panel-soft: #11151c;
  --blue: #087bc4;
  --blue-light: #16b5ea;
  --gold: #cbb15e;
  --gold-bright: #f0d781;
  --white: #fff;
  --muted: #b9c2cf;
  --line: rgba(206, 178, 91, .68);
  --green: #79e2b1;
  --red: #ff8d83;
  font-family: 'DM Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  background: #050817;
  background-image:
    radial-gradient(ellipse at 51% 48%, rgba(4, 133, 211, .42), transparent 46%),
    radial-gradient(ellipse at 8% 24%, rgba(5, 181, 218, .4), transparent 28%),
    radial-gradient(ellipse at 100% 72%, rgba(9, 93, 189, .38), transparent 38%),
    linear-gradient(145deg, #080322 0%, #061741 38%, #071d4d 62%, #0a0525 100%);
}
body::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .8;
  background:
    linear-gradient(164deg, transparent 14%, transparent 17%, rgba(34, 183, 255, .42) 17.2%, transparent 18.1%, transparent 41%, rgba(23, 131, 232, .28) 42%, transparent 43%),
    linear-gradient(13deg, transparent 28%, rgba(4, 177, 231, .23) 29%, transparent 30%, transparent 71%, rgba(29, 131, 225, .31) 72%, transparent 73%),
    radial-gradient(ellipse at 50% 105%, rgba(0, 174, 247, .3), transparent 44%);
  filter: blur(1px);
}
body > * { position: relative; z-index: 1; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: 'Space Grotesk', 'DM Sans', sans-serif; }
h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.06; margin-bottom: 12px; }
h2 { font-size: 22px; }
code { color: var(--gold-bright); background: #1a1a1d; padding: 2px 5px; border-radius: 4px; }

.topbar, .player-header {
  height: 68px;
  padding: 0 clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(231, 197, 108, .3);
  background: rgba(2, 4, 10, .78);
  backdrop-filter: blur(14px);
}
.brand { font: 800 17px 'Space Grotesk', sans-serif; letter-spacing: .13em; }
.brand b { color: var(--gold-bright); }
.topbar-label, .eyebrow {
  font: 800 10px 'Space Grotesk', sans-serif;
  letter-spacing: .2em;
  color: var(--gold-bright);
  text-transform: uppercase;
}
.muted { color: var(--muted); line-height: 1.55; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button.primary { color: #100f09; background: linear-gradient(180deg, #f6df8c, #c9aa4d); box-shadow: 0 4px 18px rgba(217, 184, 87, .2); }
.button.secondary { color: var(--white); border-color: rgba(207, 179, 98, .54); background: rgba(7, 10, 17, .82); }
.button.danger { color: #ffd5d0; border-color: #914641; background: #3b191a; }
.full-width { width: 100%; }
.hidden { display: none !important; }
.message { min-height: 22px; color: var(--green); font-size: 13px; }
.message.error { color: #ffaaa3; }

/* Entry */
.landing { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.landing-card {
  position: relative;
  width: min(570px, 100%);
  padding: 54px 30px 40px;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(3, 5, 12, .97), rgba(6, 8, 12, .91));
  box-shadow: 0 24px 90px rgba(0, 0, 0, .48), inset 0 0 0 1px rgba(249, 222, 142, .08);
}
.landing-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, #e4cb7b, transparent); }
.landing-card h1 { margin: 25px 0 19px; font-size: clamp(54px, 12vw, 92px); letter-spacing: -.06em; line-height: .84; }
.landing-card h1 span { color: var(--gold-bright); }
.landing-card p { color: #e0e6ef; font-size: 18px; }
.landing-actions { display: flex; justify-content: center; gap: 12px; margin: 28px 0; }
.landing-card small { color: #abb4c4; }

/* Host console */
.console-layout {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .8fr);
  gap: 25px;
  align-items: start;
}
.console-main, .console-side { min-width: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h1 { margin: 7px 0 0; }
.console-main > .muted { max-width: 740px; margin-bottom: 22px; }
.question-list { display: grid; gap: 13px; }
.question-card {
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(205, 178, 93, .38);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(7, 9, 14, .96), rgba(17, 20, 27, .94));
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
.question-preview, .question-preview-empty {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 12px;
  border: 1px solid rgba(213, 188, 109, .64); background: #030406; object-fit: contain;
}
.question-preview-empty { display: grid; place-content: center; padding: 12px; color: #bec5d0; text-align: center; font-size: 12px; }
.question-fields { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 10px; }
.question-fields label, .join-form label, #answer-form label { display: grid; gap: 6px; color: #d3d8e1; font-size: 12px; font-weight: 700; }
.question-fields label.wide { grid-column: 1 / -1; }
.question-fields input, .question-fields textarea, .join-form input, #answer-input {
  width: 100%; padding: 10px 11px; outline: none; color: var(--white);
  border: 1px solid #49505b; border-radius: 9px; background: #080a0e;
}
.question-fields input:focus, .question-fields textarea:focus, .join-form input:focus, #answer-input:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 2px rgba(223, 194, 103, .14); }
.question-fields input:disabled { color: #aeb3bc; opacity: .8; cursor: default; }
.question-fields input[type="file"] { padding: 7px; font-size: 12px; }
.question-fields textarea { min-height: 62px; resize: vertical; }
.question-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-bottom: -2px; }
.question-head strong { font: 700 14px 'Space Grotesk', sans-serif; letter-spacing: .07em; }
.remove-question { border: 0; padding: 5px 7px; color: #f2d985; background: none; cursor: pointer; }
.remove-question:last-child { color: #ffaaa3; }
.toolbar { display: flex; justify-content: flex-end; gap: 10px; margin: 18px 0; }
.console-side { position: sticky; top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(4, 6, 10, .98), rgba(14, 17, 23, .97)); box-shadow: 0 18px 50px rgba(0, 0, 0, .3); }
.console-side h2 { margin: 8px 0 17px; }
.room-panel { padding: 15px; border: 1px solid rgba(208, 181, 95, .34); border-radius: 13px; color: #c6ced9; background: #080a0d; line-height: 1.5; }
.room-panel.ready { color: var(--white); }
.room-code-display { margin: 18px 0 13px; padding: 15px; text-align: center; border: 1px solid var(--gold); border-radius: 16px; background: #020304; box-shadow: inset 0 0 24px rgba(196, 161, 70, .08); }
.room-code-display span { display: block; color: var(--gold-bright); font-size: 9px; font-weight: 800; letter-spacing: .23em; }
.room-code-display strong { display: block; margin-top: 4px; font: 700 36px 'Space Grotesk', sans-serif; letter-spacing: .16em; }
.room-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-status { display: flex; justify-content: space-between; margin: 20px 0 10px; color: var(--muted); font-size: 12px; }
.roster { display: grid; gap: 7px; max-height: 210px; overflow: auto; }
.roster-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 9px; background: #151920; font-size: 12px; }
.roster-person { display: grid; min-width: 0; gap: 2px; text-align: left; }
.roster-person b { overflow-wrap: anywhere; }
.roster-person small { color: #bdc3cc; font-size: 10px; font-weight: 500; }
.roster-row .status { color: #9be3bd; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-align: right; }
.roster-row.out .status { color: #e6a29d; }
.host-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.host-buttons .button:first-child:nth-last-child(1) { grid-column: 1 / -1; }
.host-question { color: var(--muted); font-size: 12px; line-height: 1.45; }
.host-question img { display: block; width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: #030406; }
.console-note { margin-top: 17px; padding-top: 14px; border-top: 1px solid rgba(208, 181, 95, .25); color: #aab3c0; font-size: 12px; line-height: 1.55; }
.host-sequence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 0; margin: 17px 0 9px; list-style: none; }
.host-sequence li { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 9px 3px; color: #9da5af; border: 1px solid #333942; border-radius: 10px; background: #090b0f; text-align: center; }
.host-sequence li span { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #656b71; border-radius: 50%; font: 700 11px 'Space Grotesk', sans-serif; }
.host-sequence li b { font-size: 9px; line-height: 1.2; }
.host-sequence li.active { border-color: var(--gold); color: #fff3c2; background: #241f12; box-shadow: inset 0 0 16px rgba(210, 179, 82, .1); }
.host-sequence li.active span, .host-sequence li.done span { border-color: var(--gold); color: var(--gold-bright); }
.host-sequence li.done { color: #bac5c0; border-color: rgba(121, 226, 177, .38); }
.host-step-hint { min-height: 34px; margin: 0 0 10px; color: #d8cfb3; font-size: 11px; line-height: 1.45; }

/* Projector: dark quiz stage, gold hairlines and bright question art */
.tv-body { min-height: 100dvh; overflow: hidden; background-color: #080304; background-image: radial-gradient(ellipse at 50% 52%, rgba(75, 18, 13, .45), transparent 53%), repeating-linear-gradient(0deg, transparent 0 78px, rgba(215, 94, 27, .16) 80px, transparent 83px), linear-gradient(180deg, #080808, #1a0808 52%, #050607); }
.tv-body::before { opacity: .7; background: linear-gradient(180deg, transparent 8%, rgba(249, 160, 48, .16) 9%, transparent 10%, transparent 80%, rgba(255, 96, 36, .18) 82%, transparent 84%); }
.tv-shell { height: 100dvh; min-height: 550px; display: grid; grid-template-rows: 60px minmax(0, 1fr) auto; padding: 0 clamp(16px, 3.2vw, 52px); }
.tv-shell.title-mode { display: block; min-height: 0; padding: 0; }
.tv-shell.title-mode .tv-header, .tv-shell.title-mode .tv-footer { display: none; }
.tv-shell.title-mode .tv-title { width: 100vw; height: 100dvh; display: grid; place-items: center; overflow: hidden; }
.tv-title img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tv-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(206, 177, 85, .5); }
.tv-ladder { color: var(--gold-bright); font: 800 12px 'Space Grotesk', sans-serif; letter-spacing: .15em; }
.tv-room { color: #c5bdad; font-size: 11px; }
.tv-lobby { align-self: center; justify-self: center; width: min(100%, 1060px); text-align: center; }
.tv-lobby h1 { margin: 14px; font-size: clamp(42px, 7vw, 76px); }
.tv-lobby p { color: #d4d1cb; line-height: 1.6; }
.tv-lobby-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 6vw, 84px); margin: 24px auto 0; padding: clamp(22px, 4vw, 40px); border: 1px solid var(--gold); border-radius: 22px; background: rgba(3, 4, 6, .92); box-shadow: 0 18px 65px rgba(0, 0, 0, .55); }
.tv-lobby-copy { min-width: 0; }
.tv-scan-prompt { margin: 0; color: #fff !important; font: 700 clamp(23px, 3vw, 38px)/1.18 'Space Grotesk', sans-serif; }
.tv-lobby-copy .join-code-large { margin: 13px 0 5px; font-size: clamp(46px, 7vw, 72px); }
.tv-lobby-copy > p:not(.tv-scan-prompt) { margin-bottom: 16px; font-size: 13px; }
.tv-qr-wrap { display: grid; justify-items: center; gap: 10px; padding: 12px; border-radius: 16px; color: #141414; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.tv-qr-wrap img { display: block; width: clamp(150px, 22vw, 240px); aspect-ratio: 1; object-fit: contain; }
.tv-qr-wrap span { color: #141414; font: 800 10px 'Space Grotesk', sans-serif; letter-spacing: .16em; }
.join-code-large { margin: 23px 0; color: var(--gold-bright); font: 700 clamp(52px, 9vw, 90px) 'Space Grotesk', sans-serif; letter-spacing: .22em; text-shadow: 0 0 28px rgba(238, 208, 119, .2); }
.tv-player-count { display: flex; align-items: baseline; justify-content: center; gap: 9px; color: #c2bdb2; }
.tv-player-count strong { color: var(--white); font: 700 29px 'Space Grotesk', sans-serif; }
.tv-question { align-self: center; justify-self: center; display: grid; justify-items: center; width: min(100%, 1480px); }
.tv-question-meta { width: min(100%, 1220px); display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; margin: 0 auto 13px; color: #f2eee3; font: 800 12px 'Space Grotesk', sans-serif; letter-spacing: .1em; }
.tv-question-meta > :nth-child(2) { text-align: center; }
.tv-question-meta > :last-child { text-align: right; }
.percent-pill { display: inline-flex; width: 55px; height: 55px; align-items: center; justify-content: center; border: 2px solid var(--gold); border-radius: 50%; color: var(--gold-bright); background: #030304; box-shadow: 0 0 0 4px rgba(207, 176, 80, .1), 0 0 22px rgba(210, 177, 80, .15); font-weight: 800; letter-spacing: -.04em; }
.timer { color: var(--white); font: 700 22px 'Space Grotesk', sans-serif; }
.slide-frame { position: relative; width: min(100%, 1220px); aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid var(--gold); border-radius: 21px; background: #030304; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 65px rgba(0, 0, 0, .6); }
.slide-frame::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(255, 226, 153, .16); border-radius: 15px; pointer-events: none; }
.slide-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tv-answer-reveal { width: min(100%, 1220px); margin-top: 12px; padding: 15px 20px; border: 1px solid var(--gold); border-radius: 15px; background: rgba(3, 4, 6, .96); animation: reveal-in .35s ease-out; }
.tv-answer-reveal strong { color: var(--gold-bright); font: 700 26px 'Space Grotesk', sans-serif; }
.tv-answer-reveal p { margin: 6px 0 0; color: #d6d4ce; }
.tv-elimination-stage { width: min(100%, 1220px); aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; border: 2px solid var(--gold); border-radius: 21px; background: radial-gradient(ellipse at 50% 56%, rgba(91, 28, 17, .58), transparent 55%), repeating-linear-gradient(0deg, transparent 0 76px, rgba(226, 95, 35, .16) 78px, transparent 81px), #030304; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 65px rgba(0, 0, 0, .6); animation: reveal-in .35s ease-out; }
.tv-elimination-stage::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(255, 226, 153, .24); border-radius: 14px; pointer-events: none; }
.tv-elimination-stage .eyebrow { z-index: 1; margin-bottom: 2px; }
.tv-elimination-stage > strong { z-index: 1; color: var(--gold-bright); font: 700 clamp(90px, 17vw, 220px)/.95 'Space Grotesk', sans-serif; letter-spacing: -.06em; text-shadow: 0 0 35px rgba(238, 208, 119, .27); animation: count-reveal .7s cubic-bezier(.2,.75,.3,1) both; }
.tv-elimination-stage > p { z-index: 1; margin: 0; color: #fff; font: 800 clamp(15px, 2vw, 24px) 'Space Grotesk', sans-serif; letter-spacing: .2em; }
.tv-remaining { z-index: 1; margin-top: 22px; color: #d2ccc0; font-size: 13px; letter-spacing: .05em; }
.tv-remaining b { color: #fff; font: 700 20px 'Space Grotesk', sans-serif; }
.tv-final-round { color: #ecd983 !important; font-weight: 700; }
@keyframes count-reveal { from { opacity: 0; transform: scale(.65); filter: blur(8px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
.tv-footer { padding: 11px 0 14px; border-top: 1px solid rgba(204, 174, 80, .45); }
.tv-counts { display: flex; justify-content: center; gap: 24px; color: #bfb8a9; font-size: 11px; }
.tv-counts b { margin-right: 4px; color: var(--gold-bright); font-size: 15px; }
.tv-roster { display: flex; justify-content: center; gap: 7px; overflow: auto; padding-top: 8px; }
.tv-roster .roster-row { min-width: 125px; padding: 7px 10px; background: rgba(8, 9, 11, .82); }
.tv-finished { align-self: center; justify-self: center; text-align: center; }
.tv-finished h1 { margin: 18px; color: var(--gold-bright); font-size: clamp(42px, 7vw, 75px); }
.winners-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.winner-chip { display: grid; gap: 3px; padding: 12px 18px; border: 1px solid var(--gold); border-radius: 15px; color: var(--gold-bright); background: #080808; font-weight: 700; }
.winner-chip small { color: #d0cbbf; font-size: 10px; font-weight: 500; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Player phone */
.player-body { min-height: 100dvh; padding: 0 14px 28px; }
.player-shell { width: min(620px, 100%); margin: 0 auto; }
.player-header { height: 60px; margin: 0 -14px; padding: 0 18px; }
.player-header .brand { font-size: 14px; }
.player-header span { color: #d8dce4; font-size: 12px; }
.join-form { max-width: 440px; margin: 10vh auto 0; padding: 28px; border: 1px solid var(--gold); border-radius: 22px; background: rgba(3, 4, 8, .96); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.join-form h1 { margin: 10px 0 24px; }
.join-form label { margin-bottom: 14px; }
.player-game { padding-top: 16px; }
.player-identity { display: grid; gap: 2px; }
.player-identity small { color: #c1c6cf; font-size: 11px; font-weight: 500; }
.player-status { display: flex; align-items: center; justify-content: space-between; margin: 5px 2px 14px; font-size: 14px; font-weight: 800; }
.standing-pill { padding: 7px 11px; border: 1px solid rgba(108, 218, 164, .5); border-radius: 999px; color: #a4f1ca; background: rgba(4, 41, 33, .85); font-size: 9px; letter-spacing: .09em; }
.standing-pill.out { border-color: rgba(220, 133, 126, .6); color: #ffc1bc; background: rgba(57, 19, 23, .9); }
.player-card { margin-bottom: 13px; padding: 20px; border: 1px solid var(--gold); border-radius: 20px; background: rgba(3, 4, 7, .96); box-shadow: 0 13px 36px rgba(0, 0, 0, .32); }
.player-card h2 { margin: 10px 0; }
.player-card p { margin: 8px 0 0; color: #d0d5de; line-height: 1.5; }
.player-question-meta { display: grid; grid-template-columns: 58px minmax(0, 1fr) 125px; align-items: center; gap: 9px; margin: 0 0 14px; color: #f1f1f3; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.player-question-meta #player-number { text-align: center; }
.player-question-meta .percent-pill { width: 52px; height: 52px; }
.player-question-meta #player-timer { display: block; padding: 9px 8px; border: 1px solid var(--gold); border-radius: 13px; color: var(--white); background: #020203; text-align: center; font: 700 16px 'Space Grotesk', sans-serif; white-space: nowrap; }
.player-card img { display: block; width: 100%; max-height: 52vh; object-fit: contain; margin: 0 0 16px; border: 1px solid rgba(211, 180, 86, .7); border-radius: 15px; background: #030304; }
#answer-form label { margin-bottom: 7px; color: #f2f0eb; font-size: 13px; text-align: center; text-transform: uppercase; letter-spacing: .08em; }
.answer-row { display: flex; gap: 9px; margin-top: 7px; }
.answer-row input { min-width: 0; flex: 1; padding: 13px 15px; border: 2px solid var(--gold); border-radius: 15px; color: var(--white); background: #020203; font-size: 18px; }
.answer-confirmation { margin-top: 12px; color: #a4f1ca; font-size: 13px; text-align: center; }
.result-heading { margin-bottom: 14px; color: #a4f1ca; font: 700 20px 'Space Grotesk', sans-serif; }
.result-heading.incorrect { color: #ffc1bc; }
#player-correct-answer { color: var(--gold-bright); font: 700 24px 'Space Grotesk', sans-serif; }
.player-round-result { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(203, 177, 94, .38); color: #f0d981; font-size: 13px; }
.player-round-result b { color: #fff; font: 700 18px 'Space Grotesk', sans-serif; }

@media (max-width: 950px) {
  .console-layout { grid-template-columns: 1fr; }
  .console-side { position: static; }
  .question-card { grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .topbar { height: 58px; }
  .console-layout { padding: 18px 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .question-card { grid-template-columns: 1fr; }
  .question-preview, .question-preview-empty { max-width: 100%; }
  .question-fields { grid-template-columns: minmax(0, 1fr) 82px; }
  .landing-actions { flex-direction: column; }
  .console-side { padding: 18px; }
  .tv-shell { min-height: 480px; grid-template-rows: 52px minmax(0, 1fr) auto; padding: 0 10px; }
  .tv-shell.title-mode { min-height: 0; padding: 0; }
  .tv-shell.title-mode .tv-title { width: 100vw; height: 100dvh; }
  .tv-header .brand { font-size: 13px; }
  .tv-ladder { font-size: 9px; }
  .tv-lobby-content { grid-template-columns: 1fr auto; gap: 12px; padding: 16px 12px; }
  .tv-lobby-copy .join-code-large { font-size: clamp(34px, 9vw, 52px); letter-spacing: .12em; }
  .tv-scan-prompt { font-size: clamp(18px, 4.4vw, 24px); }
  .tv-qr-wrap { gap: 6px; padding: 7px; border-radius: 10px; }
  .tv-qr-wrap img { width: clamp(110px, 28vw, 160px); }
  .tv-qr-wrap span { font-size: 8px; }
  .tv-room { font-size: 9px; }
  .tv-question-meta { grid-template-columns: 44px 1fr 64px; gap: 7px; margin-bottom: 9px; font-size: 8px; }
  .tv-question-meta .percent-pill { width: 42px; height: 42px; }
  .timer { font-size: 16px; }
  .slide-frame { border-radius: 13px; }
  .tv-counts { gap: 14px; font-size: 9px; }
  .tv-roster .roster-row { min-width: 98px; }
  .tv-roster .roster-row .status { display: none; }
  .tv-elimination-stage { border-radius: 13px; }
  .tv-elimination-stage > strong { font-size: clamp(68px, 22vw, 120px); }
  .tv-elimination-stage > p { font-size: 11px; letter-spacing: .12em; }
  .tv-remaining { margin-top: 10px; font-size: 9px; }
  .tv-remaining b { font-size: 14px; }
  .join-form { margin-top: 8vh; padding: 22px; }
  .player-body { padding-bottom: 18px; }
  .player-header { height: 54px; }
  .player-status { font-size: 12px; }
  .player-card { padding: 15px; border-radius: 17px; }
  .player-question-meta { grid-template-columns: 48px minmax(0, 1fr) 104px; gap: 6px; font-size: 8px; }
  .player-question-meta .percent-pill { width: 44px; height: 44px; }
  .player-question-meta #player-timer { padding: 8px 5px; font-size: 13px; }
  .player-card img { max-height: 47vh; }
  .answer-row { flex-direction: row; }
  .answer-row .button { padding-inline: 13px; }
  .host-sequence b { font-size: 8px; }
}
