/* Classroom 2 — quiet surfaces, readable content, touch-first controls. */
:root { --bg:#101219; --bg-2:#171a24; --surface:#191c27; --surface-solid:#191c27; --surface-hi:#232735; --text:#f1f2f6; --text-2:#b5bbcd; --text-3:#949cb3; --brand:#a898ed; --accent:#bcb0f4; --border:#2c3040; --border-hi:#43495e; --shadow:none; --glow:none; --grad:linear-gradient(100deg,#7764c7,#7764c7); --r-lg:20px; }
body::before { display:none; }
body { background:var(--bg); }
.card,.topbar,.student-bar,.lang-bar,.sub-item,.student-bottom-dock { backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; animation:none; }
.card { background:var(--surface); padding:22px; }
.btn,.btn-sm,.btn-tool { min-height:44px; height:auto; padding:10px 16px; font-size:.92rem; }
.btn-primary { box-shadow:none; }
.btn:hover { transform:none; }
.btn:focus-visible,button:focus-visible,a:focus-visible,select:focus-visible { outline:3px solid #c6baff; outline-offset:3px; }
.input,.select { font-size:16px; min-height:48px; background-color:var(--bg-2); }
.brand-logo { box-shadow:none; }
.dot.ok,.dot.danger,.dot.warn { box-shadow:none; }
.dot.pulse { animation:none; }
.badge { white-space:normal; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[hidden] { display:none !important; }
.eyebrow { font-size:.7rem; letter-spacing:.16em; font-weight:700; color:var(--brand); }
.reader-mark { font-size:24px; font-weight:750; letter-spacing:-2px; flex:none; }
.reader-mark span { color:var(--brand); }
.settings-sheet { color:var(--text); background:var(--surface-solid); border:1px solid var(--border-hi); border-radius:24px; padding:24px; width:min(520px,calc(100% - 32px)); max-height:calc(100dvh - 48px); overflow-y:auto; box-shadow:0 24px 80px #0006; }
.settings-sheet::backdrop { background:#080b13b8; }
.sheet-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.sheet-head h2 { font-size:1.2rem; }
.sheet-head .btn-icon { flex:none; width:44px; }
.sheet-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0; border-top:1px solid var(--border); }
.sheet-row>.row { flex-wrap:nowrap; gap:8px; }
.sheet-action { display:flex; width:100%; justify-content:space-between; margin:12px 0; white-space:normal; text-align:left; }
.sheet-danger { display:flex; flex-wrap:wrap; gap:12px; border-top:1px solid var(--border); padding-top:20px; margin-top:24px; }
.tool-grid { display:grid; gap:12px; }
.tool-grid .btn { width:100%; justify-content:flex-start; white-space:normal; }
.modal-overlay { position:fixed; inset:0; z-index:100; background:#080b13bd; padding:20px; display:flex; align-items:center; justify-content:center; overflow-y:auto; backdrop-filter:none; }
.modal-content { position:relative; background:var(--surface-solid); border:1px solid var(--border); border-radius:20px; padding:28px 24px; max-height:calc(100dvh - 40px); overflow:auto; width:min(640px,100%); }
.modal-close { position:absolute; right:12px; top:12px; }
.notes-reader-head { padding-right:48px; }
.toasts { bottom:calc(var(--dock-height,72px) + 16px); }
.pwa-install-banner { bottom:calc(var(--dock-height,72px) + 16px); box-shadow:none; background:var(--surface-solid); }
/* Student: one header, one scrolling reading surface, one compact dock. */
body.student-body { background:var(--bg); }
.student-bar { height:auto; min-height:80px; padding:calc(12px + env(safe-area-inset-top,0px)) 20px 12px; background:var(--bg); border-bottom:1px solid var(--border); gap:16px; }
.student-bar-left { gap:14px; }
.reader-class { min-width:0; }
.reader-class>strong { display:block; font-size:1rem; font-weight:650; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.reader-class-meta { display:flex; align-items:center; gap:10px; font-size:.72rem; color:var(--text-3); }
.reader-class-meta .badge { padding:0; border:0; background:none; font-weight:400; font-size:.72rem; }
.reader-class-meta .dot { width:6px; height:6px; }
.reader-language { flex:0 1 155px; min-width:104px; }
.reader-language select { font-size:.82rem; padding-left:10px; min-height:44px; background-color:var(--surface); }
.subtitle-viewport,body.has-voice-active .subtitle-viewport { width:100%; max-width:880px; margin-inline:auto; min-height:0; padding:24px 24px calc(var(--dock-height,80px) + 28px); gap:16px; scroll-behavior:auto; overflow-anchor:none; }
.sub-item { background:transparent; padding:18px 20px; border:1px solid var(--border); border-radius:14px; box-shadow:none; animation:none; transition:none; }
.sub-item.newest-highlight { background:#1c2030; border-color:#74679e; box-shadow:inset 3px 0 #a898ed; }
.sub-item.faded,.sub-item.faded:hover,.sub-item.faded:active { opacity:1; filter:none; background:transparent; border-color:var(--border); }
.sub-item .primary-text { font-size:var(--sub-font-size); line-height:1.65; font-weight:500; overflow-wrap:anywhere; }
.sub-item .bilingual-text { font-size:max(16px,calc(var(--sub-font-size)*.78)); line-height:1.65; color:var(--text-2); }
.rx-btn { min-width:44px; min-height:44px; height:auto; padding:8px; box-shadow:none; }
.sub-item .meta { color:var(--text-3); }
.student-bottom-dock { background:#141720; border-color:var(--border); padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px)); z-index:40; }
.bottom-dock-inner { max-width:832px; justify-content:center; flex-wrap:wrap; gap:8px; }
.reader-settings-btn { gap:10px; background:transparent; }
.reader-settings-btn>span:first-child { font-size:1.1rem; color:var(--brand); }
.voice-talk-wrap { margin-left:0; flex:0 0 auto; max-width:100%; }
.btn-voice-talk { height:auto; min-height:46px; width:100%; padding:10px 14px; white-space:nowrap; font-size:.94rem; border:1px solid #8070b5; box-shadow:none; background:#6958ac; }
.talk-text { white-space:nowrap; }
#btn-open-notes { position:relative; }
#btn-toggle-bilingual.active { background:#44385f; border-color:#a898ed; }
#font-size-value { font-size:.85rem; min-width:38px; text-align:center; }
.jump-latest { position:fixed; bottom:calc(var(--dock-height,80px) + 14px); left:50%; transform:translateX(-50%); z-index:41; border:1px solid #a898ed; background:#38304e; color:white; border-radius:30px; padding:12px 20px; min-height:44px; font:inherit; font-size:.88rem; cursor:pointer; max-width:calc(100% - 32px); box-shadow:0 4px 20px #0005; }
.student-join-screen { overflow-y:auto; align-items:flex-start; padding:24px 20px; background:var(--bg); backdrop-filter:none; z-index:60; }
.join-card { margin:auto; padding:32px; border-radius:24px; background:var(--surface-solid); }
.join-language-field { margin:20px 0; text-align:left; }
body.joining>header,body.joining>main,body.joining>footer,body.joining>#jump-latest,body.joining>.pwa-install-banner { display:none !important; }
.notes-notification-toast { top:auto; bottom:calc(var(--dock-height,80px) + 16px); }
.notes-toast-inner { background:var(--surface-solid); box-shadow:none; border-color:#8a7aaf; flex-wrap:wrap; }
.notes-reader-content { display:flex; flex-direction:column; max-height:calc(100dvh - 40px); }
.notes-reader-body { min-height:0; }
/* Teacher: stable workspaces and controls. */
.topbar-slim { height:auto; min-height:64px; padding-top:env(safe-area-inset-top,0px); background:var(--bg); overflow:visible; backdrop-filter:none; }
.topbar-container { min-height:64px; gap:12px; padding:0 24px; }
.topbar-brand { min-width:0; }
.topbar-brand .brand-name { max-width:none; font-size:.95rem; }
.top-link.btn-icon-only { width:44px; min-width:44px; height:44px; padding:10px; }
.topbar-actions { gap:2px; }
.teacher-main { max-width:1200px; padding-top:28px; padding-bottom:40px; }
.classroom-layout-stack { gap:24px; }
.classroom-context { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.classroom-context h1 { font-size:clamp(1.3rem,3vw,1.8rem); margin-top:4px; overflow-wrap:anywhere; }
.classroom-context>.badge { flex:none; }
.teacher-navigation { background:var(--bg); }
.class-pulse { display:flex; justify-content:space-between; gap:16px; background:#1a1e2a; border:1px solid var(--border); border-radius:12px; width:100%; min-height:48px; padding:12px 16px; color:var(--text-2); font:inherit; font-size:.85rem; text-align:left; cursor:pointer; }
.class-pulse.needs-attention { border-color:#a18b53; background:#302a1e; color:#f0d394; }
.class-pulse b { color:var(--text); }
.teacher-tabs { display:none; }
.ctrl-bar { border:0; padding:0; background:none; box-shadow:none; }
.ctrl-hero-group { display:flex; width:100%; gap:12px; align-items:stretch; }
.btn-record-hero { min-height:52px; flex:1; border-radius:12px; font-size:1rem; box-shadow:none; background:#7967bd; animation:none; width:auto; }
.btn-record-hero.is-live { background:#453638; border-color:#bd7e7f; box-shadow:none; animation:none; }
.btn-student-mic-hero { width:auto; height:auto; min-height:52px; flex:0 1 auto; padding:10px 18px; gap:8px; display:flex; align-items:center; background:var(--surface); box-shadow:none; border-radius:12px; }
.btn-student-mic-hero.active { box-shadow:none; background:#293e37; border-color:#70ae92; }
.mic-button-label { font-size:.85rem; white-space:nowrap; }
.mic-ico { display:none; }
.ctrl-more { display:flex; gap:8px; }
.lecture-workspace { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); align-items:start; gap:24px; }
.workspace-panel { min-width:0; }
#view-live { grid-column:1; grid-row:1; }
#view-interaction { grid-column:2; grid-row:1 / span 2; }
#view-history { grid-column:1; grid-row:2; }
.live-spotlight-card { border:1px solid #5d5478; background:#1b1e2a; box-shadow:none; border-radius:18px; padding:24px; }
.spotlight-slim-header { flex-wrap:wrap; gap:12px; align-items:flex-start; }
.spotlight-title-group { flex:1; }
.spotlight-target-bar { order:3; flex:1 0 100%; flex-wrap:wrap; overflow:visible; }
.spotlight-time { font-size:.72rem; }
.spotlight-badge { color:#b8dac7; background:none; border:0; padding:0; }
.lang-slim-chip { min-height:44px; padding:8px 12px; box-shadow:none !important; }
.spotlight-zh { font-size:clamp(1.35rem,2.4vw,1.7rem); line-height:1.65; font-weight:550; margin-top:20px; }
.spotlight-zh.idle { padding:24px 0; font-size:1.15rem; color:var(--text-2); }
.spotlight-tr-item { line-height:1.65; padding:14px 0; border:0; border-top:1px solid var(--border); background:none; font-size:1.05rem; }
.workspace-hint { font-size:.8rem; color:var(--text-3); padding:0 8px; }
.student-voice-card { border-color:var(--border); box-shadow:none; }
.cockpit-card-head { flex-wrap:wrap; gap:12px; }
.student-feedback-feed,.transcript-feed { max-height:none; overflow:visible; }
.transcript-card { min-height:0; }
.reactions-matrix { gap:6px; }
.rx-counter-box { padding:12px 4px; }
.rx-counter-box .rx-name { color:var(--text-2); }
.empty-voice-tip { background:none; padding:20px 0; border:0; }
.empty-voice-tip .ico { display:none; }
.voice-status-card { margin-top:20px; }
#teacher-invite .qr-compact-card { border:0; padding:0; }
#teacher-invite .qr-link-copy { width:100%; min-width:0; }
#teacher-invite .qr-link-copy input { min-width:0; }
#room-select-card .row>.btn { min-height:48px; }
.teacher-body .toasts { bottom:100px; }
@media (max-width:959px) {
 .teacher-main { padding-top:20px; padding-bottom:calc(var(--dock-height,100px) + 28px); }
 .teacher-navigation { position:sticky; top:calc(64px + env(safe-area-inset-top,0px)); z-index:25; padding:8px 0 0; }
 .teacher-tabs { display:flex; border-bottom:1px solid var(--border); margin-top:12px; }
 .teacher-tabs button { flex:1; background:none; border:0; border-bottom:3px solid transparent; min-height:52px; color:var(--text-3); font:inherit; font-size:.92rem; padding:10px 8px; cursor:pointer; }
 .teacher-tabs button[aria-selected="true"] { color:var(--text); border-color:var(--brand); }
 .lecture-workspace { display:block; }
 .workspace-panel { display:none; }
 [data-active-view="live"] #view-live,[data-active-view="interaction"] #view-interaction,[data-active-view="history"] #view-history { display:block; }
 #view-interaction>.card+.card { margin-top:16px; }
 .ctrl-bar { position:fixed; bottom:0; left:0; right:0; z-index:40; background:#141720; border-top:1px solid var(--border); padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px)); }
 .ctrl-hero-group { max-width:800px; margin:auto; gap:8px; }
 .btn-student-mic-hero { padding:10px; }
 .ctrl-more { flex-direction:column; gap:0; padding:5px 12px; font-size:.9rem; }
 .ctrl-more>span { font-size:.7rem; }
 .classroom-layout-stack { gap:16px; }
 .topbar-container { padding:0 12px; gap:6px; }
 .topbar-brand .brand-name { max-width:140px; }
 .spotlight-slim-header { overflow:visible; }
 .spotlight-target-bar { min-width:0; }
 .live-spotlight-card { padding:20px; }
 .transcript-card .card-icon { display:none; }
 .teacher-body .table-wrap { border:0; overflow:visible; }
 .teacher-body .table thead { display:none; }
 .teacher-body .table,.teacher-body .table tbody { display:block; }
 .teacher-body .table tr { display:grid; grid-template-columns:1fr auto; border:1px solid var(--border); border-radius:14px; padding:12px; margin:12px 0; gap:8px; }
 .teacher-body .table td { border:0; padding:0; }
 .teacher-body .table td:nth-child(2) { grid-column:1 / -1; grid-row:1; }
 .teacher-body .table td:nth-child(4) { grid-column:1; }
 .teacher-body .table td:nth-child(5) { grid-column:2; grid-row:3 / span 2; }
}
@media (max-width:600px) {
 .settings-sheet { width:100%; max-width:100%; margin:auto 0 0; max-height:calc(100dvh - 24px); border-radius:24px 24px 0 0; padding:24px 20px calc(24px + env(safe-area-inset-bottom,0px)); border-bottom:0; }
 .student-bar { padding:calc(10px + env(safe-area-inset-top,0px)) 16px 10px; gap:8px; min-height:76px; }
 .student-bar-left { gap:8px; }
 .reader-mark { display:none; }
 .reader-language { flex-basis:126px; }
 .reader-class-meta { gap:6px; flex-wrap:wrap; }
 .reader-class-meta .badge { font-size:.68rem; }
 .reader-class>strong { font-size:.94rem; }
 .subtitle-viewport,body.has-voice-active .subtitle-viewport { padding:16px 16px calc(var(--dock-height,80px) + 24px); gap:12px; }
 .sub-item { padding:16px; }
 .student-bottom-dock { padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px)); }
 .reader-settings-btn { padding:10px; }
 .join-card { padding:28px 24px; }
 .topbar-brand .brand-ico,.topbar-status { display:none; }
 .topbar-brand .brand-name { max-width:110px; font-size:.8rem; }
 .room-pill { display:none !important; }
 .topbar-container { gap:0; }
 .topbar-actions .top-link { width:40px; min-width:40px; height:44px; }
 .classroom-context .badge { font-size:.7rem; max-width:115px; }
 .class-pulse { font-size:.78rem; gap:10px; }
 .card { padding:18px; }
 .btn-record-hero { font-size:.94rem; }
 .btn-record-hero #record-icon { font-size:1rem !important; }
 .modal-overlay { padding:12px; }
 .modal-content { max-height:calc(100dvh - 24px); padding:24px 18px; }
 .notes-toast-actions { width:100%; justify-content:flex-end; }
 .sheet-row { flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }
body.overlay-open { overflow:hidden; }

@media (max-width:600px) { .topbar-actions .top-link { width:44px; min-width:44px; } }
.translation-settings-link { min-height:44px; padding:8px 10px; color:var(--text-2); border:1px solid var(--border); border-radius:10px; background:transparent; font:inherit; font-size:.78rem; cursor:pointer; }
.spotlight-time { flex-basis:100%; }
#teacher-languages .spotlight-target-bar { display:flex; gap:8px; }
.subtitle-viewport { transition:none; }
#btn-toggle-bilingual { box-shadow:none; }
.context-status { flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
#teacher-connection-label { font-size:.7rem; color:var(--text-3); }
#teacher-connection-label.connection-warning { color:#f2bc6b; }
@media (max-width:600px) { .context-status { max-width:100px; } }
@media (max-width:959px) {
 .teacher-main { width:calc(100% - 32px); }
 .teacher-navigation { scroll-margin-top:calc(64px + env(safe-area-inset-top,0px)); }
}
@media (max-width:959px) {
 .classroom-context .eyebrow,.spotlight-time { display:none; }
 .classroom-context h1 { margin:0; font-size:1.2rem; }
 .spotlight-zh { margin-top:12px; }
}
@media (max-width:959px) { .teacher-main { padding-inline:0; } }

/* Shared classroom feedback: quiet, aggregated and independent of subtitles. */
.help-options,.help-summary {display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}
.help-options .btn {flex:1;min-height:52px;white-space:normal}
.help-options [aria-pressed="true"],#help-open.is-active {border-color:var(--accent,#67d5c5);background:#163c3a}
.help-summary span {flex:1;min-width:130px;padding:12px;border-radius:12px;background:rgba(255,255,255,.04)}
#help-status {min-height:1.5em;color:#b9cacb;font-size:.9rem}
.student-bottom-dock .bottom-dock-inner {flex-wrap:wrap}
.student-bottom-dock .btn {white-space:normal}

.translation-status {font-size:.8rem;line-height:1.5;color:#d6bc85;margin:8px 0 0}
.meta-line {flex-wrap:wrap}
.retry-translation {white-space:normal;min-height:40px}

/* Teacher lecture mode: quiet content, persistent evidence of audio reception. */
.teacher-body .teacher-main {padding-bottom:calc(var(--dock-height,180px) + 32px)}
.teacher-body .ctrl-bar {display:block;position:fixed;inset:auto 0 0;z-index:40;background:#141720;border-top:1px solid var(--border);padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px))}
.teacher-body .ctrl-hero-group,.capture-monitor {max-width:960px;margin-inline:auto}
.capture-monitor {width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 16px;margin-bottom:12px;font-size:.84rem;color:var(--text-2)}
.capture-input {display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.capture-dot {width:8px;height:8px;border-radius:50%;background:#8b91a2;flex:none}
.capture-level {width:80px;height:7px;border-radius:8px;background:#303442;overflow:hidden;flex:none}
.capture-level span {display:block;height:100%;width:0;background:#73c6a4;transition:width .1s linear}
#capture-device-name {font-size:.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.capture-settings {justify-self:end;background:none;border:0;color:#c3b6ef;padding:4px 0;font:inherit;font-size:.78rem;cursor:pointer;min-height:28px}
#capture-hint {grid-column:1 / -1;font-size:.76rem;margin:1px 0 0;color:var(--text-3)}
#capture-hint[hidden] {display:none}
.capture-monitor[data-tone="ok"] .capture-dot {background:#73c6a4}
.capture-monitor[data-tone="warn"] #capture-transport-status,.capture-monitor[data-tone="danger"] #capture-input-status {color:#f0c182}
.capture-monitor[data-tone="danger"] .capture-dot {background:#e49b8f}
.workspace-mode-toggle {display:block;margin:0 0 10px auto;font-size:.78rem;min-height:36px}
[data-focus-mode="true"] .teacher-tabs {display:flex;border-bottom:1px solid var(--border);margin-top:12px}
[data-focus-mode="true"] .teacher-tabs button {flex:1;background:none;border:0;border-bottom:3px solid transparent;min-height:48px;color:var(--text-3);font:inherit;font-size:.9rem;padding:10px 8px;cursor:pointer}
[data-focus-mode="true"] .teacher-tabs button[aria-selected="true"] {color:var(--text);border-color:var(--brand)}
[data-focus-mode="true"] .lecture-workspace {display:block;width:100%;max-width:960px;margin-inline:auto}
[data-focus-mode="true"] .workspace-panel {display:none}
[data-focus-mode="true"][data-active-view="live"] #view-live,[data-focus-mode="true"][data-active-view="interaction"] #view-interaction,[data-focus-mode="true"][data-active-view="history"] #view-history {display:block}
.translation-overview {display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:20px;color:var(--text-2);font-size:.85rem}
#translation-issue {font-size:.78rem;color:#e6c48d}
#translation-issue[hidden] {display:none}
.translation-preview-controls {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;font-size:.82rem}
.translation-preview-controls .select {width:auto;flex:1 1 130px;min-width:0;max-width:260px}
.translation-details {margin-top:18px;color:var(--text-3);font-size:.78rem}
.translation-details summary {cursor:pointer;min-height:32px;line-height:32px}
.translation-details p {line-height:1.6;margin:8px 0}
.preview-language-name {font-size:.8rem;color:var(--text-3);display:block;margin-bottom:4px}
.spotlight-tr-item .text {overflow-wrap:anywhere}
#teacher-tools .btn-student-mic-hero {justify-content:center;width:100%}
@media (max-width:599px) {
 .teacher-body .ctrl-bar {padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
 .capture-monitor {font-size:.76rem;column-gap:8px;margin-bottom:8px}
 .capture-level {width:44px}
 #capture-transport-status {font-size:.73rem;max-width:135px;text-align:right}
 .translation-preview-controls {gap:8px}
 .translation-preview-controls label {flex-basis:100%}
 .workspace-mode-toggle {font-size:.73rem;min-height:32px;margin-bottom:6px}
}
@media (prefers-reduced-motion:reduce) {.capture-level span {transition:none}}
@media (max-width:959px) {
 [data-focus-mode="false"] .workspace-panel {display:block;margin-bottom:24px}
 [data-focus-mode="false"] .teacher-tabs {display:none}
}

#teacher-tools .workspace-mode-toggle {width:100%;margin:0;font-size:.85rem;min-height:46px}

/* Mobile teacher workspace: reserve the screen for content, not repeated chrome. */
.tab-label-mobile {display:none}
@media (max-width:959px) {
 .teacher-body.teacher-focus-active {height:100dvh;overflow:hidden;overscroll-behavior:none}
 .teacher-focus-active .topbar-slim {min-height:44px;height:calc(44px + env(safe-area-inset-top,0px))}
 .teacher-focus-active .topbar-container {min-height:44px;height:44px;padding-inline:12px}
 .teacher-body.teacher-focus-active .teacher-main {height:calc(100dvh - var(--teacher-header-height,44px));width:100%;max-width:none;margin:0;padding:4px 12px calc(var(--dock-height,88px) + 6px);box-sizing:border-box;overflow:hidden}
 .teacher-focus-active #classroom-panel {height:100%;min-height:0;gap:6px}
 .teacher-focus-active .classroom-context {flex:none;min-height:30px;gap:8px}
 .teacher-focus-active .classroom-context>div:first-child {min-width:0;flex:1}
 .teacher-focus-active .classroom-context .eyebrow,.teacher-focus-active #status-badge {display:none}
 .teacher-focus-active .classroom-context h1 {font-size:.92rem;line-height:30px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
 .teacher-focus-active .context-status {max-width:96px;flex:none;display:block}
 .teacher-focus-active #teacher-connection-label {font-size:.68rem;white-space:nowrap}
 .teacher-focus-active .teacher-navigation {position:static;flex:none;padding:0;background:transparent}
 .teacher-focus-active .class-pulse {display:none}
 .teacher-focus-active .teacher-tabs {margin:0;gap:0}
 .teacher-focus-active .teacher-tabs button {min-height:40px;padding:6px;font-size:.8rem;white-space:nowrap}
 .teacher-focus-active .tab-label-wide {display:none}
 .teacher-focus-active .tab-label-mobile {display:inline}
 .teacher-focus-active #mobile-interaction-count {font-size:.7rem;font-weight:500;color:var(--text-3)}
 .teacher-focus-active #tab-interaction.needs-attention .tab-label-mobile {color:#edcc8f}
 .teacher-focus-active #tab-interaction.needs-attention::after {content:' •';color:#edcc8f}
 .teacher-focus-active .lecture-workspace {flex:1;min-height:0;overflow:hidden;max-width:none;margin:0}
 .teacher-focus-active .workspace-panel {height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;padding-bottom:4px}
 .teacher-focus-active #view-live {overflow:hidden;padding:0}
 .teacher-focus-active .live-spotlight-card {height:100%;min-height:0;display:flex;flex-direction:column;padding:10px 12px;box-sizing:border-box;border-radius:14px}
 .teacher-focus-active .spotlight-slim-header {flex:none;gap:6px;margin:0;align-items:center;flex-wrap:nowrap}
 .teacher-focus-active .spotlight-title-group {min-width:0;flex:1}
 .teacher-focus-active .spotlight-badge {font-size:.7rem;line-height:1.5;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .teacher-focus-active .translation-settings-link {flex:none;min-height:36px;padding:6px 8px;font-size:.7rem}
 .teacher-focus-active .spotlight-time {display:none}
 .teacher-focus-active .spotlight-content {display:flex;flex-direction:column;flex:1;min-height:0}
 .teacher-focus-active .spotlight-reading {position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-bottom:8px}
 .teacher-focus-active .spotlight-zh {font-size:1.15rem;line-height:1.65;margin-top:8px}
 .teacher-focus-active .spotlight-zh.idle {font-size:1rem;padding:12px 0}
 .teacher-focus-active .spotlight-tr-item {font-size:.95rem;padding:10px 0}
 .teacher-focus-active .translation-overview {flex:none;margin-top:6px;font-size:.7rem;gap:3px 8px;line-height:1.4}
 .teacher-focus-active #translation-issue {font-size:.68rem;max-height:2.8em;overflow:auto}
 .teacher-focus-active .translation-preview-controls {flex:none;margin-top:6px;gap:8px;flex-wrap:nowrap}
 .teacher-focus-active .translation-preview-controls label {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .teacher-focus-active .translation-preview-controls .select {min-height:40px;font-size:.8rem;max-width:none;width:0;flex:1 1 0;padding-block:7px}
 .teacher-focus-active #translation-expand {min-height:40px;padding:7px 10px;font-size:.76rem;white-space:nowrap}
 .teacher-focus-active .translation-details,.teacher-focus-active .workspace-hint {display:none}
 .teacher-body.teacher-focus-active .ctrl-bar {padding:6px 12px calc(6px + env(safe-area-inset-bottom,0px));border-radius:0}
 .teacher-focus-active .capture-monitor {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 8px;margin-bottom:5px;font-size:.7rem;min-height:20px}
 .teacher-focus-active .capture-input {gap:5px;flex-wrap:nowrap;min-width:0;overflow:hidden}
 .teacher-focus-active .capture-dot {width:6px;height:6px}
 .teacher-focus-active #capture-input-status {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
 .teacher-focus-active .capture-level {width:28px;height:5px;flex-shrink:0}
 .teacher-focus-active #capture-transport-status {font-size:.68rem;max-width:none;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .teacher-focus-active #capture-device-name,.teacher-focus-active .capture-settings,.teacher-focus-active #capture-hint {display:none}
 .teacher-focus-active .capture-monitor[data-tone="warn"] #capture-hint,.teacher-focus-active .capture-monitor[data-tone="danger"] #capture-hint {display:block;font-size:.68rem;line-height:1.4;margin:3px 0;max-height:2.8em;overflow:auto}
 .teacher-focus-active .capture-monitor #capture-hint[hidden] {display:none}
 .teacher-focus-active .ctrl-hero-group {gap:8px}
 .teacher-focus-active .btn-record-hero {min-height:44px;height:44px;font-size:.9rem;padding:8px 12px}
 .teacher-focus-active .ctrl-more {min-height:44px;min-width:44px;padding:8px;font-size:1.1rem;justify-content:center;flex-direction:row}
 .teacher-focus-active .ctrl-more>span {display:none}
}
@media (max-width:959px) and (max-height:500px) and (orientation:landscape) {
 .teacher-focus-active .topbar-slim {display:none}
 .teacher-focus-active .classroom-context {min-height:26px}
 .teacher-focus-active .classroom-context h1 {line-height:26px;font-size:.85rem}
 .teacher-focus-active .teacher-tabs button {min-height:34px;padding:4px;font-size:.76rem}
 .teacher-body.teacher-focus-active .ctrl-bar {display:flex;gap:12px;align-items:center}
 .teacher-focus-active .capture-monitor {flex:1;min-width:0;margin:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
 .teacher-focus-active .ctrl-hero-group {flex:0 1 260px;width:46%;margin:0}
 .teacher-focus-active .capture-monitor[data-tone="warn"] #capture-hint,.teacher-focus-active .capture-monitor[data-tone="danger"] #capture-hint {display:none}
 .teacher-focus-active .spotlight-slim-header {min-height:28px}
 .teacher-focus-active .translation-settings-link {min-height:28px;padding:3px 8px}
 .teacher-focus-active .spotlight-zh {font-size:1rem}
 .teacher-focus-active .translation-overview {margin-top:3px}
 .teacher-focus-active .translation-preview-controls {margin-top:3px}
}

.mobile-header-action {display:none}
.stt-advisor {padding:16px;border:1px solid var(--border);border-radius:12px;background:rgba(124,105,180,.06)}
.stt-advisor h3 {font-size:1rem;margin:0 0 8px}
.stt-advisor p {font-size:.8rem;line-height:1.65;margin:8px 0}
.stt-advisor label {font-size:.8rem;display:block;margin:10px 0 6px}
.stt-advisor-actions {flex-wrap:wrap;gap:8px;margin-top:12px}
.stt-advisor-actions .btn {min-height:44px;white-space:normal}
.stt-compare {font-size:.78rem}
.stt-compare th,.stt-compare td {padding:8px;white-space:nowrap}
.stt-value-change td:last-child {color:#c7b6f1;font-weight:650}
.stt-advisor-note {color:var(--text-3)}
#stt-advice-reasons {font-size:.8rem;line-height:1.7;padding-left:20px}
@media (max-width:959px) {
 .teacher-body .topbar-brand {flex:1;min-width:0}
 .teacher-body .topbar-brand .brand-name {font-size:1.08rem;font-weight:750;max-width:none;line-height:1.25}
 .teacher-focus-active .topbar-actions a[href="../admin/"],.teacher-focus-active .topbar-actions #logout-btn {display:none}
 #teacher-tools .mobile-header-action {display:flex;align-items:center;justify-content:center}
 .stt-advisor {padding:12px}
}
@media (max-width:959px) {
 .teacher-focus-active .topbar-container>.spacer {display:none}
 .teacher-focus-active .topbar-brand {flex:1 1 0}
}

/* Admin workspace: persistent section navigation and deliberate editing. */
.admin-body .admin-main {max-width:1480px;padding-top:24px;padding-bottom:110px}
.admin-body .admin-eyebrow {font-size:.7rem;color:var(--text-3);letter-spacing:.12em}
.admin-body .hero {gap:20px;margin-bottom:24px;align-items:center}
.admin-body .hero h1 {font-size:1.65rem;line-height:1.35;margin-top:4px}
.admin-body .hero p {font-size:.85rem;line-height:1.6}
.admin-body .stats {gap:10px}
.admin-body .stats .stat {min-width:108px;padding:12px 16px;border-radius:12px;background:#191d28}
.admin-body .stats .stat .v {font-size:1.35rem;margin-top:5px;color:var(--text);background:none;-webkit-text-fill-color:currentColor}
.admin-body .stats .stat .k {font-size:.7rem;letter-spacing:0}
.admin-workspace {display:grid;grid-template-columns:210px minmax(0,1fr);align-items:start;gap:28px;min-width:0}
.admin-sidebar {position:sticky;top:88px;min-width:0}
.admin-sidebar-label {font-size:.72rem;color:var(--text-3);margin:0 0 12px;padding:0 12px}
.admin-section-nav {display:flex;flex-direction:column;gap:6px}
.admin-section-nav>a {display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:66px;padding:12px;border:1px solid transparent;border-radius:12px;color:var(--text-2);text-decoration:none}
.admin-section-nav>a:hover {background:rgba(255,255,255,.03);color:var(--text)}
.admin-section-nav>a[aria-current="page"] {background:#262236;border-color:#63577e;color:#eee8ff}
.admin-section-nav b {display:block;font-size:.9rem;font-weight:600}
.admin-section-nav small {display:block;font-size:.7rem;color:var(--text-3);margin-top:3px}
.section-dirty {font-style:normal;font-size:.62rem;color:#eccb8f;white-space:nowrap}
.section-dirty[hidden] {display:none}
.admin-sidebar-note {font-size:.72rem;line-height:1.8;color:var(--text-3);margin:18px 12px}
.admin-body .settings-grid {display:block;min-width:0}
.admin-body .settings-grid>.card {padding:24px;border-radius:16px;min-width:0;scroll-margin-top:86px}
.admin-body .card-head {margin-bottom:22px;gap:12px}
.admin-body .card-head h2 {font-size:1.15rem;line-height:1.4}
.admin-body .card-head p {font-size:.8rem;line-height:1.6}
.admin-body .card-icon {width:42px;height:42px;border-radius:12px;font-size:1.3rem;flex:none}
.admin-body .field label {font-size:.8rem;line-height:1.5;gap:6px}
.admin-body .field label .faint {font-size:.72rem}
.admin-body .input,.admin-body .select {font-size:.88rem;min-height:42px;border-radius:10px}
.admin-body .range-wrap {gap:12px}
.admin-body .range-wrap output {font-size:.78rem;min-width:64px;padding:4px 7px;border-radius:7px}
.admin-body .stt-layout {display:grid;grid-template-columns:minmax(290px,1fr) minmax(300px,1fr);align-items:start;gap:24px}
.admin-body .stt-advisor {padding:18px;background:#191c28;min-width:0}
.admin-body .stt-advisor h3,.admin-column-heading {font-size:.92rem;font-weight:600;margin:0}
.admin-body .stt-advisor .table-wrap {margin-top:12px}
.admin-body .stt-advisor-actions {gap:8px}
.admin-body .stt-advisor-actions .btn {font-size:.78rem;min-height:40px;padding:8px 10px}
.admin-body .stt-advisor-note {border-top:1px solid var(--border);padding-top:12px;font-size:.73rem;line-height:1.7}
.admin-body .stt-manual-controls {--gap:15px;min-width:0}
.admin-body .stt-manual-controls>.grid {grid-template-columns:minmax(0,1fr) minmax(110px,.65fr)!important}
.admin-body .llm-layout {grid-template-columns:minmax(260px,.85fr) minmax(300px,1.15fr);gap:24px}
.admin-body .prompt-area {min-height:320px;font-size:.84rem;line-height:1.65}
.lang-column-labels {display:grid;grid-template-columns:38px 54px 70px minmax(0,1fr) minmax(0,1fr) 38px;gap:8px;padding:0 10px 8px;color:var(--text-3);font-size:.7rem}
.admin-body .lang-row {grid-template-columns:38px 54px 70px minmax(0,1fr) minmax(0,1fr) 38px;border-radius:10px;padding:10px;gap:8px;min-width:0}
.admin-body .lang-row .input {min-width:0;width:100%}
.admin-body .lang-row .btn {min-width:36px;padding:6px}
.admin-body .live-rooms {grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))}
.admin-body .admin-main .table-wrap {max-width:100%;overflow-x:auto}
.admin-body .savebar-status {display:flex;align-items:center;gap:8px;min-width:0}
.admin-body .savebar-status .dot {flex:none}
@media (min-width:960px) {
 .admin-body .admin-topbar .container {max-width:1480px}
 .admin-main[data-active-settings] .settings-grid>.card {display:none}
 .admin-main[data-active-settings="card-omlx"] #card-omlx,.admin-main[data-active-settings="card-stt"] #card-stt,.admin-main[data-active-settings="card-llm"] #card-llm,.admin-main[data-active-settings="card-langs"] #card-langs,.admin-main[data-active-settings="card-system"] #card-system,.admin-main[data-active-settings="card-monitor"] #card-monitor {display:block}
 .admin-body #card-omlx>.stack {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
 .admin-body #card-omlx .conn-test,.admin-body #card-omlx .model-chips {grid-column:1 / -1}
 .admin-body #card-system>.stack {max-width:860px}
 .admin-body .savebar {left:auto;right:max(24px,calc((100vw - 1480px)/2));bottom:16px;width:calc(min(1480px,100vw - 48px) - 238px);max-width:none;transform:none;transition:none;min-height:64px;padding:10px 12px 10px 18px;border-radius:12px;background:#1a1d29;box-shadow:0 8px 30px #0004;font-size:.85rem}
 .admin-body .savebar.show {transform:none;border-color:#8c7851}
 .admin-body .savebar .btn {min-height:40px}
}
@media (min-width:960px) and (max-width:1199px) {
 .admin-workspace {grid-template-columns:180px minmax(0,1fr);gap:20px}
 .admin-body .settings-grid>.card {padding:20px}
 .admin-body .stt-layout {grid-template-columns:1fr}
 .admin-body .llm-layout {grid-template-columns:1fr}
 .admin-body .savebar {width:calc(100vw - 248px)}
 .admin-section-nav small {font-size:.67rem}
 .admin-body .admin-topbar .nav {gap:4px}
 .admin-body .admin-topbar .nav a {font-size:.8rem;padding:8px}
 .admin-body .admin-topbar .brand {font-size:.95rem}
}
@media (max-width:959px) {
 .admin-body .admin-main {padding-top:20px}
 .admin-workspace {display:block}
 .admin-sidebar {position:static;margin-bottom:18px}
 .admin-sidebar-label,.admin-sidebar-note {display:none}
 .admin-section-nav {flex-direction:row;overflow-x:auto;gap:6px;padding-bottom:6px}
 .admin-section-nav>a {min-height:42px;padding:8px 12px;flex:none;gap:6px}
 .admin-section-nav small {display:none}
 .admin-section-nav b {font-size:.8rem}
 .admin-body .settings-grid>.card {margin-bottom:20px}
 .admin-body .stt-layout,.admin-body .llm-layout {grid-template-columns:1fr}
 .admin-body .hero {gap:16px}
 .admin-body .hero h1 {font-size:1.4rem}
 .admin-body .stats {width:100%}
 .admin-body .stats .stat {flex:1;min-width:0;padding:10px}
}
@media (max-width:599px) {
 .admin-body .settings-grid>.card {padding:16px}
 .admin-body .stt-advisor {padding:12px}
 .admin-body .stt-manual-controls>.grid {grid-template-columns:minmax(0,1fr)!important}
 .admin-body .lang-column-labels {display:none}
 .admin-body .lang-row {grid-template-columns:34px 46px minmax(0,1fr) 34px}
 .admin-body .lang-row .code,.admin-body .lang-row .llm {display:none}
 .admin-body .savebar {font-size:.76rem;padding:10px;gap:6px}
 .admin-body .savebar .btn {font-size:.75rem;padding:8px}
}
@media (min-width:960px) {
 .admin-body .admin-main,.admin-body .admin-topbar>.container {width:min(1480px,calc(100% - 48px))}
 .admin-body .admin-topbar>.topbar-container {padding-inline:0}
}
.admin-body .admin-topbar {background:var(--bg);backdrop-filter:none;-webkit-backdrop-filter:none}
.admin-body .toasts {bottom:96px}

/* Independent speech language remains usable in the compact reader settings. */
#speech-language { width:auto; max-width:52%; min-width:0; }

.room-notice { margin:0; padding:8px 16px; text-align:center; color:var(--text-2); background:var(--bg-2); font-size:.85rem; flex-shrink:0; }
#class-ended { padding:24px; width:min(440px,calc(100% - 32px)); }
#class-ended p { margin:12px 0; line-height:1.6; }
#class-ended [hidden] { display:none; }
#leave-countdown { text-align:center; color:var(--text-3); }

#btn-reopen-room[hidden] { display:none; }

/* Teacher tools: task groups with a clear next action; destructive operations stay secondary. */
#teacher-tools.classroom-tools { width:min(660px,calc(100% - 32px)); padding:24px; }
#teacher-tools .sheet-head { margin-bottom:16px; align-items:flex-start; }
#teacher-tools .sheet-head h2 { margin:0; font-size:1.3rem; }
.tools-course-name { margin:5px 0 0; color:var(--text-3); font-size:.82rem; overflow-wrap:anywhere; }
.tools-section + .tools-section { margin-top:20px; }
.tools-section h3 { margin:0 0 8px; font-size:.78rem; color:var(--text-3); font-weight:600; letter-spacing:.04em; }
#teacher-tools .tool-row { width:100%; display:flex; align-items:center; gap:12px; padding:13px 12px; min-height:68px; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--text); text-align:left; text-decoration:none; cursor:pointer; font:inherit; }
#teacher-tools .tool-row:hover { background:var(--surface-hi); border-color:var(--border); }
#teacher-tools .tool-row:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
#teacher-tools .tool-row:disabled { opacity:.5; cursor:not-allowed; }
#teacher-tools .tool-row[hidden] { display:none; }
.tool-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:10px; background:var(--surface-hi); color:var(--text-2); font-size:1.1rem; }
.tool-copy { min-width:0; flex:1; }
.tool-copy strong { display:block; font-size:.95rem; font-weight:600; }
.tool-copy small { display:block; margin-top:4px; color:var(--text-3); font-size:.77rem; line-height:1.5; font-weight:400; }
.tool-trail { color:var(--text-3); flex-shrink:0; font-size:.95rem; }
.tools-pair { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
#teacher-tools .tool-voice-toggle { background:var(--surface-hi); margin-bottom:4px; }
#teacher-tools .mic-button-label { flex-shrink:0; padding:5px 12px; border-radius:99px; border:1px solid var(--border-hi); font-size:.8rem; color:var(--text-2); }
#teacher-tools .tool-voice-toggle.active .mic-button-label { background:var(--ok); border-color:var(--ok); color:#071a11; }
.tools-finish { margin-top:20px; padding-top:16px; border-top:1px solid var(--border); }
#teacher-tools .tools-finish .tool-row { background:rgba(168,152,237,.08); border-color:var(--border-hi); }
.tools-status-hint { margin:8px 12px 0; font-size:.75rem; line-height:1.5; color:var(--text-3); }
.tools-more { border-top:1px solid var(--border); margin-top:20px; padding-top:16px; }
.tools-more summary { color:var(--text-2); font-size:.85rem; cursor:pointer; padding:4px 0; }
.tools-secondary { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.tools-clear { display:flex; gap:12px; justify-content:space-between; align-items:center; margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }
.tools-clear strong { font-size:.82rem; color:var(--text-2); }
.tools-clear p { margin:4px 0 0; color:var(--text-3); font-size:.75rem; line-height:1.5; }
.tools-clear .btn { color:var(--danger); flex-shrink:0; }
@media(max-width:599px) {
 #teacher-tools.classroom-tools { width:100%; max-width:100%; padding:20px 16px calc(20px + env(safe-area-inset-bottom,0px)); }
 .tools-pair { grid-template-columns:1fr; gap:0; }
 .tools-section + .tools-section { margin-top:16px; }
 #teacher-tools .tool-row { min-height:64px; padding:10px; }
 .tools-clear { align-items:flex-start; }
}

.tools-records { margin-top:16px; }
.tools-records summary { padding:12px; border-radius:12px; color:var(--text); cursor:pointer; font-size:.9rem; }
.tools-records summary:hover { background:var(--surface-hi); }
.tools-records summary small { color:var(--text-3); margin-left:10px; font-size:.77rem; }
.tools-records[open] summary { margin-bottom:4px; }

.join-room-preview { text-align:left; padding:12px 14px; border:1px solid var(--border-hi); border-radius:12px; background:var(--surface-hi); }
.join-room-preview[hidden] { display:none; }
.preview-course { display:block; color:var(--text); font-size:.95rem; margin-bottom:6px; overflow-wrap:anywhere; }
.preview-state { display:block; color:var(--brand); font-size:.85rem; font-weight:600; }
.join-room-preview[data-tone="warn"] .preview-state { color:var(--warn); }
.join-room-preview[data-tone="ok"] .preview-state { color:var(--ok); }
.join-room-preview p { margin:5px 0 0; color:var(--text-2); font-size:.8rem; line-height:1.5; }

/* Closed admission needs an unmistakable action, distinct from microphone capture. */
.room-closed-notice { display:flex; align-items:flex-start; gap:12px; padding:16px 18px; border:1px solid #ba873a; border-left:4px solid #efba62; border-radius:12px; background:#352b1c; color:#ffe0a6; flex-shrink:0; }
.room-closed-notice[hidden] { display:none; }
.closed-notice-icon { font-size:1.5rem; line-height:1.3; }
.room-closed-notice strong { display:block; font-size:1rem; line-height:1.4; }
.room-closed-notice p { margin:5px 0 0; font-size:.84rem; line-height:1.6; color:#edce9f; }
.teacher-body .btn-record-hero.needs-opening { background:#efba62; color:#241a0a; border:2px solid #ffd58f; font-weight:750; box-shadow:0 0 0 3px #efba621a; }
.teacher-body .btn-record-hero.needs-opening:hover { background:#ffd08a; }
.teacher-body .btn-record-hero.needs-opening:focus-visible { outline:3px solid #ffe2b4; outline-offset:4px; }
[data-room-status="ended"] .ctrl-bar { border-top:2px solid #ba873a; background:#241f18; }
[data-room-status="ended"] #capture-input-status { color:#ffd08a; font-weight:650; }
@media(max-width:959px) {
 .room-closed-notice { margin:6px 12px; padding:10px 12px; gap:9px; }
 .room-closed-notice strong { font-size:.9rem; }
 .room-closed-notice p { font-size:.76rem; line-height:1.5; }
}
