/* TV / host screen */
body.tv { display: grid; grid-template-rows: auto 1fr auto; min-height: 100dvh; overflow: hidden; font-size: 20px; }
.hide { display: none !important; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; gap: 20px; }
.bar-mid { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--muted); }
.bar-right { display: flex; align-items: center; gap: 14px; }
.roomtag { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .18em; padding: 8px 14px; border-radius: 12px; background: var(--ink-2); border: 1.5px solid var(--line); }
.stage { display: grid; align-content: center; justify-items: center; padding: 10px 48px 24px; gap: 28px; text-align: center; }
.players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 14px 32px 22px; min-height: 60px; }
.players .chip { font-size: 17px; }
.controls { position: fixed; right: 20px; bottom: 16px; display: flex; gap: 10px; }
.controls .btn { min-height: 44px; font-size: 15px; padding: 0 16px; background: rgba(11,0,22,.7); backdrop-filter: blur(8px); }

/* Lobby */
.lobby { display: grid; grid-template-columns: auto auto; gap: 56px; align-items: center; text-align: left; }
.lobby .code { font-family: var(--display); font-weight: 800; font-size: clamp(90px, 15vw, 190px); letter-spacing: .12em; line-height: .95; color: var(--text); }
.lobby .join-at { font-size: 26px; color: var(--muted); margin-top: 6px; }
.lobby .join-at b { color: var(--cyan); font-weight: 700; }
.lobby .qr { background: #fff; padding: 14px; border-radius: 22px; width: 232px; height: 232px; display: grid; place-items: center; }
.lobby .qr svg { width: 100%; height: 100%; }
.lobby .opts { display: flex; gap: 22px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.lobby .start { margin-top: 24px; display: flex; align-items: center; gap: 18px; }
.lobby .need { color: var(--muted); font-size: 17px; }
.players .chip .x { margin-left: 4px; color: var(--muted); font-weight: 800; font-size: 14px; padding: 0 4px; border-radius: 6px; }
.players .chip .x:hover { color: var(--danger); background: rgba(255,255,255,.06); }

/* Shared stage bits */
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--muted); }
.prompt.big { font-size: clamp(38px, 5.2vw, 76px); max-width: 22ch; }
.prompt.mid { font-size: clamp(28px, 3.6vw, 52px); max-width: 26ch; }
.progress { font-family: var(--display); font-weight: 800; font-size: 34px; }
.progress b { color: var(--cyan); }

/* Faceoff */
.faceoff { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; width: min(1400px, 100%); align-items: start; margin-top: 8px; }
.faceoff .side { display: grid; gap: 22px; }
.faceoff .bubble { text-align: left; min-height: 150px; display: flex; align-items: center; }
.faceoff .meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; min-height: 40px; }
.faceoff .author { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.faceoff .author .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--ink); }
.faceoff .pts { font-family: var(--display); font-weight: 800; font-size: 30px; }
.faceoff .pts.zero { color: var(--muted); }
.faceoff .voters { color: var(--muted); font-size: 15px; text-align: left; padding: 0 8px; min-height: 22px; }
.mic { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); background: var(--gold); padding: 4px 12px; border-radius: 999px; animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vs { display: none; }
.votes-in { color: var(--muted); font-size: 20px; }

/* Final grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px 24px; width: min(1500px, 100%); }
.grid .bubble { font-size: clamp(20px, 2vw, 30px); text-align: left; padding: 18px 22px; min-height: 100px; }
.grid .cell { display: grid; gap: 18px; }
.grid .meta { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
.grid .rank { font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--gold); }

/* Leaderboard */
.board { width: min(860px, 100%); display: grid; gap: 10px; text-align: left; }
.row { display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 18px; padding: 14px 22px; border-radius: 18px; background: var(--ink-2); border: 1.5px solid var(--line); }
.row.first { border-color: var(--gold); background: #2a2010; }
.row .rank { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--muted); }
.row.first .rank { color: var(--gold); }
.row .name { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 28px; }
.row .name .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--ink); }
.row .delta { color: var(--ok); font-weight: 700; font-size: 20px; min-width: 90px; text-align: right; }
.row .score { font-family: var(--display); font-weight: 800; font-size: 32px; font-variant-numeric: tabular-nums; min-width: 120px; text-align: right; }

/* Winner */
.winner { display: grid; gap: 10px; justify-items: center; }
.winner .crown { font-size: 64px; }
.winner .who { font-family: var(--display); font-weight: 800; font-size: clamp(60px, 9vw, 120px); line-height: 1; }
.winner .pts { font-size: 28px; color: var(--muted); }

@media (max-width: 900px) {
  .lobby { grid-template-columns: 1fr; gap: 24px; }
  .faceoff { grid-template-columns: 1fr; gap: 28px; }
  .stage { padding: 10px 20px 20px; }
  .bar { padding: 14px 18px; }
}
