/* Console palette: Radix Slate + Indigo. Student reading themes stay independent. */
.supervision-panel { margin-bottom:24px; }
.supervision-heading { display:flex;align-items:center;justify-content:space-between;gap:16px; }
.supervision-heading h3,.supervision-panel h4 { margin:0 0 6px; }
.supervision-panel h4 { font-size:20px; }
.supervision-totals { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0; }
.supervision-totals>div { padding:14px;background:var(--ops-canvas);border:1px solid var(--ops-border);border-radius:12px; }
.supervision-totals small,.supervision-totals strong { display:block; }.supervision-totals strong{font-size:22px;margin-top:6px;}
.supervision-preview { margin-top:14px;padding:16px;border:1px solid var(--ops-border);border-radius:12px;background:var(--ops-canvas); }
.supervision-preview img { display:block;max-width:100%;max-height:70vh;margin:12px auto 0;object-fit:contain; }
.supervision-preview img[hidden] { display:none; }
@media(max-width:600px){.supervision-totals{grid-template-columns:1fr;gap:8px}.supervision-totals>div{display:flex;justify-content:space-between;align-items:center}.supervision-totals strong{margin:0;font-size:18px}.supervision-heading{align-items:flex-start;}.supervision-panel{padding:16px;}}
body:not(.student-mode) {
  --ops-ink: #1c2024;
  --ops-muted: #60646c;
  --ops-canvas: #f9f9fb;
  --ops-surface: #fff;
  --ops-border: #e0e1e6;
  --ops-teal: #3e63dd;
  --ops-teal-dark: #3358d4;
  --ops-teal-soft: #edf2fe;
  --ops-cyan: #3e63dd;
  --ops-red: #b42336;
  --ops-red-soft: #fff0f1;
  --ops-gold: #946800;
  --ops-gold-soft: #fff7df;
  --console-link: #3a5bc7;
  --console-hover: #f0f0f3;
  --console-input-border: #d4d5de;
  --console-page: #fff;
  --console-sidebar: #f9f9fb;
  --console-row-hover: #f3f4ff;
  --console-icon-bg: #eef0ff;
  --console-icon-ink: #565e9c;
  color-scheme: light;
  color: var(--ops-ink);
  background: var(--ops-canvas);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}
html[data-console-theme="dark"] body:not(.student-mode) {
  --ops-ink: #edeef0;
  --ops-muted: #b0b4ba;
  --ops-canvas: #111113;
  --ops-surface: #18191b;
  --ops-border: #2b2d33;
  --ops-teal-soft: #222841;
  --ops-teal-dark: #3358d4;
  --ops-cyan: #9eb1ff;
  --ops-red: #ff959f;
  --ops-red-soft: #3b181f;
  --ops-gold: #f0c96d;
  --ops-gold-soft: #332916;
  --console-link: #9eb1ff;
  --console-hover: #212225;
  --console-input-border: #3a3d45;
  --console-page: #111113;
  --console-sidebar: #18191b;
  --console-row-hover: #1e2235;
  --console-icon-bg: #222638;
  --console-icon-ink: #aebbff;
  color-scheme: dark;
}

body:not(.student-mode) :is(button, input, textarea, select, summary, a):focus-visible {
  outline: 3px solid var(--ops-cyan);
  outline-offset: 3px;
}
body:not(.student-mode) :is(label, h2, h3, .row-title) { color: var(--ops-ink); }
body:not(.student-mode) :is(.muted, .notice, .row-meta, .empty, .document-copy p, .document-copy small) { color: var(--ops-muted); }
body:not(.student-mode) a { color: var(--console-link); text-underline-offset: 3px; }
body:not(.student-mode) :is(input, textarea, select) {
  border-color: var(--console-input-border);
  border-radius: 8px;
  background: var(--ops-surface);
  color: var(--ops-ink);
}
body:not(.student-mode) :is(input, textarea, select):hover { border-color: var(--ops-muted); }
body:not(.student-mode) :is(input, textarea, select):focus { border-color: var(--ops-cyan); background: var(--ops-surface); }
body:not(.student-mode) :is(input, textarea)::placeholder { color: var(--ops-muted); opacity: 1; }
body:not(.student-mode) input[type="file"]::file-selector-button { background: var(--console-hover); color: var(--ops-ink); border-radius: 5px; }
body:not(.student-mode) button { border-radius: 8px; font-weight: 600; }
body:not(.student-mode) button:is(.secondary, .quiet) { border-color: var(--ops-border); color: var(--ops-ink); background: var(--ops-surface); }
body:not(.student-mode) button:is(.secondary, .quiet):hover { border-color: var(--console-input-border); color: var(--console-link); background: var(--console-hover); }
body:not(.student-mode) button.danger { color: var(--ops-red); border-color: var(--ops-border); background: var(--ops-surface); }
body:not(.student-mode) button.danger:hover { border-color: var(--ops-red); background: var(--ops-red-soft); }
body:not(.student-mode) :is(.tag, .document-format) { border: 0; border-radius: 6px; color: var(--console-link); background: var(--ops-teal-soft); }
body:not(.student-mode) .tag.gold { color: var(--ops-gold); background: var(--ops-gold-soft); }
body:not(.student-mode) .tag.red { color: var(--ops-red); background: var(--ops-red-soft); }
body:not(.student-mode) .eyebrow { font-family: inherit; color: var(--console-link); letter-spacing: .06em; }

