:root{color-scheme:dark;--bg:#101923;--panel:#182633;--line:#526778;--ink:#f1f5f8;--muted:#c2cfd9;--accent:#ffcf79;--mint:#88dfcd;--scale:1;font-size:calc(16px * var(--scale))}
*{box-sizing:border-box} [hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,"Microsoft JhengHei",sans-serif;line-height:1.65;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);min-height:44px;min-width:44px;padding:10px 15px;cursor:pointer;line-height:1.4}button:hover{border-color:var(--mint)}button:disabled{opacity:.65;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--mint);outline-offset:3px}.primary{background:var(--accent);border-color:var(--accent);color:#182633;font-weight:750}.quiet{background:transparent}.chosen{border:2px solid var(--mint);background:#25483f}a{color:var(--mint)}
header{position:sticky;top:0;z-index:3;background:var(--bg);border-bottom:1px solid var(--line);padding:10px 16px}.header-line,.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.header-line strong{flex:1}.progress{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}.progress button{font-size:1rem;padding:3px 7px;min-width:30px;min-height:44px;border-radius:7px}.progress [aria-current=step]{border:2px solid var(--accent)}
main{max-width:940px;margin:auto;padding:24px 20px 90px}h1{font-size:1.9rem;line-height:1.3;margin:8px 0 12px}h2{font-size:1.3rem;line-height:1.4;margin:4px 0 12px}h3{font-size:1.08rem;color:var(--accent);margin:4px 0}p{margin:8px 0 16px}#lead{font-size:1.2rem;color:var(--muted)}.eyebrow{color:var(--accent)}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;margin:14px 0}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cards .card{margin:0;min-width:0}.map{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.map figure{margin:0;text-align:center}.map img{width:100%;aspect-ratio:1}.map figcaption{font-weight:700}img{max-width:100%;display:block;border-radius:10px}.still{width:100%;aspect-ratio:16/9;object-fit:cover}.step-art{width:100%;max-height:240px;object-fit:contain}.choices{display:grid;gap:10px;margin:14px 0}.choices button{text-align:left}.feedback{color:var(--mint);white-space:pre-line}.muted{color:var(--muted)}label.check{display:flex;gap:12px;align-items:start;padding:12px 0;min-height:44px}input[type=checkbox]{min-width:24px;width:24px;height:24px;accent-color:var(--mint);margin-top:3px}input[type=text],textarea{width:100%;min-height:48px;background:#101c28;border:1px solid var(--line);border-radius:8px;color:var(--ink);padding:10px;user-select:text;-webkit-user-select:text}textarea{resize:vertical}summary{min-height:44px;cursor:pointer;padding:8px}nav#actions{display:flex;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:16px;margin-top:22px}.check-detail{margin-left:36px;color:var(--muted)}.video{aspect-ratio:16/9;width:100%;border:0;border-radius:12px;background:#000}.video-box{position:relative}.caption{position:absolute;bottom:14%;left:5%;right:5%;background:#000d;color:white;text-align:center;font-size:1rem;pointer-events:none}.caption:empty{display:none}dialog{width:min(92vw,640px);max-height:85dvh;overflow:auto;background:var(--panel);color:var(--ink);border:1px solid var(--mint);border-radius:16px;padding:20px}dialog::backdrop{background:#000b}.actions{margin-top:14px}#focus{position:fixed;inset:0;z-index:5;background:var(--bg);display:grid;grid-template-rows:auto minmax(0,1fr)}#focusBar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px;border-bottom:1px solid var(--line)}#toolSlot{min-height:0}#toolSlot iframe{width:100%;height:100%;border:0;display:block}.table{display:grid;grid-template-columns:1fr 1fr;gap:10px}.table ul{padding-left:20px}.record{border-left:3px solid var(--mint);padding-left:12px}progress{width:100%;accent-color:var(--mint)}.projection main{max-width:1200px;padding-top:35px}.projection h1{font-size:3rem}.projection #lead{font-size:1.7rem}.projection .map{max-width:820px;margin:20px auto}.projection .step-art{max-height:330px}.projection header button{font-size:1rem}
@media(max-width:600px){main{padding:16px 16px 65px}header{padding:8px 12px}h1{font-size:1.6rem}.header-line{gap:6px}.header-line button{padding:8px 10px}.cards{grid-template-columns:1fr}.map{grid-template-columns:repeat(2,minmax(0,1fr))}.map img{max-height:110px;object-fit:contain}.card{padding:14px}.table{grid-template-columns:1fr}.progress{gap:4px}.progress button{padding:2px 5px}#lead{font-size:1.1rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
#classTools{max-width:940px;margin:12px auto;padding:0 16px}#classTools .term-login input:not([type=checkbox]){background:#fff;color:#172b40}#classTools .term-login label{color:#172b40}#classTools .term-login-setup{line-height:1.5}#main.class-shell-content h1{font-size:1.6em}#main.class-shell-content h2{font-size:1.3em}#main.class-shell-content h3{font-size:1.08em}#main.class-shell-content #lead{font-size:1.1em}.class-shell-feedback textarea{background:#fff;color:#172b40}.class-shell-feedback label{color:#172b40}.class-shell-feedback p{color:#18334a}figure.card{margin-left:0;margin-right:0}figure.card figcaption{margin-top:8px;font-size:.9em}
.map{grid-template-columns:repeat(3,minmax(0,1fr))}.map .card{margin:0;display:grid;gap:8px;text-align:center}.map-symbol{font-size:2.4rem;line-height:1.2;color:var(--mint)}.step-number{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--mint);color:var(--bg);font-weight:800}.login-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.feedback{white-space:normal}.feedback button{display:block;margin-top:10px}button{overflow-wrap:anywhere}canvas{display:block;width:100%;max-width:100%;aspect-ratio:16/9;background:#07111b;border-radius:10px}.ob-thumbs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.ob-thumbs button{padding:6px;min-width:0}.ob-thumbs span{display:block;margin-top:6px}#body>*{min-width:0}.progress{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}.progress button{min-width:0}.card h3,.header-line strong{overflow-wrap:anywhere}
@media(max-width:600px){.map{grid-template-columns:repeat(2,minmax(0,1fr))}.progress{grid-template-columns:repeat(6,minmax(0,1fr))}.login-actions{grid-template-columns:1fr}.map-symbol{font-size:2rem}}
@media(max-height:450px) and (min-width:700px){header{position:static}.ob-control{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,1fr);gap:8px}.ob-control>h2,.ob-control>.ob-lines,.ob-control>.actions{grid-column:1/-1}.ob-thumbs{margin:0}.ob-thumbs canvas{max-height:70px}}

/* 每幕切成短頁；導覽與下一步留在自己的列，不覆蓋題目或影片。 */
html,body{height:100%;height:100dvh;overflow:hidden}
body{display:grid;grid-template-rows:auto minmax(0,1fr);line-height:1.45}
header{position:static;padding:4px 8px;z-index:auto}
.header-line{flex-wrap:nowrap;gap:4px}.header-line strong{font-size:16px;min-width:0}.header-line button{padding:4px 8px;font-size:16px;flex-shrink:0}
main,.projection main{width:100%;max-width:1200px;min-height:0;padding:8px 12px;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto auto;gap:6px}
main,.projection main{height:100%;max-height:100%;margin:0 auto;overflow:hidden}
#title{grid-row:1}#lead{grid-row:2}#paneSelect{grid-row:3}#body{grid-row:4}#notice{grid-row:5}#actions{grid-row:6}
h1,.projection h1,#main.class-shell-content h1{font-size:1.3em;margin:0;line-height:1.3}
#lead,.projection #lead,#main.class-shell-content #lead{font-size:1em;line-height:1.4;margin:0}
#paneSelect{width:100%;min-height:44px;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:5px}
#body{min-height:0;overflow:hidden}.lesson-pane{height:100%;min-height:0;overflow:auto;scrollbar-gutter:stable}
.lesson-pane>.card:first-child{margin-top:0}.card{padding:10px;margin:6px 0}h2,h3{margin:0 0 6px}p{margin:4px 0 8px}.choices{gap:6px;margin:6px 0}
button{padding:6px 10px;min-height:44px}.actions{gap:6px;margin-top:6px}
nav#actions{margin:0;padding:4px 0 0;border-top:1px solid var(--line);gap:5px;flex-wrap:nowrap;align-items:stretch}
#actions button{font-size:16px;padding:5px 8px;min-width:0;flex:1}#actions .primary{flex:1.25}
#notice:empty{display:none}#notice{font-size:16px;margin:0}
#sceneDialog .progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 12px;gap:8px}#sceneDialog button{min-height:44px;min-width:44px}
#settingsDialog{padding:8px}#classTools{margin:0;padding:0}#classTools button,#classTools summary{min-height:44px!important;font-size:16px!important}#classTools .class-shell-heading{display:none}
#settingsDialog{max-height:calc(100dvh - 16px)}#settingsPane{width:100%;min-height:44px;font:inherit;background:var(--panel);color:var(--ink);margin-bottom:6px}#settingsClose{margin-top:6px}
#settingsDialog[data-settings=login] .class-shell-tools,#settingsDialog[data-settings=login] .class-shell-evaluation,#settingsDialog[data-settings=tools] .class-shell-login,#settingsDialog[data-settings=tools] .class-shell-evaluation,#settingsDialog[data-settings=evaluation] .class-shell-tools,#settingsDialog[data-settings=evaluation] .class-shell-login{display:none}
#classTools .term-login h2,#classTools .class-shell-status:empty{display:none}#classTools .term-login p,#classTools .term-login label,#classTools .term-login input{font-size:16px!important}#classTools .term-login input:not([type=checkbox]){min-height:44px}
.lesson-pane>.class-shell-evaluation{color:#18334a}.lesson-pane>.class-shell-evaluation a{color:#14587e}
.question[data-resolved=true] .choices button:not(.chosen),.question[data-retry=true] .choices{display:none}
.question .muted{font-size:16px}.question figure.card{margin:0 0 6px;padding:0;border:0;background:transparent}.question figure img{height:100px;object-fit:contain;width:100%}.question figure figcaption{display:none}
.lesson-pane figure.card{margin:0 0 6px;padding:0;border:0;background:transparent}.lesson-pane figure.card img{height:100px;object-fit:contain;width:100%}.lesson-pane figure.card figcaption{display:none}
.observation-counts{grid-template-columns:repeat(3,minmax(0,1fr))}.observation-counts button{font-size:16px;padding:4px;line-height:1.2}
.choices.reason-answered{grid-template-columns:minmax(0,1fr) auto}.choices.reason-answered button:not(.chosen):not(:last-child){display:none}
.question details:not([open]){margin:0}.lesson-pane details[open]:not([data-inline]){position:fixed;inset:70px 12px 72px;z-index:8;overflow:auto;background:var(--panel);padding:12px;border:2px solid var(--mint);border-radius:12px}:is(.lesson-pane,body) .question details[open]:not([data-inline]){position:fixed;inset:70px auto auto 50%;transform:translateX(-50%);width:min(680px,calc(100vw - 24px));height:auto;max-height:calc(100dvh - 142px);box-shadow:0 12px 40px #000a;font-size:1.15rem;line-height:1.6;z-index:8;overflow:auto;background:var(--panel);padding:12px;border:2px solid var(--mint);border-radius:12px}
.lesson-pane .cards{gap:6px}.lesson-pane .cards details{border:1px solid var(--line);border-radius:10px;padding:4px}
.map .card{padding:8px}.map-symbol{font-size:1.7rem}.map{gap:6px}.map strong{font-size:16px}.map+p{margin-top:8px}
.video-box canvas{max-height:220px;object-fit:contain}.ob-control>canvas{max-height:120px;object-fit:contain}.ob-thumbs{gap:5px;margin:5px 0}.ob-thumbs canvas{height:58px;object-fit:contain}.ob-thumbs span{margin:0}.ob-control>.muted,.ob-control h2{font-size:16px;margin:0}.ob-thumbs button{padding:2px}.ob-control .actions{margin:4px 0}
.lesson-pane .cards:has(.step-number){grid-template-columns:repeat(2,minmax(0,1fr))}.step-number{width:24px;height:24px;font-size:16px}.lesson-pane .cards:has(.step-number) .card{padding:8px}.lesson-pane .cards:has(.step-number) h3{font-size:16px}.lesson-pane .cards:has(.step-number) p{margin:0;font-size:16px}
.projection .map{max-width:820px;margin:8px auto}.projection .lesson-pane>.cards{max-width:1000px;margin:auto}.projection .map-symbol{font-size:2.4rem}
.projection h1{font-size:2rem}.projection #lead{font-size:1.2rem}
.audio-incident{padding:8px!important;margin:0!important}.audio-incident h2{font-size:16px!important}.audio-incident .incident-stage{max-width:240px;margin:4px auto}.audio-incident .choices{gap:5px;margin:4px 0}.audio-incident p{margin:4px 0}.audio-incident .actions{margin:4px 0}.audio-incident .choices button{padding:5px 8px}.audio-incident>details>summary{padding:4px;min-height:44px}
.projection .audio-incident .incident-stage{max-width:620px}.projection .audio-incident .choices button{font-size:18px}.projection .audio-incident .feedback{font-size:18px}
@media(max-width:600px){.lesson-pane .cards:has(.step-number){grid-template-columns:repeat(2,minmax(0,1fr))}.map{grid-template-columns:repeat(2,minmax(0,1fr))}.audio-incident .incident-stage{max-width:180px}.audio-incident .incident-quote{font-size:16px}.audio-incident>.incident-quote+ p{font-size:16px}.audio-incident .actions button{font-size:16px}.lesson-pane>ul{padding-left:22px}.question .choices button{padding:5px 8px}.question h3{font-size:16px}#lead{max-height:3em}.map-symbol{font-size:1.5rem}.map .card{gap:3px}.lesson-pane .card h3{line-height:1.35}}

/* 版本入口常駐；停格圖以原圖放大，拖看時不帶動講義。 */
.teacher-route button{margin:4px 8px 4px 0}.teacher-route [aria-pressed=true]{border:2px solid var(--mint);background:#25483f}
.still-open{display:block;width:100%;padding:0;border-color:var(--mint);overflow:hidden}.still-open span{display:block;font-size:16px;padding:4px}
#stillDialog{position:fixed;inset:8px;margin:0;width:calc(100vw - 16px);height:calc(100dvh - 16px);max-width:none;max-height:none;padding:10px;overflow:hidden}
#stillDialog[open]{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:6px}#stillDialog h2,#stillDialog p,#stillDialog .actions{margin:0}
.still-viewport{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:none;background:#000;border:1px solid var(--line);border-radius:8px}
.still-viewport img{width:100%;height:100%;max-width:none;object-fit:contain;border-radius:0;pointer-events:none}.still-viewport.zoomed{cursor:grab}.still-viewport.zoomed img{height:auto;object-fit:initial}
body.host-page{display:block;overflow:auto}body.host-page main{display:block;height:auto;max-height:none;overflow:visible}#hostScenes{grid-template-columns:repeat(3,minmax(0,1fr))}#hostRoute{display:flex;align-items:center;gap:8px}#hostRoute select{min-height:44px;color:var(--ink);background:var(--panel)}
@media(max-width:600px){.header-line strong{font-size:14px}.header-line button{padding:4px 6px}#hostScenes{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 題號已在上方選單；手機不再重複佔一列，四個選項完整留在題頁內。 */
@media(max-width:600px){body[data-scene="6"][data-lite="true"] .question>p.muted{display:none}}

/* 教室投影獨立放大，手機仍沿用自己的字級與短頁。 */
body.projection{font-size:32px;line-height:1.4}
.projection #main{max-width:1840px;padding:20px 32px;gap:14px}
.projection #main #title{font-size:56px;line-height:1.2}
.projection #main #lead{font-size:32px;line-height:1.4;max-height:none}
.projection :is(button,select),.projection .header-line strong{font-size:32px}
.projection #actions button,.projection .header-line button{font-size:32px;padding:8px 16px}
.projection #body .lesson-pane{display:flex;flex-direction:column;justify-content:safe center;gap:20px}
.projection #body .lesson-pane[hidden]{display:none}
.projection #body .map{max-width:none;width:100%;flex:1;align-content:stretch;gap:20px;margin:0}
.projection #body .map .card{justify-content:center;padding:24px;gap:16px}
.projection #body .map strong{font-size:36px}
.projection #body .map-symbol{font-size:64px}
.projection #body .cards{max-width:none;width:100%;gap:20px;flex:1;align-content:stretch}
.projection #body .cards .card{padding:24px;display:flex;flex-direction:column;justify-content:center}
.projection #body :is(p,li,summary,.feedback,.muted){font-size:32px}
.projection #body :is(h2,h3){font-size:40px;line-height:1.3}
.projection #body .step-number{width:52px;height:52px;font-size:32px}
.projection #body .audio-incident :is(p,button,.feedback){font-size:32px!important}
.projection #body .audio-incident h2{font-size:40px!important}
.projection #body .audio-incident .incident-stage{max-width:560px}
.w7-evaluation{border:2px solid #e4b147;color:#18334a;padding:10px 14px;line-height:1.4}
.w7-evaluation a{color:#14587e;display:inline-block;min-height:44px;padding:6px 0}
.projection .w7-evaluation{font-size:32px;padding:18px 24px;margin:0}
.projection .closing-summary{padding:24px;margin:0}
.projection .closing-summary ul{display:grid;grid-template-columns:1fr 1fr;gap:16px 44px;margin:16px 0}
@media(max-width:1000px){body.projection{font-size:24px}.projection #main{padding:10px 16px}.projection #main #title{font-size:36px}.projection #body .map .card{padding:12px}}

/* r5: results stay in their tool; projection shows the current layer. */
.projection #body .current-layer{border:4px solid var(--accent);background:#314536}
.w7-evaluation,.w7-evaluation :is(strong,p,a){font-size:16px!important;line-height:1.4}
.projection #body .w7-evaluation,.projection #body .w7-evaluation :is(strong,p,a){font-size:32px!important}
.incident-example{padding:8px 12px;border:2px solid var(--accent);background:#17242f;color:#ffe6b0;font-size:16px;line-height:1.4}
.projection .incident-example{font-size:32px}
.projection #body .video-box canvas{max-height:490px}
.scene-help-steps{padding-left:24px;line-height:1.5}
#focusBar #toolNext{min-width:68px;flex:none}
.side-by-side{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.side-by-side>section{min-width:0}
.side-by-side h3{font-size:16px;margin:0 0 4px}
.side-by-side canvas{max-height:210px}
@media(max-width:600px){.side-by-side{grid-template-columns:1fr;gap:4px}.side-by-side canvas{max-height:135px}}

/* OB already shows its saved result; reserve the remaining space for its controls. */
body:not(.projection):has(.ob-control [role=status]:not([hidden])) #notice{display:none}
@media(max-height:600px) and (min-width:700px) and (orientation:landscape){
 body:not(.projection)[data-scene="6"] #lead{display:none}
 body:not(.projection)[data-scene="6"] #title{font-size:16px}
 body:not(.projection) .ob-control{height:100%;margin:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:4px}
 body:not(.projection) .ob-control>h2{display:none}
 body:not(.projection) .ob-control>.ob-lines{grid-column:1;grid-row:1;margin:0}
 body:not(.projection) .ob-control>canvas{grid-column:1;grid-row:2;align-self:center;height:100%;max-height:80px;object-fit:contain}
 body:not(.projection) .ob-control>.ob-thumbs{grid-column:2;grid-row:1/3;margin:0;gap:4px;align-content:center}
 body:not(.projection) .ob-control .ob-thumbs canvas{height:32px}
 body:not(.projection) .ob-control .ob-thumbs span{font-size:16px;line-height:1.1}
 body:not(.projection) .ob-control>.actions{grid-column:1/-1;grid-row:3;margin:0}
}
/* A19 手機橫拿：工具頁頂列壓矮，讓出高度給工具本身。 */
@media(max-height:450px) and (orientation:landscape){#focusBar{padding:1px 8px}}
/* A20 手機橫拿（含 1000×560 這類矮寬螢幕）：主畫面佔左側全高，四個跟隨鈕在右側直排、名字在框內，按鈕列在最右。 */
@media(max-height:600px) and (min-width:700px) and (orientation:landscape){
 body:not(.projection) .ob-control{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,210px) minmax(130px,200px);grid-template-rows:auto minmax(0,1fr);align-items:stretch;padding:6px}
 body:not(.projection) .ob-control>canvas{grid-column:1;grid-row:1/-1;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;object-fit:contain;align-self:stretch}
 body:not(.projection) .ob-control>.ob-thumbs{grid-column:2;grid-row:1/-1;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(4,minmax(0,1fr));gap:4px;align-content:stretch}
 body:not(.projection) .ob-control .ob-thumbs button{position:relative;padding:0;min-height:36px!important;overflow:hidden}
 body:not(.projection) .ob-control .ob-thumbs canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
 body:not(.projection) .ob-control .ob-thumbs span{position:absolute;left:0;right:0;bottom:0;padding:1px 4px;background:#000c;font-size:15px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body:not(.projection) .ob-control>.ob-lines{grid-column:3;grid-row:1;align-self:start;min-width:0}
 body:not(.projection) .ob-control .ob-lines .feedback{margin:0;font-size:15px;line-height:1.3}
 body:not(.projection) .ob-control>.actions{grid-column:3;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr);gap:4px;align-content:safe end}
}

/* Practice results and one-criterion repairs use the tool viewport without scrolling. */
.practice-host{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:8px;padding:10px 12px;font-size:16px}
.practice-host h2,.practice-host h3{font-size:18px;margin:0}.practice-host p{margin:0;line-height:1.4}.practice-host .practice-items{display:grid;gap:8px}.practice-item{border:1px solid var(--line);border-radius:10px;padding:8px;display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,42%);align-items:center;gap:8px}.practice-item p{min-width:0}.practice-host button,.practice-host select,.practice-host input{font-size:16px;min-height:44px;min-width:44px}.practice-host canvas{max-height:150px;object-fit:contain;flex:0 1 auto;min-height:0}.practice-host .actions{display:flex;margin:0;flex-wrap:nowrap}.practice-host .actions button{flex:1}.practice-time{display:flex;gap:8px;align-items:center}.practice-time span{font-variant-numeric:tabular-nums}
@media(max-height:450px){.practice-host{gap:4px;padding:6px 10px}.practice-host canvas{max-height:60px}.practice-item{padding:4px}.practice-host h2{font-size:16px}.practice-host .practice-items{gap:4px}}

@media(max-height:450px){
 .practice-host[data-practice-repair]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto}
 .practice-host[data-practice-repair]>h2{grid-column:1;grid-row:1}
 .practice-host[data-practice-repair]>p:first-of-type{grid-column:2;grid-row:1}
 .practice-host[data-practice-repair]>canvas{grid-column:1;grid-row:2;height:100%;max-height:90px}
 .practice-host[data-practice-repair]>.practice-time{grid-column:1;grid-row:3}
 .practice-host[data-practice-repair]>:is(input,select){grid-column:2;grid-row:2;align-self:center;width:100%;min-width:0}
 .practice-host[data-practice-repair]>p:last-of-type{grid-column:2;grid-row:3}
 .practice-host[data-practice-repair]>.actions{grid-column:1/-1;grid-row:4}
}

.ob-cheatsheet{margin:0;padding:8px}.ob-cheatsheet h2{font-size:18px;margin:0}.ob-cheatsheet p{margin:4px 0}.ob-cheatsheet label{display:grid;gap:3px;margin-block:5px;font-size:16px}.ob-cheatsheet input{width:100%;min-width:0;font:inherit;min-height:44px}.ob-cheatsheet button{width:100%;min-height:44px}
[data-camera-activity]{display:flex;flex-direction:column;gap:6px;min-height:0;height:100%}[data-camera-activity] h2{font-size:18px;margin:0}[data-camera-activity] p{margin:0;font-size:16px;line-height:1.35}[data-camera-activity] button,[data-camera-activity] input{font:inherit;font-size:16px;min-height:44px;min-width:44px}[data-camera-activity] input{width:100%;margin-top:8px}.camera-content{min-height:0;display:flex;flex-direction:column;gap:6px}.camera-content canvas{width:100%;max-height:150px;object-fit:contain}.camera-options{display:grid;grid-template-columns:1fr 1fr;gap:6px}.camera-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.camera-pair h3{font-size:16px;margin:0}.camera-pair section{min-width:0}.camera-controls{display:grid;gap:6px}.camera-controls>button{width:100%}.camera-options [aria-pressed=true]{border:2px solid var(--mint)}
@media(max-width:600px){.camera-pair{grid-template-columns:1fr;gap:3px}.camera-pair canvas{max-height:88px}.camera-pair h3{line-height:1.2}.camera-progress{font-size:16px}}
@media(max-height:450px){body:not(.projection):has([data-camera-activity]:not([hidden])) #lead{display:none}[data-camera-activity]{display:grid;grid-template-columns:1fr 1fr;gap:4px}[data-camera-activity]>h2{display:none}.camera-progress{grid-column:1/-1}.camera-content{grid-column:1;grid-row:2/4}.camera-controls{grid-column:2;grid-row:2}.camera-content canvas{max-height:72px}.camera-options{gap:4px}.camera-options button{padding:4px}.camera-pair{grid-template-columns:1fr 1fr}.ob-cheatsheet{display:grid;grid-template-columns:1fr 1fr;gap:4px}.ob-cheatsheet h2,.ob-cheatsheet>p:nth-of-type(2){display:none}.ob-cheatsheet>p:first-of-type{grid-column:1/-1}.ob-cheatsheet label{margin:0}.ob-cheatsheet button{align-self:end}}

@media(max-height:450px){
 body:not(.projection):has(.lesson-pane[data-camera-activity]:not([hidden])) #title,body:not(.projection):has(.lesson-pane:not([hidden]) .ob-cheatsheet) :is(#title,#lead){display:none}
 .camera-controls{grid-template-columns:1fr 1fr;align-content:start}.camera-controls>.camera-options{grid-column:1/-1}
 [data-camera-stage=reasons] .camera-content{display:contents}
 [data-camera-stage=reasons]>.camera-progress{display:none}
 [data-camera-stage=reasons] .camera-content>p:first-child{grid-column:1/-1;grid-row:1}
 [data-camera-stage=reasons] .camera-content>.camera-options{grid-column:1;grid-row:2/5}
 [data-camera-stage=reasons] .camera-content>input{grid-column:2;grid-row:2;margin:0}
 [data-camera-stage=reasons] .camera-content>.muted{grid-column:2;grid-row:3}
 [data-camera-stage=reasons]>.camera-controls{grid-column:2;grid-row:4;grid-template-columns:1fr}
 .ob-cheatsheet>button{grid-column:2;grid-row:3;align-self:start}.ob-cheatsheet>.feedback{grid-column:2;grid-row:3;align-self:end;margin-top:46px;font-size:16px}
}

body:not(.projection) .ob-cheatsheet h2{display:none}

@media(max-height:450px){
 body:not(.projection):has(.lesson-pane[data-camera-activity]:not([hidden])) #paneSelect,body:not(.projection):has(.lesson-pane:not([hidden]) .ob-cheatsheet) #paneSelect{display:none}
 .ob-cheatsheet>p:first-of-type{grid-column:1;grid-row:1}.ob-cheatsheet>.feedback{grid-column:2;grid-row:1;margin:0;align-self:start}
 .ob-cheatsheet label{line-height:1.2}.ob-cheatsheet{padding:6px}
}

@media(max-width:600px) and (min-height:451px){[data-camera-stage=compare] .camera-pair canvas{max-height:140px}}

/* Act4 uses short panes for the actual replay demonstration and approved reason questions. */
.lesson-pane:is([data-act4-card],[data-act4-step])>img{width:100%;height:min(32dvh,220px);object-fit:contain}
.lesson-pane:is([data-act4-card],[data-act4-step]) h2{font-size:20px}.act4-demo{width:100%;max-height:240px;background:#000;object-fit:contain}.act4-demo-caption{font-size:16px;line-height:1.4}
[data-act4-question]{display:flex;flex-direction:column;gap:6px;overflow:hidden}[data-act4-question] h2{font-size:18px;margin:0}[data-act4-question] canvas{max-height:150px;min-height:0;object-fit:contain;flex:0 1 auto}[data-act4-question] p{font-size:16px;margin:0;line-height:1.4}.act4-choices{display:grid;gap:6px}.act4-choices button{font-size:16px;min-height:44px}.act4-explanation{display:grid;gap:6px}.act4-reason-note{color:var(--accent)}[data-act4-answered=true]>:is(canvas,.act4-watch,.act4-play){display:none}
[data-act4-demo] button{min-height:44px;font-size:16px}
@media(max-height:450px){
 body:not(.projection):has(.lesson-pane:not([hidden]):is([data-act4-question],[data-act4-demo],[data-act4-card],[data-act4-step])) :is(#title,#lead,#paneSelect){display:none}
 [data-act4-question]:not([data-act4-answered=true]){display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr) auto;gap:4px}
 [data-act4-question] h2{grid-column:1/-1;font-size:16px}[data-act4-question] canvas{grid-column:1;grid-row:2;max-height:100px}
 .act4-watch{grid-column:1;grid-row:3}.act4-choices{grid-column:2;grid-row:2}.act4-play{grid-column:2;grid-row:3}.act4-explanation:empty{display:none}
 [data-act4-answered=true] .act4-explanation{grid-template-columns:1fr auto;gap:4px 12px}[data-act4-answered=true] .act4-explanation>p{grid-column:1}[data-act4-answered=true] .act4-explanation>button{grid-column:2;grid-row:1/4;align-self:center}
 .lesson-pane:is([data-act4-card],[data-act4-step])>img{height:100%;max-height:130px;width:50%;float:left;margin-right:12px}.lesson-pane:is([data-act4-card],[data-act4-step]) h2{font-size:18px}.act4-demo{width:66%;max-height:150px;float:left;margin-right:10px}
}
.projection [data-act4-demo] .act4-demo{max-height:500px}.projection .lesson-pane:is([data-act4-card],[data-act4-step])>img{height:55dvh;max-height:500px}.projection .lesson-pane:is([data-act4-card],[data-act4-step]) h2{font-size:40px}

.act4-reason-note{display:flex;flex-wrap:wrap;gap:0}.act4-reason-note>span{display:inline-block;white-space:nowrap}.projection [data-act4-demo] button{font-size:32px}

/* ACT4_LANDSCAPE_NO_OVERLAP: choices span the full right column; replay stays on the left. */
@media(max-height:450px){
 [data-act4-question]:not([data-act4-answered=true]){grid-template-rows:auto minmax(0,1fr) auto auto}
 [data-act4-question] h2{grid-column:1;grid-row:1}
 .act4-choices{grid-column:2;grid-row:1/5}
 .act4-watch{grid-column:1;grid-row:3}
 .act4-play{grid-column:1;grid-row:4}
}

[data-act4-question] h2>span{display:inline-block;white-space:nowrap}
@media(max-height:450px){[data-act4-question]:not([data-act4-answered=true])>canvas{height:100%;max-height:100px;align-self:center}}

/* r7: actual paused source frames are the touch targets, with labels below. */
.camera-thumbnails button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px;font-size:16px;line-height:1.2;min-height:44px}
.camera-thumbnails canvas{width:100%;height:76px;object-fit:contain;display:block;background:#000}
[data-camera-stage=choose] .camera-content p{font-size:16px}
body:not(.projection) [data-act4-demo] button{font-size:16px!important;min-height:44px}
@media(max-height:450px){.camera-thumbnails canvas{height:50px}.camera-thumbnails button{padding:2px}.camera-thumbnails{gap:3px}}


/* 第六幕停格：四格姓名各佔獨立列，不遮住圖內位置或交火線索。 */
.ob-named-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;width:100%;max-width:640px;margin-inline:auto;text-align:left}
.ob-named-grid .ob-camera{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:4px;background:#07111b}
.ob-named-grid .ob-camera-label{display:grid;align-content:center;min-height:40px;padding:2px 5px;background:#102438;color:#fff}
.ob-named-grid .ob-camera-name{display:block;padding:0;font-size:16px;line-height:1.25;font-weight:700;overflow-wrap:anywhere}
.ob-named-grid .ob-camera-status{display:block;padding:0;font-size:16px;line-height:1.25;color:#fff;overflow-wrap:normal}
.ob-named-grid .ob-camera-crop{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden}
.ob-named-grid [data-ob-quadrant] .ob-camera-crop img{position:absolute;left:0;top:0;width:200%;height:200%;max-width:none;border-radius:0;object-fit:fill;pointer-events:none}
.ob-named-grid [data-ob-quadrant="1"] .ob-camera-crop img,.ob-named-grid [data-ob-quadrant="3"] .ob-camera-crop img{left:-100%}
.ob-named-grid [data-ob-quadrant="2"] .ob-camera-crop img,.ob-named-grid [data-ob-quadrant="3"] .ob-camera-crop img{top:-100%}
.ob-named-grid .is-spectating .ob-camera-crop img{filter:brightness(.35) saturate(.4)}
.question:has(.ob-named-grid) .choices{grid-template-columns:repeat(2,minmax(0,1fr))}
body:not(.projection)[data-scene="6"][data-lite="true"]:has(.ob-named-grid) #lead{display:none}
.still-viewport>.ob-named-grid{max-width:none}

/* 短語各自保留完整字詞，兩段可在逗點後自然換行。 */
.ob-named-grid .ob-camera-status-part{display:inline-block;padding:0;font:inherit;white-space:nowrap}

/* 觸控目標至少 44px：場域第 2 幕「選一段交火回看」下拉等。 */
select{min-height:44px}
/* 投影一屏（10/21）：1366×768 不捲動；只改投影版面，字級維持 32px 以上，手機版不受影響。 */
.projection #main{padding:8px 32px 10px;gap:8px}
.projection #body .lesson-pane{gap:12px;--proj-media:calc(100dvh - 372px)}
.projection #body .map{align-content:center;gap:16px}
.projection #body .map .card{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:12px 20px;gap:16px}
.projection #body .map-symbol{font-size:52px;line-height:1}
.projection #body .cards:has(.step-number) .card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:16px;padding:14px 20px}
.projection #body .cards:has(.step-number) .card>:not(.step-number){grid-column:2;margin:0}
.projection #body .cards:has(.step-number) .card>.step-number{grid-row:1}
.projection #body .cards:has(.step-number) .card>p{grid-column:1/-1;margin:6px 0 0}
.projection #body .w7-evaluation{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:28px;padding:12px 24px}
.projection #body .w7-evaluation>p{order:3;flex-basis:100%;margin:4px 0 0}
.projection #body .w7-evaluation>a{min-height:0;padding:0}
.projection .closing-summary{padding:14px 24px}
.projection .closing-summary ul{gap:6px 44px;margin:8px 0}
.projection .closing-summary :is(h2,p){margin:0}
/* 有影片或圖的分頁：媒體在左、說明與按鈕在右，媒體高度跟著投影高度走，不靠影片載入後才決定。 */
.projection #body .lesson-pane:is(:has(>.video-box),:has(>video.act4-demo),:has(>img)){display:grid;grid-template-columns:auto minmax(0,1fr);grid-auto-rows:min-content;align-content:safe center;column-gap:24px;row-gap:12px}
.projection #body .lesson-pane:is(:has(>.video-box),:has(>video.act4-demo),:has(>img))>*{grid-column:2;margin:0}
.projection #body .lesson-pane>:is(.video-box,video.act4-demo,img){grid-column:1;grid-row:1/span 8;align-self:center;height:var(--proj-media);width:auto;max-width:calc(var(--proj-media) * 16 / 9);aspect-ratio:16/9;max-height:none;float:none;margin:0}
.projection #body .lesson-pane>.video-box canvas{height:100%;width:100%;max-height:none}
@media(max-height:740px){.projection #body .map{gap:10px}.projection #body .map .card{padding:8px 20px}.projection #body .lesson-pane{gap:8px;--proj-media:calc(100dvh - 392px)}}
/* 老師區：只在投影的設定視窗裡，不出現在學生手機 */
.teacher-zone{border-top:1px solid currentColor;margin-top:12px;padding-top:8px;font-size:18px;line-height:1.5}.teacher-zone a,.teacher-zone summary{font-size:18px}.teacher-zone h2{margin:4px 0}.teacher-zone h3{font-size:1em;margin:10px 0 4px}
.teacher-zone a{display:inline-flex;align-items:center;min-height:48px;padding:6px 12px;margin:4px 6px 4px 0;border:1px solid currentColor;border-radius:10px;color:inherit;font-weight:700}
.teacher-screens{display:flex;flex-wrap:wrap}.teacher-sub summary{min-height:48px;display:flex;align-items:center;cursor:pointer;font-weight:700}.teacher-sub ul{margin:4px 0;padding-left:1.2em}
/* 下一幕還不能按時，直接寫還差哪一步 */
#actions .missing{flex-basis:100%;width:100%;margin:0 0 4px;color:var(--accent);font-weight:700}
/* 交火下拉：和上方的頁面選單同樣式，不像停用 */
.feedback select{min-height:48px;font:inherit;color:var(--ink);background:var(--panel);border:2px solid var(--mint);border-radius:8px;padding:6px 10px;margin:6px 8px 6px 0;max-width:100%}
/* 手機橫拿：題目圖放左邊、選項放右邊，選項不跑出畫面 */
@media(orientation:landscape) and (max-height:500px){body:not(.projection)[data-scene="3"] #lead{display:none}body:not(.projection) .question:has(figure){display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);column-gap:12px;align-items:start}body:not(.projection) .question:has(figure)>*{grid-column:2}body:not(.projection) .question:has(figure)>figure{grid-column:1;grid-row:1/span 6}body:not(.projection) .question figure img{height:auto;max-height:45dvh}}
nav#actions:has(.missing){flex-wrap:wrap}nav#actions:has(.missing)>button{flex:1 1 0}
@media(orientation:landscape) and (max-height:500px){body:not(.projection) .question:has(figure)>p.muted{display:none}body:not(.projection) .question:has(figure) .choices{gap:6px;margin:6px 0}body:not(.projection) .question:has(figure) .choices button{min-height:44px;padding:4px 10px}body:not(.projection)[data-scene="3"] #title{font-size:1.2rem;margin:2px 0 4px}}
@media(orientation:landscape) and (max-height:500px){body:not(.projection)[data-scene="3"] #paneSelect{display:none}body:not(.projection)[data-scene="3"] .question:has(figure)>p.muted{display:block;margin:0;font-size:14px}body:not(.projection) .question:has(figure) h3{margin:2px 0 4px}body:not(.projection) .question:has(figure) details summary{min-height:36px}}
@media(orientation:landscape) and (max-height:500px){body:not(.projection) .question:has(figure) .choices{gap:4px;margin:4px 0}body:not(.projection) .question:has(figure) h3{font-size:1rem;line-height:1.35}}
@media(orientation:landscape) and (max-height:500px){body:not(.projection)[data-scene="3"] #title{display:none}}
@media(orientation:landscape) and (max-height:500px){nav#actions:has(.missing){flex-wrap:nowrap}#actions .missing{flex:1.6 1 0;width:auto;margin:0;align-self:center;font-size:15px;line-height:1.3}}
/* 登入自己佔一頁：只有標題、登入表單與「先上課」；課程內容、影片、工具列整個收起，登入後才回來。 */
body[data-gate=login]{display:block}
body[data-gate=login]>:not(#loginPage){display:none!important}
#loginPage{height:100%;overflow:auto;padding:16px;display:flex;flex-direction:column;align-items:center;gap:8px}
#loginPage h1{font-size:1.4em;margin:0;text-align:center}
#loginNote{margin:0;max-width:520px;text-align:center;color:var(--muted)}
#loginSlot{width:100%;max-width:520px}
#loginSlot .class-shell-login{margin:0}#loginSlot .class-shell-login>summary,#loginSlot .term-login h2{display:none}
#loginSlot .term-login input:not([type=checkbox]){background:#fff;color:#172b40}#loginSlot .term-login label{color:#172b40}
#loginBack{width:100%;max-width:520px}
@media(max-height:450px){#loginPage{padding:6px 12px;gap:4px}#loginPage h1{font-size:1.1em}#loginNote{font-size:14px;line-height:1.3}}
/* 投影在筆電上直接操作：不顯示手機配對／手機主控的提示與按鈕（共用外殼程式保留）。 */
.projection #classTools{display:none}
/* 第 2 幕學生端：影片框吃滿這一頁剩下的高度（原本固定最高 220px，大螢幕和平板看起來很小），按鈕排一列留在影片下方。 */
body:not(.projection) .lesson-pane:has(>.video-box){display:grid;grid-template-columns:repeat(3,max-content) minmax(0,1fr);grid-template-rows:minmax(120px,1fr);grid-auto-rows:auto;gap:4px}
body:not(.projection) .lesson-pane>.video-box{grid-column:1/-1;min-height:0;container-type:size;display:flex;align-items:center;justify-content:center}
body:not(.projection) .lesson-pane:has(>.video-box)>:is(p,progress,.media-failed){grid-column:1/-1;margin:0}
body:not(.projection) .lesson-pane>.video-box canvas{width:min(100cqw,calc(100cqh * 16 / 9));height:auto;aspect-ratio:16/9;max-height:none}
@media(max-height:450px){body:not(.projection):has(.lesson-pane:not([hidden])>.video-box) #lead{display:none}body:not(.projection) .lesson-pane:has(>.video-box){grid-template-columns:minmax(0,1fr) minmax(150px,28%);grid-template-rows:repeat(5,auto) minmax(0,1fr)}body:not(.projection) .lesson-pane>.video-box{grid-column:1;grid-row:1/-1}body:not(.projection) .lesson-pane:has(>.video-box)>:not(.video-box){grid-column:2}body:not(.projection) .lesson-pane:has(>.video-box)>p{font-size:14px;line-height:1.3}}
.cam-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}.cam-cards .card{padding:10px}.cam-view{display:block;width:100%;aspect-ratio:16/9;background:#000;border-radius:8px;margin-bottom:6px}.cam-cards h3{margin:4px 0}.cam-cards p{margin:4px 0;font-size:.95rem}
.lesson-intro .intro-link{display:inline-flex;align-items:center;min-height:44px;font-size:1.05rem;font-weight:600}.projection .lesson-intro .intro-link{font-size:1em;min-height:52px}
/* 前導片：入口兩張並排；按播放在講義裡開影片框，16:9 吃滿可用空間，「回講義」固定在上方。 */
.film-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:8px;margin:0 0 6px}
.film-row .lesson-intro{margin:0;display:flex;flex-direction:column;gap:4px}.film-row h3,.film-row p{margin:0}
.lesson-intro .intro-play{min-height:44px;font-size:16px;align-self:start}
.projection .film-row{gap:16px}.projection .film-row .lesson-intro{padding:12px 20px}.projection .film-row .muted{display:none}.projection .lesson-intro .intro-play{font-size:32px;min-height:52px}
#filmDialog{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;padding:6px;border:0;border-radius:0;background:#000;overflow:hidden}
#filmDialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr);gap:6px}
.film-bar{display:flex;align-items:center;gap:8px;min-width:0}.film-bar h2{flex:1;min-width:0;margin:0;font-size:16px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.film-bar button{flex:none;min-width:96px}
.film-stage{min-height:0;container-type:size;display:grid;place-items:center}
.film-stage iframe{width:min(100cqw,calc(100cqh * 16 / 9));height:auto;aspect-ratio:16/9;border:0;display:block;background:#000}
.film-status,.film-offline p{color:var(--ink);font-size:18px;text-align:center;margin:0 0 10px}.film-offline{display:grid;gap:8px;justify-items:center;padding:12px}.film-offline button{min-width:160px}
.projection .film-bar h2{font-size:32px}.projection .film-bar button,.projection .film-offline button{font-size:32px}.projection .film-status,.projection .film-offline p{font-size:40px}
/* 手機橫拿第 1 幕：收起導言與片卡說明，前導片與評量提醒同一屏。 */
@media(orientation:landscape) and (max-height:500px){body:not(.projection)[data-scene="1"] #lead,body:not(.projection) .film-row .muted{display:none}body:not(.projection) .film-row .lesson-intro{padding:6px 10px;gap:2px}body:not(.projection) .lesson-pane>.w7-evaluation{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:16px;padding:6px 12px;margin:0}body:not(.projection) .lesson-pane>.w7-evaluation>p{order:3;flex-basis:100%;margin:0}body:not(.projection) .lesson-pane>.w7-evaluation>a{min-height:44px;display:inline-flex;align-items:center;padding:0}}
/* 工具頁連不上：在工具區中間給一句話與「再試一次」「回講義」，不留白頁或黑頁。 */
.tool-offline{max-width:520px;margin:24px auto;display:grid;gap:10px;text-align:center;font-size:18px}.tool-offline p{margin:0}
/* 「還差」寫明哪一步、哪一頁；可以跳過去時整行就是按鈕。 */
nav#actions>button.missing{flex:1 1 100%;text-align:left;background:transparent;border:2px solid var(--accent);color:var(--accent);font-weight:700;line-height:1.3;min-height:44px}
@media(orientation:landscape) and (max-height:500px){nav#actions>button.missing{flex:1.6 1 0;font-size:15px;padding:4px 8px}}
/* OB 狀態列：一格內上下排，不與按鈕或彼此重疊。 */
.ob-lines{display:grid;gap:2px;min-width:0}.ob-lines>.feedback{margin:0}
/* 投影第 3、6–11 幕：崗位一排＋這一幕的三步大字（有停格放右邊），1366×768、1280×720 一屏放得下。 */
.projection #body .lesson-pane:has(>.screen-task){justify-content:safe center;gap:14px}
.projection #body .map.map-strip{grid-template-columns:repeat(6,minmax(0,1fr));flex:none;gap:10px}
.projection #body .map.map-strip .card{flex-direction:column;justify-content:center;align-items:center;gap:0;padding:6px 4px;text-align:center}
.projection #body .map.map-strip .map-symbol{font-size:32px;line-height:1.1}
.projection #body .map.map-strip strong{font-size:32px;line-height:1.2;white-space:nowrap}
.screen-task{margin:0;display:grid;gap:24px;align-items:center}
.projection #body .screen-task{padding:16px 24px;flex:none}
.screen-task.has-stills{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.projection #body .screen-task h2{color:var(--accent);margin:0 0 8px}
.screen-task ol{margin:0;padding-left:1.4em;display:grid;gap:6px}
.projection #body .screen-task li{font-size:32px;line-height:1.35}
.screen-task-stills{display:grid;gap:8px;min-width:0}.screen-task-stills[data-count="4"]{grid-template-columns:1fr 1fr}
.screen-task-stills img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px}
.map-strip .omitted{color:var(--muted);border-style:dashed;background:transparent}.map-strip .omitted .map-symbol{color:var(--line)}.map-strip .omitted strong{text-decoration:line-through}
/* 投影第 12 幕：兩欄排，1366×768、1280×720 最後一行都看得到。 */
.projection #body .lesson-pane:has(>.closing-summary){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-auto-rows:min-content;align-content:safe center;gap:14px 28px}
.projection #body .lesson-pane:has(>.closing-summary)>:not(.closing-summary){grid-column:1;margin:0}
.projection #body .lesson-pane>.closing-summary{grid-column:2;grid-row:1/span 3;align-self:start}
.projection #body .closing-summary ul{grid-template-columns:1fr;gap:4px;margin:8px 0;padding-left:1.2em}
.projection #body .closing-summary>p{margin-top:8px}
@media(max-height:740px){.projection #body .lesson-pane:has(>.closing-summary){gap:8px 24px}.projection #body .lesson-pane:has(>.closing-summary)>.w7-evaluation{padding:8px 18px}.projection #body .lesson-pane>.closing-summary{padding:10px 20px}.projection #body .closing-summary :is(li,p){line-height:1.3}.projection #body .closing-summary ul{margin:4px 0}.projection #body .lesson-pane:has(>.closing-summary) .closing-note{line-height:1.3}}
/* 手機橫拿（844×390 等）：題目與選項同一屏、不內捲。
   標題與分頁選單併成一列、收起導言；題目在左、選項在右（第 2 幕想一想、第 10 幕 BEEP、第 11 幕理由）。1000×560 這類矮寬螢幕同樣適用。 */
@media(orientation:landscape) and (max-height:600px){
 body:not(.projection) #lead{display:none}
 body:not(.projection) main{grid-template-columns:minmax(0,auto) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;padding:4px 12px;gap:4px 10px}
 body:not(.projection) #title{grid-row:1;grid-column:1;font-size:16px;line-height:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}
 body:not(.projection) #paneSelect{grid-row:1;grid-column:2;min-width:0}
 body:not(.projection) #title:only-child,body:not(.projection) #paneSelect[hidden]~#body{grid-column:1/-1}
 body:not(.projection) #body,body:not(.projection) #notice,body:not(.projection) #actions{grid-column:1/-1}
 body:not(.projection) #body{grid-row:2}body:not(.projection) #notice{grid-row:3}body:not(.projection) #actions{grid-row:4}
 body:not(.projection) .question:not(:has(figure)){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);column-gap:12px;align-items:start;margin:0}
 body:not(.projection) .question:not(:has(figure))>*{grid-column:1;margin:0 0 4px}
 body:not(.projection) .question:not(:has(figure))>.choices{grid-column:2;grid-row:1/span 4;margin:0}
 body:not(.projection) .question .choices button{min-height:44px;padding:4px 10px;line-height:1.3}
 body:not(.projection) .audio-incident{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:12px;align-items:start}
 body:not(.projection) .audio-incident>*{grid-column:2;margin:0}body:not(.projection) .audio-incident{row-gap:3px}
 body:not(.projection) .audio-incident>h2{grid-column:1/-1;line-height:1.2}body:not(.projection) .audio-incident{padding:6px 8px!important}
 body:not(.projection) .audio-incident>.incident-stage{grid-column:1;grid-row:2;max-width:calc((100dvh - 224px) * 16 / 9);width:100%;margin:0}
 body:not(.projection) .audio-incident>.incident-controls{grid-column:2;grid-row:2/span 2;align-self:start}
 body:not(.projection) .audio-incident .incident-controls>.actions{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin:0 0 3px}
 body:not(.projection) .question .feedback:empty,body:not(.projection) .audio-incident>p:empty{display:none}
 body:not(.projection) .audio-incident .choices{margin:0;gap:4px}
 body:not(.projection) .audio-incident .feedback,body:not(.projection) .audio-incident .incident-quote{font-size:14px;line-height:1.35}
 body:not(.projection) .audio-incident>.feedback{grid-column:1;grid-row:3}
 body:not(.projection) .audio-incident:has(>.feedback:not(:empty))>.incident-stage{max-width:calc((100dvh - 214px) * 16 / 9 * .55)}
 body:not(.projection) .lesson-pane>p.muted[data-review-copy]{font-size:14px;margin:0 0 4px}
 body:not(.projection) .reason-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);column-gap:12px;align-items:start;margin:0}
 body:not(.projection) .reason-card>*{grid-column:1;margin:0 0 4px}
 body:not(.projection) .reason-card>.choices{grid-column:2;grid-row:1/span 4;margin:0}
 body:not(.projection) .reason-card .feedback{font-size:14px;line-height:1.35}
}
/* 第 3 幕停格：手機直拿時照寬度放大（最高約三成畫面），不再只有 100px 高。 */
@media(orientation:portrait),(min-height:601px){body:not(.projection) .question figure img{height:auto;max-height:min(30dvh,240px);width:100%;object-fit:contain}}
@media(orientation:landscape) and (min-height:501px) and (max-height:600px){body:not(.projection)[data-scene="3"] .question:has(figure){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px;align-items:start}body:not(.projection)[data-scene="3"] .question:has(figure)>*{grid-column:2}body:not(.projection)[data-scene="3"] .question:has(figure)>figure{grid-column:1;grid-row:1/span 6}body:not(.projection)[data-scene="3"] .question figure img{height:auto;max-height:calc(100dvh - 200px);width:100%;object-fit:contain}}
/* 手機橫拿其他短頁：五台攝影機一排五格、自行檢查與今天的紀錄收緊，不內捲。 */
@media(orientation:landscape) and (max-height:600px){body:not(.projection) .cam-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}body:not(.projection) .cam-cards .card{padding:6px}body:not(.projection) .cam-cards p{font-size:14px;line-height:1.3;margin:0}body:not(.projection) .cam-cards h3{font-size:15px;margin:2px 0}body:not(.projection) #main .lesson-pane>h2{font-size:16px;margin:0 0 2px}body:not(.projection) .lesson-pane>.card:has(>label.check){display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;align-items:center}body:not(.projection) .lesson-pane>.card:has(>label.check)>:not(button){grid-column:1;margin:0}body:not(.projection) .lesson-pane>.card:has(>label.check)>button{grid-column:2;grid-row:1/span 3}body:not(.projection) .lesson-pane label.check{padding:2px 0}body:not(.projection) .lesson-pane>p.muted{font-size:14px;margin:0 0 4px}body:not(.projection)[data-scene="12"] .lesson-pane>ul{columns:2;column-gap:20px;margin:0 0 4px}}
@media(max-width:600px){body:not(.projection) .cam-cards .card{padding:6px}body:not(.projection) .cam-cards p{margin:2px 0;line-height:1.35}}
/* 第 2 幕「五台攝影機」：上方播放列；五格依可用高度一次放得下（寬螢幕與橫拿一排五格），手機直拿兩欄可捲。 */
.cam-controls{display:flex;gap:6px;margin:0 0 6px}.cam-controls button{flex:1;min-height:44px}
.lesson-pane:has(>.cam-controls){display:flex;flex-direction:column}
.lesson-pane>.cam-cards{flex:1;min-height:0;align-content:start}
@media(min-width:701px){body:not(.projection) .cam-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}body:not(.projection) .cam-cards .card{padding:6px}body:not(.projection) .cam-cards h3{font-size:15px;margin:2px 0}body:not(.projection) .cam-cards p{font-size:14px;line-height:1.3;margin:0}}
@media(orientation:landscape) and (max-height:600px){.cam-controls{margin:0 0 4px}}
/* 夠高的寬畫面（如 1366×768）：三加二排；較矮的 1000×560、844×390 一排五格，畫面高度依這一頁的可用高度算，五格一次看完。 */
body:not(.projection) .lesson-pane:has(>.cam-controls){container-type:size}
@container (min-width:700px) and (min-height:440px){body:not(.projection) .cam-cards{grid-template-columns:repeat(3,minmax(0,1fr))}body:not(.projection) .cam-cards .cam-view{width:auto;max-width:100%;height:calc((100cqh - 216px) / 2);margin-inline:auto}}
@media(orientation:landscape) and (max-height:500px){body:not(.projection) .cam-cards p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}}
/* 筆電與大螢幕：題目圖放左邊、題目與選項放右邊，圖依這一頁的可用高度放大，不再縮成一小格。 */
@media(min-width:700px) and (min-height:501px){body:not(.projection) .question:has(figure){display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);column-gap:18px;align-items:start}body:not(.projection) .question:has(figure)>*{grid-column:2}body:not(.projection) .question:has(figure)>figure{grid-column:1;grid-row:1/span 8;margin:0}body:not(.projection) .question:has(figure)>figure img{width:100%;height:auto;max-height:calc(100dvh - 250px);object-fit:contain}}
/* 「這週沒上到？看重點」：依內容高度的置中小框，不再撐滿整個畫面；點標題或框外收起。 */
.question details[open]>summary{font-weight:700;color:var(--accent)}
/* 筆電與大螢幕：第 4 幕 REPLAY 示範影片依可用高度放大，不再固定 240px 高、下面空一大塊。 */
@media(min-width:700px) and (min-height:501px){body:not(.projection) [data-act4-demo] .act4-demo{width:100%;height:max(200px,calc(100dvh - 405px));max-height:none;float:none;margin:0}}
/* 筆電與大螢幕一次放大偏小的畫面：第 4 幕理由卡圖與三題畫面、第 6 幕 OB 主畫面與四格、第 10 幕不當用語畫面，依可用高度放大並置中。 */
@media(min-width:700px) and (min-height:501px){
body:not(.projection) .lesson-pane[data-act4-card]>img{display:block;width:auto;max-width:100%;height:max(220px,calc(100dvh - 330px));max-height:none;margin:0 auto;object-fit:contain}
body:not(.projection) [data-act4-question] canvas{width:auto;max-width:100%;height:max(150px,calc(100dvh - 520px));max-height:none;margin:0 auto;flex:0 0 auto}
body:not(.projection) .audio-incident .incident-stage{max-width:calc(max(135px,calc(100dvh - 640px)) * 16 / 9);width:100%;margin:4px auto}body:not(.projection) .incident-stage canvas{display:block;width:100%;height:auto;aspect-ratio:16/9}
}
/* 第 5 幕「選鏡頭」：看切點的畫面、四路小畫面、兩畫面對照，依可用高度放大（筆電與大螢幕），手機直拿的四路小畫面維持 16:9 不被壓扁。 */
@media(min-width:700px) and (min-height:501px){
body:not(.projection) .camera-content>canvas{width:auto;max-width:100%;height:max(150px,calc(100dvh - 420px));max-height:none;margin:0 auto}
body:not(.projection) .camera-thumbnails canvas{width:auto;max-width:100%;height:max(76px,calc((100dvh - 470px) / 2));max-height:none;margin:0 auto;display:block}
body:not(.projection) .camera-pair canvas{width:auto;max-width:100%;height:max(150px,calc(100dvh - 520px));max-height:none;margin:0 auto;display:block}
}
@media(max-width:600px){body:not(.projection) .camera-thumbnails canvas{width:100%;height:auto;max-height:none;aspect-ratio:16/9}}
/* 第 6 幕 OB 跟隨（筆電與大螢幕）：主畫面放左、四路 2×2 放右，每格 16:9 依寬度放大，看得清楚選手畫面。 */
@media(min-width:900px) and (min-height:501px){
body:not(.projection) .ob-control{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);align-items:start;column-gap:14px}
body:not(.projection) .ob-control>h2{grid-column:1/-1;grid-row:1}
body:not(.projection) .ob-control>.ob-lines{grid-column:1/-1;grid-row:2}
body:not(.projection) .ob-control>canvas{grid-column:1;grid-row:3;width:100%;height:auto;aspect-ratio:16/9;max-height:calc(100dvh - 330px);max-width:100%;object-fit:contain;margin:0}
body:not(.projection) .ob-control>.ob-thumbs{grid-column:2;grid-row:3;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;align-content:start}
body:not(.projection) .ob-control .ob-thumbs canvas{width:100%;height:auto;aspect-ratio:16/9;max-height:none;object-fit:contain}
body:not(.projection) .ob-control>.actions{grid-column:1/-1;grid-row:4}
}
@media(max-width:600px){body:not(.projection) .ob-control .ob-thumbs canvas{height:auto;max-height:none;aspect-ratio:16/9;width:100%}}
