/* FunWithUs's lobby and live game refresh. */
:root { color-scheme: dark; }
.lobby-header-links { display: flex; align-items: center; gap: 20px; }
.app-nudge { display:flex; gap:14px; align-items:center; margin-bottom:14px; padding:12px; border:1px solid #445334; border-radius:9px; background:#1c2416; font-size:12px; }
.app-nudge > div { flex:1; min-width:0; }
.app-nudge strong, .app-nudge span { display:block; }
.app-nudge span { color:#a8b49b; font-size:11px; }
.app-nudge a { color:var(--neon-lime); white-space:nowrap; }
.app-nudge button { background:none; border:0; font-size:22px; color:#a8b49b; cursor:pointer; }
.download-shell { width:min(600px,calc(100% - 40px)); margin:36px auto; }
.download-shell h1 { font-size:clamp(40px,8vw,64px); line-height:1; letter-spacing:-.05em; color:var(--neon-lime); margin-block:24px; }
.download-shell > p, .download-shell li { color:#b9c4b1; font-size:15px; line-height:1.6; }
.download-shell .lobby-kicker { margin-top:36px; }
.download-shell .stack { margin-block:24px; }
.download-shell details { margin-block:24px; }
.download-shell nav { margin-top:28px; font-size:13px; }
.download-room { border-left:3px solid var(--neon-lime); padding-left:14px; }
dialog { border:1px solid #536143; border-radius:14px; background:#171d13; color:#f8f7f2; max-width:min(500px,calc(100vw - 32px)); padding:24px; }
dialog::backdrop { background:#000b; }
dialog input { border-color:#536143 !important; }
dialog h2 { margin:0; }
dialog p { font-size:14px; color:#b9c4b1; }
.tv-setup { max-width:1100px; min-height:100svh; padding:5vh 4vw; margin:auto; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.tv-setup > img { width:90px; height:90px; }
.tv-setup h1 { margin:20px 0; font-size:clamp(48px,6vw,88px); line-height:1; letter-spacing:-.06em; }
.tv-setup p { font-size:clamp(18px,2vw,27px); color:#b5c1a9; }
.tv-pair-code { padding:16px 34px; font:600 clamp(54px,9vw,120px)/1.2 var(--font-label); letter-spacing:.15em; color:var(--neon-lime); background:#1b2413; border-radius:16px; }
.tv-setup .small { font-size:clamp(14px,1.5vw,20px); }
/* The entire TV view, including its QR code, fits a 16:9 display. */
.cast-receiver-body { background:#101212; padding:2vh 2vw; overflow:hidden; }
.cast-receiver-body::before { display:none; }
.cast-stage { width:100%; height:96vh; display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,24vw); grid-template-rows:13vh minmax(0,1fr) 34vh 2vh; gap:1.5vh 2vw; }
.cast-top { grid-area:1/1/2/2; min-width:0; }
.cast-logo { width:9vh; height:9vh; border:0; border-radius:0; box-shadow:none; }
.cast-room { color:var(--neon-lime); font-size:1.3vw; }
.cast-theme { color:#f7f8f2; font-size:2.4vw; overflow-wrap:anywhere; }
.cast-hud-grid { display:contents; }
.cast-clock-card { grid-area:1/2/2/3; padding:1vh 1.2vw; background:#1b2118; border:1px solid #3c4b30; border-radius:12px; align-items:center; gap:0; }
.cast-timer { font-size:5vh; color:var(--neon-lime); text-shadow:none; }
.cast-phase { font-size:1.4vh; color:#b9c7ab; }
.cast-leader-panel { grid-area:2/2/3/3; min-height:0; overflow:auto; padding:1.5vh 1vw; background:#171c16; border:1px solid #343f2e; }
.cast-leader-panel h3 { color:#b9c7ab; font-size:1.6vh; }
.cast-leader-panel .leader-row { border-color:#343f2e; background:#222b1b; }
.cast-main { grid-area:2/1/4/2; min-height:0; overflow:auto; justify-content:center; padding:2vh 2vw; gap:2.5vh; background:#171c16; border:1px solid #343f2e; }
.cast-question { font-size:clamp(28px,3.3vw,68px); line-height:1.12; }
.cast-choices { grid-template-columns:1fr 1fr; gap:1.8vh 1vw; }
.cast-choice { padding:2vh 1vw; background:#222b1b; border:1px solid #465438; min-width:0; }
.cast-choice-opt { color:var(--neon-lime); font-size:1.4vw; }
.cast-choice-text { font-size:clamp(20px,2.1vw,44px); line-height:1.15; overflow-wrap:anywhere; }
.cast-choice.correct { border-color:var(--neon-lime); box-shadow:none; background:#33461e; }
.cast-join-panel { grid-area:3/2/4/3; flex-direction:column; flex-wrap:nowrap; justify-content:center; gap:.7vh; padding:1vh .7vw; border:1px solid #343f2e; background:#171c16; }
.cast-qr { width:24vh; height:24vh; max-width:100%; object-fit:contain; padding:.4vh; border:0; border-radius:8px; }
.cast-join-title { color:var(--neon-lime); font-size:1.5vh; }
.cast-join-url { font-size:1.5vh; color:#b9c7ab; }
.cast-status-note { grid-area:4/1/5/3; font-size:1.2vh; min-height:0; color:#718467; padding:0; }
.cast-reveal { padding:1vh 1vw; }
.cast-reveal-row { font-size:2vh; }
.cast-correct-list { font-size:1.5vh; }
.tv-setup { min-height:96vh; padding:2vh 4vw; }
.native-app .lobby-description { display:none; }
.native-app .lobby-intro h1 { font-size:38px; }
.native-app .lobby-kicker { display:none; }
.native-app .lobby-header { display:none; }
.native-app .home-v2 { grid-template-rows:1fr auto; }
.native-app .lobby-footer a[href='/android'] { display:none; }
.native-app #cast-btn, .native-app #fire-tv-btn, .native-app #screen-btn { display:none; }
.native-app .game-v2 .topbar { flex-direction:row; align-items:center; gap:12px; }
.native-app .game-v2 .topbar .brand { flex:1; min-width:0; }
.native-app .game-v2 .topbar h1 { display:none; }
.native-app .game-v2 .topbar .brand-logo { width:28px; }
.native-app .game-v2 .topbar .timer { font-size:24px; line-height:1.2; }
.native-app .game-v2 .topbar .room-pill { font-size:10px; padding:6px; }
.native-app #host-control-panel > .row > .stack > .row { display:grid; grid-template-columns:1fr 1fr; }
.native-app #host-control-panel > .row > .stack > .row .btn { font-size:12px; padding:10px; min-height:44px; }
.native-app #start-btn { grid-column:1/-1; }
@media(max-width:480px) { .lobby-header-links a:first-child { display:none; } .lobby-brand { font-size:24px; } }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--neon-lime); outline-offset: 4px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 30; background: var(--neon-lime); color: #101214; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 16px; }
.home-v2 { background: #101212; grid-template-rows: auto 1fr auto; }
.lobby-header, .lobby-layout, .lobby-footer { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.lobby-header { min-height: 92px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2b2e2c; }
.lobby-brand { color: var(--ink); display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; letter-spacing: -1.6px; }
.lobby-brand:hover { text-decoration: none; }
.lobby-brand img { width: 42px; height: 42px; }
.brand-suffix { color: #a5a9a2; }
.lobby-guide { color: #bfc4bb; font-size: 14px; }
.lobby-guide span { margin-left: 10px; color: var(--neon-lime); }
.lobby-layout { display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: center; padding-block: 36px 42px; }
.lobby-intro { min-width: 0; animation: lobby-enter 450ms ease both; }
.lobby-kicker { display: flex; gap: 9px; align-items: center; color: #b7bdb0; font: 10px/1.4 var(--font-label); letter-spacing: 1.4px; margin: 0 0 22px; }
.live-dot { width: 6px; height: 6px; background: var(--neon-lime); border-radius: 50%; flex: 0 0 auto; }
.lobby-intro h1 { margin: 0; font-size: clamp(56px, 6.45vw, 86px); line-height: .98; letter-spacing: -.07em; font-weight: 600; }
.lobby-intro h1 > span { color: var(--neon-lime); }
.lobby-description { color: #abb2a7; font-size: 16px; line-height: 1.65; max-width: 420px; margin: 24px 0 32px; }
.field-caption { font: 10px/1.5 var(--font-label); letter-spacing: 1.3px; color: #868e82; margin: 0 0 9px; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.topic-grid button { display: flex; justify-content: space-between; gap: 12px; text-align: left; padding: 11px 0; border: 0; border-bottom: 1px solid #2b2e2c; background: none; color: #c7cdc0; font: 13px var(--font-body); cursor: pointer; transition: color 130ms, padding 130ms; }
.topic-grid button > span:last-child { color: #6f7967; }
.topic-grid button:hover, .topic-grid button.selected { color: var(--neon-lime); padding-left: 4px; }
.lobby-proof { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: #868e82; margin-top: 24px; }
.lobby-proof span + span::before { content: '·'; margin-right: 14px; }
.lobby-workspace { min-width: 0; animation: lobby-enter 450ms 70ms ease both; }
.lobby-join { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; margin-bottom: 25px; padding-bottom: 23px; border-bottom: 1px solid #30342e; }
.lobby-join > label { color: #b7bfb0; font-size: 13px; }
.join-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.join-code-row input { font: 13px var(--font-label); letter-spacing: 2px; min-height: 42px; padding: 10px 12px; border-radius: 7px; }
.join-code-row .btn { font-size: 12px; border-radius: 7px; padding: 10px 14px; min-height: 42px; white-space: nowrap; }
#join-status { grid-column: 1 / -1; margin: 0; color: #b7bfb0; }
#join-status:empty { display: none; }
.lobby-create { scroll-margin-top: 20px; }
.mode-switch { padding: 3px; margin: 0; border: 1px solid #34392f; border-radius: 9px; display: grid; grid-template-columns: 1fr 1fr; background: #171a16; }
.mode-switch label { position: relative; cursor: pointer; text-align: center; font-size: 13px; }
.mode-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-switch span { display: block; color: #929c89; padding: 10px; border-radius: 6px; transition: background 150ms, color 150ms; }
.mode-switch input:checked + span { background: #32382a; color: #e5f4d4; }
.mode-switch input:focus-visible + span { outline: 2px solid var(--neon-lime); outline-offset: 3px; }
.mode-description { font-size: 11px; color: #969e90; margin: 9px 0 23px; }
.lobby-create label:not(.mode-switch label) { font-size: 12px; margin-bottom: 7px; color: #d3dacb; }
.lobby-create .topic-field > label { font-size: 19px; font-weight: 500; margin-bottom: 11px; letter-spacing: -.5px; }
.lobby-create textarea, .lobby-create select, .lobby-create input[type='text'], .join-code-row input { border-color: #3d4536; background: #171b15; }
.lobby-create textarea { min-height: 88px; height: 88px; border-radius: 8px; padding: 13px 15px; font-size: 16px; resize: vertical; line-height: 1.5; }
.lobby-create textarea::placeholder, .join-code-row input::placeholder { color: #78816f; }
.topic-field .small { margin: 6px 0 22px; font-size: 11px; color: #949e8b; }
.lobby-settings-grid { display: grid; grid-template-columns: 1fr .8fr 1.15fr; gap: 12px; }
.lobby-settings-grid > div { min-width: 0; }
.lobby-create select { border-radius: 7px; padding: 10px 8px; font-size: 13px; min-height: 43px; }
.lobby-advanced { border: 0; margin: 18px 0 21px; }
.lobby-advanced > summary { font-size: 11px; color: #a3ad99; cursor: pointer; width: fit-content; padding: 3px 0; }
.advanced-fields { display: grid; gap: 16px; margin-top: 15px; padding: 16px; border-left: 2px solid #3d4536; background: #151813; }
.advanced-fields input[type='text'] { font: 16px var(--font-label); border-radius: 6px; }
.advanced-fields .small { font-size: 11px; color: #a3ad99; }
.lobby-create .checkbox-label { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-label input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--neon-lime); }
.lobby-create-button { width: 100%; min-height: 52px; border-radius: 8px; font-size: 16px; justify-content: space-between; padding-inline: 20px; }
.lobby-create-button:hover { background: #e2ff8a; }
.lobby-estimate { text-align: center; font-size: 10px; color: #929d87; margin: 10px 0 0; }
.round-source-note { text-align: center; font-size: 10px; line-height: 1.5; color: #899780; margin: 8px auto 0; max-width: 350px; }
#home-status { font-family: var(--font-body); font-size: 12px; min-height: 0; margin-top: 10px; }
#home-status:empty { display: none; }
.lobby-footer { display: flex; flex-wrap:wrap; justify-content: space-between; gap: 20px; border-top: 1px solid #2b2e2c; padding: 18px 0 22px; color: #8e9786; font-size: 11px; }
.lobby-footer nav { display: flex; gap: 24px; }
.lobby-footer a { color: #b0baa6; }
@keyframes lobby-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

/* Keep the question and answers prominent on a phone or shared display. */
.game-v2 { background: #101212; }
.game-v2 .page-shell { width: min(1180px, calc(100% - 40px)); margin-top: 20px; }
.game-v2 .brand-logo { width: 46px; border-radius: 7px; }
.game-v2 .title-stack h1 { color: var(--ink); background: none; -webkit-text-fill-color: var(--ink); }
.game-v2 .subtitle { font-size: 14px; max-width: 620px; overflow-wrap: anywhere; }
.game-v2 .panel { background: #171a17; box-shadow: none; border-color: #30362c; border-radius: 12px; }
.game-v2 .panel h2, .game-v2 .panel h3 { color: #e3e9dc; }
.game-v2 .question-card { border: 0; background: none; box-shadow: none; padding: 10px 0; }
.game-v2 .question-card .question-text { color: #f8f7f2; }
.game-v2 .choice-btn { background: #20251d; border-color: #3c4534; border-radius: 9px; min-height: 56px; box-shadow: none; }
.game-v2 .choice-btn .opt { color: var(--neon-lime); display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid #4c5742; border-radius: 5px; margin-right: 12px; vertical-align: middle; }
.game-v2 .choice-btn:hover { border-color: #d8ff57; box-shadow: none; }
.game-v2 .choice-btn.correct { background: #30401e; border-color: var(--neon-lime); }
.game-v2 .choice-btn.wrong { border-color: #c96b64; }
.game-v2 .choice-btn.selected { border-color: var(--neon-lime); }
.game-v2 .meter { height: 5px; background: #333b2b; }
.game-v2 .meter > span { background: var(--neon-lime); }
.game-v2 .btn { border-radius: 8px; min-height: 44px; }
.game-v2 .room-pill { background: #252d1d; color: var(--neon-lime); border-radius: 7px; letter-spacing: 2px; }
.game-v2 input[type='text'], .game-v2 input[type='password'], .game-v2 input[type='email'] { border-color: #46513c; border-radius: 8px; }
.game-v2 #join-setup-panel { max-width: 560px; margin-inline: auto; width: 100%; }
.game-v2 #join-setup-panel > h2 { font-size: 28px; margin-block: 6px 12px; }
.game-v2 #host-control-panel > .row > .stack { min-width: 0 !important; }
.game-v2 #join-url-text, .game-v2 #display-join-url { overflow-wrap: anywhere; }
.game-v2 .join-shell .question-text { font-size: clamp(25px, 4.2vw, 42px); line-height: 1.2; }
.game-v2 .join-shell .choice-btn { font-size: clamp(16px, 2vw, 22px); padding: 14px; }
.game-v2 #join-mini-board { border: 0; background: none; padding-inline: 0; }
.game-v2 .join-topbar { flex-direction: row; align-items: center; }
.game-v2 .join-top-meta { align-items: flex-end; min-width: 65px; }
.generation-message { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: #b7c3ab; font-size: 13px; line-height: 1.5; }
.generation-message:empty { display: none; }
.generation-message.is-writing::before { content: ''; width: 14px; height: 14px; border: 2px solid #45513a; border-top-color: var(--neon-lime); border-radius: 50%; animation: thinking-spin 1s linear infinite; flex-shrink: 0; }
.generation-message.has-error { color: #ffb4a9; }
@keyframes thinking-spin { to { transform: rotate(360deg); } }
.review-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.review-heading > span { color: #8f9e82; font-size: 12px; }
#question-review > summary { font-size: 16px; cursor: pointer; padding: 6px 0; }
.review-help { font-size: 13px !important; color: #a5b39a !important; max-width: 760px; margin-block: 12px !important; }
.preview-question { border-top: 1px solid #343e2c; padding: 14px 0; }
.preview-question > summary { font-size: 14px; color: #e2eadb; cursor: pointer; }
.preview-question ol { font-size: 13px; color: #a6b09e; padding-left: 24px; }
.preview-question li { margin-bottom: 6px; padding-left: 6px; }
.preview-question li.preview-correct { color: var(--neon-lime); }
.preview-question p { font-size: 13px !important; color: #b0bda4 !important; margin-bottom: 12px !important; }
.preview-question .btn { min-height: 36px; font-size: 12px; padding: 8px 12px; }
.question-edit-form { margin-block: 16px; padding: 16px; background: #12160f; border-radius: 8px; }
.question-edit-form label { font-size: 12px; }
.question-edit-form input, .question-edit-form textarea, .question-edit-form select { margin-top: 6px; font-size: 14px; border: 1px solid #46513c; border-radius: 6px; }
.game-back-link { font-size: 12px; color: #b9c7ab; }
.key-hint { font-size: 11px; color: #8a9980; }
@media (min-width: 1000px) { .game-v2 #join-choice-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) {
  .lobby-header, .lobby-layout, .lobby-footer { width: calc(100% - 56px); }
  .lobby-layout { gap: 40px; grid-template-columns: 1fr 1fr; }
  .lobby-intro h1 { font-size: 65px; }
  .lobby-join { grid-template-columns: 1fr; gap: 9px; }
}
@media (max-width: 799px) {
  .lobby-header, .lobby-layout, .lobby-footer { width: calc(100% - 40px); }
  .lobby-header { min-height: 64px; }
  .lobby-brand { font-size: 26px; }
  .lobby-brand img { width: 35px; height: 35px; }
  .lobby-layout { grid-template-columns: 1fr; gap: 16px; padding-block: 18px 24px; }
  .lobby-intro h1 { font-size: clamp(40px, 10.6vw, 65px); line-height: 1.02; }
  .desktop-break { display: none; }
  .lobby-kicker { font-size: 9px; letter-spacing: 1px; margin-bottom: 14px; }
  .lobby-description { font-size: 14px; margin: 14px 0 0; max-width: 100%; }
  .topic-starters { margin-top: 12px; }
  .topic-starters .field-caption { display: none; }
  .topic-grid { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
  .topic-grid button { flex: 0 0 auto; gap: 16px; border: 1px solid #343c2f; border-radius: 6px; padding: 10px 12px; min-height: 44px; }
  .topic-grid button:hover, .topic-grid button.selected { padding-left: 12px; }
  .lobby-proof { display: none; }
  .lobby-join { grid-template-columns: auto 1fr; gap: 12px; margin-bottom: 22px; }
  .lobby-join { padding-bottom: 16px; margin-bottom: 18px; }
  .mode-description { margin-bottom: 16px; }
  .lobby-advanced { margin-block: 14px 17px; }
  .topic-field .small { margin-bottom: 14px; }
  .lobby-footer { font-size: 10px; align-items: flex-start; }
  .lobby-footer > span { max-width: 180px; }
  .lobby-footer nav { gap: 14px; }
  .game-v2 .page-shell { width: calc(100% - 24px); margin-top: 12px; }
  .game-v2 .panel { padding: 14px; }
  .game-v2 .brand-logo { width: 36px; }
  .game-v2 .topbar { gap: 12px; }
  .game-v2 .subtitle { font-size: 12px; }
  .game-v2 .join-shell .question-text { font-size: clamp(24px, 5.6vw, 34px); }
  .game-v2 .choice-btn { min-height: 54px; }
  .game-v2 #host-control-panel .qr-wrap { width: 112px; }
  .game-v2 #host-control-panel .qr-wrap img { width: 104px; height: 104px; }
  .review-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .key-hint { display: none; }
}
@media (max-width: 370px) {
  .lobby-settings-grid { gap: 7px; }
  .lobby-create select { padding-inline: 5px; font-size: 12px; }
  .lobby-join { grid-template-columns: 1fr; }
  .lobby-intro h1 { font-size: 37px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .game-v2.player-v2 .page-shell { margin-top: 8px; }
  .game-v2.player-v2 .join-topbar { margin-bottom: 8px; }
  .game-v2.player-v2 .brand-logo { width: 32px; }
  .game-v2.player-v2 #join-mini-board { display: none; }
  .game-v2.player-v2 .join-shell .question-text { font-size: 20px; line-height: 1.25; }
  .game-v2.player-v2 #join-choice-list { grid-template-columns: 1fr 1fr; }
  .game-v2.player-v2 .join-shell .choice-btn { min-height: 45px; padding: 8px 12px; font-size: 15px; }
  .game-v2.player-v2 .question-card { padding-block: 3px; }
  .game-v2.player-v2 #join-report-btn { font-size: 11px; min-height: 32px; padding: 7px 10px; }
}
@media (min-width: 800px) and (max-height: 800px) {
  .lobby-header { min-height: 76px; }
  .lobby-layout { padding-block: 24px; }
  .lobby-intro h1 { font-size: clamp(56px, 5.7vw, 72px); }
  .lobby-kicker { margin-bottom: 16px; }
  .lobby-description { margin-block: 18px 24px; }
  .lobby-proof { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
