:root{font-size:16px;color:#172e39;background:#f4f2eb;font-family:system-ui,"Noto Sans TC","Microsoft JhengHei",sans-serif;line-height:1.65;--accent:#165753;--paper:#fffefa;--muted:#495e63;--line:#bdc9c7}
*{box-sizing:border-box}body{margin:0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}input,textarea{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}button,input,textarea,select{font:inherit}button,select,input{min-height:46px}button{border:1px solid var(--line);border-radius:10px;padding:.6rem .85rem;background:var(--paper);color:#172e39;cursor:pointer;touch-action:manipulation;white-space:normal}button:hover{background:#e7eeeb}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #946000;outline-offset:3px}button:disabled{opacity:.65;cursor:default}input,textarea,select{display:block;width:100%;min-width:0;border:1px solid #748984;border-radius:9px;background:#fff;color:#172e39;padding:.65rem}textarea{min-height:100px;resize:vertical;line-height:1.65}label{display:block;font-weight:650;margin:.8rem 0 .35rem}p{margin:.55rem 0}h1,h2,h3{line-height:1.35;overflow-wrap:anywhere}h1{font-size:1.9rem;letter-spacing:-.035em;margin:.5rem 0 .75rem}h2{font-size:1.25rem;margin:.45rem 0 .8rem}h3{font-size:1.08rem;margin:.4rem 0}a{color:#165753}small,.note{font-size:1rem;color:var(--muted)}#app{max-width:1060px;padding:1.3rem 1.2rem 2rem;margin:auto}.topline{display:flex;align-items:center;justify-content:space-between;gap:.7rem;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:.9rem}.eyebrow{font-size:1rem;color:var(--accent);font-weight:750}.tools{display:flex;gap:.4rem;flex-wrap:wrap}.tools button{padding:.35rem .6rem}header{margin:1.4rem 0}.progress{display:flex;gap:5px;margin:1rem 0}.progress span{height:5px;background:#c5cfca;flex:1;border-radius:3px}.progress span.current{background:#165753}.lead{font-size:1.12rem;max-width:48rem}.badge{display:inline-block;background:#e1ece5;color:#174d42;border-radius:5px;padding:.15rem .5rem}.panel,.chat,.card{padding:1.15rem;background:var(--paper);border:1px solid var(--line);border-radius:14px;margin:1rem 0;min-width:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:.8rem}.grid .panel{margin:0}.choice{display:block;text-align:left;width:100%;margin:.6rem 0}.choice[aria-pressed=true],.toggle[aria-pressed=true]{border:2px solid var(--accent);background:#e2efe8;color:#123f38}.inline{display:flex;gap:.55rem;flex-wrap:wrap;align-items:center}.inline>*{min-width:0}.chatline{border-left:3px solid #8da89e;padding:.5rem .75rem;margin:.8rem 0;overflow-wrap:anywhere}.chatline.student{border-color:#946000;background:#fcf4e1}.speaker{font-weight:750;font-size:1rem;color:#315454}.feedback{padding:.9rem;background:#e8f0e9;border:1px solid #99ada2;border-radius:10px;margin:.8rem 0;overflow-wrap:anywhere}.hint{padding:1rem;background:#fff5db;border-left:4px solid #946000;margin:.8rem 0}.privacy{display:block;color:var(--muted);font-size:1rem;margin:.35rem 0 1rem}.primary{background:var(--accent);color:white;border:2px solid var(--accent);font-weight:750;min-width:160px}.primary:hover{background:#123f3c}.actions{display:flex;flex-wrap:wrap;gap:.65rem;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:1rem;margin-top:1.5rem}.actions .primary{margin-left:auto}.helpbar{margin-top:1rem}summary{cursor:pointer;padding:.65rem 0;min-height:44px}details{margin:.6rem 0}details details{border-left:2px solid var(--line);padding-left:.75rem}.heat{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:.9rem 0}.heat span{text-align:center;padding:.4rem .15rem;border:1px solid var(--line);border-radius:7px;font-size:1rem}.heat span.active{background:#174d42;color:#fff}.checkrow{display:flex;align-items:center;gap:.7rem;padding:.4rem 0;font-weight:400}.checkrow input{width:22px;min-height:44px;flex:0 0 22px;margin:0}.placeholder{background:repeating-linear-gradient(135deg,#e5ebe5,#e5ebe5 10px,#edf1e9 10px,#edf1e9 20px);padding:1rem;border-radius:10px;border:1px dashed #657e74}.placeholder p{background:#f8faf5;padding:.35rem}.counter{font-weight:750;color:#165753}.projection{max-width:1160px!important;font-size:1.25rem}.projection h1{font-size:2.6rem}.projection .panel{padding:1.5rem}.projection .progress{margin-bottom:1.5rem}.projection .lead{font-size:1.4rem}video{width:100%;max-height:330px;background:#172e39}.notice:empty{display:none}.notice{padding:.8rem;background:#fff5db;border-radius:9px;margin:.7rem 0}.steps{display:flex;gap:.5rem;flex-wrap:wrap}.hostframe{width:100%;height:65vh;border:1px solid var(--line);border-radius:12px}.deleted{opacity:.6}ol,ul{padding-left:1.5rem}.wraptext{overflow-wrap:anywhere}#scene{max-width:100%}.footer-note{margin-top:1rem}#scene-title:focus{outline:none}[hidden]{display:none!important}.compact .choice{display:flex;align-items:center;justify-content:center;gap:.4rem;font-weight:700;border:2px solid var(--accent);color:var(--accent);text-align:center}.compact .choice[aria-pressed=true]{background:var(--accent);color:#fff}.compact .compact-wave{max-height:calc(100dvh - 190px);overflow:auto;margin:0;padding:.4rem .8rem}.compact .compact-wave .chatline{margin:.35rem 0;padding:.2rem .6rem}.compact-origin{padding:.45rem .7rem;border-left:3px solid #8da89e;background:#f1f5f2;font-weight:650;margin:.3rem 0 .7rem;overflow-wrap:anywhere}
@media(max-width:480px){#app{padding:1rem .85rem 1.5rem}h1{font-size:1.65rem}.panel,.chat,.card{padding:.85rem}.heat{grid-template-columns:repeat(3,minmax(0,1fr))}.actions{align-items:stretch}.actions .primary{flex:1}.topline{align-items:flex-start}.tools{gap:.3rem}.projection h1{font-size:1.9rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.projection{font-size:1.05rem}.projection header{margin:.7rem 0}.projection h1{font-size:2.2rem;margin:.2rem 0}.projection .lead{font-size:1.1rem;margin:.3rem 0}.projection .progress{margin:.5rem 0}.projection label[for=scene]{display:none}.projection #scene{margin:.5rem 0}.projection .panel{padding:.8rem 1rem;margin:.5rem 0}.projection .panel h2{font-size:1.15rem;margin:.2rem 0 .4rem}.projection .grid{gap:.7rem}.projection .grid .panel{margin:.3rem 0}.projection .placeholder{padding:.4rem}.projection .placeholder p{margin:0}.projection .helpbar{margin-top:.5rem}.projection .actions{padding-top:.6rem;margin-top:.6rem}.projection .chatline{margin:.4rem 0;padding:.3rem .7rem}
#app.projection{padding-top:.8rem;padding-bottom:.8rem}
@media(min-width:1000px){.projection .chatline{display:grid;grid-template-columns:180px 1fr;gap:.8rem;align-items:start}}
#app.lesson{height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding-bottom:env(safe-area-inset-bottom,.4rem)}
.lesson-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:1rem;padding-right:.2rem}
.lesson .actions{position:sticky;bottom:0;z-index:3;flex:none;background:#f4f2eb;margin:.4rem 0 0;padding:.5rem 0;min-height:64px}
.lesson .lesson-scroll textarea,.lesson .lesson-scroll input{scroll-margin-block:1rem}
.guide-image{display:block;width:100%;height:auto;border-radius:9px}
.projection-example{margin:.75rem 0}
.projection-example img{display:block;width:100%;height:auto;max-height:65vh;object-fit:contain}
.projection-fallback{display:flex;align-items:center;justify-content:center;min-height:30vh;margin:0;padding:24px;border:2px dashed #8aa;border-radius:12px;text-align:center}
.projection-example figcaption{font-size:1rem;color:var(--muted)}
#spotlight{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.sim-clip{border:1px solid #718d8d;border-radius:10px;overflow:hidden;background:#132e39;color:#fff}
.sim-top{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.4rem;padding:.5rem .7rem;background:#203f48;font-size:1rem}
.sim-top span{color:#e4efdb}.sim-frame{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);min-height:310px}
.sim-game{position:relative;min-width:0;min-height:310px;overflow:hidden}.sim-game canvas{display:block;width:100%;height:100%;position:absolute;inset:0}
.sim-caption{position:absolute;bottom:0;left:0;right:0;padding:.65rem;background:#102630f2;font-size:1rem;line-height:1.6;overflow-wrap:anywhere}
.sim-caption strong{display:block;color:#fae39e}.sim-caption strong:empty{display:none}.sim-caption span{color:#fff}
.sim-chat{display:flex;flex-direction:column;min-width:0;height:310px;background:#f0f3e9;color:#172e39;border-left:1px solid #738a81}
.sim-chat h3{margin:0;padding:.4rem .5rem;background:#dce7de;font-size:1rem}.sim-chat [data-messages]{flex:1;min-height:0;overflow-y:auto;padding:.4rem}
.sim-message{font-size:1rem;margin:.4rem 0;padding:.4rem 0;border-bottom:1px solid #b7c8bd;overflow-wrap:anywhere}.sim-message strong{display:block;font-size:1rem;color:#165753}
.sim-controls{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.6rem;background:#f7f7ef;color:#172e39}.sim-controls label{flex:1 1 130px;margin:0;font-size:1rem}.sim-controls input{min-height:44px;padding:0;accent-color:#165753}
.projection .sim-frame,.projection .sim-game{min-height:270px}.projection .sim-chat{height:270px}
.sim-game{display:flex;flex-direction:column;padding-top:150px}
.sim-caption{position:relative;bottom:auto;margin-top:auto}
.sim-chat{height:310px}.sim-chat [data-messages]{height:0}
.projection .sim-game{padding-top:120px}.projection .sim-chat{height:270px}
.lesson .term-login p,.lesson .term-login label{font-size:1rem}
.lesson .term-login input:not([type=checkbox]){min-height:44px}
.lesson .term-login{max-width:none}
.lesson .term-login button{min-height:44px}
.speech-tools{margin:.3rem 0 1rem;min-width:0}.speech-disclosure{font-size:1rem;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}.speech-review{margin:.75rem 0;padding:.8rem;border:1px solid var(--line);border-radius:10px;background:#f8faf5;min-width:0}.speech-review textarea{width:100%;box-sizing:border-box}.speech-actions{display:flex;flex-wrap:wrap;gap:.5rem}.speech-actions button{min-height:44px;max-width:100%;white-space:normal}.speech-transcript{overflow-wrap:anywhere}.chatline[data-new-feedback]{scroll-margin-block:1rem}

/* 手機每次處理一項完整任務；原文與資料不靠裁切或縮放藏到畫面外。 */
#app.lesson.compact{max-width:none;margin:0;padding:6px 8px;gap:6px;line-height:1.3}
.compact .lesson-scroll{display:flex;flex-direction:column;gap:6px;overflow:visible;padding:0;scroll-padding:0}
.compact .compact-heading{display:grid;grid-template-columns:64px minmax(0,1fr) 56px;align-items:center;gap:6px;min-height:44px;flex:none}
.compact .compact-heading h1{font-size:16px;line-height:20px;margin:0;letter-spacing:0}
.compact .compact-mode{display:block;font-size:16px;line-height:20px;color:#165753;font-weight:400}
/* 「練習模式／互動練習」只是小標記，字小一級、淡色，不搶標題。 */
.compact .compact-mode #mode{font-size:13px;color:var(--muted)}
#app.lesson header #mode.badge{font-size:13px;padding:0 .4rem;background:none;color:var(--muted);border:1px solid var(--line)}
.compact button,.compact select,.compact input:not([type=checkbox]){min-height:44px;padding:5px 7px;line-height:1.3}
.compact .compact-main{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:8px;flex:1;min-height:0;min-width:0}
.compact .compact-context,.compact .compact-work{min-width:0}
.compact h2{font-size:18px;line-height:1.3;margin:0 0 6px}
.compact p{margin:4px 0;line-height:1.3;overflow-wrap:anywhere}
.compact label{margin:0 0 3px;line-height:1.3}
.compact textarea{min-height:80px;height:80px;max-height:80px;resize:none;padding:6px;line-height:1.3}
.compact .speech-tools{margin:4px 0}
.compact .speech-disclosure{font-size:16px;line-height:1.3;margin:6px 0 0}
.compact .compact-field-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:4px}
.compact .checkrow{min-height:44px;margin:0;padding:0;gap:6px}
.compact .checkrow input{min-height:44px}
.compact input[type=checkbox]{min-height:20px;height:20px}
.compact .compact-fields{display:grid;gap:8px}
.compact .compact-options{display:grid;gap:5px}
.compact .compact-options button{text-align:left}
.comparison-options{display:grid;gap:8px}
.comparison-options button{text-align:left}
.comparison-options button[aria-pressed=true]{background:#e2efe8;border:2px solid #165753}
.comparison-feedback{padding:.6rem;margin:.5rem 0}
.comparison-feedback p{margin:.35rem 0}
.comparison-step-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.comparison-step-options button[aria-pressed=true]{background:#e2efe8;border:2px solid #165753}
.lesson:not(.compact) .comparison-options:has(button:disabled){grid-template-columns:repeat(2,minmax(0,1fr))}
.compact .heat{grid-template-columns:repeat(5,minmax(0,1fr));margin:4px 0 8px}
.compact .heat span{padding:4px 1px;white-space:nowrap}
.compact .tag-results{margin:4px 0;padding-left:1.3em}
.compact .compact-guide{display:block;width:100%;height:auto;max-height:280px;object-fit:contain}
.compact button[aria-pressed=true]{background:#e2efe8;border:2px solid #165753}
.compact .chat{margin:0;padding:0;border:0;background:transparent}
.compact .chatline{margin:0;padding:6px;border-left:3px solid #165753}
.compact .actions.compact-nav{position:static;display:flex;flex-wrap:nowrap;align-items:center;justify-content:start;gap:4px;padding:0;margin:0;border-top:1px solid var(--line);min-height:49px;flex:none}
.compact-nav .primary{min-width:0;flex:1;margin-left:0!important}
.compact-count{font-size:16px;flex:none;min-width:42px;text-align:center}
.compact-wide>.compact-context{display:none}
.compact .compact-save:empty{display:none}
.compact .compact-save{display:inline-block;width:max-content;max-width:100%;font-size:16px;line-height:1.3}
.compact .term-login{padding:8px;border-radius:10px;line-height:1.3}
.compact .term-login h2{display:none}
.compact .term-login p{font-size:16px;line-height:1.3;margin:4px 0}
.compact .term-login form{gap:5px}
.compact .term-login label{font-size:16px;line-height:1.3;gap:2px}
.compact .term-login input:not([type=checkbox]){font-size:16px;height:44px;min-height:44px}
.compact .term-login button{font-size:16px;min-height:44px;padding:5px}
.compact .term-login .term-login-setup{min-height:44px}
.compact .term-login-status{min-height:21px}
.compact .sim-top{padding:3px 5px;font-size:16px;line-height:1.2}
.compact .sim-top strong{display:none}
.compact .sim-frame,.compact .sim-game{min-height:175px}
.compact .sim-game{padding-top:65px}
.compact .sim-chat{height:175px}
.compact .sim-chat h3{font-size:16px;padding:2px 4px}
.compact .sim-message{font-size:16px;margin:2px 0;padding:2px 0}
.compact .sim-message strong{font-size:16px}
.compact .sim-caption{font-size:16px;line-height:1.3;padding:4px}
.compact .sim-controls{gap:4px;padding:4px}
.compact .sim-controls label{display:flex;align-items:center;gap:4px;flex-basis:100%;font-size:16px}
.compact .sim-controls input{flex:1;width:0;min-width:0;height:44px;min-height:44px;padding:0}
.compact .compact-observe{grid-template-columns:1fr 1fr;margin-top:4px}
.compact .speech-review{position:fixed;z-index:10;inset:56px 8px 61px;margin:0;padding:8px;background:#fffefa;border:2px solid #165753;display:flex;flex-direction:column;gap:6px}
.compact .speech-review label{margin:0}
.compact .speech-review textarea{min-height:70px;height:auto;flex:1;max-height:none}
.compact .speech-review .privacy{font-size:16px;line-height:1.3;margin:0}
.compact .speech-review .speech-transcript:empty{display:none}
.compact .speech-review .speech-transcript{display:none}
.compact .speech-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.compact .speech-actions button{min-height:44px}
.compact-speech .compact-context,.compact-speech .compact-work>label,.compact-speech .compact-work>textarea,.compact-speech .compact-field-actions{visibility:hidden}
.compact-speech .speech-review{visibility:visible}
.compact-speech .speech-tools>[data-speech-action=start]{visibility:hidden}
@media(max-height:480px){
  .compact .compact-main{grid-template-columns:minmax(0,42fr) minmax(0,58fr);gap:12px}
  .compact .compact-work:has(>textarea){display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-content:start}
  .compact .compact-work:has(>textarea)>:is(label,textarea,p){grid-column:1/-1}
  .compact .compact-work:has(>textarea)>.compact-field-actions{grid-column:2;grid-row:3;align-self:start}
  .compact .compact-main:has(>.compact-work:empty)>.compact-context{grid-column:1/-1}
  .compact .compact-wide{grid-template-columns:1fr}
  .compact .compact-guide{max-height:180px}
  .compact textarea{min-height:56px;height:56px;max-height:56px}
  .compact .compact-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
  .compact .compact-options{grid-template-columns:repeat(3,minmax(0,1fr))}
  .compact .comparison-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .compact .compact-observe{grid-template-columns:1fr 1fr}
  .compact .term-login form{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px}
  .compact .term-login .term-login-intro{display:block}
  .compact .term-login .term-login-setup{grid-column:1;grid-row:2}
  .compact .term-login .term-login-actions{grid-column:2/4;grid-row:2}
  .compact .term-login .term-login-status{font-size:16px;line-height:1.3}
  .compact .sim-frame,.compact .sim-game{min-height:78px}
  .compact .sim-game{padding-top:16px}
  .compact .sim-chat{height:78px}
  .compact .sim-chat h3{display:none}
  .compact .sim-controls{flex-wrap:nowrap}
  .compact .sim-controls label{flex:1;min-width:90px}
  .compact .speech-review{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto minmax(44px,1fr) 44px;gap:4px}
  .compact .speech-review>[role=status]{grid-column:1;grid-row:1;margin:0}
  .compact .speech-review>label{grid-column:1;grid-row:2}
  .compact .speech-review>.speech-transcript{display:none}
  .compact .speech-review>textarea{grid-column:1/-1;grid-row:3;min-height:44px}
  .compact .speech-review>.privacy{grid-column:2;grid-row:1/3}
  .compact .speech-actions{grid-column:1/-1;grid-row:4;grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(min-width:901px) and (min-height:481px){
  .compact .compact-main{grid-template-columns:minmax(0,42fr) minmax(0,58fr);gap:24px;max-width:1200px;width:100%;align-self:center}
  .compact .compact-main:has(>.compact-work:empty)>.compact-context{grid-column:1/-1}
  .compact .compact-wide{grid-template-columns:1fr}
  .compact .compact-heading,.compact .compact-nav{max-width:1200px;width:100%;align-self:center}
  .compact .compact-main{align-content:center}
  .compact .compact-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
  .compact textarea{min-height:100px;height:100px;max-height:100px}
  .compact .compact-guide{max-height:420px}
  .compact .sim-frame,.compact .sim-game{min-height:300px}
  .compact .sim-chat{height:300px}
  .compact .speech-review{width:min(1100px,calc(100% - 16px));left:50%;right:auto;transform:translateX(-50%)}
}

/* 10/22 UX 修正：標註結果、送出提示、保存確認等學生端樣式（放在投影大螢幕區塊之前）。 */
.tag-status{font-weight:700;padding:4px 8px;border-radius:8px;margin:6px 0}.tag-status.ok{background:#e2efe8;color:#123f38}.tag-status.fix{background:#fff5db;color:#6b4500}
.send-hint{font-weight:700;color:#123f38;background:#e2efe8;border-radius:8px;padding:4px 8px;margin:6px 0}.send-hint[data-kind=none]{font-weight:400;color:var(--muted);background:transparent;padding:0}
.compact .compact-field-actions .send-hint{flex-basis:100%;margin:0}
.feedback-pattern{background:#eef4ec;border-left:3px solid #165753;border-radius:4px;padding:4px 8px;margin:4px 0 6px}
.compact [data-step^="feedback-"] .compact-copy{font-weight:700}
/* 講義內全螢幕疊層：前導片、開麥彩排、版主值班不離開講義。 */
dialog.w7-overlay{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;display:flex;flex-direction:column;background:#f4f2eb;color:#172e39}
dialog.w7-overlay::backdrop{background:#0b1a1fcc}
.w7-overlay-header{display:flex;align-items:center;gap:10px;flex:none;padding:6px 10px;border-bottom:1px solid #bdc9c7;background:#fffefa}
.w7-overlay-header h2{margin:0;font-size:18px;line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.w7-overlay-close{flex:none;min-height:44px;padding:4px 14px;border:2px solid #165753;border-radius:10px;background:#fff;color:#165753;font:inherit;font-weight:750;cursor:pointer}
.w7-overlay-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.w7-overlay-body iframe{display:block;width:100%;height:100%;border:0;background:#fff}
dialog.w7-overlay[data-kind=video] .w7-overlay-body{background:#000}
dialog.w7-overlay[data-kind=video] .w7-overlay-body iframe{background:#000;height:auto;max-height:100%;aspect-ratio:16/9}
.w7-overlay-offline{margin:16px;padding:16px 20px;border-radius:10px;background:#fff5db;color:#6b4500;font-size:20px;font-weight:700;text-align:center}
.w7-offline-note{display:inline-block;margin:4px 0 0 8px;padding:2px 8px;border-radius:6px;background:#fff5db;color:#6b4500;font-weight:700}
/* 投影第 2 幕：鍵盤操作提示，放在導言同一行右側，不多占一行。 */
#app.projection .lead:has(>.clip-keys){position:relative}
#app.projection .clip-keys{position:absolute;right:0;bottom:2px;font-size:20px;line-height:1.4;padding:2px 10px;border-radius:8px;background:#e2efe8;color:#123f38;font-weight:700;white-space:nowrap}
#app.projection .clip-keys.armed{background:#fff5db;color:#6b4500}
/* 分步版每張卡在可用高度內上下置中：內容少時不再留下半頁空白；內容多時自動邊距歸零、從頂端排，不會往上蓋住標題。 */
.compact .compact-main{flex:0 0 auto;margin-block:auto}
/* 直拿手機（寬 600px 以下）一律靠上：短卡置中會在標題下留一大片空白，看起來像沒載入。 */
@media(max-width:600px){.compact .compact-main{margin-block:0 auto}}
/* 分步版前導片：播放連結做成外框大按鈕（底部綠色主鈕之外的第二動作）。 */
#app.compact .lesson-intro a{display:flex;align-items:center;justify-content:center;min-height:52px;padding:.5rem .8rem;border:2px solid #165753;border-radius:10px;background:#fff;color:#165753;font-weight:750;text-decoration:none}
/* 直拿手機：字與按鈕放大一級，示意圖用滿寬度。 */
@media(max-width:600px) and (min-height:640px){
  .compact h2{font-size:20px}
  .compact .compact-copy{font-size:18px;line-height:1.5}
  .compact .compact-options button,.compact .choice{min-height:52px}
  .compact .compact-guide{max-height:none}
  .compact .compact-wave{max-height:none;overflow:visible}
}
/* 手機橫放：常見問題、一波留言、漏網清單、平台步驟改成標題在上、內容橫向兩欄，不在卡內捲動。 */
@media(max-height:480px){
  .compact :is([data-step=faq],[data-step=wave],[data-step=passed],[data-step^=guide-]){grid-template-columns:minmax(0,1fr);gap:4px}
  .compact :is([data-step=faq],[data-step=wave],[data-step=passed],[data-step^=guide-])>.compact-context{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
  .compact :is([data-step=faq],[data-step=wave],[data-step=passed],[data-step^=guide-])>.compact-context h2{margin:0}
  .compact [data-step=faq]>.compact-work{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;align-content:start}
  .compact [data-step=faq] summary{padding:.4rem 0}
  .compact [data-step=faq] details p{margin:0 0 4px}
  .compact :is([data-step=wave],[data-step=passed]) .compact-wave{max-height:none;overflow:visible;columns:2;column-gap:16px;padding:0}
  .compact :is([data-step=wave],[data-step=passed]) .compact-wave .chatline{break-inside:avoid;margin:0 0 4px;padding:2px 8px}
  .compact [data-step^=guide-]>.compact-work{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
  .compact [data-step^=guide-] .compact-guide{max-height:230px}
  .compact [data-step^=guide-] ol{margin:0;padding-left:1.3em}
}
/* 較矮的桌機／平板橫放（例如 1000×530）：模擬片縮矮，整張卡放得下。 */
@media(min-width:901px) and (min-height:481px) and (max-height:700px){
  .compact .sim-frame,.compact .sim-game{min-height:190px}
  .compact .sim-chat{height:190px}
  .compact .sim-game{padding-top:40px}
  .compact .compact-wave{max-height:none;overflow:visible;columns:2;column-gap:16px}
  .compact .compact-wave .chatline{break-inside:avoid}
}
.wave-results{margin:4px 0;padding-left:1.2em}.wave-results li{margin:2px 0;color:var(--muted)}.wave-results li.done{color:#123f38;font-weight:700}
.extra-levels button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left}.extra-levels button small{font-size:14px;font-weight:400;color:var(--muted)}
.extra-optional{font-size:16px;margin:10px 0 4px}.extra-links{display:grid;gap:6px}
@media(max-height:480px){.extra-links{grid-template-columns:1fr 1fr}.extra-levels button small{display:none}}
/* 老師停頓提示（只在主持頁第 5、6 幕；投影與學生講義都不顯示）。 */
.teacher-pause{margin:6px 0;padding:6px 12px;border-radius:10px;background:#fff5db;color:#6b4500;font-weight:700}
.host-timing{font-weight:700;color:#165753}
/* 第 7 幕主播失言片段：小檔 640×360，手機寬度用滿。 */
.incident video{display:block;width:100%;max-width:640px;aspect-ratio:16/9;background:#000;border-radius:8px}
.incident-quote{font-weight:700;color:#6b4500;background:#fff5db;border-radius:8px;padding:4px 8px;margin:6px 0}
.incident-controls{display:flex;gap:6px}.incident-controls button{flex:1;min-height:44px}
.incident-offline{margin:6px 0;padding:12px;border-radius:8px;background:#fff5db;color:#6b4500;font-weight:700;text-align:center}
.incident-risks{display:grid;grid-template-columns:1fr 1fr;gap:5px}.incident-risks button{text-align:left}
.incident-steps{margin:4px 0;padding-left:1.3em}
@media(max-height:480px){.compact [data-step=incident-clip] .incident video{max-height:186px;width:auto;margin:0 auto}.compact .incident-risks{grid-template-columns:repeat(3,minmax(0,1fr))}}
#app.projection .projection-incident{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;min-height:0}
#app.projection .projection-incident>.panel{margin:0;padding:16px 24px;display:flex;flex-direction:column;gap:8px;min-height:0}
#app.projection .projection-incident video{max-height:38vh;width:auto;max-width:100%}
#app.projection .projection-incident .incident-question{font-weight:700;margin:0}
/* 1366×768 投影第 7 幕：影片縮一點，下方提問不被切掉。 */
@media(max-height:800px){#app.projection .projection-incident video{max-height:calc(100vh - 540px)}}
/* 全班點選（本機卡；B6 元件可用時換成共用元件）與暖身題。 */
.w7-poll-prompt{font-weight:700;margin:4px 0 6px}
.w7-poll-options{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important}
.w7-poll-status{color:var(--muted);margin:6px 0 0}
.warmup-options button.warm-answer{border:2px solid #2d7a50;background:#d9f0e0;color:#0f4a2e;opacity:1}
.warmup-options button:disabled{opacity:.75}
.warmup-feedback{margin:6px 0;padding:6px 10px;border-radius:8px}.warmup-feedback.ok{background:#d9f0e0;color:#0f4a2e}.warmup-feedback.fix{background:#fff5db;color:#6b4500}
.w8-lead{font-weight:700}
/* 期中教學評量連結做成按鈕大小（至少 48px 高），手機好點。 */
a.evaluation-link{display:flex;align-items:center;justify-content:center;min-height:48px;padding:8px 14px;border:2px solid #165753;border-radius:10px;background:#fff;color:#165753;font-weight:750;text-decoration:none;text-align:center;line-height:1.3}
a.evaluation-link:hover{background:#e7eeeb}
/* 投影「看全班點選」疊層：字大、選項大。 */
dialog.w7-poll-screen{background:#18181b;color:#f4f4f5}
dialog.w7-poll-screen .w7-overlay-header{background:#27272a;border-color:#3f3f46}
dialog.w7-poll-screen .w7-overlay-header h2{color:#f4f4f5;font-size:28px}
.w7-poll-body{flex:1;min-height:0;overflow:auto;padding:16px 32px;display:grid;gap:16px;align-content:start}
.w7-poll-body h3{font-size:clamp(24px,3vw,40px);margin:0 0 12px}
.w7-poll-labels{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.w7-poll-labels span{border:1px solid #52525b;border-radius:10px;padding:12px 16px;font-size:clamp(20px,2.2vw,32px)}
.w7-poll-note{font-size:clamp(22px,2.4vw,34px);font-weight:700;color:#fdba74;margin:12px 0 0}
/* 投影疊層用滿整個畫面：題目、選項與票數放大，選項格平均分掉剩下的高度。
   「已作答 N 人」和狀態句（例如「還沒有人點選。」）只留一行：有狀態句時藏人數。 */
dialog.w7-poll-screen .w7-poll-body{align-content:stretch;grid-auto-rows:minmax(0,1fr);padding:20px 32px 28px}
dialog.w7-poll-screen .w7-poll-body>[data-w7-poll]{display:flex;flex-direction:column;min-height:0;margin:0}
dialog.w7-poll-screen .w7-poll-body>.b6-poll{padding:24px 32px;gap:12px}
dialog.w7-poll-screen .b6-number{font-size:20px}
dialog.w7-poll-screen .w7-poll-body h3{font-size:clamp(30px,3.6vw,52px);margin:0}
dialog.w7-poll-screen :is(.b6-counts,.b6-choices,.w7-poll-labels){flex:1;min-height:0;grid-auto-rows:minmax(0,1fr);gap:16px;margin:0}
dialog.w7-poll-screen :is(.b6-count,.b6-choice-label,.w7-poll-labels span){min-height:0;padding:12px 24px;font-size:clamp(26px,3vw,46px);display:flex;align-items:center;justify-content:space-between}
dialog.w7-poll-screen .b6-count strong{font-size:clamp(36px,4.4vw,72px)}
dialog.w7-poll-screen :is(.b6-total,.b6-status){font-size:clamp(24px,2.4vw,36px);margin:0;min-height:0}
dialog.w7-poll-screen .b6-status:empty{display:none}
dialog.w7-poll-screen .b6-total:has(~ .b6-status:not(:empty)){display:none}
#app.projection .projection-nav .poll-screen-open{border:2px solid #165753;background:#fff;color:#165753}
#app.projection .projection-nav button,#app.projection .w7-checkin-open{white-space:nowrap}
#app.projection .topline .eyebrow{white-space:nowrap}
.privacy-once{font-size:14px!important;color:var(--muted);margin:4px 0 0}
.saved-flash{font-weight:700;color:#0f4a2e;background:#d9f0e0;border:2px solid #2d7a50;border-radius:8px;padding:6px 10px;margin:6px 0}
/* 公用電腦投影：字級與版面只作用於投影，學生分步版、整頁版沿用原尺寸。 */
#app.projection .topline .lesson-intro{display:flex;align-items:center;gap:16px;margin:0;padding:0;border:0;background:transparent}
#app.projection .topline .lesson-intro h2{font-size:24px;margin:0}
#app.projection .topline .lesson-intro a{font-size:24px;white-space:nowrap}
#app.projection .topline .lesson-intro p{display:none}
#app:not(.projection) .lesson-intro a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px} /* 前導片連結至少 44px 點擊區 */
/* 登入獨立一頁（10/22）：只放標題與登入框，置中、不和影片或題目同屏。 */
#app .login-page{display:flex;align-items:flex-start;justify-content:center;padding:16px;box-sizing:border-box}
#app .login-main{width:100%;max-width:560px;display:grid;gap:10px;margin:0 auto}
#app .login-main h1{margin:0;font-size:1.5rem;line-height:1.3}
#app .login-main .login-copy{margin:0;font-size:1rem;line-height:1.5}
#app .login-main .term-login{max-width:none}
#app .login-main .term-login>h2{display:none}
#app .login-main .login-return{min-height:48px}
/* 投影一屏（10/21）：1366×768 不捲動；幕次與換幕鍵放頂列。只改投影，字級維持 32px 以上，學生版不受影響。 */
#app.projection .projection-nav{display:flex;gap:12px;margin-left:auto}
#app.projection .projection-nav button{min-height:56px;padding:4px 22px}
#app.projection .projection-nav button.primary{min-width:150px}
#app.projection .projection-nav button:disabled{opacity:.45}
/* 老師區只在桌面寬度（教室電腦）出現；手機不顯示，與基礎 W7 一致。 */
@media (max-width:1023px){.teacher-zone{display:none}}
/* 第 9 幕票選最佳回覆：學生卡（A–E 五句）與投影統計／揭曉 */
.peer-options{display:grid;gap:6px;grid-column:1/-1}
.peer-option{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:.5rem;align-items:start;text-align:left;min-height:48px;padding:.45rem .7rem;line-height:1.45}
.peer-option strong{display:inline-grid;place-items:center;width:1.8rem;height:1.8rem;border-radius:50%;background:#e8eeec;color:#165753}
.peer-option[aria-pressed=true] strong{background:#165753;color:#fff}
.peer-note{grid-column:1/-1;margin:.5rem 0 0;font-weight:700}
.peer-note.peer-done{color:#165753}
.peer-sub{grid-column:1/-1;margin:.2rem 0 0;color:var(--muted)}
.peer-top{grid-column:1/-1;margin:.4rem 0 0;padding:0;list-style:none;display:grid;gap:6px;counter-reset:peer}
.peer-top li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.6rem;align-items:baseline;padding:.5rem .7rem;border:2px solid var(--line);border-radius:8px;background:var(--paper);counter-increment:peer;overflow-wrap:anywhere}
.peer-top li:first-child{border-color:#165753;background:#e2efe8}
.peer-votes{font-weight:700;color:#165753;white-space:nowrap}
.peer-votes::before{content:"第 " counter(peer) " 名・"}
.peer-board .peer-count{font-weight:700;margin:0;color:#165753}
.peer-reveal-row{display:flex;gap:.4rem 1.2rem;align-items:center;flex-wrap:wrap}
.peer-reveal-row h2{margin:0}
.peer-reveal-row small{margin-left:-.6rem}
.peer-message{color:#b3261e;font-weight:700;margin:.4rem 0 0}
/* 投影第 9 幕有票選時：票選一條在上，收尾與評量左右並排，整頁不用捲。 */
#app.projection #projection-default.peer-layout{grid-template-columns:repeat(2,minmax(0,1fr));align-content:start}
#app.projection #projection-default.peer-layout>.peer-board{grid-column:1/-1}
#app.projection #projection-default.peer-layout>.panel{margin:0}
dialog.peer-screen .w7-overlay-header h2{font-size:28px}
dialog.peer-screen .peer-screen-body{display:block;overflow:auto;padding:24px 40px}
dialog.peer-screen .peer-top{gap:16px;font-size:40px}
dialog.peer-screen .peer-top li{padding:16px 24px;border-width:3px}
dialog.peer-screen .peer-top li:first-child{font-size:48px}
dialog.peer-screen .peer-note{font-size:32px}

/* 全班點選（B6）放進分步卡：學號欄只一行、空白狀態列不佔高；內容仍超出時整張卡可以捲，選項不會被底部按鈕列蓋住。 */
.compact .lesson-scroll{overflow-y:auto;overscroll-behavior:contain}
.compact .b6-identity{padding:8px 10px;margin:0 0 6px}
.compact .b6-identity p{margin:0 0 4px}
.compact .b6-identity .b6-status:empty{display:none}
.compact .b6-poll{padding:8px 10px;margin:0 0 6px}
.compact .b6-poll .b6-status:empty{display:none}
@media(max-height:480px){
  .compact .b6-identity{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
  .compact .b6-identity>p:first-child{margin:0;flex:0 1 auto}
  .compact .b6-identity form{flex:1 1 220px}
  .compact .b6-poll .b6-options{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
}

/* 筆電與大螢幕（寬 901、高 600 以上）：分步卡從畫面上方排起，不再整塊懸在中間；左欄放說明、右欄放作答與畫面，右欄較寬。
   第 2 幕直播片段與第 7 幕主播失言影片依可用高度放大。 */
@media(min-width:901px) and (min-height:600px){
  .compact .compact-main{margin-block:0 auto;align-content:start;max-width:1400px;grid-template-columns:minmax(0,1fr) minmax(0,2fr)}
  .compact .compact-heading,.compact .compact-nav{max-width:1400px}
  .compact .sim-frame,.compact .sim-game{min-height:max(300px,calc(100dvh - 360px))}
  .compact .sim-chat{height:max(300px,calc(100dvh - 360px))}
  .compact .incident video{max-width:100%;max-height:none;width:auto;height:max(240px,calc(100dvh - 330px));margin:0 auto}
}
/* 第 2 幕直播片段：手機直式依可用高度放大（原本 175px、下面空一大塊）；手機橫放不再只剩 78px。 */
@media(max-width:600px) and (min-height:640px){
  .compact .sim-frame,.compact .sim-game{min-height:max(175px,calc(100dvh - 470px))}
  .compact .sim-chat{height:max(175px,calc(100dvh - 470px))}
}
@media(max-height:480px){
  .compact .sim-frame,.compact .sim-game{min-height:max(78px,calc(100dvh - 250px))}
  .compact .sim-chat{height:max(78px,calc(100dvh - 250px))}
}
/* SVG 插圖 */
/* 分步版閱讀卡的內嵌動畫插圖（illustrations.mjs）。有插圖的卡一律靠上、標題→插圖→內容；寬一點時插圖在左、文字在右。（放在投影大螢幕區塊之前） */
.w7-art{margin:0;display:flex;justify-content:center;align-items:center;min-width:0}
.w7-art svg{display:block;width:100%;height:auto;max-height:clamp(120px,30dvh,180px);overflow:visible}
.compact .compact-main:has(.w7-art){grid-template-columns:minmax(0,1fr);align-content:start;margin-block:0 auto;gap:6px}
.compact .compact-main:has(.w7-art) .compact-copy:empty{display:none}
.compact .compact-work:has(>.w7-art){display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-content:start;align-items:center}
.compact .compact-reasons{margin:0}
@media(min-width:601px){
  .compact .compact-work:has(>.w7-art:not(:only-child)){grid-template-columns:minmax(0,2fr) minmax(0,3fr);column-gap:20px;row-gap:4px}
  .compact .compact-work:has(>.w7-art:not(:only-child))>.w7-art{grid-column:1;grid-row:1/span 6}
  .compact .compact-work:has(>.w7-art:not(:only-child))>:not(.w7-art){grid-column:2}
  .compact .compact-work>.w7-art:only-child svg{max-width:560px}
}
@media(max-height:480px){.w7-art svg{max-height:min(150px,calc(100dvh - 180px))}}
@media(min-width:901px) and (min-height:481px){
  .w7-art svg{max-height:clamp(150px,34dvh,340px)}
  .compact .compact-work>.w7-art:only-child svg{max-width:720px}
}
.w7-art :is(.a-beat,.a-pop,.a-talk,.a-grow){transform-box:fill-box;transform-origin:center}
.w7-art .a-talk{transform-origin:top center}
.w7-art .a-beat{animation:w7-beat 3s ease-in-out infinite}
.w7-art .a-pop{animation:w7-pop 3s ease-in-out infinite}
.w7-art .a-rise{animation:w7-rise 3s ease-in-out infinite}
.w7-art .a-talk{animation:w7-talk 1.5s ease-in-out infinite}
.w7-art .a-live{animation:w7-breathe 3s ease-in-out infinite}
.w7-art .a-drop{animation:w7-drop 3s ease-in-out infinite}
.w7-art .a-ball{animation:w7-ball 3.6s ease-in-out infinite}
.w7-art .a-grow{animation:w7-grow 3.6s ease-in-out infinite}
.w7-art .a-step rect{animation:w7-step-fill 3.6s step-end infinite}
.w7-art .a-step text{animation:w7-step-text 3.6s step-end infinite}
.w7-art .a-step-2 :is(rect,text){animation-delay:-2.4s}
.w7-art .a-step-3 :is(rect,text){animation-delay:-1.2s}
.w7-art .a-cool{animation:w7-cool 3.6s ease-in-out infinite}
.w7-art .a-cool-2{animation-delay:.4s}
.w7-art .a-cool-3{animation-delay:.8s}
.w7-art .a-volley{animation:w7-volley 3s ease-in-out infinite}
.w7-art .a-check{stroke-dasharray:40;animation:w7-draw 3s ease-out infinite}
.w7-art .a-strike{stroke-dasharray:52;animation:w7-strike 3s ease-in-out infinite}
.w7-art .a-bad{animation:w7-bad 3s ease-in-out infinite}
.w7-art .a-flip{transform-box:fill-box;transform-origin:center;animation:w7-flip 4s ease-in-out infinite}
.w7-art .a-sand-top{transform-box:fill-box;transform-origin:bottom center;animation:w7-drain 4s linear infinite}
.w7-art .a-sand-bottom{transform-box:fill-box;transform-origin:bottom center;animation:w7-fill 4s linear infinite}
.w7-art .a-stream{animation:w7-stream 4s linear infinite}
.w7-art .a-cell{animation:w7-cell 3.6s step-end infinite}
.w7-art .a-cell-2{animation-delay:-2.4s}
.w7-art .a-cell-3{animation-delay:-1.2s}
@keyframes w7-beat{0%,60%,100%{transform:scale(1)}15%{transform:scale(1.22)}35%{transform:scale(1.12)}}
@keyframes w7-pop{0%,45%{transform:scale(.6);opacity:.35}60%{transform:scale(1.12);opacity:1}72%,100%{transform:scale(1);opacity:1}}
@keyframes w7-rise{0%{transform:translateY(0);opacity:0}12%{opacity:1}48%{transform:translateY(-26px);opacity:1}60%,100%{transform:translateY(-30px);opacity:0}}
@keyframes w7-talk{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.7)}}
@keyframes w7-breathe{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes w7-drop{0%,40%{opacity:0;transform:translateY(-3px)}55%,80%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(3px)}}
@keyframes w7-ball{0%{transform:translate(66px,30px)}8%{transform:translate(40px,4px)}14%{transform:translate(0,0)}20%{transform:translate(-46px,8px)}28%,64%{transform:translate(-90px,40px)}72%{transform:translate(-46px,8px)}78%{transform:translate(0,0)}86%{transform:translate(40px,4px)}94%,100%{transform:translate(66px,30px)}}
@keyframes w7-grow{0%,32%,68%,100%{transform:scale(1)}42%,58%{transform:scale(1.45)}}
@keyframes w7-step-fill{0%{fill:#165753}33.3%{fill:#fffefa}}
@keyframes w7-step-text{0%{fill:#fff}33.3%{fill:#165753}}
@keyframes w7-cool{0%,15%{opacity:1}40%,85%{opacity:.25}100%{opacity:1}}
@keyframes w7-volley{0%,100%{transform:translate(0,0)}25%{transform:translate(32px,-16px)}50%{transform:translate(64px,22px)}75%{transform:translate(32px,-16px)}}
@keyframes w7-draw{0%{stroke-dashoffset:40}30%,100%{stroke-dashoffset:0}}
@keyframes w7-strike{0%,20%{stroke-dashoffset:52}45%,100%{stroke-dashoffset:0}}
@keyframes w7-bad{0%,40%{opacity:1}60%,90%{opacity:.3}100%{opacity:1}}
@keyframes w7-flip{0%,82%{transform:rotate(0)}100%{transform:rotate(180deg)}}
@keyframes w7-drain{0%{transform:scaleY(1)}80%,100%{transform:scaleY(.05)}}
@keyframes w7-fill{0%{transform:scaleY(.15)}80%,100%{transform:scaleY(1)}}
@keyframes w7-stream{0%{opacity:1;stroke-dashoffset:0}78%{opacity:1;stroke-dashoffset:-28}79%,100%{opacity:0}}
@keyframes w7-cell{0%{fill:#e2efe8;stroke-width:3}33.3%{fill:#fffefa;stroke-width:1.5}}
@media(prefers-reduced-motion:reduce){.w7-art *{animation:none!important}}

@media(min-width:1200px) and (min-height:700px){
  #app.projection{max-width:none!important;width:100%;min-height:100dvh;height:100dvh;padding:24px 32px;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:12px;font-size:32px;line-height:1.4}
  #app.projection :where(*){font-size:inherit}
  #app.projection h1{font-size:48px;line-height:1.25;margin:4px 0}
  #app.projection h2{font-size:38px;line-height:1.3;margin:0 0 12px}
  #app.projection h3{font-size:34px;line-height:1.3}
  #app.projection .topline{padding-bottom:8px}
  #app.projection header{margin:0}
  #app.projection .lead{max-width:none;margin:4px 0}
  #app.projection .progress{margin:8px 0}
  #app.projection #projection-default{display:grid;gap:20px;min-height:0}
  #app.projection #projection-default>.panel{margin:0;padding:24px 32px;display:flex;flex-direction:column;justify-content:center;gap:12px}
  #app.projection .panel p{margin:0}
  #app.projection .chatline{grid-template-columns:290px minmax(0,1fr);margin:0;padding:12px 16px}
  #app.projection .projection-example{margin:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px}
  #app.projection .projection-example img{width:100%;height:100%;min-height:0;max-height:none;object-fit:contain}
  #app.projection #projection-default>.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
  #app.projection .grid>.panel{margin:0;padding:20px;display:flex;flex-direction:column;gap:12px}
  #app.projection .sim-clip{display:flex;flex-direction:column;flex:1;min-height:0}
  #app.projection .sim-top{padding:8px 12px}
  #app.projection .sim-frame{flex:1;min-height:380px;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
  #app.projection .sim-game{min-height:380px;padding-top:100px}
  #app.projection .sim-chat{height:100%;min-height:380px}
  #app.projection .sim-caption{padding:12px;line-height:1.4}
  #app.projection .sim-message{margin:8px 0;padding:8px 0}
  #app.projection .sim-controls{padding:10px;gap:8px}
}
@media(min-width:1200px) and (min-height:700px){
  #app.projection{padding:10px 32px 14px;gap:8px}
  #app.projection .topline{flex-wrap:nowrap;align-items:center;gap:24px;padding-bottom:6px}
  #app.projection .topline .counter{white-space:nowrap}
  #app.projection .topline:has(.lesson-intro){flex-wrap:wrap;row-gap:4px}
  #app.projection .topline .lesson-intro{order:9;flex-basis:100%}
  #app.projection .topline .lesson-intro :is(h2,a){font-size:32px}
  #app.projection .progress{margin:0 0 6px}
  #app.projection h1{margin:0}
  #app.projection .lead{margin:2px 0 0}
  #app.projection #projection-default{gap:14px}
  #app.projection #projection-default>.panel{padding:16px 28px;gap:8px}
  #app.projection .panel h2{margin:0 0 4px}
  #app.projection .chatline{padding:6px 16px}
  #app.projection #projection-default>.grid{min-height:0;grid-template-rows:minmax(0,1fr)}
  #app.projection .grid>.panel{padding:12px 16px;gap:8px;min-height:0}
  #app.projection .grid>.panel>h3{margin:0}
  #app.projection .sim-top{padding:4px 12px;column-gap:16px;row-gap:0}
  #app.projection .sim-frame{min-height:0}
  #app.projection .sim-game{min-height:0;padding-top:0}
  #app.projection .sim-chat{min-height:0}
  #app.projection .sim-controls{padding:6px 10px;flex-wrap:nowrap}
  #app.projection .sim-controls label{line-height:1.2}
}

/* 1280×720 投影第 9 幕（收尾＋期中評量）原本多 1px：只有矮螢幕時收一點間距。 */
@media(min-width:1200px) and (min-height:700px) and (max-height:740px){
  #app.projection #projection-default{gap:10px}
  #app.projection #projection-default>.panel{padding:12px 28px}
}
