/* Shared visual values from the lesson design workstation V1.4. */
:root{--theme:#175a61;--theme-dark:#153f46;--tint:#e9f3f1;--line:#d8e0e1;--row:#f3f6f5;--bg:#f3f6f5;--ink:#253239;--muted:#607179;--shadow:0 14px 38px #1d353512}
:root[data-theme=navy]{--theme:#345b80;--theme-dark:#273c56;--tint:#e8eff7;--row:#f2f5f9;--bg:#f2f5f9}
:root[data-theme=rust]{--theme:#8b5645;--theme-dark:#5e4037;--tint:#f7ebe5;--row:#f8f5f2;--bg:#f8f5f2}
:root[data-theme=slate]{--theme:#555d70;--theme-dark:#373d4b;--tint:#eceef2;--row:#f5f5f7;--bg:#f5f5f7}
:root[data-theme=forest]{--theme:#356550;--theme-dark:#294938;--tint:#e8f2e9;--row:#f3f7f4;--bg:#f3f7f4}
:root[data-theme=coral]{--theme:#d74d56;--theme-dark:#713a43;--tint:#ffebec;--row:#fff7f7;--bg:#fff7f7}
:root[data-theme=amber]{--theme:#d98516;--theme-dark:#714c22;--tint:#fff0d8;--row:#fffaf3;--bg:#fffaf3}
:root[data-theme=violet]{--theme:#8057c5;--theme-dark:#493a65;--tint:#f0eafd;--row:#f8f6fc;--bg:#f8f6fc}
:root[data-theme=aqua]{--theme:#119d9b;--theme-dark:#24575b;--tint:#e3f6f3;--row:#f2faf9;--bg:#f2faf9}
html{scroll-padding-top:calc(var(--toolbar-h,110px) + 18px)}
body{background:var(--bg);font:15px/1.58 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",CourseCJK,sans-serif;color:var(--ink)}
.topbar{background:var(--theme-dark);color:#fff;padding:16px clamp(16px,4vw,60px);min-height:80px;border:0}
.brand{gap:12px;letter-spacing:0;color:white;font-size:32px;font-weight:700}.brand strong{font-size:inherit;line-height:1.2}.brand-icon{width:48px;height:48px;background:linear-gradient(135deg,#ffffff23,#ffffff08);color:#f4db9f;border-radius:11px;padding:5px}.brand-icon svg{width:100%;height:100%}
.top-meta{font-size:15px;gap:17px;flex-wrap:wrap;justify-content:flex-end;color:#e4e9eb}.status{color:#c9e2dd}.status i{background:#9ad4be}.version{font-size:15px;border-left:0;padding:0}
.toolbar-shell{background:var(--bg);border-color:var(--line);backdrop-filter:none}.toolbar{max-width:1420px;padding:18px 26px 21px;gap:7px}.toolbar-spacer{flex:0}.toolbar-divider{display:none}
.btn{border:1px solid #b8cccb;background:#fff;color:var(--theme);border-radius:7px;padding:9px 12px;font-weight:700;font-size:15px;line-height:1.58;gap:7px}.toolbar>.btn{min-height:44px}.btn.primary{padding:9px 12px}.btn.small{font-size:13px;padding:6px 10px}.theme-trigger{height:44px;font-size:15px}.theme-menu{top:49px}.theme-option{font-size:14px;font-weight:700;color:var(--ink)}
.font-select{display:block;width:145px;height:44px;flex:none;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);padding:5px 9px;margin:0;font:700 14px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;cursor:pointer}
.font-group{display:flex;align-items:center;justify-content:space-between;width:145px;height:44px;border:1px solid var(--line);border-radius:8px;background:white;padding:2px;flex:none}.font-control{font-size:15px;min-width:29px;padding:5px 4px;border:0}.font-group output{min-width:50px;text-align:center;font-size:12px;font-weight:700;line-height:1.4}
.export-checks{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:8px;padding:3px 7px;background:white;min-height:44px}.export-checks label{display:inline-flex;align-items:center;gap:5px;margin:0;padding:1px 3px;font-size:13px;line-height:1.35;white-space:nowrap;color:var(--ink);font-weight:700;cursor:pointer}.export-checks input,.lesson-choice input{width:15px;height:15px;min-height:0;margin:0;padding:0;accent-color:var(--theme);box-shadow:none}.checkbox-stack{display:grid;gap:0;border-left:1px solid var(--line);padding-left:5px}
.layout{max-width:1420px;margin:0 auto;grid-template-columns:220px minmax(0,1fr);gap:24px;padding:0 26px}.sidebar{top:calc(var(--toolbar-h,110px) + 15px)}
.nav-card,.folder-card{box-shadow:var(--shadow);border-color:var(--line)}.nav-heading{font-size:14px;font-weight:700;letter-spacing:.12em;color:var(--muted);background:var(--tint);padding:10px 12px;border-radius:6px;margin-bottom:9px}.nav-card a{font-size:16px;font-weight:650;padding:10px 12px;border-radius:6px}.nav-card a>span{font-size:14px}.nav-card em{font-size:11px;font-weight:400}.folder-card{background:var(--tint)}.folder-card strong{font-size:14px;font-weight:700}.numbering-note{font-size:12px;color:var(--muted)}
.section-card{border:1px solid var(--line);border-radius:12px;padding:25px 29px;margin-bottom:17px;box-shadow:var(--shadow);scroll-margin-top:calc(var(--toolbar-h,110px) + 18px)}
.section-title{position:relative;display:block;background:var(--tint);border:1px solid var(--theme);border-radius:7px;text-align:center;padding:13px 18px;margin-bottom:19px}.section-kicker{display:none}.section-title h1,.section-title h2{display:flex;align-items:center;justify-content:center;gap:9px;margin:1px 0 3px;font:700 22.5px/1.4 "SimHei","Heiti SC","Noto Sans CJK SC","Microsoft YaHei",CourseCJK,sans-serif;color:#171b1d;letter-spacing:0}.heading-icon{width:22px;height:22px;flex:none;color:var(--theme)}.section-title p{color:var(--muted);font-size:13px;line-height:1.6;max-width:760px;margin:7px auto 0}.section-title .pill{display:inline-block;position:static;margin:8px 0 0;background:#fff9;font-size:11px;padding:2px 8px}
label,.field-label{font-size:13px;font-weight:700;color:var(--ink)}input,textarea,select{font:inherit;border:1px solid #c8d5d7;border-radius:7px;padding:9px 11px;color:var(--ink);background:white}input::placeholder,textarea::placeholder{font:inherit;color:#a5afb1}.edit-table{font-size:14px}.edit-table th{font-size:14px;font-weight:700}.edit-table input,.edit-table textarea,.edit-table select{font-size:14px}.edit-table td{border-color:var(--line)}.summary-editor{font-size:15px}
.cover-layout{grid-template-columns:minmax(0,1fr) 220px;gap:26px}.cover-preview-wrap{background:var(--row);border-color:var(--line)}.cover-logos{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}.logo-upload{margin:0;padding:12px;gap:10px;flex-wrap:wrap;background:var(--row)}.logo-thumb{width:56px;height:56px}.logo-copy{flex:1;min-width:130px}.logo-copy strong{font-size:14px;font-weight:700}.logo-copy p{font-size:12px;color:var(--muted)}.logo-copy>div{gap:6px}.preview-caption{font-size:11px;line-height:1.6;color:var(--muted)}
.upload-panel{background:var(--tint)}.upload-copy strong{font-size:15px;font-weight:700}.upload-copy p{font-size:13px;color:var(--muted)}.pdf-clean-settings{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:12px 0 0;color:var(--muted);font-size:12px}.pdf-clean-settings label{display:flex;align-items:center;gap:6px;margin:0;font-size:13px}.pdf-clean-settings input{display:inline-block;width:65px;margin:0;padding:5px 7px;font-weight:400}.pdf-clean-settings input:disabled{background:var(--row);color:var(--muted)}
.lesson-list{display:flex;flex-direction:column;gap:10px}.lesson-group{border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#fff}.lesson-group-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 12px;background:var(--tint);color:var(--theme-dark);font-size:14px}.lesson-group-head strong{font-weight:700}.lesson-group-head>span{font-size:12px;font-weight:400}.lesson-card{border:0;border-bottom:1px solid var(--line);border-radius:0;display:flex;align-items:center;box-shadow:none;min-height:61px;background:#fff}.lesson-card:last-child{border-bottom:0}.lesson-card.selected{background:var(--row)}.lesson-card:hover{box-shadow:none;background:var(--tint)}.lesson-choice{display:flex;align-items:center;justify-content:center;padding:12px;margin:0;align-self:stretch}.lesson-choice input{width:17px;height:17px}.lesson-open{padding:9px 6px 9px 0;color:var(--ink)}.lesson-main{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.lesson-topic{display:inline;font-size:15px;font-weight:700;color:var(--ink);line-height:1.5}.version-tag{font-size:12px;line-height:1.4;color:var(--theme);border:1px solid var(--theme);border-radius:4px;padding:1px 5px;white-space:nowrap}.latest-tag{font-size:11px;color:var(--theme-dark);background:var(--tint);padding:1px 5px;border-radius:3px}.lesson-meta{font-size:12px;color:var(--muted);margin-top:3px;overflow-wrap:anywhere}.lesson-remove{position:static;flex:none;margin:0 7px}.lesson-empty{padding:21px;color:var(--muted);background:var(--row);border-color:var(--line)}.lesson-empty strong{font-size:15px;font-weight:700}.lesson-empty p{font-size:13px}
.subtle{font-size:12px;color:var(--muted)}.dialog-toolbar,.guide-dialog{background:var(--bg)}.dialog-toolbar strong{font-size:15px;font-weight:700}.dialog-toolbar>span{font-size:12px;color:var(--muted)}
@media(min-width:1450px){.cover-layout{grid-template-columns:minmax(0,1fr) 250px;gap:32px}}
@media(max-width:1050px){.layout{grid-template-columns:190px minmax(0,1fr);gap:18px;padding:0 20px}.topbar{padding:16px 22px}.brand{font-size:26px}.top-meta{gap:7px;font-size:14px}.version{font-size:14px}.section-card{padding:23px}.cover-layout{grid-template-columns:1fr}.cover-preview-wrap{max-width:240px;justify-self:center}.cover-logos{grid-template-columns:1fr 1fr}.font-select,.font-group{width:145px}}
@media(max-width:760px){.topbar{align-items:flex-start;flex-wrap:wrap;padding:16px}.brand{font-size:24px}.brand-icon{width:42px;height:42px}.top-meta{width:100%;justify-content:flex-end;font-size:13px}.version{display:inline;font-size:13px}.status{font-size:13px}.toolbar{padding:16px 15px 19px;gap:6px}.toolbar .btn{font-size:14px;padding:8px 10px}.font-select,.font-group{width:135px}.font-control{padding:5px!important}.layout{display:block;padding:0 15px}.sidebar{position:static}.nav-heading{font-size:14px}.nav-card a{font-size:15px;min-height:38px;padding:7px 9px}.section-card{padding:20px 18px}.section-title h1,.section-title h2{font-size:21px}.cover-logos{grid-template-columns:1fr}.logo-upload{flex-wrap:nowrap}.lesson-topic{font-size:14px}.lesson-meta{font-size:11px}.lesson-main{gap:5px}.lesson-choice{padding:9px}.export-checks{flex-wrap:nowrap}.section-actions{gap:6px}.section-actions .btn{font-size:13px}.dialog-toolbar{padding:10px;flex-wrap:wrap;height:auto;min-height:66px}.dialog-toolbar>span{min-width:100px}.pdf-viewer{height:calc(100% - 100px)}}
.field-grid input,.edit-table input,.edit-table textarea,.summary-editor,.location-line input{font-weight:400}

.preview-dialog,.pdf-viewer{background:var(--row)}
/* V0.3 management controls and shared content tools. */
.theme-menu{grid-template-columns:1fr;width:160px}.theme-option{width:100%}
.startup-dialog{max-width:620px}.startup-dialog h2{margin:0 0 14px;color:var(--theme-dark);font-size:22px}.startup-options{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.startup-options>div{background:var(--row);border:1px solid var(--line);padding:16px;border-radius:9px}.startup-options strong{font-size:16px}.startup-options p{font-size:14px;line-height:1.7}.startup-dialog code{font:13px/1.7 monospace;background:var(--row);padding:3px 5px;overflow-wrap:anywhere}.startup-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}@media(max-width:560px){.startup-options{grid-template-columns:1fr}}
.save-buttons{display:flex;align-items:stretch;height:44px}.save-buttons .btn:first-child{border-radius:7px 0 0 7px}.save-buttons .save-other{border-radius:0 7px 7px 0;border-left:0;padding:5px 7px;min-width:25px}
.global-watermark,.lesson-display-settings{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:7px;background:white;padding:10px 12px;margin:0;min-height:44px;font-size:14px;font-weight:700;color:var(--ink)}.global-watermark input,.lesson-display-settings input{width:15px;height:15px;margin:0;padding:0;accent-color:var(--theme)}.lesson-display-settings{gap:14px;min-height:40px;padding:7px 10px}.lesson-display-settings label{display:inline-flex;align-items:center;gap:5px;margin:0;font-size:13px}
.content-tools{border:1px solid var(--line);border-radius:11px;background:white;padding:17px 13px;box-shadow:var(--shadow);margin-top:16px}.content-tools h2{font-size:14px;letter-spacing:.12em;color:var(--muted);margin:0 10px 10px;font-weight:700}.content-tool-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 4px}.content-tool-buttons .btn{font-size:13px;min-height:36px;padding:6px 7px}
.progress-table{table-layout:fixed;min-width:920px}.progress-table th:nth-child(1){width:8%}.progress-table th:nth-child(2){width:14%}.progress-table th:nth-child(3){width:9%}.progress-table th:nth-child(4){width:9%}.progress-table th:nth-child(5){width:36%}.progress-table th:nth-child(6){width:18%}.progress-table .action-col{width:6%}.progress-table td{vertical-align:top}.progress-table select{padding:8px 2px;min-height:43px}
.course-rich-editor{position:relative;outline:none;font-weight:400;font-size:14px;line-height:1.75;min-height:45px;padding:7px 5px;word-break:normal;overflow-wrap:anywhere;cursor:text;background:transparent;border:1px solid transparent;border-radius:4px}.course-rich-editor:focus{border-color:var(--theme);box-shadow:0 0 0 2px var(--tint);background:white}.course-rich-editor p,.course-rich-editor div{margin:0 0 4px}.course-rich-editor.is-empty:before{content:attr(data-placeholder);color:#a5afb1;pointer-events:none;position:absolute;left:7px;right:7px;top:7px;font-size:12px;font-weight:400}.course-rich-editor ul,.course-rich-editor ol{margin:4px 0;padding-left:1.5em}.course-rich-editor li{margin:2px 0}.course-rich-editor a{color:var(--theme);text-decoration:underline}.summary-editor.course-rich-editor{border:1px solid #c8d5d7;background:white;padding:20px;font-size:15px;min-height:285px;resize:none}.summary-editor.course-rich-editor.is-empty:before{left:20px;top:20px;font-size:15px}
.course-rich-figure{display:block;position:relative;margin:12px auto!important;padding:4px;border:1px dashed var(--line);max-width:100%;background:white;cursor:default}.course-rich-figure img{display:block;max-width:100%;max-height:420px;margin:auto;height:auto;object-fit:contain}.course-rich-figure figcaption{display:flex;justify-content:center;align-items:center;gap:4px;margin:6px 0 1px;font-size:12px;color:var(--muted);font-weight:400}.course-rich-figure .rich-caption{display:inline-block;flex:1;min-width:30px;padding:3px!important;margin:0!important;border:0!important;text-align:center;font-size:12px!important;background:transparent!important;font-weight:400}.rich-figure-number{white-space:nowrap}.rich-remove{position:absolute;right:-6px;top:-7px;width:21px;height:21px;background:white;border:1px solid #d4b9b7;border-radius:50%;color:#974d47;line-height:18px;font-size:18px;z-index:2}.rich-resize{position:absolute;right:0;bottom:0;width:18px;height:18px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 50%,#598a90 51%,#598a90 62%,transparent 63%);touch-action:none}.rich-missing{color:#974d47}
.lesson-group-head{align-items:flex-start}.lesson-group-head strong{font-size:15px;line-height:1.6;flex:1}.lesson-group-head>span{flex:none}.lesson-card{min-height:48px}.lesson-open{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:10px 4px 10px 0}.lesson-filename{font-size:14px;line-height:1.6;font-weight:500;overflow-wrap:anywhere;text-align:left;flex:1;min-width:0}.lesson-filename .latest-tag{margin-left:7px;display:inline-block}.lesson-modified{font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap;flex:none;font-weight:400}.lesson-choice{padding:10px 12px}
#linkForm h2{margin:0 0 14px;font-size:20px}#linkForm label{margin:12px 0}.link-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
@media(max-width:760px){.content-tools{margin:12px 0}.content-tool-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}.content-tool-buttons .btn{font-size:13px}.global-watermark{min-height:40px;padding:8px 10px}.lesson-open{flex-wrap:wrap;gap:2px}.lesson-filename{flex-basis:100%}.lesson-modified{font-size:11px}.lesson-group-head strong{font-size:14px}.save-buttons{height:40px}}

.pdf-page-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.select-all-lessons{display:inline-flex;align-items:center;gap:7px;min-height:40px;margin:0;padding:7px 11px;border:1px solid var(--line);border-radius:7px;background:var(--row);font-size:14px;white-space:nowrap}.select-all-lessons input{width:17px;height:17px;margin:0;padding:0;accent-color:var(--theme)}
.cover-layout{grid-template-columns:minmax(0,1fr) minmax(290px,35%);gap:24px;align-items:stretch}.cover-fields{display:flex;flex-direction:column}.cover-logos{grid-template-columns:1fr;gap:10px;margin-top:auto;padding-top:16px}.logo-upload{flex-wrap:nowrap;padding:10px 12px;gap:12px;min-width:0}.logo-thumb{width:48px;height:48px}.logo-copy{min-width:0}.logo-copy p{margin:2px 0 0}.logo-actions{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto}.cover-preview-wrap{display:flex;flex-direction:column;align-self:stretch;padding:0 14px 14px}.cover-preview-wrap canvas{flex:1;min-height:0;object-fit:contain;object-position:center bottom}.preview-label{font-size:12px}
@media(min-width:1450px){.cover-layout{grid-template-columns:minmax(0,1fr) minmax(310px,35%);gap:28px}}
@media(max-width:1050px){.cover-layout{grid-template-columns:1fr}.cover-preview-wrap{width:100%;max-width:360px;justify-self:center}.cover-preview-wrap canvas{flex:none}.cover-logos{margin-top:0}}
@media(max-width:600px){.logo-upload{flex-wrap:wrap}.logo-copy{min-width:120px}.logo-actions{margin-left:auto}.logo-actions .btn{font-size:12px}}
#fontAccessDialog h2{margin:0 0 14px;font-size:22px}#fontAccessDialog p{line-height:1.8}#fontAccessDialog .section-actions{margin:20px 0 0}
.lesson-export-settings{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;background:var(--row);border:1px solid var(--line);border-radius:7px;padding:10px 13px;margin:-4px 0 16px}.lesson-export-settings strong{font-size:13px;color:var(--muted)}.lesson-export-settings label{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:14px}.lesson-export-settings input{width:16px;height:16px;margin:0;padding:0;accent-color:var(--theme)}
.lesson-export-settings{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;align-items:center}.lesson-export-settings>strong{display:block;flex:none;white-space:nowrap;color:var(--ink);font-size:14px}.lesson-export-settings label{white-space:nowrap;flex:none;gap:4px;font-size:14px}

.module-export-toggle{position:absolute;right:14px;top:12px;display:inline-flex;align-items:center;gap:5px;margin:0;padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:#ffffffcf;font-size:13px;font-weight:600;color:var(--ink);cursor:pointer}.module-export-toggle input{width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--theme)}@media(max-width:650px){.section-title{padding-top:46px}}