/* Four primary destinations, with the active section expanded in the sidebar. */
.console-brand-icon { display: none; }
.student-mode .console-topbar-main { display: contents; }
.student-mode #logout .console-icon { display: none; }
body:not(.student-mode) .management-console:not(.hidden) {
  grid-template-columns: 216px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  width: 100%; max-width: 1800px; min-height: 100dvh;
  margin: 0 auto; border: 0; border-radius: 0; box-shadow: none;
  background: var(--console-page); overflow: visible;
}
body:not(.student-mode) .management-console .topbar {
  position: sticky; top: 0; z-index: 10; grid-column: 1 / -1; grid-row: 1;
  display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 0;
  min-height: 72px; padding: 0; background: var(--console-page);
  border-bottom: 1px solid var(--ops-border); color: var(--ops-ink);
}
body:not(.student-mode) .topbar-brand { height: 100%; gap: 12px; padding: 0 24px; background: var(--console-sidebar); border-right: 1px solid var(--ops-border); }
body:not(.student-mode) :is(.topbar-mark, .login-brand-mark) { border: 0; padding: 0; background: transparent; }
:is(.topbar-mark, .login-brand-mark) img { display: block; width: 100%; height: 100%; }
body:not(.student-mode) .topbar-mark { width: 32px; height: 32px; }
body:not(.student-mode) .topbar-mark img { display: none; }
body:not(.student-mode) .console-brand-icon { display: block; width: 32px; height: 32px; fill: none; stroke: var(--console-link); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
body:not(.student-mode) .topbar h1 { color: var(--ops-ink); font-size: 20px; letter-spacing: -.4px; white-space: nowrap; }
body:not(.student-mode) :is(.topbar .eyebrow, .topbar-copy, .account-actions .role-chip) { display: none; }
body:not(.student-mode) .console-topbar-main { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 20px; padding: 0 36px; }
body:not(.student-mode) .console-breadcrumb { display: flex; min-width: 0; align-items: center; gap: 14px; font-size: 13px; color: var(--ops-muted); white-space: nowrap; }
body:not(.student-mode) .console-breadcrumb strong { color: var(--ops-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
body:not(.student-mode) .account-actions { gap: 16px; flex-wrap: nowrap; flex-shrink: 0; }
body:not(.student-mode) .student-picker > span { color: var(--ops-muted); font-size: 13px; }
body:not(.student-mode) .student-select { min-width: 132px; height: 40px; background: var(--console-page); color: var(--ops-ink); border-color: var(--ops-border); }
body:not(.student-mode) .topbar button.quiet { background: transparent; color: var(--ops-muted); border-color: transparent; }
body:not(.student-mode) .topbar button.quiet:hover { color: var(--console-link); background: var(--console-hover); }
body:not(.student-mode) :is(#theme-toggle, #menu-toggle, #logout) { width: 40px; min-width: 40px; height: 40px; padding: 9px; font-size: 0; flex-shrink: 0; }
body:not(.student-mode) .management-console .tabs {
  position: sticky; top: 72px; align-self: start; grid-column: 1; grid-row: 2;
  height: calc(100dvh - 72px); overflow-y: auto;
  background: var(--console-sidebar); border-right: 1px solid var(--ops-border);
  padding: 30px 18px 18px; gap: 8px;
}
body:not(.student-mode) .nav-label { margin: 0 12px 16px; color: var(--ops-muted); font-family: inherit; font-size: 12px; font-weight: 500; }
body:not(.student-mode) .tabs .nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px; background: transparent; color: var(--ops-muted); border: 0; border-radius: 8px; font-size: 14px; text-align: left; font-weight: 500; }
body:not(.student-mode) .tabs .nav-item:hover { background: var(--console-hover); color: var(--ops-ink); }
body:not(.student-mode) .tabs .nav-item.active { background: var(--ops-teal-soft); color: var(--console-link); font-weight: 600; }
.nav-item svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
body:not(.student-mode) #workspace-navigation { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 14px 22px; padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--ops-border); background: transparent; }
body:not(.student-mode) .workspace-subnav .tab { width: 100%; min-height: 36px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ops-muted); font-size: 13px; text-align: left; font-weight: 500; }
body:not(.student-mode) .workspace-subnav .tab:hover { background: var(--console-hover); color: var(--ops-ink); }
body:not(.student-mode) .workspace-subnav .tab.active { color: var(--console-link); font-weight: 600; background: var(--ops-teal-soft); }
body:not(.student-mode) .workspace-subnav[hidden], .workspace-subnav [hidden] { display: none !important; }
body:not(.student-mode) .sidebar-account { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--ops-border); color: var(--ops-muted); font-size: 13px; }
body:not(.student-mode) .account-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--console-hover); }
body:not(.student-mode) .account-avatar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
body:not(.student-mode) #console-account-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.student-mode) #console-logout-slot button { border: 0; background: transparent; color: var(--ops-muted); }
body:not(.student-mode) #console-logout-slot button:hover { background: var(--console-hover); color: var(--ops-ink); }
body:not(.student-mode) .management-console > main { grid-column: 2; grid-row: 2; width: 100%; max-width: 1320px; justify-self: center; padding: 34px 36px 48px; background: var(--console-page); }
body:not(.student-mode) .workspace-header { margin-bottom: 24px; align-items: center; gap: 16px; }
body:not(.student-mode) .workspace-header h2 { font-size: 32px; font-weight: 650; letter-spacing: -.7px; }
body:not(.student-mode) .workspace-header p { max-width: 65ch; color: var(--ops-muted); }
body:not(.student-mode) .workspace-actions button { white-space: nowrap; min-height: 44px; padding: 11px 18px; }
body:not(.student-mode) .management-console main > .management-disclosure { margin-top: 16px; }
body:not(.student-mode) .section-tabs { gap: 26px; border-bottom: 1px solid var(--ops-border); margin-bottom: 20px; }
body:not(.student-mode) .section-tabs button { padding: 13px 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ops-muted); font-size: 14px; font-weight: 500; }
body:not(.student-mode) .section-tabs button:hover { background: transparent; color: var(--console-link); }
body:not(.student-mode) .section-tabs button.selected { background: transparent; border-bottom-color: var(--console-link); color: var(--console-link); font-weight: 600; }

