:root{color-scheme:dark;--bg:#090909;--panel:#141414;--text:#f4f4f4;--muted:#9b9b9b;--line:#343434;--red:#dc2d2d;--red2:#8d1717;--good:#57cf79;--warn:#f0ca62;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;min-height:100%;background:var(--bg);color:var(--text)}body{overflow:hidden;background:radial-gradient(circle at 18% 0,rgba(220,45,45,.1),transparent 35rem),linear-gradient(145deg,#070707,#101010)}button,input,select{font:inherit}button{color:inherit;cursor:pointer;min-height:44px}button:disabled{cursor:not-allowed;opacity:.28}#app{height:100dvh;min-height:300px;display:grid;grid-template-rows:auto minmax(0,1fr)}.viewport{width:min(960px,100%);margin:auto;min-height:0;max-height:100%;padding:clamp(14px,2.5vw,28px);overflow:auto;overscroll-behavior:contain}.topbar{height:52px;border-bottom:1px solid #242424;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(14px,2.5vw,28px)}.brand-mini{border:0;background:none;font-weight:900;letter-spacing:-.03em;padding:6px 0}.brand-mini span,.logo span{color:var(--red)}.top-actions,.utility-actions{display:flex;gap:7px}.icon-btn,.text-btn,.subtle{border:1px solid var(--line);background:#171717;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:800;letter-spacing:.04em}.text-btn{border:0;background:none;color:#ddd;padding:6px 8px}.splash{height:100%;min-height:260px;display:grid;place-content:center;justify-items:center;gap:30px;text-align:center}.logo h1{font-size:clamp(38px,8vw,72px);letter-spacing:-.065em;margin:0;line-height:.92}.logo p,.muted,.menu-heading p{color:var(--muted)}.logo p{margin:12px 0 0}.primary,.secondary,.danger,.confidence{border:1px solid transparent;border-radius:9px;padding:9px 14px;font-weight:850;letter-spacing:.025em}.primary{background:var(--red)}.primary:active{background:#ef3434}.secondary{background:#242424;border-color:#414141}.danger{background:#391515;border-color:#6f2929}.start{min-width:140px}.menu-shell{display:grid;gap:18px;align-content:center;min-height:100%}.menu-heading h1{font-size:clamp(28px,5vw,46px);letter-spacing:-.04em;margin:0}.menu-heading p{margin:5px 0 0}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.answer-setting{grid-column:1/-1}fieldset{border:1px solid var(--line);border-radius:12px;padding:12px;margin:0;background:rgba(20,20,20,.9)}legend,.eyebrow{color:var(--red);font-size:11px;font-weight:900;letter-spacing:.14em}.segments{display:flex;gap:5px;flex-wrap:wrap}.segment{flex:1;min-width:max-content;border:1px solid transparent;background:#222;border-radius:7px;padding:8px 10px;font-size:13px}.segment.active{background:var(--red2);border-color:#d94a4a}.field-note{font-size:11px;color:var(--warn);margin:7px 2px 0}.answer-help{font-size:12px;line-height:1.45;color:var(--muted);margin:9px 2px 0;min-height:2.9em}.menu-footer,.main-actions,.actions,.guess-actions,.reveal-footer{display:flex;gap:9px;align-items:center;justify-content:space-between;flex-wrap:wrap}.live-note{font-size:12px;color:var(--muted);margin:0}.live-note span{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--good);margin-right:6px}.panel,.answer-panel,.host-controls{background:rgba(20,20,20,.95);border:1px solid var(--line);border-radius:13px;padding:clamp(14px,2.5vw,22px)}.lobby,.reveal,.finished,.waiting{max-width:760px;margin:auto}.room-code{font:900 clamp(34px,7vw,62px)/1 ui-monospace,monospace;letter-spacing:.14em;margin-top:8px}.tags{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0}.tags span{font-size:11px;border:1px solid var(--line);border-radius:999px;padding:5px 9px;color:#ccc}.player-list,.result-list,.score-list{display:grid;gap:7px;margin:16px 0}.player,.result,.score-list>div,.host-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;background:#101010;border:1px solid #292929;border-radius:9px}.player small{color:var(--red);font-weight:900}.player-side{display:flex;align-items:center;gap:8px;color:#777;font-size:11px;font-weight:800}.player-side .ready,.correct{color:var(--good)}.dots{border:0;background:#282828;border-radius:6px}.game-layout{display:grid;gap:10px}.game-meta{display:flex;align-items:end;justify-content:space-between}.game-meta h2{font-size:clamp(25px,4vw,38px);margin:3px 0 0}.score{text-align:right;font-weight:950;font-size:25px}.score small{display:block;color:var(--muted);font-size:9px;letter-spacing:.12em}.review-stage{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}.review-card{border-left:4px solid var(--red);background:#111;border-radius:0 12px 12px 0;padding:clamp(16px,3vw,28px);overflow:auto;display:grid;align-items:center;min-height:140px;max-height:35dvh}.review-card p{font-size:clamp(17px,2.7vw,26px);line-height:1.42;margin:0}.review-nav{display:flex;align-items:center;justify-content:center;gap:12px;min-height:44px}.review-nav span{font-size:10px;font-weight:900;letter-spacing:.12em;color:var(--muted)}.review-arrow{border:1px solid var(--line);background:#171717;color:var(--red);font-size:27px;font-weight:400;width:44px;padding:0}.review-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--muted);font-size:11px}.review-tools>div{display:flex;gap:4px}.notice{border:1px solid var(--line);border-radius:8px;padding:9px 11px;font-size:12px;line-height:1.35}.notice.replaced{border-color:#28663a;color:#a8e9b9;background:#102417}.notice.penalty{border-color:#763333;color:#ffb0b0;background:#2b1414}.notice.uncertain{color:#ddd;background:#181818}.answer-panel{display:grid;gap:11px}.worth{font-size:12px;color:var(--muted)}.worth strong{color:var(--text)}.options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.option{border:1px solid #3c3c3c;background:#1a1a1a;text-align:left;border-radius:8px;padding:9px 11px}.option.selected{border-color:var(--red);background:#2c1515}.answer-input{display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:850;letter-spacing:.08em}.answer-input input,.modal input,.modal select{width:100%;border:1px solid #414141;background:#0b0b0b;color:white;border-radius:8px;padding:10px 11px}.confidence{background:#28200f;border-color:#5d4d24;color:#efd470}.confidence small{font-size:10px}.confidence.active{background:#6a5110;border-color:#a98728;color:#fff4b1}.host-controls{padding:11px 13px}.host-controls summary,.all-reviews summary{font-size:11px;font-weight:900;letter-spacing:.09em;cursor:pointer;min-height:32px}.host-row{margin-top:8px;font-size:12px}.host-row div{display:flex;gap:6px}.host-row button{padding:6px 8px}.reveal h1,.finished h1{font-size:clamp(30px,6vw,56px);letter-spacing:-.05em;margin:7px 0 0}.result small{display:block;color:var(--muted);margin-top:3px}.result>span{font-size:12px;font-weight:900}.wrong{color:#ff7777}.all-reviews{margin:16px 0}.all-reviews article,.modal-scroll article{border-left:2px solid var(--red);padding:4px 12px;margin:12px 0}.all-reviews p,.modal-scroll p{margin:3px 0;line-height:1.4}.all-reviews small,.modal-scroll small{color:var(--muted);font-size:9px}.reveal-footer a{color:#bbb;font-size:12px}.center-card{height:100%;display:grid;place-content:center;justify-items:center;text-align:center}.spinner{width:24px;height:24px;border:3px solid #333;border-top-color:var(--red);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.busy{position:fixed;inset:0;background:rgba(0,0,0,.78);display:grid;place-content:center;justify-items:center;gap:12px;z-index:50;font-size:13px}.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.8);display:grid;place-items:center;padding:15px;z-index:40}.modal{width:min(650px,100%);max-height:min(680px,92dvh);overflow:auto;background:#141414;border:1px solid #3b3b3b;border-radius:14px;padding:20px}.modal.compact{width:min(430px,100%);display:grid;gap:13px}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal h2{margin:0}.modal label{display:grid;gap:6px;font-size:10px;color:#bbb;font-weight:850;letter-spacing:.08em}.modal-scroll{max-height:65dvh;overflow:auto}.setting-note{font-size:12px;line-height:1.45}.error{background:#301515;border:1px solid #703131;color:#ffaaaa;border-radius:8px;padding:10px 12px;font-size:13px}.leaderboard{max-width:820px;margin:auto}.leaderboard h1{font-size:clamp(30px,6vw,54px);margin:6px 0 18px}.score-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.score-filters label{display:grid;gap:5px;font-size:10px;font-weight:850;letter-spacing:.08em;color:var(--muted)}.score-filters select{min-width:0;background:#0b0b0b;color:#fff;border:1px solid #414141;border-radius:8px;padding:10px;font-size:16px}.leader-list{display:grid;gap:6px;margin-top:16px}.leader-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 12px;background:#101010;border:1px solid #292929;border-radius:9px}.leader-row>strong{color:var(--red)}.leader-row>span{overflow:hidden;text-overflow:ellipsis}.leader-row>small{grid-column:2/4;color:var(--muted)}.empty{text-align:center;padding:30px 0}.center-card.small{min-height:180px}
@media(max-width:640px){.viewport{padding:12px}.settings-grid{grid-template-columns:1fr}.answer-setting{grid-column:auto}.menu-shell{align-content:start;gap:14px}.menu-footer{align-items:stretch}.utility-actions,.main-actions{width:100%}.utility-actions button,.main-actions button{flex:1}.main-actions .primary{flex-basis:100%;order:-1}.review-card{max-height:31dvh;min-height:120px}.options{grid-template-columns:1fr}.guess-actions>*{flex:1;min-width:0}.guess-actions .secondary{flex-basis:100%}.top-actions{gap:4px}.icon-btn{padding:6px 8px}.review-tools{align-items:flex-start;flex-direction:column}.review-tools>div{width:100%}.review-tools button{flex:1}.result{align-items:flex-start;flex-direction:column}.result>span{align-self:flex-end}.score-filters{grid-template-columns:1fr}.leader-row{padding:9px}.modal-bg{align-items:end;padding:8px}.modal{max-height:94dvh;padding:16px;border-radius:14px 14px 8px 8px}input,select{font-size:16px!important}}
@media(max-width:360px){.viewport{padding:9px}.topbar{padding:0 9px}.brand-mini{font-size:12px}.logo h1{font-size:37px}.panel,.answer-panel,.host-controls{padding:12px}.main-actions,.utility-actions{gap:6px}.review-card p{font-size:17px}.guess-actions{gap:6px}.guess-actions button{padding:8px}.room-code{font-size:34px}.player,.result,.score-list>div,.host-row{padding:9px}}
@media(max-height:560px) and (min-width:641px){.viewport{padding-top:10px;padding-bottom:10px}.menu-shell{gap:10px}.menu-heading p{display:none}.review-card{min-height:100px;max-height:28dvh}.answer-panel{padding:11px;gap:7px}.topbar{height:46px}}
.reveal-footer{position:sticky;top:0;z-index:3;margin:12px -2px 0;padding:9px 2px;background:linear-gradient(180deg,var(--panel) 80%,rgba(20,20,20,.92));border-bottom:1px solid var(--line)}
.host-controls summary,.all-reviews summary{min-height:44px;display:flex;align-items:center}

/* Compact, frame-friendly polish. */
button{min-height:40px;transition:border-color .15s ease,background .15s ease,transform .15s ease}button:hover:not(:disabled){border-color:#666}button:active:not(:disabled){transform:translateY(1px)}
.primary,.secondary,.danger,.confidence,.segment,.subtle,.icon-btn{border-radius:999px}.primary{box-shadow:0 5px 18px rgba(220,45,45,.2)}
.viewport{padding:clamp(10px,2vw,18px)}.topbar{height:46px}.menu-shell{gap:12px}.menu-heading h1{font-size:clamp(27px,4.5vw,39px)}
.settings-grid{gap:8px}fieldset{padding:9px 10px;border-radius:16px;background:linear-gradient(145deg,rgba(24,24,24,.96),rgba(16,16,16,.96))}.segment{padding:6px 10px}.answer-help{min-height:0;margin:6px 2px 0;line-height:1.35}.field-note{margin-top:4px}
.menu-footer{gap:8px}.utility-actions,.main-actions{gap:6px}.utility-actions button{font-size:10px}.main-actions .primary{padding-inline:18px}
.game-layout{gap:7px}.game-meta h2{font-size:clamp(22px,3.5vw,32px)}.score{font-size:22px}.review-card{min-width:0;min-height:105px;max-height:29dvh;padding:clamp(13px,2vw,20px);border-radius:0 16px 16px 0}.review-card p{font-size:clamp(16px,2.2vw,22px);line-height:1.34}.review-nav{min-height:38px}.review-arrow{width:40px;min-height:38px;border-radius:999px}.review-tools{justify-content:flex-end}.answer-panel{padding:11px 13px;gap:7px;border-radius:16px}.options{gap:6px}.option{min-height:38px;padding:7px 11px;border-radius:12px}.guess-actions{gap:6px}.guess-actions button{padding:7px 12px}.worth{line-height:1}
.review-card p,.all-reviews p,.modal-scroll p,.result small,.option,.leader-row>span,.player strong,.reveal h1{overflow-wrap:anywhere;word-break:break-word;hyphens:auto}.all-reviews article,.modal-scroll article{min-width:0}
.modal{border-radius:20px}.how-to ol{display:grid;gap:10px;margin:0;padding-left:22px;color:#ddd;line-height:1.4}.how-to li::marker{color:var(--red);font-weight:900}
@media(max-height:700px){.viewport{padding-top:9px;padding-bottom:9px}.menu-shell{gap:8px;align-content:start}.menu-heading h1{font-size:30px}.menu-heading p{margin-top:2px;font-size:12px}.settings-grid{gap:7px}fieldset{padding:7px 9px}.segment{min-height:36px;padding:5px 9px}.answer-help{font-size:11px}.menu-footer{gap:6px}.topbar{height:42px}.game-layout{gap:5px}.game-meta h2{font-size:23px}.review-card{min-height:88px;max-height:25dvh;padding:11px 15px}.review-nav{min-height:34px}.review-arrow{min-height:34px;height:34px}.review-tools .text-btn{min-height:30px;padding:3px 8px}.answer-panel{padding:9px 11px;gap:6px}.option{min-height:35px;padding:6px 10px}.guess-actions button{min-height:36px}.panel{padding:14px}}
@media(max-height:500px){.menu-heading p,.answer-help{display:none}.menu-shell{gap:6px}.segment{font-size:11px}.review-card{max-height:21dvh}.game-meta h2{display:none}}
@media(max-height:500px) and (min-width:641px){.settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.answer-setting{grid-column:auto}.segments{height:100%}}

/* Portrait/mobile: larger type, thumb-sized controls, and one contained scroller. */
@media(max-width:640px){
  #app{min-height:0}.viewport{height:100%;margin:0 auto;padding:12px;overflow-x:hidden}.topbar{height:50px}
  .brand-mini{font-size:14px}.icon-btn,.text-btn,.subtle{font-size:13px}.top-actions .icon-btn{min-height:42px;padding:7px 11px}
  .menu-shell{gap:14px}.menu-heading h1{font-size:34px}.menu-heading p{font-size:15px;line-height:1.35}
  legend,.eyebrow{font-size:12px}.settings-grid{gap:10px}fieldset{padding:11px 12px}.segment{min-height:46px;padding:9px 11px;font-size:15px}.answer-help{display:block;min-height:0;font-size:14px;line-height:1.4}.field-note{font-size:13px}
  .utility-actions,.main-actions{gap:8px}.utility-actions button{min-height:44px;font-size:12px}.main-actions button{min-height:48px;font-size:15px}
  .game-layout{gap:8px}.game-meta h2{display:block;font-size:28px}.score{font-size:25px}.review-card{min-height:112px;max-height:34dvh;padding:16px 17px}.review-card p{font-size:20px;line-height:1.4}
  .review-nav{min-height:44px}.review-nav span{font-size:12px}.review-arrow{width:44px;height:44px;min-height:44px}.review-tools{align-items:center;flex-direction:row}.review-tools>div{width:100%;gap:7px}.review-tools button,.review-tools .text-btn{min-height:44px;font-size:13px}
  .answer-panel{padding:13px;gap:10px}.worth{font-size:14px}.options{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.option{min-height:48px;padding:10px 12px;font-size:16px;line-height:1.3}
  .guess-actions button{min-height:46px;font-size:13px}.confidence small{font-size:11px}.answer-input{font-size:12px}.answer-input input{min-height:48px;font-size:16px}
  .panel{font-size:16px}.modal{font-size:16px}.modal h2{font-size:25px}.modal label{font-size:12px}.modal-head .icon-btn{width:44px;min-width:44px;height:44px;padding:0}.how-to ol{font-size:16px;gap:12px}.how-to>.primary{min-height:48px;font-size:15px}
  .result small,.all-reviews p,.modal-scroll p{font-size:15px;line-height:1.5}.all-reviews summary,.host-controls summary{font-size:12px}
}
@media(max-width:370px){
  .viewport{padding:10px}.menu-heading h1{font-size:30px}.utility-actions{flex-wrap:nowrap}.utility-actions button{min-width:0;padding:4px;font-size:12px}
  .review-card{padding:14px;min-height:102px}.review-card p{font-size:18px}.option{font-size:15px;padding:9px}.guess-actions button{font-size:12px}
}
@media(max-width:640px) and (orientation:portrait){.review-card{max-height:none;overflow:visible}}
@media(max-width:640px) and (orientation:portrait) and (min-height:760px){.review-card{min-height:145px}}
