.room-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.room-settings-grid label{display:grid;gap:8px;font-weight:700;color:#153e49}
.room-settings-grid input,.room-settings-grid select{width:100%;min-height:52px;box-sizing:border-box;font:inherit;border:1px solid #73a8a5;border-radius:14px;padding:10px 14px;background:#fff;color:#153e49}
.room-settings-actions{display:flex;flex-wrap:wrap;gap:12px}
.room-settings :focus-visible,.tv-answer-members :focus-visible,.answer-groups-dialog :focus-visible{outline:3px solid #067c83;outline-offset:4px}
.tv-answer-members{grid-column:1/-1;align-self:end;box-sizing:border-box;width:100%;height:114px;min-height:114px;border-top:1px solid #c5dfdc;padding-top:6px;color:#153e49;font:600 18px/1.35 SirajArabic,Arial,sans-serif}
.tv-answer-members.is-waiting{visibility:hidden}
.tv-answer-members-label{height:30px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.tv-answer-members-label>span:last-child{display:flex;align-items:center;gap:8px}
.tv-answer-members-label button{min-width:36px;min-height:30px;border:1px solid #83aaa8;border-radius:8px;background:#edf8f5;color:#153e49;font:700 22px/1 Arial,sans-serif;padding:0 6px}
.tv-answer-name-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-height:72px;align-items:start}
.tv-answer-name-grid>span{overflow-wrap:anywhere;word-break:normal;white-space:normal;font-size:20px;line-height:1.4;padding:3px 6px;border-radius:8px;background:#eaf6f3}
.tv-mode .tv-content .answer.read-only:has(.tv-answer-members){display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:10px 14px}
.tv-mode .tv-answer-device-cue{display:flex;align-items:center;gap:10px}
.tv-mode .tv-answer-device-cue>span:first-of-type{flex:1}
.tv-phase-timer{display:inline-flex;flex:0 0 5ch;align-items:center;justify-content:center;min-width:5ch;font-size:clamp(24px,2.4vw,44px);line-height:1.3;font-variant-numeric:tabular-nums;direction:ltr;white-space:nowrap;padding:4px 8px;background:#073d46;color:#fff4cd;border-radius:12px}
.tv-answer-list-open{flex:0 0 auto;min-height:44px;font-size:18px}
.answer-groups-dialog{width:min(1000px,90vw);max-height:88svh;padding:24px;border:2px solid #e8bc65;border-radius:20px;background:#fff9ed;color:#153e49;font:500 22px/1.7 SirajArabic,Arial,sans-serif;overflow:auto}
.answer-groups-dialog::backdrop{background:#062c35c9}
.answer-groups-dialog section{padding:12px 18px;margin-block:16px;border-radius:16px;background:#fff;border:1px solid #c9e5df}
.answer-groups-dialog p{overflow-wrap:anywhere;white-space:normal}
@keyframes answer-reveal-glow{0%{box-shadow:0 0 0 0 #efbd4f90}55%{box-shadow:0 0 0 8px #efbd4f50}100%{box-shadow:0 0 0 0 #efbd4f00}}
.tv-mode .answer.answer-celebrate{animation:answer-reveal-glow .9s ease-out 1}
.reduce-motion .answer.answer-celebrate{animation:none}
@media(prefers-reduced-motion:reduce){.tv-mode .answer.answer-celebrate{animation:none}}
@media(max-width:800px){.room-settings-grid{grid-template-columns:1fr}.tv-answer-name-grid>span{font-size:18px}}

/* Measured TV question stage; only its question layout scales, never timer/footer/tools. */
.tv-mode .tv-scene.cinematic-question{height:100svh;min-height:0;max-height:100svh;overflow:hidden;padding-block:5vh;gap:12px}
.tv-mode .tv-scene.cinematic-question>.tv-content{display:flex;flex-direction:column;overflow:hidden;min-height:0;gap:8px}
.tv-question-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;flex:0 0 auto;color:#fff4ce;font:600 18px/1.4 SirajArabic,Arial,sans-serif}
.tv-question-size{display:flex;align-items:center;justify-content:center;gap:8px}
.tv-question-tools button{min-width:44px;min-height:44px;padding:4px 10px;border:1px solid #f3ce83;border-radius:12px;background:#fff9ed;color:#153e49;font:700 18px/1.5 SirajArabic,Arial,sans-serif}
.tv-question-size bdi{min-width:4ch;text-align:center}
.tv-question-instruction{max-width:16ch}
.tv-mode .tv-fit-layout{display:block;flex:0 0 auto;width:auto;min-height:0;transform-origin:top right}
.tv-mode .tv-fit-layout .question-card{padding:calc(8px * var(--tv-unit,1));margin:0}
.tv-mode .tv-fit-layout .round-audience{padding:4px 8px;margin:0 0 4px;gap:4px;min-height:0;font-size:calc(18px * var(--tv-unit,1))}
.tv-mode .tv-fit-layout .question-card>.eyebrow,.tv-mode .tv-fit-layout .question-card>h2{display:inline;font-size:calc(18px * var(--tv-unit,1));line-height:1.4;margin:0}
.tv-mode .tv-fit-layout .question-prompt{font-size:calc(32px * var(--tv-text-pref,1) * var(--tv-unit,1));line-height:1.5;margin:calc(4px * var(--tv-unit,1)) 0}
.tv-mode .tv-scene .tv-fit-layout .canonical-source{font-size:calc(56px * var(--tv-text-pref,1) * var(--tv-unit,1));line-height:1.9;padding:calc(4px * var(--tv-unit,1)) calc(8px * var(--tv-unit,1));margin:calc(4px * var(--tv-unit,1)) 0}
.tv-mode .tv-scene .tv-fit-layout .canonical-source[data-source-kind=quran]{font-size:calc(64px * var(--tv-text-pref,1) * var(--tv-unit,1));line-height:1.9}
.tv-mode .tv-scene .tv-fit-layout .canonical-source cite{font-size:calc(18px * var(--tv-unit,1));line-height:1.5;margin-top:2px}
.tv-mode .tv-fit-layout .answers,.tv-mode .tv-fit-layout .answers.long-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(6px * var(--tv-unit,1));margin-block:4px}
.tv-mode .tv-fit-layout .answers .answer.read-only{display:grid;grid-template-columns:calc(32px * var(--tv-unit,1)) minmax(0,1fr);align-items:start;gap:4px;padding:calc(6px * var(--tv-unit,1));min-height:0;border-radius:12px;font-size:calc(26px * var(--tv-unit,1));line-height:1.4}
.tv-mode .tv-fit-layout .answer .exp-answer-top{width:calc(32px * var(--tv-unit,1))}
.tv-mode .tv-fit-layout .answer .exp-answer-copy{grid-column:2}
.tv-mode .tv-fit-layout .exp-answer-cue{width:calc(32px * var(--tv-unit,1));height:calc(32px * var(--tv-unit,1));font-size:calc(20px * var(--tv-unit,1))}
.tv-mode .tv-fit-layout .tv-answer-members{height:calc(88px * var(--tv-unit,1));min-height:calc(88px * var(--tv-unit,1));font-size:calc(16px * var(--tv-unit,1));padding-top:2px}
.tv-mode .tv-fit-layout .tv-answer-members-label{height:calc(26px * var(--tv-unit,1))}
.tv-mode .tv-fit-layout .tv-answer-name-grid{min-height:calc(58px * var(--tv-unit,1));gap:4px}
.tv-mode .tv-fit-layout .tv-answer-name-grid>span{font-size:calc(20px * var(--tv-unit,1));line-height:1.4;padding:0 4px}
.tv-mode .tv-fit-layout .reading-note{font-size:calc(16px * var(--tv-unit,1));line-height:1.4;padding:2px;margin:2px 0}
.tv-mode .tv-fit-layout .reveal-card{padding:4px 8px;margin-top:4px}
.tv-mode .tv-fit-layout .reveal-card h2{font-size:calc(18px * var(--tv-unit,1));margin:0}
.tv-mode .tv-fit-layout .reveal-card p{font-size:calc(22px * var(--tv-unit,1));line-height:1.5;margin:2px 0}
.tv-question-reader{width:min(92vw,1500px);max-height:90svh;overflow:auto;padding:24px;border:2px solid #f3ce83;border-radius:20px;background:#fff9ed;color:#153e49;font:500 26px/1.7 SirajArabic,Arial,sans-serif}
.tv-question-reader header{display:flex;align-items:center;justify-content:space-between;gap:20px}
.tv-question-reader .reader-prompt{font-size:36px}
.tv-mode .tv-question-reader .canonical-source{font-size:44px;line-height:1.9}
.tv-mode .tv-question-reader .canonical-source[data-source-kind=quran]{font-family:'SIRAJ Official Hafs',serif;font-size:52px;font-synthesis:none}
.tv-question-reader .canonical-source cite{font:500 22px/1.7 SirajArabic,Arial,sans-serif}
.tv-question-reader .reader-options{display:grid;gap:12px}
.tv-question-reader .reader-options section{border:2px solid #b4d7d1;border-radius:16px;background:white;padding:12px}
.tv-question-reader .reader-options section.revealed{border-color:#087c63;background:#e0f5e9}
.tv-question-reader h3{font-size:28px;margin:0}
.tv-question-reader::backdrop{background:#052b37d9}

/* Read/answer has no public-name band. Lock/reveal reserves its stable paged lane. */
.tv-mode .tv-fit-layout .tv-answer-members.is-waiting{display:none}
.tv-mode .tv-fit-layout .answers .answer.read-only{align-items:center;font-size:calc(34px * var(--tv-unit,1))}
.tv-mode .tv-fit-layout .answer .exp-answer-copy{display:flex;align-items:center;min-height:calc(68px * var(--tv-unit,1));align-self:center}
.tv-mode .tv-fit-layout .answer .exp-answer-top{align-self:center}
.tv-mode .tv-fit-layout:has(.canonical-source) .question-prompt{font-size:calc(26px * var(--tv-unit,1))}
.tv-mode .tv-fit-layout .answers .answer:nth-child(1){--choice:#b94c3c}
.tv-mode .tv-fit-layout .answers .answer:nth-child(2){--choice:#087c83}
.tv-mode .tv-fit-layout .answers .answer:nth-child(3){--choice:#2b6eac}
.tv-mode .tv-fit-layout .answers .answer:nth-child(4){--choice:#a07a18}

.room-auto-host{margin:20px 0;padding:18px;border:1px solid #b8d8d2;border-radius:16px;min-width:0}.room-auto-host legend{font-weight:800;color:#153e49;padding:0 8px}.room-auto-host label{display:grid;gap:8px;font-weight:700}.room-auto-host .room-auto-toggle{display:flex;align-items:center;gap:12px;min-height:48px;margin-bottom:14px}.room-auto-toggle input{width:24px;height:24px;flex:0 0 24px;accent-color:#087c83}.room-auto-host input[type=number]{font:inherit;min-height:48px;width:min(100%,220px);box-sizing:border-box;border:1px solid #73a8a5;border-radius:12px;padding:8px 12px}.auto-host-status{font-weight:700;color:#087c83}
