/* Palette based on the user's Guang Hai Ming Yue reference screenshot. */
:root{--ink:#28241f;--muted:#736a59;--green:#776648;--pale:#eee7d9;--line:#c9beaa;--paper:#f4efe5;--gold:#8b7041}
body{background:var(--paper);color:var(--ink)}
header{max-width:none;background:#2d2d2d;border-bottom:4px solid #b1a386;color:#fff;padding-left:max(24px,calc((100vw - 1072px)/2));padding-right:max(24px,calc((100vw - 1072px)/2))}
header a,.brand{color:#f5eee0}.brand-sub{border-color:#9c8c6c;color:#e1d5bf}.seal{background:#ad9d7c;color:#fff9ed;border:1px solid #c6b593;border-radius:3px}.quiet{color:#e6dbc8}
.intro:after{color:#b0a080;border-color:#c9bda7}.eyebrow{color:#927138}.chips span{color:#776647;border-color:#c4b699;background:#eee6d6}
.workspace{background:#faf6ed;border:1px solid #c6b99f;border-radius:5px;box-shadow:0 4px 18px #53442e0c}.step{color:#a48d5f;border-color:#cfc2a9}
.course-picker{background:#eee7d9;border:1px solid #b8a786;border-radius:3px}input,textarea,select{background:#fffdf8;color:#2b251d;border-color:#c7baa1;border-radius:3px}input:focus,textarea:focus,select:focus{outline-color:#a5926a}
.tabs{border-color:#c9bca3}.tabs button[aria-selected=true]{color:#6e5730;border-color:#a88c51}.tabs button:hover{background:#efe7d7}
.primary,.play{background:#a49473;color:#fff;border-radius:3px}.primary:hover,.play:hover{background:#877551}.secondary{background:#e7dfcf;color:#5b4b31;border:1px solid #bbaa88;border-radius:3px}.secondary:hover{background:#dbceb5}
.example{color:#85652d}.action-row,.edit-panel,.transcript,.links-heading{border-color:#cdbfa5}
.original{background:#f0eadf;border:1px solid #c3b69e;border-radius:2px}.context{background:#eee7da;border-radius:2px;color:#393126}.notice{background:#f4ecd9;border-left-color:#b38b39;color:#5a4728}
.link-card{background:#f4efe5;border:1px solid #b6a581;border-radius:3px}.link-url{color:#705a33;background:#e9e0cc}.lesson-badge{color:#fff;background:#ad9d7c;border-radius:3px}
.paragraph{border-color:#d9cfbc}.paragraph .time{color:#8a6c32}.paragraph blockquote{border-color:#a37138;color:#382d1e}.paragraph p{color:#2c2821}
.about details,footer{border-color:#c8bba1}.about .eyebrow,.three>div>span{color:#8b7041}footer{color:#786b54}.unmapped-link{color:#7c5d27}#toast{background:#3b352c;color:#fff5df}#error,#edit-error{background:#f5e7df;color:#8c382b}
@media(max-width:700px){header{padding-left:16px;padding-right:16px}.workspace{border-radius:4px}.link-card{padding:14px}.course-picker select{font-size:16px}}
.primary,.play{background:#86734f}.primary:hover,.play:hover{background:#705e3d}.lesson-badge{color:#332b1d}

footer{flex-wrap:wrap;gap:12px}.maker-credit{margin-left:auto;text-align:right;white-space:nowrap}
@media(max-width:700px){.maker-credit{flex-basis:100%;margin-left:0;text-align:right}}
.maker-credit{font-size:14px;line-height:1.6;color:#786b54;font-weight:400}

.header-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.header-right .maker-credit{font-size:13px;color:#e1d5bf;line-height:1.5;margin:0;white-space:nowrap}.header-right .quiet{font-size:13px}@media(max-width:700px){header{gap:12px}.header-right .maker-credit{font-size:12px}}
@media(max-width:700px){.brand{font-size:18px;flex-shrink:0}.brand-sub{display:block;border-left:0;padding-left:0;margin-left:0;font-size:11px}.header-right .maker-credit{font-size:11px}}

.intro h1{overflow-wrap:anywhere}.title-divider{margin:0 .15em}@media(max-width:700px){.intro h1{font-size:32px}}

.paragraph .time{white-space:pre-line}

/* Latest publication is separate from furthest mapped book progress. */
.teacher-progress{margin:20px 0 24px}.teacher-progress>h3{font-size:18px;margin:0 0 8px}.progress-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.progress-card{border:1px solid #c8b99c;background:#f4efe5;padding:16px;min-width:0}.progress-card.selected{border-color:#8a7851;box-shadow:inset 0 3px #a59370}.progress-card h4{margin:0 0 10px;font-size:17px}.progress-latest{font-weight:700;text-underline-offset:4px}.progress-title{font-size:14px;line-height:1.7;margin:8px 0}.progress-card .hint{line-height:1.8;margin:8px 0}.progress-furthest{font-size:13px;line-height:1.8;padding-top:10px;border-top:1px solid #d6cab5;margin-bottom:0}@media(max-width:760px){.progress-grid{grid-template-columns:1fr}.progress-card{padding:14px}}

.header-right{min-width:0}.header-right .maker-credit{white-space:normal;overflow-wrap:anywhere}@media(max-width:700px){.header-right{flex:1}.header-right .maker-credit{max-width:210px}}

.header-right{gap:7px}.header-right .maker-credit{display:grid;gap:2px;font-size:12px;line-height:1.5;text-align:right}.maker-room{color:#d4bd8f;font-size:12px;letter-spacing:.12em}.maker-byline{color:#ede4d3;white-space:nowrap;font-size:11px;letter-spacing:.02em}.maker-divider{color:#8b806c;padding:0 4px}.header-right .quiet{font-size:11px;color:#c5bba8}@media(max-width:700px){.header-right{gap:4px}.maker-room{font-size:11px;letter-spacing:.06em}.maker-byline{font-size:10px}.maker-divider{padding:0 2px}}

#teacher-result .progress-grid{grid-template-columns:1fr}#teacher-result .teacher-progress{margin-top:24px;padding-top:20px;border-top:1px solid #d6cab5}

.batch-mode-bar,.batch-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}.batch-workspace>label{display:block;font-weight:600;margin:20px 0 8px}.batch-workspace select,.batch-workspace input,.batch-workspace textarea{width:100%;margin-top:8px;padding:12px;border:1px solid #c8b99c;background:#fffdfa;color:#2d2d2d;border-radius:4px;font:inherit}.batch-workspace textarea{resize:vertical}.batch-guide{margin:20px 0;padding:16px;background:#eee7d8;border:1px solid #c8b99c}.batch-guide summary{cursor:pointer;font-weight:600}.batch-example{border-collapse:collapse;width:100%;margin:16px 0;font-size:14px}.batch-example th,.batch-example td{border:1px solid #c8b99c;padding:10px;text-align:left;white-space:pre-line;line-height:1.8}.batch-review-row{display:grid;grid-template-columns:60px 2fr repeat(4,1fr) auto;align-items:end;gap:8px;padding:14px 0;border-bottom:1px solid #d6cab5}.batch-review-row label{font-size:12px;min-width:0}.batch-review-row input{padding:8px}.batch-review-row button{padding:10px}.batch-image{max-width:100%;max-height:300px;object-fit:contain;display:block}.batch-result-link{display:block;padding:12px 0;overflow-wrap:anywhere}.batch-workspace #batch-results{margin-top:24px}.batch-actions button{min-height:44px}@media(max-width:700px){.batch-mode-bar button{flex:1}.batch-review-row{grid-template-columns:repeat(2,minmax(0,1fr))}.batch-review-row>strong,.batch-review-row>label:first-of-type{grid-column:1/-1}.batch-example{font-size:12px}.batch-example td,.batch-example th{padding:8px}.batch-actions button{flex:1 1 140px}}

.batch-example-image{display:block;width:100%;height:auto;margin:18px 0;border:1px solid #c8b99c;background:white}

.batch-row-warning{grid-column:1/-1;margin:4px 0;white-space:pre-line}

.batch-mode-bar button[aria-pressed=true]{background:#8a7851;color:white;border-color:#8a7851}

.batch-drop-zone{display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;min-height:130px;margin:14px 0;padding:22px;border:2px dashed #ad986b;border-radius:8px;background:#f4efe4;color:#594b32;text-align:center;cursor:pointer;overflow-wrap:anywhere}.batch-drop-zone span{font-size:14px;color:#786b54}.batch-drop-zone:hover,.batch-drop-zone.is-dragging{background:#eae0cb;border-color:#80693b}.batch-drop-zone:focus-visible{outline:3px solid #80693b;outline-offset:3px}

#result .edit-panel>h3,#result>.links-heading>h3{font-size:clamp(1.35rem,2.5vw,1.6rem);font-weight:800;line-height:1.45;color:#2d2d2d;}

#result>.links-heading:first-child{margin-top:0;}#result>.links-heading:first-child>h3{margin:0;}

#nv-result>.links-heading:first-child,#teacher-result>.links-heading:first-child{margin-top:0;}#nv-result>.links-heading:first-child>h3,#teacher-result>.links-heading:first-child>h3{margin:0;font-size:clamp(1.35rem,2.5vw,1.6rem);font-weight:800;}

#nv-page-lines{max-height:300px;overflow:auto;}#nv-result .nv-playback>h3,#nv-result .nv-time-editor>h3{font-size:clamp(1.35rem,2.5vw,1.6rem);font-weight:800;}

header{height:auto;min-height:100px;padding-top:16px;padding-bottom:16px;}.header-links{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:5px 14px;}.header-right .header-links a{font-size:12px;color:#e1d0ae;text-decoration:none;white-space:nowrap;}.header-links a:hover{text-decoration:underline;text-underline-offset:4px;}@media(max-width:700px){header{min-height:100px;}.header-links{gap:4px 10px;}.header-right .header-links a{font-size:11px;}}

#original-text,#nv-original,#teacher-original,#nv-page-lines .context{white-space:pre-wrap;line-height:2.1;font-family:serif;font-size:18px;}#original-text,#nv-original,#teacher-original{max-height:300px;overflow:auto;}@media(max-width:700px){#original-text,#nv-original,#teacher-original,#nv-page-lines .context{font-size:17px;}}

.feature-link{display:inline-flex;align-items:center;justify-content:center;padding:11px 17px;font-size:14px;text-decoration:none;min-height:44px}

.batch-time-editor{margin-top:20px;padding-top:15px;border-top:1px solid var(--line)}.batch-time-editor summary{cursor:pointer;font-weight:700}.batch-time-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.batch-time-fields label{font-size:14px}.batch-time-fields input{width:100%;padding:12px;margin-top:8px}@media(max-width:650px){.batch-time-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

.paper-reference{font-size:15px;font-weight:400;line-height:1.85;color:#655437;white-space:pre-line;overflow-wrap:anywhere;border-left:3px solid #ad9360;border-radius:0 5px 5px 0;background:rgba(173,147,96,.08);padding:9px 13px;margin:12px 0;}

.paper-reference strong{font-weight:700;color:#25231f;}

/* Keep initial course metadata stable while the live status refreshes. */
.sync-row{min-height:4.4em;align-items:center;}#sync-status{line-height:1.8;}

/* Fixed independent rows: network status never changes the surrounding layout. */
#sync-status{display:grid;grid-template-rows:26px 52px;flex:1;min-width:0;line-height:26px;}
#sync-progress,#sync-detail{display:block;overflow:auto;overflow-wrap:anywhere;scrollbar-width:thin;}
.sync-row{min-height:78px;}
@media(max-width:700px){#sync-status{width:100%;flex:none;grid-template-rows:52px 78px;}.sync-row{min-height:186px;}}

#original-search-form,section.workspace{scroll-margin-top:16px;}

/* Readable narrow-screen schedule; all columns stack without horizontal scrolling. */
@media(max-width:1024px){.batch-guide>.batch-example-image{display:none;}.batch-guide>.batch-example[hidden]{display:block!important;width:100%;font-size:17px;margin:16px 0;}.batch-example tr{display:block;background:#fffdf8;border:1px solid #c8b99c;border-radius:5px;margin-bottom:16px;overflow:hidden;}.batch-example tr:first-child{display:none;}.batch-example td{display:block;border:0;padding:10px 14px;white-space:pre-line;overflow-wrap:anywhere;line-height:1.9;}.batch-example td+td{border-top:1px solid #e2d8c6;}.batch-example td:before{content:attr(data-label);display:block;font-size:14px;color:#786b54;line-height:1.6;margin-bottom:3px;}.batch-example td:first-child{background:#eee7d9;font-weight:700;font-size:18px;}}

.return-search{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:50;min-height:48px;padding:12px 18px;border:1px solid #685735;border-radius:999px;background:#796741;color:#fff;font-size:16px;font-weight:700;box-shadow:0 3px 12px #0003;cursor:pointer;}.return-search:hover{background:#645330;}.return-search:focus-visible{outline:3px solid #bda36c;outline-offset:3px;}

.batch-row-warning,.batch-result-error,#error,#edit-error,#nv-edit-error{font-weight:900;color:#000;font-size:clamp(18px,2vw,21px);line-height:1.8;background:#fff0d8;border-left:5px solid #302514;padding:16px;}