/* Shared surfaces, lists, and forms use the same tokens in both themes. */
body:not(.student-mode) :is(.panel, .metric, .subject-card, .device-actions, .management-disclosure, .exam-paper-compose, .exam-paper-list, .poetry-library, .writing-review-library, .writing-review-history, .writing-review-images-section, .writing-review-feedback) {
  background: var(--ops-surface); border-color: var(--ops-border); border-radius: 12px; box-shadow: none;
}
body:not(.student-mode) .panel { padding: 24px; }
body:not(.student-mode) :is(.panel-header, .row, .learning-document-row, .course-video-disclosure-body, .course-video-row-body) { border-color: var(--ops-border); }
body:not(.student-mode) .row:hover { background: var(--ops-canvas); }
body:not(.student-mode) .management-disclosure > summary { padding: 17px 20px; }
body:not(.student-mode) .management-disclosure > summary:hover { background: var(--ops-canvas); border-radius: 12px; }
body:not(.student-mode) .disclosure-indicator { color: var(--console-link); }
body:not(.student-mode) .management-disclosure-body { padding: 22px; }
body:not(.student-mode) .row-management > summary { border-color: var(--ops-border); color: var(--ops-muted); border-radius: 7px; }
body:not(.student-mode) .library-toolbar { grid-template-columns: minmax(0, 1fr) 130px 130px auto; gap: 16px; }
body:not(.student-mode) .library-search input { background: var(--ops-surface); }
body:not(.student-mode) .library-catalog .row { gap: 16px; padding: 22px 0; }
body:not(.student-mode) .material-library-row::before { content: attr(data-subject); display: grid; place-items: center; width: 44px; height: 54px; flex: 0 0 44px; background: var(--ops-teal-soft); border-left: 3px solid var(--ops-cyan); border-radius: 4px 8px 8px 4px; color: var(--console-link); font-size: 13px; }
body:not(.student-mode) .material-library-row .row-title { font-size: 16px; font-weight: 600; }
body:not(.student-mode) .material-labels { color: var(--ops-muted); }
body:not(.student-mode) .material-toc-status { color: var(--ops-muted); }
body:not(.student-mode) .document-upload-panel h3 { color: var(--ops-ink); }
body:not(.student-mode) .document-file-picker { background: var(--ops-canvas); border-color: var(--console-input-border); }
body:not(.student-mode) .document-format.is-pdf { color: var(--console-link); background: var(--ops-teal-soft); }
body:not(.student-mode) .document-format.is-word { color: var(--ops-ink); background: var(--console-hover); }
body:not(.student-mode) .document-actions a { color: var(--console-link); }
body:not(.student-mode) .empty { border: 0; padding: 24px 0; }
body:not(.student-mode) .course-video-row-disclosure { background: var(--ops-surface); border-color: var(--ops-border); }
body:not(.student-mode) .course-video-row-disclosure > summary::before { color: var(--console-link); }
body:not(.student-mode) :is(.material-video-form, .exam-paper-notes, .exam-history-summary) { background: var(--ops-canvas); border-color: var(--ops-border); }
body:not(.student-mode) .storage-groups > div { color: var(--ops-ink); background: var(--ops-surface); }
body:not(.student-mode) .note-backup-links a { border-color: var(--ops-border); color: var(--console-link); }
body:not(.student-mode) .device-status { background: var(--ops-surface); border-radius: 12px; box-shadow: none; color: var(--ops-ink); }
body:not(.student-mode) .device-status.is-locked { border-color: var(--ops-border); background: var(--ops-teal-soft); }
body:not(.student-mode) .device-status h3 { color: var(--ops-ink); }
body:not(.student-mode) .device-status p { color: var(--ops-muted); }
body:not(.student-mode) .device-status.is-open { background: var(--ops-gold-soft); border-color: var(--ops-gold); }
body:not(.student-mode) .device-status.is-open > strong { color: var(--ops-canvas); }
body:not(.student-mode) :is(.device-activity-panel .panel-header, .device-activity-entry) { border-color: var(--ops-border); }
body:not(.student-mode) .device-activity-entry { --activity-accent: var(--ops-muted); }
body:not(.student-mode) .device-activity-entry:is(.tone-textbook, .tone-video, .tone-device) { --activity-accent: var(--console-link); }
body:not(.student-mode) .device-activity-entry.tone-error { --activity-accent: var(--ops-red); }
body:not(.student-mode) .device-activity-entry::before { border-color: var(--ops-surface); }
body:not(.student-mode) .device-activity-entry::after { background: var(--ops-border); }
body:not(.student-mode) .device-activity-technical > div { background: var(--ops-canvas); }
body:not(.student-mode) .device-activity-technical :is(summary, code, pre) { color: var(--ops-muted); }
body:not(.student-mode) .device-activity-information { display: grid; grid-template-columns: minmax(72px,auto) minmax(0,1fr); gap: 9px 18px; margin: 0; font-size: 13px; line-height: 1.7; }
body:not(.student-mode) .device-activity-information dt { color: var(--ops-muted); }
body:not(.student-mode) .device-activity-information dd { margin: 0; color: var(--ops-ink); overflow-wrap: anywhere; }
body:not(.student-mode) .device-activity-process { border-top: 1px solid var(--ops-border); margin-top: 16px; padding-top: 14px; }
body:not(.student-mode) .device-activity-process h4 { margin: 0 0 12px; font-size: 13px; }
body:not(.student-mode) .device-activity-process ol { margin: 0; padding-left: 20px; }
body:not(.student-mode) .device-activity-process li { padding: 0 0 14px 6px; overflow-wrap: anywhere; }
body:not(.student-mode) .device-activity-process p { margin: 4px 0; font-size: 13px; }
body:not(.student-mode) .device-activity-process :is(time, small) { font-size: 12px; color: var(--ops-muted); }
body:not(.student-mode) .device-activity-search { margin-bottom: 18px; }
body:not(.student-mode) .device-activity-search summary { cursor: pointer; font-weight: 600; }
body:not(.student-mode) .device-activity-search summary small { margin-left: 12px; font-weight: 400; color: var(--ops-muted); }
body:not(.student-mode) .device-activity-search-form { display: grid; grid-template-columns: minmax(120px,1fr) minmax(150px,1fr) minmax(180px,2fr) auto; gap: 12px; margin-top: 18px; align-items: end; }
body:not(.student-mode) .device-activity-search-form .form-actions { margin: 0; }
body:not(.student-mode) .device-activity-search-form :is(input, select) { min-width: 0; width: 100%; }
@media (max-width:1200px) { body:not(.student-mode) .device-activity-search-form { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { body:not(.student-mode) .device-activity-search-form { grid-template-columns:minmax(0,1fr); } body:not(.student-mode) .device-activity-search summary small { display:block; margin:6px 0 0; } }
body:not(.student-mode) .report-table th { background: var(--ops-canvas); color: var(--ops-muted); }
body:not(.student-mode) .report-table :is(th, td) { border-color: var(--ops-border); }

/* Less frequent editors and saved reviews must not retain light-only surfaces. */
body:not(.student-mode) :is(.material-toc-status, .admin-vocabulary-unit-summary, .admin-vocabulary-ok, .ai-search-history-count) { background: var(--ops-teal-soft); color: var(--console-link); border-color: var(--ops-border); }
body:not(.student-mode) :is(.material-toc-editor, .admin-vocabulary-editor) { border-top-color: var(--ops-cyan); }
body:not(.student-mode) :is(.material-toc-row, .admin-vocabulary-word-row, .ai-search-history-header, .ai-search-record-row, .ai-search-question-image, .ai-search-answer, .exam-paper-sheet, .exam-answer-key, .exam-answer-sheet, .exam-history-list, .exam-feedback-list, .exam-history-answer, .exam-paper-result, .exam-feedback-item) { background: var(--ops-surface); color: var(--ops-ink); border-color: var(--ops-border); border-radius: 10px; }
body:not(.student-mode) :is(.material-toc-columns, .material-toc-page, .admin-vocabulary-columns, .admin-vocabulary-unit-label, .admin-vocabulary-key) { color: var(--ops-muted); }
body:not(.student-mode) :is(.admin-vocabulary-unit-summary strong, .ai-search-record-copy header strong, .exam-history-row strong, .exam-feedback-item > header strong) { color: var(--ops-ink); }
body:not(.student-mode) .admin-vocabulary-warnings { background: var(--ops-gold-soft); color: var(--ops-gold); border-color: var(--ops-gold); }
body:not(.student-mode) .admin-vocabulary-word-row.is-removed { background: var(--ops-red-soft); }
body:not(.student-mode) .ai-search-history-header { border: 0; padding: 0 0 18px; min-height: 0; }
body:not(.student-mode) .ai-search-record-row.status-completed { border-left-color: var(--ops-cyan); }
body:not(.student-mode) .ai-search-record-row.status-failed { border-left-color: var(--ops-red); }
body:not(.student-mode) :is(.ai-search-record-index span, .ai-search-question-image header span, .ai-search-answer header span, .writing-review-eyebrow) { color: var(--console-link); }
body:not(.student-mode) :is(.ai-search-record-index strong, .ai-search-record-copy time, .ai-search-record-copy p, .reading-header p, .exam-paper-row-copy p, .exam-paper-row-copy small, .exam-paper-header p, .exam-paper-status, .exam-paper-list > header > span) { color: var(--ops-muted); }
body:not(.student-mode) .ai-search-record-copy .ai-search-record-error { color: var(--ops-red); }
body:not(.student-mode) :is(.ai-search-answer .exam-markdown, .exam-markdown, .exam-markdown h3, .exam-markdown h4, .writing-review-page-header h2, .exam-paper-row-copy h3, .exam-paper-feedback h3, .exam-paper-feedback p, .exam-history-answer pre) { color: var(--ops-ink); }
body:not(.student-mode) :is(.exam-paper-notes, .exam-paper-score span, .exam-paper-score small, .exam-history-row p, .exam-history-summary small, .exam-history-summary > div:first-child > span, .exam-history-answer p, .exam-feedback-item p, .exam-feedback-item > header span) { color: var(--ops-muted); }
body:not(.student-mode) :is(.exam-paper-score strong, .exam-history-summary > div:first-child > strong, .exam-answer-key summary, .exam-paper-status.status-completed) { color: var(--console-link); }
body:not(.student-mode) :is(.exam-markdown code, .ai-search-question-image img) { background: var(--console-hover); }
body:not(.student-mode) :is(.exam-paper-result.failed, .exam-paper-status.status-failed) { color: var(--ops-red); background: var(--ops-red-soft); }
body:not(.student-mode) .exam-feedback-item.lost { background: var(--ops-gold-soft); border-color: var(--ops-gold); }
body:not(.student-mode) :is(.exam-paper-row, .exam-history-row, .writing-review-page-header, .ai-search-answer > header, .ai-search-question-image > header) { border-color: var(--ops-border); }
body:not(.student-mode) :is(.writing-review-row, .writing-review-score) { background: var(--ops-surface); border-color: var(--ops-border); border-left-color: var(--ops-cyan); }
body:not(.student-mode) :is(.writing-review-score strong, .writing-review-heading strong, .writing-review-feedback > header span) { color: var(--console-link); }
body:not(.student-mode) .writing-review-heading strong { background: var(--ops-teal-soft); }
body:not(.student-mode) :is(.writing-review-row.status-failed, .writing-review-score.status-failed) { border-left-color: var(--ops-red); background: var(--ops-red-soft); }
body:not(.student-mode) :is(.writing-review-row.status-pending, .writing-review-score.status-pending) { border-left-color: var(--ops-gold); background: var(--ops-gold-soft); }
body:not(.student-mode) :is(.writing-review-row.status-failed .writing-review-heading strong, .writing-review-score.status-failed strong, .writing-review-error) { color: var(--ops-red); background: var(--ops-red-soft); }
body:not(.student-mode) :is(.writing-review-row.status-pending .writing-review-heading strong, .writing-review-score.status-pending strong) { color: var(--ops-gold); background: var(--ops-gold-soft); }
body:not(.student-mode) :is(.writing-review-heading time, .writing-review-pending, .writing-review-row-footer > span, .writing-review-score span, .writing-review-score small, .writing-review-images-section header span) { color: var(--ops-muted); }
body:not(.student-mode) :is(.writing-review-markdown, .writing-review-markdown h3, .writing-review-markdown h4, .writing-review-feedback h3) { color: var(--ops-ink); }
body:not(.student-mode) .writing-review-markdown code { background: var(--console-hover); color: var(--ops-ink); }
body:not(.student-mode) :is(.writing-review-row-footer, .writing-review-feedback > header) { border-color: var(--ops-border); }

/* Login uses the same appearance and a keyboard-accessible theme switch. */
body:not(.student-mode) .login-shell { position: relative; background: var(--ops-canvas); }
body:not(.student-mode) .login-brand { border: 0; color: var(--ops-ink); }
body:not(.student-mode) .login-brand::after { display: none; }
body:not(.student-mode) .login-brand h1 { color: var(--ops-ink); font-size: clamp(36px, 4vw, 52px); }
body:not(.student-mode) .login-brand .eyebrow { color: var(--console-link); }
body:not(.student-mode) .login-brand > p:not(.eyebrow) { color: var(--ops-muted); font-size: 17px; }
body:not(.student-mode) .system-ready { color: var(--ops-muted); font-family: inherit; font-size: 13px; }
body:not(.student-mode) .login-form { border-color: var(--ops-border); background: var(--ops-surface); border-radius: 18px; box-shadow: 0 16px 50px rgb(0 0 0 / 5%); padding: 38px; }
body:not(.student-mode) .login-form h2 { font-size: 26px; }
body:not(.student-mode) .login-theme-toggle { position: absolute; right: 24px; top: 24px; }
.student-mode .topbar-mark { display: block; width: 40px; height: 40px; flex-shrink: 0; }
.student-mode .nav-item, .student-mode .workspace-subnav, .student-mode .nav-label { display: none !important; }

/* Compact catalog and dialogs. The list itself is the main surface. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body:not(.student-mode) .console-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body:not(.student-mode) :is(.library-catalog, .document-catalog) { padding: 0; border: 0; border-radius: 0; background: var(--console-page); }
body:not(.student-mode) .library-toolbar { grid-template-columns: minmax(180px, 420px) 132px auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 4px 0 22px; border: 0; }
body:not(.student-mode) .library-search { position: relative; grid-column: auto; }
body:not(.student-mode) .library-search > svg { position: absolute; left: 14px; top: 12px; color: var(--ops-muted); pointer-events: none; }
body:not(.student-mode) .library-search input { height: 44px; padding-left: 43px; background: var(--console-page); font-size: 14px; }
body:not(.student-mode) .library-subject-filter select { height: 44px; background: var(--console-page); font-size: 13px; }
body:not(.student-mode) #library-count { justify-self: end; font-size: 13px; color: var(--ops-muted); white-space: nowrap; }
body:not(.student-mode) .catalog-filters { position: relative; }
body:not(.student-mode) .catalog-filters > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--console-input-border); border-radius: 8px; cursor: pointer; color: var(--ops-muted); font-size: 13px; list-style: none; }
body:not(.student-mode) :is(.catalog-filters, .document-more, .row-management) > summary::-webkit-details-marker { display: none; }
body:not(.student-mode) .catalog-filters > summary:hover { background: var(--console-hover); color: var(--ops-ink); }
body:not(.student-mode) #library-filter-indicator { color: var(--console-link); white-space: nowrap; }
body:not(.student-mode) .catalog-filters > div { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 48px)); display: grid; gap: 16px; padding: 18px; background: var(--ops-surface); border: 1px solid var(--ops-border); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / 12%); }
body:not(.student-mode) .catalog-filters > div button { justify-self: start; }
body:not(.student-mode) .library-catalog .material-library-row { min-height: 78px; padding: 14px 12px; gap: 18px; align-items: center; }
body:not(.student-mode) .material-library-row::before { content: none; }
body:not(.student-mode) .library-catalog .material-library-row:hover,
body:not(.student-mode) .library-catalog .material-library-row:focus-within { background: var(--console-row-hover); border-radius: 8px; }
body:not(.student-mode) .material-file-icon { display: grid; place-items: center; width: 44px; height: 48px; flex: 0 0 44px; border-radius: 8px; background: var(--console-icon-bg); color: var(--console-icon-ink); }
body:not(.student-mode) .material-file-icon svg { width: 24px; height: 26px; stroke-width: 1.5; }
body:not(.student-mode) .material-row-copy { flex: 1; min-width: 0; }
body:not(.student-mode) .material-library-row .row-title { font-size: 17px; font-weight: 600; line-height: 1.5; }
body:not(.student-mode) .material-title-link { color: var(--ops-ink); text-decoration: none; }
body:not(.student-mode) .material-title-link:hover { color: var(--console-link); }
body:not(.student-mode) .material-library-row .row-meta { margin-top: 4px; font-size: 13px; }
body:not(.student-mode) .material-open-link { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 36px; padding: 8px 16px; border-radius: 7px; background: var(--ops-teal-soft); color: var(--console-link); font-size: 13px; font-weight: 600; text-decoration: none; opacity: 0; pointer-events: none; }
body:not(.student-mode) .material-library-row:is(:hover, :focus-within) .material-open-link { opacity: 1; pointer-events: auto; }
body:not(.student-mode) .material-library-row > .row-management { flex: 0 0 auto; max-width: none; margin: 0; }
body:not(.student-mode) .row-management > summary { border-color: transparent; color: var(--ops-muted); }
body:not(.student-mode) .row-management > summary:hover { background: var(--console-hover); }
body:not(.student-mode) .material-library-row > .row-management > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 36px; height: 36px; padding: 8px; border: 0; list-style: none; }
body:not(.student-mode) .material-library-row > .row-management[open] { flex-basis: 100%; width: 100%; margin: 0; }
body:not(.student-mode) .material-library-row > .row-management[open] > summary::before { content: "收起详情"; font-size: 12px; }
body:not(.student-mode) .material-detail-body { margin-top: 8px; padding: 20px; border: 1px solid var(--ops-border); border-radius: 10px; background: var(--ops-surface); }
body:not(.student-mode) .material-original-title { display: grid; gap: 6px; margin: 0 0 14px; overflow-wrap: anywhere; }
body:not(.student-mode) .material-original-title span { color: var(--ops-muted); font-size: 12px; }
body:not(.student-mode) .material-original-title strong { color: var(--ops-ink); font-size: 15px; font-weight: 600; }
body:not(.student-mode) .material-notes { margin-top: 5px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
body:not(.student-mode) .catalog-pagination { margin-top: 0; padding: 20px 0; gap: 14px; }
body:not(.student-mode) .catalog-pagination > div, body:not(.student-mode) .library-page-numbers { display: flex; align-items: center; gap: 6px; }
body:not(.student-mode) .catalog-pagination button { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 36px; padding: 7px; border-color: var(--ops-border); background: var(--console-page); font-weight: 500; }
body:not(.student-mode) .catalog-pagination button[aria-current="page"] { background: var(--ops-teal); border-color: var(--ops-teal); color: white; }
body:not(.student-mode) .pagination-gap { min-width: 16px; text-align: center; color: var(--ops-muted); }
body:not(.student-mode) .document-catalog-header { margin: 0; padding: 4px 0 22px; gap: 12px; }
body:not(.student-mode) .document-catalog-header > .muted { font-size: 13px; }
body:not(.student-mode) .document-search { width: min(420px, 100%); }
body:not(.student-mode) .learning-document-row { padding: 17px 12px; gap: 18px; }
body:not(.student-mode) .document-format { flex-basis: 44px; height: 48px; border-radius: 8px; font-size: 11px; background: var(--console-icon-bg); color: var(--console-icon-ink); }
body:not(.student-mode) .document-copy h3 { font-size: 17px; font-weight: 600; }
body:not(.student-mode) .document-copy p { font-size: 13px; }
body:not(.student-mode) .document-more { position: relative; flex-shrink: 0; }
body:not(.student-mode) .document-more > summary { width: max-content; padding: 9px 12px; border: 0; border-radius: 7px; cursor: pointer; color: var(--ops-muted); font-size: 13px; }
body:not(.student-mode) .document-more > summary:hover { background: var(--console-hover); }
body:not(.student-mode) .document-more .document-actions { position: absolute; top: calc(100% + 5px); right: 0; z-index: 4; width: min(240px, calc(100vw - 48px)); display: grid; gap: 12px; padding: 16px; border: 1px solid var(--ops-border); border-radius: 10px; background: var(--ops-surface); box-shadow: 0 8px 26px rgb(0 0 0 / 12%); font-size: 13px; }
body:not(.student-mode) .document-actions small { color: var(--ops-muted); overflow-wrap: anywhere; }
body:not(.student-mode) .document-actions button { justify-self: start; }
body:not(.student-mode) .workspace-dialog { width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--ops-border); border-radius: 16px; background: var(--ops-surface); color: var(--ops-ink); box-shadow: 0 24px 80px rgb(0 0 0 / 24%); }
body:not(.student-mode) .workspace-dialog::backdrop { background: rgb(0 0 0 / 48%); }
body:not(.student-mode) .workspace-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--ops-border); }
body:not(.student-mode) .workspace-dialog > header h2 { font-size: 20px; }
body:not(.student-mode) .workspace-dialog-body { padding: 24px; }
body:not(.student-mode) .workspace-dialog .document-upload-options { margin-top: 16px; }
body:not(.student-mode) .workspace-dialog #learning-documents-status { margin: 16px 0 0; }
body:not(.student-mode) .device-controls-grid .duration-controls { display: grid; grid-template-columns: minmax(100px, 1fr) auto auto; gap: 8px; align-items: end; }
body:not(.student-mode) .duration-controls label { font-size: 12px; color: var(--ops-muted); }
body:not(.student-mode) .duration-controls button { white-space: nowrap; }
body:not(.student-mode) .device-status { padding: 20px 24px; border-left-width: 1px; }
body:not(.student-mode) .device-status > strong { border-radius: 6px; font-size: 12px; padding: 7px 10px; }
body:not(.student-mode) .device-controls-grid .device-actions { gap: 14px; }
body:not(.student-mode) .device-actions p { font-size: 13px; }

@media (max-width: 1200px) {
  body:not(.student-mode) .console-topbar-main { padding: 0 24px; }
  body:not(.student-mode) .management-console > main { padding: 30px 24px 40px; }
  body:not(.student-mode) .library-toolbar { grid-template-columns: minmax(140px, 1fr) 116px auto; gap: 10px; }
  body:not(.student-mode) #library-count { grid-column: 1 / -1; justify-self: start; }
  body:not(.student-mode) .device-controls-grid .duration-controls { grid-template-columns: 1fr 1fr; }
  body:not(.student-mode) .duration-controls label { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  body:not(.student-mode) .management-console:not(.hidden) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  body:not(.student-mode) .management-console .topbar { position: static; grid-template-columns: auto minmax(0, 1fr); }
  body:not(.student-mode) .topbar-brand { border: 0; background: var(--console-page); }
  body:not(.student-mode) .console-topbar-main { justify-content: flex-end; }
  body:not(.student-mode) .console-breadcrumb { display: none; }
  body:not(.student-mode) .management-console .tabs { position: static; grid-column: 1; grid-row: 2; display: none; height: auto; padding: 18px; border: 0; border-bottom: 1px solid var(--ops-border); }
  body:not(.student-mode) .management-console.menu-open .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.student-mode) .nav-label { grid-column: 1 / -1; margin-bottom: 4px; }
  body:not(.student-mode) #workspace-navigation { grid-column: 1 / -1; display: flex; flex-direction: row; flex-wrap: wrap; margin: 0 0 8px; padding: 5px; border: 0; background: var(--console-page); border-radius: 7px; }
  body:not(.student-mode) #workspace-navigation .tab { width: auto; flex: 1; text-align: center; }
  body:not(.student-mode) .sidebar-account { grid-column: 1 / -1; padding-top: 12px; margin-top: 8px; }
  body:not(.student-mode) .management-console > main { grid-column: 1; grid-row: 3; }
}
@media (max-width: 700px) {
  body:not(.student-mode) .management-console .topbar { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 16px; gap: 14px; }
  body:not(.student-mode) .topbar-brand { padding: 0; gap: 10px; }
  body:not(.student-mode) .topbar-mark, body:not(.student-mode) .console-brand-icon { width: 28px; height: 28px; }
  body:not(.student-mode) .topbar h1 { font-size: 18px; }
  body:not(.student-mode) .console-topbar-main { padding: 0; }
  body:not(.student-mode) .account-actions { display: grid; width: 100%; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; }
  body:not(.student-mode) #menu-toggle { grid-column: 1; grid-row: 1; }
  body:not(.student-mode) #theme-toggle { grid-column: 3; grid-row: 1; }
  body:not(.student-mode) .student-picker { grid-column: 2; min-width: 0; justify-self: end; }
  body:not(.student-mode) .student-picker > span { display: none; }
  body:not(.student-mode) .student-select { min-width: 0; width: 100%; max-width: 180px; }
  body:not(.student-mode) .management-console > main { padding: 24px 16px 32px; }
  body:not(.student-mode) .workspace-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
  body:not(.student-mode) .workspace-header h2 { font-size: 26px; }
  body:not(.student-mode) .workspace-header p { font-size: 13px; }
  body:not(.student-mode) .workspace-actions button { padding: 9px 12px; min-height: 40px; font-size: 13px; }
  body:not(.student-mode) .section-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 16px; }
  body:not(.student-mode) .section-tabs button { padding: 12px 0; font-size: 12px; }
  body:not(.student-mode) .panel { padding: 16px; }
  body:not(.student-mode) :is(.library-catalog, .document-catalog) { padding: 0; }
  body:not(.student-mode) .library-toolbar { grid-template-columns: minmax(0, 1fr) auto; padding: 0 0 18px; gap: 10px; }
  body:not(.student-mode) .library-search { grid-column: 1 / -1; }
  body:not(.student-mode) .library-subject-filter { min-width: 0; max-width: 180px; }
  body:not(.student-mode) #library-count { font-size: 12px; }
  body:not(.student-mode) .catalog-filters > summary { padding: 10px 12px; }
  body:not(.student-mode) .library-catalog .material-library-row { padding: 16px 0; gap: 10px; }
  body:not(.student-mode) .material-file-icon { width: 34px; height: 42px; flex-basis: 34px; border-radius: 7px; }
  body:not(.student-mode) .material-file-icon svg { width: 20px; height: 23px; }
  body:not(.student-mode) .material-library-row .row-title { font-size: 15px; }
  body:not(.student-mode) .material-library-row .row-meta { font-size: 12px; }
  body:not(.student-mode) .material-open-link { display: none; }
  body:not(.student-mode) .material-library-row > .row-management { flex: 0 0 auto; margin: 0; max-width: none; }
  body:not(.student-mode) .material-library-row > .row-management[open] { flex-basis: 100%; }
  body:not(.student-mode) .material-detail-body { padding: 16px; }
  body:not(.student-mode) .material-library-row .material-metadata-form { grid-template-columns: minmax(0, 1fr); }
  body:not(.student-mode) .catalog-pagination { justify-content: center; gap: 14px; }
  body:not(.student-mode) .catalog-pagination > span { width: 100%; text-align: center; font-size: 12px; }
  body:not(.student-mode) .catalog-pagination > div, body:not(.student-mode) .library-page-numbers { gap: 3px; }
  body:not(.student-mode) .catalog-pagination button { min-width: 32px; padding: 6px; }
  body:not(.student-mode) .document-catalog-header { padding: 4px 0 18px; }
  body:not(.student-mode) .document-search { width: 100%; }
  body:not(.student-mode) .learning-document-row { flex-wrap: nowrap; padding: 16px 0; gap: 10px; }
  body:not(.student-mode) .document-format { flex-basis: 34px; height: 42px; font-size: 10px; }
  body:not(.student-mode) .document-copy h3 { font-size: 15px; }
  body:not(.student-mode) .document-more > summary { padding: 8px 4px; font-size: 12px; }
  body:not(.student-mode) .workspace-dialog { max-height: calc(100dvh - 24px); width: calc(100vw - 24px); border-radius: 12px; }
  body:not(.student-mode) .workspace-dialog > header { padding: 16px; }
  body:not(.student-mode) .workspace-dialog-body { padding: 18px 16px; }
  body:not(.student-mode) .workspace-dialog .form-grid { grid-template-columns: 1fr; }
  body:not(.student-mode) .device-status { padding: 18px; }
  body:not(.student-mode) .management-disclosure > summary, body:not(.student-mode) .management-disclosure-body { padding: 16px; }
  body:not(.student-mode) .login-shell { padding: 70px 24px 28px; }
  body:not(.student-mode) .login-theme-toggle { right: 20px; top: 18px; }
  body:not(.student-mode) .login-form { padding: 28px 22px; }
}
@media (hover: none) {
  body:not(.student-mode) .material-open-link { opacity: 1; pointer-events: auto; }
}
@media (pointer: coarse) {
  body:not(.student-mode) button, body:not(.student-mode) summary { min-height: 44px; }
  body:not(.student-mode) :is(input, textarea, select) { font-size: 16px; }
}

/* Video teaching: the drawing surface and the call controls have separate places. */
body:not(.student-mode) .video-call-dialog.video-workspace {
  width: min(1760px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-height: none;
  margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--ops-border); border-radius: 14px;
  background: var(--ops-canvas); color: var(--ops-ink); box-shadow: 0 24px 80px rgb(0 0 0 / 20%);
}
body:not(.student-mode) .video-workspace[open] { display: grid; grid-template-rows: 76px minmax(0, 1fr); }
body:not(.student-mode) .video-workspace::backdrop { background: rgb(0 0 0 / 48%); }
body:not(.student-mode) .video-workspace [hidden] { display: none !important; }
body:not(.student-mode) .video-workspace > header { position: static; display: flex; align-items: center; gap: 24px; padding: 14px 24px; border-bottom: 1px solid var(--ops-border); background: var(--ops-surface); }
body:not(.student-mode) .vc-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-right: 24px; border-right: 1px solid var(--ops-border); font-size: 19px; font-weight: 650; }
body:not(.student-mode) .vc-brand svg { width: 30px; height: 30px; color: var(--console-link); }
body:not(.student-mode) .vc-identity { flex: 1; min-width: 0; }
body:not(.student-mode) .vc-identity h2 { margin: 0; font-size: 13px; font-weight: 500; color: var(--ops-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.student-mode) .vc-lesson-title { display: block; max-width: 100%; margin: 0 0 4px; padding: 0; border: 0; background: transparent; color: var(--ops-ink); font-size: 20px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.student-mode) .vc-lesson-title::after { content: "✎"; margin-left: 10px; font-size: 17px; color: var(--ops-muted); }
body:not(.student-mode) .vc-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
body:not(.student-mode) .vc-header-actions > button { min-height: 42px; }
body:not(.student-mode) .vc-theme-toggle { display: grid; place-items: center; width: 42px; padding: 8px; }
body:not(.student-mode) .vc-save-board { padding: 11px 20px; }
body:not(.student-mode) .vc-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; min-height: 0; padding: 20px; }
body:not(.student-mode) .vc-board-area { display: grid; min-width: 0; min-height: 0; border: 1px solid var(--ops-border); border-radius: 12px; background: var(--ops-surface); }
body:not(.student-mode) .vc-main-video { min-width: 0; min-height: 0; padding: 16px; }
body:not(.student-mode) .vc-video-frame { position: relative; width: 100%; height: 100%; min-height: 0; }
body:not(.student-mode) .video-workspace .vc-video-frame > video { display: block; width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; border-radius: 9px; background: #111113; object-fit: contain; }
body:not(.student-mode) .vc-camera-waiting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-radius: 9px; background: var(--console-hover); color: var(--ops-muted); font-size: 13px; pointer-events: none; }
body:not(.student-mode) .vc-camera-waiting svg { width: 34px; height: 34px; }
body:not(.student-mode) .vc-call-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; padding: 18px; border: 1px solid var(--ops-border); border-radius: 12px; background: var(--ops-surface); }
body:not(.student-mode) .vc-side-preview h3 { margin: 0 0 14px; font-size: 16px; }
body:not(.student-mode) .vc-side-video { position: relative; aspect-ratio: 16 / 10; }
body:not(.student-mode) .vc-side-video .vc-video-frame { position: absolute; inset: 0; }
body:not(.student-mode) .vc-call-message { margin: 16px 0; font-size: 12px; line-height: 1.7; color: var(--ops-muted); }
body:not(.student-mode) .video-workspace footer.vc-call-controls { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin: 0; }
body:not(.student-mode) .vc-call-controls [data-quality-label] { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; color: var(--ops-muted); font-size: 13px; }
body:not(.student-mode) .vc-call-controls [data-quality-mode] { width: 165px; margin: 0; background: var(--ops-surface); color: var(--ops-ink); border-color: var(--console-input-border); }
body:not(.student-mode) .vc-call-controls button { min-height: 42px; }
body:not(.student-mode) .vc-call-controls [data-microphone] { background: var(--ops-teal-soft); color: var(--console-link); border-color: var(--ops-border); }
body:not(.student-mode) .vc-call-controls p { flex-basis: auto; font-size: 12px; line-height: 1.6; color: var(--ops-muted); }
body:not(.student-mode) .vc-call-controls p:empty { display: none; }
body:not(.student-mode) .video-workspace.has-teaching-board [data-open-board] { display: none; }
body:not(.student-mode) .video-workspace .video-call-details { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--ops-border); font-size: 12px; color: var(--ops-muted); }
body:not(.student-mode) .video-call-details > summary { cursor: pointer; min-height: 32px; }
body:not(.student-mode) .video-workspace .video-call-actual { margin: 12px 0 8px; font-size: 12px; font-weight: 500; text-align: left; }
body:not(.student-mode) .vc-board-status { margin-top: auto; padding-top: 24px; font-size: 12px; color: var(--ops-muted); overflow-wrap: anywhere; }
body:not(.student-mode) .vc-board-status p { margin: 0 0 10px; line-height: 1.6; }
body:not(.student-mode) .vc-draft-status { color: var(--console-link); }
body:not(.student-mode) .vc-end-slot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--ops-border); }
body:not(.student-mode) .vc-end-slot button { width: 100%; }
body:not(.student-mode) .video-workspace .vc-end-call { min-height: 42px; background: var(--ops-red-soft); color: var(--ops-red); border-color: var(--ops-red); white-space: nowrap; }
body:not(.student-mode) .video-workspace .teaching-workspace { display: grid; grid-template-rows: 60px minmax(0, 1fr) 56px; min-height: 0; min-width: 0; margin: 0; }
body:not(.student-mode) .video-workspace .tb-documentbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--ops-border); }
body:not(.student-mode) .video-workspace [data-source] { width: min(260px, 35%); max-width: none; min-width: 0; margin: 0; font-size: 13px; color: var(--ops-ink); background: var(--ops-surface); }
body:not(.student-mode) .video-workspace .tb-hide-board { margin-left: auto; border: 0; color: var(--console-link); background: transparent; font-size: 12px; white-space: nowrap; }
body:not(.student-mode) :is(.tb-add-menu, .tb-more-menu) { position: relative; z-index: 5; }
body:not(.student-mode) :is(.tb-add-menu, .tb-more-menu) > summary { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; min-height: 40px; border: 1px solid var(--ops-border); border-radius: 8px; background: var(--ops-surface); color: var(--ops-ink); cursor: pointer; font-size: 13px; list-style: none; white-space: nowrap; }
body:not(.student-mode) :is(.tb-add-menu, .tb-more-menu) > summary::-webkit-details-marker { display: none; }
body:not(.student-mode) .vc-menu-body { position: absolute; top: calc(100% + 8px); left: 0; display: grid; gap: 6px; width: 230px; padding: 8px; background: var(--ops-surface); border: 1px solid var(--ops-border); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / 16%); }
body:not(.student-mode) .vc-menu-body button { text-align: left; background: transparent; color: var(--ops-ink); border: 0; font-size: 13px; }
body:not(.student-mode) .vc-menu-body button:hover { background: var(--console-hover); }
body:not(.student-mode) .video-workspace .tb-stage { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 4px; min-width: 0; min-height: 0; padding: 12px 12px 12px 8px; }
body:not(.student-mode) .video-workspace .tb-tools { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; align-self: start; gap: 8px; margin: 0; padding: 8px; border: 1px solid var(--ops-border); border-radius: 10px; background: var(--ops-surface); }
body:not(.student-mode) .video-workspace .tb-tools button { display: grid; place-items: center; width: 42px; height: 42px; min-height: 0; padding: 10px; border: 0; background: transparent; color: var(--ops-muted); border-radius: 8px; }
body:not(.student-mode) .video-workspace .tb-tools button:hover { background: var(--console-hover); }
body:not(.student-mode) .video-workspace .tb-tools button[aria-pressed="true"] { background: var(--ops-teal-soft); color: var(--console-link); outline: none; }
body:not(.student-mode) .video-workspace .tb-tools label { display: flex; margin: 0; padding: 3px 0; color: var(--ops-muted); }
body:not(.student-mode) .video-workspace .tb-tools [data-color] { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer; }
body:not(.student-mode) .video-workspace .tb-tools [data-width] { width: 44px; height: 36px; padding: 4px; margin: 0; font-size: 12px; background: var(--ops-surface); color: var(--ops-ink); border-color: var(--ops-border); }
body:not(.student-mode) .tb-more-menu > summary { padding: 8px; width: 42px; border: 0; }
body:not(.student-mode) .tb-more-menu .vc-menu-body { top: auto; bottom: 0; left: calc(100% + 12px); width: 180px; }
body:not(.student-mode) .video-workspace .tb-more-menu button { display: block; width: 100%; }
body:not(.student-mode) .video-workspace .tb-viewport { width: 100%; height: 100%; min-height: 0; border-radius: 8px; background: var(--console-hover); }
body:not(.student-mode) .video-workspace .tb-paper { background: #fff; }
/* Display-only contrast adjustment on blank pages; PDF pixels and stored ink stay original. */
html[data-console-theme="dark"] body:not(.student-mode) .video-workspace .tb-paper[data-blank="true"] { filter: invert(.88) hue-rotate(180deg); }
body:not(.student-mode) .video-workspace .tb-loading { background: var(--console-hover); color: var(--ops-muted); }
body:not(.student-mode) .video-workspace .tb-pagebar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0; padding: 8px 14px; border-top: 1px solid var(--ops-border); }
body:not(.student-mode) .video-workspace .tb-pagebar button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px; background: var(--ops-surface); color: var(--ops-muted); border: 1px solid var(--ops-border); font-size: 12px; }
body:not(.student-mode) .video-workspace .tb-new-page { justify-self: start; border: 0; white-space: nowrap; }
body:not(.student-mode) :is(.tb-page-navigation, .tb-zoom-controls) { display: flex; align-items: center; gap: 8px; }
body:not(.student-mode) .tb-zoom-controls { justify-self: end; }
body:not(.student-mode) .tb-zoom-value { min-width: 40px; text-align: center; font-size: 12px; color: var(--ops-muted); }
body:not(.student-mode) .video-workspace .tb-page-navigation label { display: flex; align-items: center; gap: 4px; color: var(--ops-muted); font-size: 12px; }
body:not(.student-mode) .video-workspace [data-page] { width: 38px; padding: 5px; margin: 0; font-size: 12px; text-align: center; background: var(--ops-surface); color: var(--ops-ink); border: 0; appearance: textfield; }
body:not(.student-mode) .video-workspace [data-page]::-webkit-inner-spin-button { appearance: none; }
body:not(.student-mode) :is(.vc-metadata-dialog, .tb-picker) { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; border: 1px solid var(--ops-border); border-radius: 14px; background: var(--ops-surface); color: var(--ops-ink); }
body:not(.student-mode) .vc-metadata-dialog::backdrop { background: rgb(0 0 0 / 45%); }
body:not(.student-mode) .video-workspace .vc-metadata-dialog header { position: static; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; background: var(--ops-surface); }
body:not(.student-mode) .video-workspace .vc-metadata-dialog header h2 { margin: 0; font-size: 20px; color: var(--ops-ink); }
body:not(.student-mode) .video-workspace .vc-metadata-dialog .tb-save { display: grid; gap: 16px; margin: 0; }
body:not(.student-mode) .video-workspace .vc-metadata-dialog label { display: grid; gap: 8px; color: var(--ops-muted); font-size: 14px; }
body:not(.student-mode) .video-workspace .vc-metadata-dialog :is([data-title], [data-subject]) { width: 100%; background: var(--ops-surface); color: var(--ops-ink); }
body:not(.student-mode) .video-workspace .vc-metadata-dialog [data-result] { font-size: 13px; overflow-wrap: anywhere; }
body:not(.student-mode) .tb-picker input { margin-top: 14px; }
@media (max-width: 1150px) {
  body:not(.student-mode) .vc-body { grid-template-columns: minmax(0, 1fr) 240px; padding: 14px; gap: 14px; }
  body:not(.student-mode) .vc-call-panel { padding: 14px; }
  body:not(.student-mode) .vc-call-controls [data-quality-mode] { width: 135px; }
  body:not(.student-mode) .video-workspace .tb-pagebar { grid-template-columns: auto 1fr auto; gap: 6px; }
  body:not(.student-mode) .tb-page-navigation { justify-self: center; }
  body:not(.student-mode) .tb-new-page span { display: none; }
  body:not(.student-mode) .video-workspace .tb-documentbar { gap: 8px; padding: 10px; }
}
@media (max-width: 900px) {
  body:not(.student-mode) .vc-brand { padding-right: 14px; font-size: 16px; }
  body:not(.student-mode) .vc-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; grid-template-rows: minmax(540px, 70dvh) auto; }
  body:not(.student-mode) .vc-call-panel { overflow: visible; }
  body:not(.student-mode) .vc-side-preview { max-width: 300px; }
  body:not(.student-mode) .vc-side-video { max-height: 160px; }
  body:not(.student-mode) .vc-board-status { padding-top: 14px; }
}
@media (max-width: 700px) {
  body:not(.student-mode) .video-call-dialog.video-workspace { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 10px; }
  body:not(.student-mode) .video-workspace[open] { grid-template-rows: auto minmax(0, 1fr); }
  body:not(.student-mode) .video-workspace > header { flex-wrap: wrap; gap: 10px; padding: 12px; }
  body:not(.student-mode) .vc-brand { border: 0; padding-right: 0; gap: 8px; font-size: 15px; }
  body:not(.student-mode) .vc-brand svg { width: 24px; height: 24px; }
  body:not(.student-mode) .vc-identity { min-width: 130px; }
  body:not(.student-mode) .vc-identity h2 { font-size: 11px; }
  body:not(.student-mode) .vc-lesson-title { font-size: 16px; }
  body:not(.student-mode) .vc-header-actions { width: 100%; justify-content: flex-end; gap: 8px; }
  body:not(.student-mode) .vc-header-actions button { padding: 8px 12px; font-size: 12px; }
  body:not(.student-mode) .vc-body { padding: 8px; gap: 10px; grid-template-rows: 620px auto; }
  body:not(.student-mode) .video-workspace .teaching-workspace { grid-template-rows: auto minmax(0, 1fr) auto; }
  body:not(.student-mode) .video-workspace .tb-documentbar { flex-wrap: wrap; padding: 10px 8px; gap: 8px; }
  body:not(.student-mode) .video-workspace [data-source] { width: 100%; }
  body:not(.student-mode) .video-workspace .tb-stage { grid-template-columns: 46px minmax(0, 1fr); padding: 8px 6px 8px 4px; }
  body:not(.student-mode) .video-workspace .tb-tools { padding: 3px; gap: 4px; }
  body:not(.student-mode) .video-workspace .tb-tools button, body:not(.student-mode) .tb-more-menu > summary { width: 38px; height: 38px; min-height: 38px; padding: 8px; }
  body:not(.student-mode) .video-workspace .tb-tools [data-width] { width: 38px; }
  body:not(.student-mode) .video-workspace .tb-pagebar { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 8px 6px; gap: 8px; }
  body:not(.student-mode) .video-workspace .tb-page-navigation { gap: 4px; }
  body:not(.student-mode) .video-workspace .tb-zoom-controls { width: 100%; justify-content: flex-end; }
  body:not(.student-mode) .vc-end-slot { display: none; }
  body:not(.student-mode) .vc-metadata-dialog { padding: 18px; }
}
@media (max-height: 700px) and (min-width: 901px) {
  body:not(.student-mode) .vc-body { overflow-y: auto; grid-template-rows: minmax(560px, 1fr); }
  body:not(.student-mode) .vc-end-slot { display: none; }
}
