:root{color-scheme:light;--bg:#f1f6f9;--paper:#fff;--ink:#19364a;--muted:#637d8c;--line:#d9e5ed;--accent:#146b97;--soft:#e8f3fa;--shadow:0 12px 35px #153e5810;font-family:Inter,"Microsoft JhengHei","Noto Sans TC",system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);line-height:1.7}body.dark{color-scheme:dark;--bg:#111c27;--paper:#1b2a39;--ink:#edf6ff;--muted:#abc1d1;--line:#354756;--accent:#8bd3ff;--soft:#223e52;--shadow:none}button,input,select,textarea{font:inherit}button,a,select,input,summary{touch-action:manipulation}button,.file-button{cursor:pointer;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);padding:7px 11px;font-size:13px;white-space:nowrap}button:hover,.file-button:hover{border-color:var(--accent);background:var(--soft)}button:disabled{opacity:.35;cursor:default}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #75bae9;outline-offset:3px}.skip{position:absolute;top:-60px}.skip:focus{top:0;background:var(--paper);z-index:20;padding:10px}.top{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 30px;background:var(--paper);border-bottom:1px solid var(--line)}.brand{font-size:27px;line-height:1.3;font-weight:750;color:var(--ink)}.brand span{font-size:15px;font-weight:400;margin-left:8px}.brand small{display:block;font-size:10px;letter-spacing:2px;color:var(--muted);margin-top:5px}.top nav{display:flex;align-items:center;gap:22px;font-size:13px}.shell{max-width:1880px;margin:auto;display:grid;grid-template-columns:220px minmax(0,1fr)}.sidebar{position:sticky;top:91px;height:calc(100vh - 92px);padding:30px 20px;border-right:1px solid var(--line);overflow:auto}.sidebar-title{font-size:11px;font-weight:800;letter-spacing:1.6px;margin-bottom:23px;display:flex;justify-content:space-between}.sidebar-title span{font-size:9px;color:var(--muted)}.search-label{font-size:11px;color:var(--muted)}input[type=search]{width:100%;margin:8px 0 5px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);font-size:12px;padding:10px 8px}#search-count{font-size:11px;color:var(--muted);min-height:23px}.chapter-link{display:block;padding:12px 10px;margin:4px 0;border-radius:8px;color:var(--muted);font-size:13px}.chapter-link.active{background:var(--soft);color:var(--accent);font-weight:700}.chapter-link small{display:block;font-size:10px;opacity:.7}.sidebar-note{border-top:1px solid var(--line);padding-top:24px;margin-top:30px;font-size:11px;color:var(--muted)}#search-results a{display:block;padding:8px;border-bottom:1px solid var(--line);font-size:12px}main{padding:28px 32px 20px;min-width:0}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.eyebrow{font-size:11px;letter-spacing:2px;color:var(--accent);font-weight:700;margin:0 0 8px}h1{font-size:clamp(24px,2.1vw,37px);line-height:1.4;margin:0 0 19px;letter-spacing:-.5px}.progress{font-size:13px;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}.controls{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 22px;font-size:12px}.controls select{min-width:190px;max-width:350px;flex:1;padding:8px 28px 8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-size:12px}.divider{height:22px;border-left:1px solid var(--line);margin:0 4px}.stage{display:grid;grid-template-columns:minmax(0,3fr) minmax(235px,1fr);gap:19px;align-items:stretch}.stage.stacked{grid-template-columns:1fr}.stage.no-cues{grid-template-columns:1fr}.slide-panel,.cues-panel,.reading-panel,.notes{background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.panel-label{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 18px;border-bottom:1px solid var(--line);font-size:10px;letter-spacing:1px;font-weight:750;color:var(--accent)}.panel-label span+span{color:var(--muted);font-size:9px;font-weight:400;letter-spacing:0}.slide-open{display:block;width:100%;padding:0;border:0;border-radius:0;background:#fff;overflow:hidden}.slide-open:hover{background:#fff}.slide-open img{width:100%;height:auto;display:block;aspect-ratio:16/9;object-fit:contain}.slide-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;font-size:10px;color:var(--muted)}.slide-bottom button{font-size:10px;padding:4px 8px;border-color:transparent}.cues-panel{display:flex;flex-direction:column}.cues-panel[hidden]{display:none}.cue-intro{margin:21px 22px 5px;font-size:12px;color:var(--muted)}#cues{list-style:none;counter-reset:cues;padding:0 23px;margin:4px 0 20px}#cues li{counter-increment:cues;position:relative;padding:19px 0 19px 29px;border-bottom:1px solid var(--line);font-size:clamp(14px,1.2vw,20px);font-weight:650;line-height:1.7}#cues li:last-child{border-bottom:0}#cues li:before{content:'0' counter(cues);position:absolute;left:0;top:23px;font-size:10px;font-weight:500;color:var(--accent)}.cue-foot{margin-top:auto;padding:16px 23px;background:var(--soft);font-size:10px;color:var(--muted)}.reading-panel{margin-top:22px;padding-bottom:24px}.reading-panel h2{font-size:20px;margin:23px 28px 8px}.reading-panel>p{font-size:16px;line-height:1.95;margin:0 28px;max-width:1050px}.example{margin:20px 28px 0;padding:16px 19px;background:var(--soft);border-radius:10px;border-left:3px solid var(--accent);display:flex;gap:24px;align-items:start}.example>span{font-size:11px;font-weight:700;color:var(--accent);white-space:nowrap;line-height:26px}.example p{margin:0;font-size:14px;line-height:1.9}.related{display:flex;gap:12px;flex-wrap:wrap;margin:18px 28px 0}.related:empty{display:none}.related a{font-size:12px;border:1px solid var(--line);border-radius:99px;padding:5px 12px}.notes{margin-top:18px;padding:16px 22px;box-shadow:none}.notes summary{cursor:pointer;font-size:13px;font-weight:650}.notes summary span{margin-left:15px;font-size:10px;color:var(--muted);font-weight:400}.notes p{font-size:12px;color:var(--muted)}.notes label{display:block;font-size:12px}.notes textarea{display:block;width:100%;border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--bg);color:var(--ink);resize:vertical;margin:8px 0 12px}.note-actions{display:flex;flex-wrap:wrap;gap:8px}.file-button input{display:none}.bottom-nav{display:flex;justify-content:space-between;align-items:center;margin:24px 0;font-size:11px;color:var(--muted)}footer{border-top:1px solid var(--line);padding-top:19px;display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:10px;line-height:1.8}footer span:last-child{text-align:right}.gallery{grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:15px;padding:8px 0 30px}.gallery:not([hidden]){display:grid}.gallery button{padding:0;overflow:hidden;text-align:left;white-space:normal}.gallery img{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:#fff}.gallery strong{display:block;font-size:11px;padding:9px 10px;font-weight:500}.gallery button.active{outline:2px solid var(--accent)}#projection{padding:0;border:0;margin:0;background:#091017;color:#fff;max-width:none;max-height:none;width:100vw;height:100dvh;overflow:hidden}#projection[open]{display:flex;flex-direction:column;align-items:center}#projection::backdrop{background:#091017}#projection img{width:100%;flex:1;min-height:0;object-fit:contain}.project-bar{padding:9px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;font-size:12px}.project-bar button{background:#243440;color:white;border-color:#405566;font-size:12px}.project-counter{padding:5px 15px;font-size:11px;color:#a5becb}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:11px 20px;background:#133a50;color:#fff;border-radius:10px;z-index:30;box-shadow:var(--shadow);max-width:90vw;font-size:13px}
@media(min-width:1600px){main{padding:35px 42px}.stage{grid-template-columns:minmax(0,3.6fr) minmax(270px,1fr)}}@media(max-width:1100px){.shell{grid-template-columns:180px minmax(0,1fr)}.sidebar{padding:25px 12px}main{padding:25px 20px}.stage{grid-template-columns:1fr}.cues-panel #cues{display:flex;gap:25px;margin-bottom:12px}.cues-panel #cues li{flex:1;border-bottom:0;font-size:15px}.cue-intro,.cue-foot{display:none}.controls select{max-width:none}}@media(max-width:700px){.top{position:relative;padding:16px 18px;align-items:start}.brand{font-size:23px}.brand span{font-size:12px}.brand small{font-size:8px;letter-spacing:1px}.top nav{gap:10px;flex-wrap:wrap;justify-content:end;max-width:155px;font-size:10px}.top nav a:nth-child(2){display:none}.top nav button{padding:3px 7px}.shell{display:block}.sidebar{height:auto;position:static;border-right:0;border-bottom:1px solid var(--line);padding:14px 18px}.sidebar-title,.search-label,.sidebar-note{display:none}.sidebar input{margin:0 0 6px}.sidebar nav{display:flex;gap:4px;overflow:auto}.chapter-link{flex-shrink:0;font-size:11px;margin:0;padding:7px 9px}.chapter-link small{display:none}#search-count:empty{min-height:0}main{padding:20px 14px}.eyebrow{font-size:10px}h1{font-size:25px;margin-bottom:16px}.progress{font-size:11px}.controls{gap:6px}.controls select{max-width:calc(100% - 35px);min-width:0;flex-basis:85%}.controls button{font-size:11px;padding:6px 9px}.divider{display:none}.panel-label{padding:11px 14px}.slide-bottom{padding:10px;align-items:start}.slide-bottom>span{max-width:44%}.slide-bottom div{display:flex;flex-wrap:wrap;justify-content:end}.cues-panel #cues{display:block;margin:0;padding:0 18px}.cues-panel #cues li{font-size:15px;padding:12px 0 12px 28px;border-bottom:1px solid var(--line)}#cues li:before{top:17px}.reading-panel h2{font-size:19px;margin:20px 18px 9px}.reading-panel>p{font-size:15px;margin:0 18px}.example{margin:18px 18px 0;padding:13px;display:block}.example p{font-size:13px}.related{margin:16px 18px 0}.notes{padding:15px}.notes summary span{display:block;margin-left:16px}.note-actions button,.file-button{font-size:11px}.bottom-nav span{font-size:10px}footer{display:block}footer span{display:block;margin-bottom:10px}footer span:last-child{text-align:left}.project-bar{padding:8px;font-size:10px}.project-bar>span{max-width:55%}.project-bar button{font-size:10px;padding:6px}}@media print{.top,.sidebar,.controls,.slide-bottom,.notes,.bottom-nav,.related,#toast,.gallery{display:none!important}.shell{display:block}main{padding:0}.stage{grid-template-columns:1fr}.cues-panel{box-shadow:none;margin-top:10px}.slide-panel,.reading-panel{break-inside:avoid}.slide-open img{max-height:45vh}.reading-panel{margin-top:15px}body{background:white;color:#000}.panel-label{color:#333}footer{font-size:9px}}
/* Classroom clock: shared by the reading page and projection toolbar. */
.class-timer{margin:0 0 23px;padding:13px 18px;background:var(--paper);border:1px solid var(--line);border-radius:12px;font-variant-numeric:tabular-nums;color:var(--ink)}.class-timer[hidden]{display:none!important}.timer-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:10px;color:var(--muted);margin-bottom:8px}.timer-caption>div{display:flex;gap:6px}.timer-caption button{font-size:10px;padding:3px 8px}.timer-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.timer-values>div{display:flex;align-items:baseline;gap:12px;border-right:1px solid var(--line)}.timer-values>div:last-child{border:0}.timer-values span{font-size:11px;white-space:nowrap;color:var(--muted)}.timer-values strong{font-size:22px;font-weight:650;line-height:1.5;letter-spacing:.5px;white-space:nowrap}.class-timer[data-phase=soon] .timer-remaining{color:#a8560c}.class-timer[data-phase=urgent] .timer-remaining,.class-timer[data-phase=over] .timer-remaining{color:#bc273d}.class-timer[data-phase=before] .timer-remaining{color:var(--accent)}.timer-remaining span{color:inherit}
.project-bar{flex:0 0 auto;gap:16px}.project-bar>#project-title{flex:1;min-width:0;max-width:260px;line-height:1.5}.project-actions{display:flex;gap:5px;flex-shrink:0}.project-bar .class-timer{--ink:#eff7ff;--muted:#acc4d6;--line:#334755;--paper:#111f2a;--soft:#243949;--accent:#85cefa;margin:0;padding:7px 13px;flex:1 1 640px;max-width:860px;min-width:0;background:#111f2a;border-color:#334755}.project-bar .timer-values{gap:12px}.project-bar .timer-values>div{gap:8px}.project-bar .timer-values strong{font-size:18px}.project-bar .timer-values span{font-size:10px}.project-bar .timer-caption{margin-bottom:2px;gap:8px}.project-bar .timer-caption button{font-size:10px;padding:1px 7px}.project-bar .class-timer[data-phase=soon] .timer-remaining{color:#ffc070}.project-bar .class-timer[data-phase=urgent] .timer-remaining,.project-bar .class-timer[data-phase=over] .timer-remaining{color:#ff8e9e}#projection>#project-image{display:block;flex:1 1 0;min-height:0;height:0;width:100%;object-fit:contain}.project-counter{flex:0 0 auto}
#timer-settings{position:fixed;inset:0;margin:auto;padding:26px;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #b7d3e4;border-radius:16px;background:#f9fcff;color:#19364a;box-shadow:0 20px 80px #0005;color-scheme:light;z-index:40}#timer-settings::backdrop{background:#031525aa}.timer-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.timer-dialog-head h2{font-size:22px;margin:0}.timer-dialog-head button{background:#fff;color:#19364a;border-color:#d3e0e9;font-size:19px;padding:0 10px}#timer-settings p{font-size:13px;line-height:1.8;color:#5f7687;margin:12px 0 18px}#timer-settings label{display:block;font-size:13px;margin:12px 0 5px}#timer-settings input{width:100%;min-width:0;font-size:17px;padding:9px 10px;border:1px solid #b7cdda;border-radius:8px;background:#fff;color:#19364a}.timer-inputs{display:grid;grid-template-columns:1fr 1fr;gap:16px}#timer-settings small{display:block;color:#637d8c;font-size:11px;margin-top:15px}#timer-settings #timer-error{color:#b6253c;margin:10px 0}#timer-error:empty{display:none}.timer-dialog-actions{display:flex;gap:10px;justify-content:end;margin-top:24px}.timer-dialog-actions button{background:white;color:#19364a;border-color:#b7cdda}.timer-dialog-actions .timer-apply{background:#155d85;color:white;border-color:#155d85}
@media(max-width:1150px){.timer-values>div{display:block}.timer-values strong{display:block;font-size:20px}.project-bar{flex-wrap:wrap;gap:8px}.project-bar>#project-title{max-width:none}.project-bar .class-timer{order:3;flex-basis:100%;max-width:none}.project-bar .timer-values>div{display:flex}.project-bar .timer-values strong{display:inline}.project-bar .timer-caption>span{font-size:10px}}
@media(max-width:700px){.class-timer{padding:11px 12px;margin-bottom:20px}.timer-caption{align-items:start;flex-wrap:wrap;gap:6px}.timer-caption>span{font-size:9px}.timer-caption button{font-size:10px}.timer-values{gap:8px}.timer-values span{font-size:10px}.timer-values strong{font-size:16px;letter-spacing:0}.project-bar .class-timer{padding:7px 9px}.project-bar .timer-values>div{display:block}.project-bar .timer-values strong{font-size:15px;display:block}.project-bar .timer-caption{flex-wrap:wrap}.project-bar>#project-title{font-size:10px}.project-actions button{padding:5px 7px}.project-bar .timer-values{gap:8px}}
@media print{.class-timer,#timer-settings{display:none!important}}
/* Editable HTML and local-first presentation analysis. */
.report-time{margin-left:auto}.panel-label button{font-size:10px;padding:3px 8px;letter-spacing:0}.rich-cues>ul,.rich-cues>ol{list-style:none;margin:0;padding:0;counter-reset:cues}.rich-cues p{margin:8px 0}.rich-cues a,.rich-reading a,.rich-example a{text-decoration:underline}.rich-reading{font-size:16px;line-height:1.95;margin:0 28px;max-width:1050px}.rich-reading p,.rich-example p{margin:0 0 .65em}.rich-reading p:last-child,.rich-example p:last-child{margin-bottom:0}.rich-example{font-size:14px;line-height:1.9;min-width:0}.rich-reading pre,.rich-example pre{white-space:pre-wrap;overflow-wrap:anywhere}.rich-cues>p{font-size:16px}.rich-reading blockquote,.html-input blockquote{border-left:3px solid #80b6d3;padding-left:14px;margin:12px 0;color:#526f82}.work-dialog{position:fixed;inset:0;margin:auto;width:min(1060px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:26px;border:1px solid #bed5e4;border-radius:16px;background:#f7fbff;color:#19364a;color-scheme:light;overflow:auto;box-shadow:0 22px 90px #0005}.work-dialog::backdrop{background:#051421aa}.work-dialog-head{display:flex;justify-content:space-between;gap:20px;align-items:start;margin-bottom:18px}.work-dialog h2{font-size:23px;line-height:1.5;margin:0}.work-dialog-head p{font-size:12px;color:#607c8e;margin:5px 0 0}.work-dialog-head>button{font-size:21px;padding:0 11px}.work-dialog button,.work-dialog select{background:#fff;color:#19364a;border-color:#bbd1df}.work-dialog h3{font-size:17px;margin:24px 0 12px}.work-dialog h3 small{font-size:11px;color:#668293}.work-note,.sync-status{font-size:12px;line-height:1.8;color:#657f90}.report-toolbar{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.report-toolbar label{font-size:12px}.report-toolbar select{min-width:170px;max-width:330px;padding:7px;border:1px solid #bbd1df;border-radius:7px;flex:1;font-size:12px}.report-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}.report-summary>div{padding:15px;background:#e9f3fa;border-radius:10px}.report-summary span{font-size:11px;color:#59788b;display:block}.report-summary strong{font-size:25px;font-variant-numeric:tabular-nums}.table-scroll{max-width:100%;overflow:auto;border:1px solid #d1e2ed;border-radius:10px;max-height:380px}.table-scroll table{width:100%;border-collapse:collapse;font-size:12px;text-align:left;background:white}.table-scroll th{position:sticky;top:0;background:#e9f3fa;font-weight:650;white-space:nowrap}.table-scroll th,.table-scroll td{padding:10px 12px;border-bottom:1px solid #e1ebf2}.table-scroll td:first-child{white-space:nowrap;font-variant-numeric:tabular-nums}.clear-panel{padding:17px;margin:18px 0;border:1px solid #dbaa6d;background:#fff7ea;border-radius:10px;font-size:13px}.clear-panel p{margin:8px 0}.clear-panel label{display:block;margin:12px 0}.clear-panel input{width:auto}.clear-panel button{margin:6px 7px 0 0}#report-clear-confirm{color:#a33426}.editor-toolbar{position:sticky;top:-26px;z-index:2;background:#f7fbfff2;padding:10px 0;display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid #cedfe9}.editor-section{margin:17px 0}.editor-section>label{display:block;font-size:14px;font-weight:650;margin-bottom:7px}.html-input,.html-source{display:block;width:100%;min-height:110px;padding:14px;background:white;border:1px solid #bdcfdd;border-radius:9px;color:#19364a;font-size:15px;line-height:1.85;overflow-wrap:anywhere}.html-input[hidden],.html-source[hidden]{display:none}.html-input:focus{outline:2px solid #80badc}.html-input p{margin:0 0 8px}.html-input ul,.html-input ol{margin:4px 0;padding-left:25px}.html-source{resize:vertical;font-family:Consolas,monospace;font-size:13px;min-height:160px;white-space:pre-wrap}.editor-actions{display:flex;gap:8px;justify-content:end;flex-wrap:wrap}.work-dialog .primary-action{background:#155d85;color:white;border-color:#155d85}#editor-status{font-size:13px;color:#1e6387;margin:16px 0}#editor-latest{padding:10px;background:white;border-radius:8px;max-height:250px;overflow:auto}#editor-latest>strong{display:block;margin:10px 0;font-size:12px}#editor-latest>div{font-size:13px}#editor-history-list{padding:12px;background:#e9f3fa;border-radius:10px;margin-top:15px}#editor-history-list>div{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:7px;font-size:12px}
@media(max-width:1100px){.cues-panel #cues{display:block}.cues-panel #cues>ol,.cues-panel #cues>ul{display:flex;gap:22px}}@media(max-width:700px){.rich-reading{font-size:15px;margin:0 18px}.rich-example{font-size:13px}.cues-panel #cues>ol,.cues-panel #cues>ul{display:block}.report-time{margin-left:0}.work-dialog{padding:17px;width:calc(100vw - 18px);max-height:calc(100dvh - 18px)}.work-dialog h2{font-size:19px}.work-dialog button{font-size:11px}.editor-toolbar{top:-17px}.report-summary{gap:6px}.report-summary>div{padding:9px}.report-summary strong{font-size:18px}.report-summary span{font-size:9px}.report-toolbar select{max-width:100%;width:100%;flex-basis:80%}.table-scroll th,.table-scroll td{padding:8px}.project-actions{gap:3px}}
@media print{.work-dialog{display:none!important}}

.audio-panel{margin-top:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface,#fff);padding:24px}.audio-panel h2{font-size:1.35rem;margin:18px 0 8px}.audio-panel h3{font-size:1rem;margin-top:24px}.audio-panel>p{line-height:1.8}.audio-actions,.audio-card-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.audio-actions{margin:18px 0}.audio-actions .file-button{display:inline-flex;padding:10px 15px;background:#e8f3fc;border:1px solid #bdd8eb;border-radius:8px;color:#144c6d;cursor:pointer}.audio-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px}.audio-card{display:flex;flex-direction:column;gap:12px;padding:18px;background:#f1f7fb;border:1px solid #d4e4ef;border-radius:12px;min-width:0}.audio-card.draft{border-style:dashed}.audio-card strong{overflow-wrap:anywhere}.audio-card small{color:#5a7283}.audio-card audio{width:100%;min-width:0}.audio-download{padding:7px 10px;font-size:.85rem}.audio-play-error{font-size:.85rem;color:#a63232}.recording-indicator{position:fixed;right:20px;bottom:20px;z-index:10000;background:#8a2535;color:#fff;border-radius:12px;box-shadow:0 5px 30px #0003;padding:12px 16px;display:flex;align-items:center;gap:15px}.recording-indicator[hidden]{display:none}.recording-indicator button{background:#fff;color:#812437}.dark .audio-panel{background:#152632}.dark .audio-card{background:#172e3d;border-color:#385363}.dark .audio-card small{color:#b2c9d7}.is-recording .project-bar:before{content:'● 錄音中';color:#ffb0bc;font-weight:700}.audio-panel[hidden]{display:none}@media(max-width:600px){.audio-panel{padding:16px}.recording-indicator{left:12px;right:12px;bottom:12px;justify-content:space-between;font-size:.85rem}.audio-card-actions button{flex:1}}@media print{.audio-panel,.recording-indicator{display:none}}

.project-actions{flex-wrap:wrap;max-width:100%;justify-content:flex-end}
[data-audio-action="toggle-teacher"]{color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe;font-weight:700}
[data-audio-action="toggle-teacher"].has-audio{border-color:#3b82f6;background:#dbeafe;color:#1e40af}
[data-audio-action="toggle-tts"]{color:#0f766e;background:#f0fdfa;border:1px solid #99f6e4;font-weight:700}
[data-audio-action].audio-playing{background:#ef4444!important;color:#fff!important;border-color:#dc2626!important;font-weight:800;animation:audioPulse 1.2s infinite}
@keyframes audioPulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,0.6)}70%{box-shadow:0 0 0 6px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
.dark [data-audio-action="toggle-teacher"]{color:#93c5fd;background:#1e293b;border-color:#334155}
.dark [data-audio-action="toggle-tts"]{color:#5eead4;background:#132e2b;border-color:#1e4e48}
#projection [data-audio-action]{color:#fff;background:rgba(255,255,255,0.15);border:1px solid rgba(255,255,255,0.25)}
#project-timer-toggle {
  color: #85cefa !important;
  background: rgba(133, 206, 250, 0.16) !important;
  border: 1px solid rgba(133, 206, 250, 0.4) !important;
  font-weight: 600;
  transition: all 0.2s ease;
}
#project-timer-toggle:hover {
  background: rgba(133, 206, 250, 0.28) !important;
  border-color: #85cefa !important;
  color: #fff !important;
}
#project-timer-toggle[aria-pressed="false"] {
  color: #acc4d6 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  opacity: 0.75;
}




/* === Antigravity Enhancements for 資策會 115 年度 class-web-ppt === */

/* Top Brand layout */
.brand {
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  text-decoration: none !important;
}
.brand .brand-tag {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.brand strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.brand small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: none !important;
  margin-left: 6px;
}
@media (max-width: 900px) {
  .brand small { display: none !important; }
}

/* Top Nav Buttons */
.top nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-sub {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  font-size: 11px !important;
  padding: 5px 10px !important;
  border-radius: 7px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}
.btn-sub:hover {
  background: var(--soft) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.btn-sync {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}
.btn-sync:hover {
  background: #dbeafe !important;
}

/* Edit Course Top Button */
.btn-edit-course {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.15s ease !important;
}
.btn-edit-course:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

/* Slide Box with Drag-and-Drop & Toolbar */
.slide-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.slide-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.slide-image-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.slide-box:hover .slide-image-toolbar {
  opacity: 1;
}
.slide-image-toolbar label, .slide-image-toolbar button {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.slide-image-toolbar label:hover, .slide-image-toolbar button:hover {
  background: #2563eb;
  border-color: #3b82f6;
  color: white;
}
.drop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 64, 175, 0.88);
  backdrop-filter: blur(4px);
  color: white;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border: 3px dashed #93c5fd;
  pointer-events: none;
}
.drop-overlay h3 { margin: 0 0 6px; font-size: 18px; }
.drop-overlay p { margin: 0; font-size: 12px; opacity: 0.85; }
.slide-box.drag-over .drop-overlay {
  display: flex;
}
.slide-paste-tip {
  font-size: 11px;
  color: var(--muted);
}

/* Rich boxes in Reading Panel */
.case-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.8;
}
.case-box strong { color: #1e40af; display: block; margin-bottom: 4px; font-size: 13px; }
.case-box p { margin: 0; }

.pitfalls-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.8;
}
.pitfalls-box strong { color: #b45309; display: block; margin-bottom: 4px; font-size: 13px; }
.pitfalls-box p { margin: 0; }

.assessment-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.8;
}
.assessment-box strong { color: #047857; display: block; margin-bottom: 4px; font-size: 13px; }
.assessment-box p { margin: 0; }

.dark .case-box { background: #172a3e; border-left-color: #60a5fa; }
.dark .case-box strong { color: #93c5fd; }
.dark .pitfalls-box { background: #2d2616; border-left-color: #fbbf24; }
.dark .pitfalls-box strong { color: #fde68a; }
.dark .assessment-box { background: #132d25; border-left-color: #34d399; }
.dark .assessment-box strong { color: #a7f3d0; }

/* Edit Dialog form fields */
.edit-field-group {
  margin-bottom: 16px;
}
.edit-field-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.edit-field-group input, .edit-field-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
}
.edit-field-group textarea:focus, .edit-field-group input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Scoped Editor Mode: for fast in-class single-field edits */
.work-dialog.scoped-mode {
  width: min(740px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 60px) !important;
  padding: 24px 28px !important;
  border: 2px solid #3b82f6 !important;
  box-shadow: 0 25px 90px rgba(0,0,0,0.3) !important;
}
.work-dialog.scoped-mode .work-dialog-head {
  margin-bottom: 14px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.work-dialog.scoped-mode h2 {
  font-size: 1.18rem !important;
  color: #1d4ed8;
}
.work-dialog.scoped-mode .edit-field-group {
  margin-bottom: 14px;
}
.work-dialog.scoped-mode .edit-field-group label {
  font-size: 13px !important;
  font-weight: 700;
  margin-bottom: 8px;
}
.work-dialog.scoped-mode .edit-field-group textarea {
  min-height: 240px !important;
  font-size: 14.5px !important;
  line-height: 1.8 !important;
  padding: 12px 14px !important;
  border: 1.5px solid #93c5fd !important;
  border-radius: 8px !important;
}
.work-dialog.scoped-mode .edit-field-group textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Gallery Drag & Drop Reordering Styling */
.card-drag-handle {
  cursor: grab !important;
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.card-drag-handle:hover {
  background: #2563eb !important;
  transform: scale(1.12);
}
.card-drag-handle:active {
  cursor: grabbing !important;
}
.gallery-card-item {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.gallery-card-item.is-dragging {
  opacity: 0.35 !important;
  transform: scale(0.96);
  border: 1.5px dashed #2563eb !important;
  box-shadow: none !important;
}
.gallery-card-item.drop-indicator-left {
  box-shadow: -5px 0 0 0 #2563eb, 0 10px 25px rgba(37, 99, 235, 0.25) !important;
  border-left: 2px solid #2563eb !important;
  transform: translateX(4px);
}
.gallery-card-item.drop-indicator-right {
  box-shadow: 5px 0 0 0 #2563eb, 0 10px 25px rgba(37, 99, 235, 0.25) !important;
  border-right: 2px solid #2563eb !important;
  transform: translateX(-4px);
}
@keyframes pulseSave {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.has-unsaved-glow {
  animation: pulseSave 1.6s infinite !important;
}
