:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Noto Sans CJK SC",sans-serif;color:#202d29;background:#f6f8f7;font-synthesis:none;--green:#31634e;--line:#e1e8e3;--muted:#75837b;--paper:#fff}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,.file-label{cursor:pointer}button{border:0;background:none;color:inherit;transition:background .15s}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #73a58a;outline-offset:3px}button:hover:not(:disabled),.file-label:hover{filter:brightness(.96)}[hidden]{display:none!important}#app{display:grid;grid-template-columns:254px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--line);padding:30px 16px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{font-family:Georgia,"Songti SC",serif;font-size:35px;color:#254b3b;text-decoration:none;letter-spacing:5px;padding-left:14px;font-weight:600}.brand span{color:#6f947d}.brand small{display:block;font-family:inherit;font-weight:400;letter-spacing:2px;font-size:12px;margin-top:5px;color:var(--muted)}.sidebar nav{padding:32px 0 24px;border-bottom:1px solid var(--line)}.nav{display:flex;align-items:center;width:100%;text-align:left;padding:13px 14px;border-radius:7px;font-size:14px;margin:3px 0;color:#68786f}.nav.active{color:#315f49;background:#eaf2ed;font-weight:600}.nav span{margin-left:auto;background:#fff;border-radius:4px;padding:0 5px}.course-head{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);padding:8px 12px 12px}.lessons{overflow-y:auto;flex:1;scrollbar-width:thin}.lesson{display:flex;width:100%;gap:10px;padding:12px 10px;text-align:left;border-radius:7px;margin-bottom:3px;align-items:center;color:#66766c;font-size:13px}.lesson .num{font-variant-numeric:tabular-nums;font-size:12px;color:#8e9b92;min-width:21px}.lesson .desc{min-width:0;flex:1}.lesson small{display:block;font-size:11px;color:#7b8e81;margin-top:5px}.lesson.active{background:#eef4ef;color:#29553e;font-weight:600}.lesson .check{font-size:13px;color:#407e57}.sidebar footer{padding:17px 12px 0;color:#627268;font-size:12px;border-top:1px solid var(--line);margin-top:14px}.sidebar footer span{display:block;color:#94a197;font-size:11px;margin-top:5px}main{padding:0 34px 24px;min-width:0}.topbar{height:80px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.topbar>div:first-child{display:flex;gap:22px;align-items:center}.eyebrow{font-size:11px;letter-spacing:1.7px;color:#7c8b82}.topbar #save-state{color:#8a978e;font-size:11px}.header-actions{display:flex;gap:8px;align-items:center}.quiet{padding:7px 8px;font-size:12px;color:#6d7d73;border-radius:5px}.title-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:28px 0 25px}h1{font-size:27px;font-weight:550;letter-spacing:.3px;margin:8px 0 10px}.subtitle{font-size:13px;color:var(--muted);margin:0}p.eyebrow{margin:0}button.primary,.primary.file-label{background:var(--green);color:#fff;padding:10px 16px;border-radius:6px;font-size:13px;display:inline-block}.outline{border:1px solid #cbd8ce;border-radius:6px;padding:9px 13px;color:#4d6858;font-size:13px}.workspace{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:24px;align-items:start}.workspace.video{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}.workspace.material{grid-template-columns:minmax(0,1fr) minmax(0,1.45fr)}.video-shell{background:#e5ede7;border:1px solid #dbe5dd;border-radius:10px;aspect-ratio:16/10;overflow:hidden;display:flex;align-items:center;justify-content:center}video{width:100%;height:100%;background:#14221b}.video-empty{text-align:center;color:#567461;padding:24px}.video-symbol{background:#d4e1d7;border:1px solid #c7d7cc;border-radius:50%;display:inline-grid;place-items:center;width:54px;height:54px;color:#42654d;padding-left:3px}.video-empty h2{font-size:20px;font-weight:500;margin:18px 0 8px}.video-empty p{font-size:13px;margin:0 0 20px}.video-empty small{display:block;color:#829587;font-size:11px;margin-top:13px}.player-toolbar{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;align-items:center;padding:12px 0 10px;border-bottom:1px solid var(--line)}.player-toolbar>div{display:flex;gap:5px;align-items:center}.player-toolbar button,.player-toolbar select{font-size:12px;padding:7px 8px;border-radius:5px;color:#587461}.player-toolbar select{border:1px solid var(--line);background:#fff}.player-toolbar #bookmark{background:#eaf0ec;color:#3e6c51}.video-meta{display:flex;justify-content:space-between;padding:10px 0 22px;font-size:11px;color:#89978d}.text-button{color:#4d775c;font-size:12px}.note-composer{padding:19px;background:#fff;border:1px solid var(--line);border-radius:9px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}h2{font-size:15px;font-weight:550;margin:0}.section-heading span{font-size:11px;color:var(--muted)}textarea{width:100%;resize:vertical;border:0;background:#f7f9f7;border-radius:5px;padding:13px;min-height:100px;color:#324b3b;font-size:14px;line-height:1.7}textarea::placeholder{color:#9aa69e}.composer-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px}.composer-bottom>span{font-size:11px;color:#96a198}.session-tip{padding:22px 3px}.session-tip span{font-size:11px;letter-spacing:1px;color:#79937f}.session-tip p{font-size:12px;color:#8b988f;line-height:1.8;margin:7px 0 0}.materials{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;min-width:0}.material-tabs{display:flex;align-items:center;border-bottom:1px solid var(--line);padding:0 18px;gap:17px}.material-tabs button{padding:17px 2px 14px;border-bottom:2px solid transparent;color:#839087;font-size:13px;white-space:nowrap}.material-tabs button[aria-selected=true]{border-color:var(--green);color:var(--green);font-weight:600}.material-tabs span{font-size:11px;background:#f0f4f1;padding:2px 5px;border-radius:4px;margin-left:2px}#material-content{min-height:490px}.material-tools{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid #edf0ed;font-size:11px;color:#8c988f;gap:10px;flex-wrap:wrap}.segmented{display:flex;background:#f3f6f3;border-radius:5px;padding:3px;gap:2px}.segmented button{font-size:11px;padding:5px 8px;border-radius:3px;color:#7f8d83}.segmented button.selected{background:#fff;color:#3a674b;box-shadow:0 1px 3px #1e3b2512}.exercise-body{padding:20px}.exercise-intro{display:flex;align-items:center;justify-content:space-between;gap:10px}.exercise-intro h2{font-size:17px}.page-link{font-size:11px;color:#76907f}.practice-help{font-size:12px;color:#98a39c;line-height:1.7;margin:8px 0 18px}.question-card{border:1px solid #dce6de;border-radius:8px;padding:23px 18px;background:#fcfdfb}.question-meta{display:flex;justify-content:space-between;color:#85978b;font-size:11px}.question-prompt{font-family:"Noto Sans CJK JP","Hiragino Kaku Gothic ProN",sans-serif;font-size:27px;margin:23px 0;line-height:1.7;overflow-wrap:anywhere}.question-card textarea{font-size:14px;min-height:66px;margin-bottom:15px}.question-actions{display:flex;gap:8px;flex-wrap:wrap}.question-actions button{font-size:12px}.answer{margin:18px 0;padding:15px;background:#ecf3ed;border-radius:6px}.answer small{font-size:11px;color:#738d7a;display:block;margin-bottom:6px}.answer p{margin:0;font-size:19px;overflow-wrap:anywhere;line-height:1.8}.answer .self-check{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.self-check button{font-size:12px;padding:6px 9px;border:1px solid #c9dace;border-radius:4px}.self-check button.selected{background:#d7e7da}.question-nav{display:flex;justify-content:space-between;align-items:center;margin:17px 0 0;font-size:12px;color:#7e9184}.question-nav button{border:1px solid var(--line);border-radius:5px;padding:6px 12px}.sample-caption{font-size:11px;line-height:1.8;color:#98a49b;margin:18px 0 0}.pdf-frame{width:100%;height:610px;border:0;background:#f1f4f1}.pdf-nav{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.pdf-nav input{width:48px;padding:5px;border:1px solid var(--line);border-radius:4px}.pdf-nav button{padding:5px;font-size:12px;color:#486c53}.empty-panel{padding:55px 28px;text-align:center;color:#839489}.empty-panel h2{font-size:18px;color:#4c6e56;margin-bottom:14px}.empty-panel p{font-size:13px;line-height:1.9;margin-bottom:20px}.note-entry{padding:18px 20px;border-bottom:1px solid var(--line)}.note-entry p{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;margin:10px 0}.note-entry small{font-size:11px;color:#8b9a8f}.note-actions{display:flex;gap:10px;align-items:center}.note-actions button{font-size:12px;color:#527a5d;padding:5px 0}.note-actions .delete{margin-left:auto;color:#9b7974}.bottom-bar{display:flex;justify-content:space-between;align-items:center;margin-top:18px}.layouts{display:flex;gap:7px}.layouts button{padding:6px 10px;font-size:11px;color:#8b9b90;border-radius:5px}.layouts button.selected{background:#e6eee7;color:#4a7355}.review-card{background:#fff;border:1px solid var(--line);border-radius:9px;padding:23px;margin:12px 0}.review-card h2{margin:10px 0}.review-card p{font-size:15px;line-height:1.8;white-space:pre-wrap}.review-card small{color:#86978b;font-size:12px}.review-answer{padding:14px;background:#edf4ee;border-radius:6px;font-size:18px}.review-card button{margin:8px 8px 0 0}.focus-mode #app{grid-template-columns:1fr}.focus-mode .sidebar{display:none}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#284d39;color:#fff;padding:12px 22px;border-radius:7px;font-size:13px;box-shadow:0 5px 30px #14372020;opacity:0;pointer-events:none;transition:opacity .15s;z-index:5}#toast.visible{opacity:1}@media(max-width:1150px){main{padding:0 22px 24px}.workspace{gap:17px}#app{grid-template-columns:222px minmax(0,1fr)}.topbar #save-state{display:none}.header-actions{gap:0}.quiet{font-size:11px}.composer-bottom>span{display:none}}@media(max-width:900px){.workspace,.workspace.video,.workspace.material{grid-template-columns:1fr}.sidebar{width:200px}#app{grid-template-columns:200px minmax(0,1fr)}.topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:12px 0}.title-row{align-items:flex-start}h1{font-size:23px}.header-actions{flex-wrap:wrap}}@media(max-width:600px){#app{grid-template-columns:1fr}.sidebar{position:static;width:auto;height:auto}.lessons{max-height:180px}.sidebar .brand,nav,.level,.sidebar footer{display:none}main{padding:0 14px 20px}.title-row{padding:20px 0}.title-row .outline{white-space:nowrap}.subtitle{font-size:12px}}

.file-label { position: relative; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-label:focus-within { outline: 3px solid #73a58a; outline-offset: 3px; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.page-link, .text-button { text-decoration: underline; text-underline-offset: 3px; }
.question-nav select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #41634d; }
@media (max-height: 760px) { .sidebar { padding-top: 18px; } .sidebar nav { padding-top: 18px; padding-bottom: 12px; } }
.pdf-page { padding: 10px; background: #e9eeeb; overflow: auto; max-height: min(70vh, 820px); min-height: 280px; }
.pdf-page canvas { display: block; margin: 0 auto; background: #fff; }
.pdf-loading { color: #51655a; margin: 12px; }
.pdf-zoom { color: #486c53; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 5px; }
.handout-contents { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px; }
.handout-contents button { padding: 5px 9px; }
.answer .answer-note, .review-answer .answer-note { display: block; font-size: 12px; margin-top: 8px; }
.guide { padding: 16px 18px; }
.guide-section + .guide-section { margin-top: 24px; }
.guide-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.guide-table { width: 100%; border-collapse: collapse; margin: 10px 0; text-align: left; }
.guide-table th, .guide-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.guide-table th { color: #597465; background: #edf3ef; font-size: 12px; }
.guide-table td { font-size: 15px; }
.guide-example { padding: 10px 12px; background: #f6f8f6; border-radius: 6px; }
.guide-example p { margin: 5px 0; line-height: 1.6; font-size: 14px; }
.guide-example button { padding-left: 0; }
@media (max-width: 600px) { .handout-contents { display: flex; } }

.sidebar-brand { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.directory-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border: 1px solid #dbe6de;
  border-radius: 7px;
  background: #fff;
  color: #315f49;
  font-size: 12px;
  white-space: nowrap;
}
.directory-toggle:hover { background: #edf5ef; border-color: #b6cdbc; }
.sidebar-brand .directory-toggle { margin-top: 2px; }
.directory-icon { display: block; position: relative; width: 15px; height: 13px; border: 1.5px solid currentColor; border-radius: 3px; }
.directory-icon::before { content: ""; position: absolute; inset: 0 auto 0 4px; border-left: 1.5px solid currentColor; }
.brand small:lang(ja) { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; letter-spacing: .12em; }
.question-prompt:lang(zh-CN) { font-family: inherit; }
.guide-table td:lang(ja), .guide-example p:lang(ja), .question-prompt:lang(ja), .answer p:lang(ja), .review-answer:lang(ja), .session-tip span:lang(ja) {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}
.guide-table td:lang(ja), .guide-example p:lang(ja), .answer p:lang(ja), .review-answer:lang(ja) { letter-spacing: .015em; }
.question-prompt:lang(ja) { letter-spacing: .02em; }
@media (max-width: 600px) {
  .sidebar-brand { justify-content: flex-end; }
  .sidebar-brand .directory-toggle { margin-top: 0; }
}

.library-notice {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #cbd8ce;
  border-radius: 7px;
  background: #f0f5f0;
}
.library-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.library-notice h2 { margin: 0; font-size: 15px; font-weight: 650; }
.library-notice p { margin: 5px 0 0; color: #4d6858; font-size: 13px; line-height: 1.6; }
.library-notice a { text-decoration: none; }
.library-notice a.primary { display: inline-block; padding: 10px 16px; border-radius: 6px; background: var(--green); color: white; font-size: 13px; }
.library-notice details { margin-top: 12px; color: #4d6858; font-size: 13px; }
.library-notice details[open] { padding-top: 10px; border-top: 1px solid #d9e4dc; }
.library-notice summary { width: fit-content; cursor: pointer; }
.library-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px; }
.library-notice details p a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.library-connected { display: inline-flex; align-items: center; gap: 6px; color: #365f4b; font-size: 12px; white-space: nowrap; }
.library-connected::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.manual-materials { padding: 0 20px 20px; font-size: 13px; color: #527160; }
.manual-materials summary { cursor: pointer; margin-bottom: 12px; }
.manual-materials label { display: inline-block; margin-right: 6px; }

#learning { container: learning / inline-size; }
#workspace {
  grid-template-columns: minmax(0, var(--video-pane, 1.45fr)) 20px minmax(0, var(--material-pane, 1fr));
  gap: 0;
}
.pane-toolbar { display: flex; justify-content: flex-end; min-height: 32px; align-items: center; }
.materials > .pane-toolbar { padding-inline: 12px; border-bottom: 1px solid var(--line); }
.course-switcher { padding: 18px 12px 12px; }
.course-switcher-title { display: block; margin-bottom: 9px; color: #52665b; font-size: 12px; font-weight: 600; }
.course-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.course-level { min-height: 35px; padding: 6px 4px; border: 1px solid #e1e8e3; border-radius: 6px; color: #52665b; background: #fbfcfb; font-size: 13px; transition: none; }
.course-level[aria-pressed="false"]:hover:not(:disabled) { border-color: #9db8a8; background: #f0f6f2; }
.course-level[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: #fff; font-weight: 650; }
.course-level-status { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pending-course { padding-block: 28px; }
.pending-course .text-button { display: inline-block; margin-top: 12px; }
.material-tabs { flex-wrap: wrap; column-gap: clamp(8px, 1vw, 17px); }
.material-caption { margin: 0; padding: 10px 18px; color: #55685d; font-size: 12px; line-height: 1.5; }
.test-response { padding: 9px 18px; color: #55685d; font-size: 13px; }
.test-response summary { cursor: pointer; }
.test-response textarea { display: block; width: 100%; margin-top: 8px; padding: 8px; color: inherit; border: 1px solid #cbd8ce; border-radius: 5px; resize: vertical; }
#pane-divider {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 200px;
  cursor: col-resize;
  touch-action: none;
}
#pane-divider::after {
  content: '';
  width: 3px;
  height: 38px;
  border-radius: 4px;
  background: #bccbc1;
}
#pane-divider:hover::after, #pane-divider:focus-visible::after { background: var(--green); }
.resizing-panes, .resizing-panes * { cursor: col-resize !important; user-select: none; }
#workspace[data-expanded="video"], #workspace[data-expanded="material"] { grid-template-columns: 1fr; }
#workspace[data-expanded="video"] .materials,
#workspace[data-expanded="material"] .video-column,
#workspace[data-expanded]:not([data-expanded=""]) #pane-divider { display: none; }
#workspace[data-expanded="video"] .video-shell { max-height: 75vh; }
#workspace[data-expanded="material"] .pdf-page { max-height: 78vh; }
@container learning (max-width: 690px) {
  #workspace { grid-template-columns: 1fr; row-gap: 18px; }
  #pane-divider { display: none; }
}

.video-empty #tg-video-status { margin-block: 8px; }
.video-empty #get-tg-video:not([hidden]) { margin-right: 5px; }
.review-card .review-delete { color: #8a3f38; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.review-card .review-delete:hover { background: #f8eeec; }
#toast.visible .toast-undo { pointer-events: auto; margin-left: 12px; padding: 2px 4px; color: white; text-decoration: underline; text-underline-offset: 2px; }
