/* r198: 图三「显示模式 + 主题色」外观系统。 */

html[data-student-theme-resolved="light"][data-student-theme-color="warm"] body.student-page {
  --theme-page: #fff8e8;
  --theme-surface: #fffefb;
  --theme-surface-soft: #fff0cd;
  --theme-surface-raised: #fffaf0;
  --theme-accent: #e9a22d;
  --theme-accent-strong: #8a5600;
  --theme-accent-soft: #fff0cd;
  --theme-on-accent: #3a2508;
  --theme-support: #60753f;
  --theme-support-soft: #eef2df;
  --theme-border: #eadcc7;
}

html[data-student-theme-resolved="light"][data-student-theme-color="ocean"] body.student-page {
  --theme-page: #f2f7fa;
  --theme-surface: #fcfeff;
  --theme-surface-soft: #e3f0f7;
  --theme-surface-raised: #f7fbfd;
  --theme-accent: #2e6f9e;
  --theme-accent-strong: #245a82;
  --theme-accent-soft: #e3f0f7;
  --theme-on-accent: #ffffff;
  --theme-support: #3e7b79;
  --theme-support-soft: #e2f1ef;
  --theme-border: #d6e3ec;
}

html[data-student-theme-resolved="light"][data-student-theme-color="forest"] body.student-page {
  --theme-page: #f2f7f1;
  --theme-surface: #fcfefb;
  --theme-surface-soft: #e2f1e8;
  --theme-surface-raised: #f7fbf7;
  --theme-accent: #367a5a;
  --theme-accent-strong: #275f45;
  --theme-accent-soft: #e2f1e8;
  --theme-on-accent: #ffffff;
  --theme-support: #5a7043;
  --theme-support-soft: #eaf0e1;
  --theme-border: #d7e5da;
}

html[data-student-theme-resolved="light"][data-student-theme-color="ink"] body.student-page {
  --theme-page: #f4f4f2;
  --theme-surface: #ffffff;
  --theme-surface-soft: #e8e9ea;
  --theme-surface-raised: #fafaf9;
  --theme-accent: #34373c;
  --theme-accent-strong: #202327;
  --theme-accent-soft: #e8e9ea;
  --theme-on-accent: #ffffff;
  --theme-support: #67737f;
  --theme-support-soft: #e7eaec;
  --theme-border: #dedfdf;
}

html[data-student-theme-resolved="light"][data-student-theme-color="wisteria"] body.student-page {
  --theme-page: #f7f4fa;
  --theme-surface: #fefcff;
  --theme-surface-soft: #efe8f7;
  --theme-surface-raised: #fbf8fd;
  --theme-accent: #6b4f9e;
  --theme-accent-strong: #573d85;
  --theme-accent-soft: #efe8f7;
  --theme-on-accent: #ffffff;
  --theme-support: #875f7a;
  --theme-support-soft: #f3e7ed;
  --theme-border: #e1d8e8;
}

html[data-student-theme-resolved="light"][data-student-theme-color="coral"] body.student-page {
  --theme-page: #fff5f2;
  --theme-surface: #fffcfb;
  --theme-surface-soft: #fce7e2;
  --theme-surface-raised: #fff9f7;
  --theme-accent: #a94f42;
  --theme-accent-strong: #873c32;
  --theme-accent-soft: #fce7e2;
  --theme-on-accent: #ffffff;
  --theme-support: #866047;
  --theme-support-soft: #f2e8df;
  --theme-border: #ecd9d4;
}

html[data-student-theme-resolved="light"] body.student-page {
  --theme-text: #282522;
  --theme-text-2: #5f5953;
  --theme-muted: #736c65;
  --theme-track: #ddd7d0;
  --theme-surface-glass: rgba(255, 255, 255, 0.94);
  --theme-shadow-sm: 0 7px 20px rgba(45, 38, 31, 0.055);
  --theme-shadow-md: 0 13px 34px rgba(45, 38, 31, 0.075);
  --theme-focus: rgba(55, 91, 126, 0.32);
}

html[data-student-theme-resolved="dark"] body.student-page {
  --theme-page: #151515;
  --theme-surface: #222220;
  --theme-surface-soft: #2b2b28;
  --theme-surface-raised: #30302d;
  --theme-text: #f7f7f2;
  --theme-text-2: #d0d0c9;
  --theme-muted: #a6a6a0;
  --theme-border: #3c3c38;
  --theme-track: #4a4a45;
  --theme-surface-glass: rgba(34, 34, 32, 0.94);
  --theme-shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.22);
  --theme-shadow-md: 0 14px 38px rgba(0, 0, 0, 0.32);
  --theme-focus: rgba(255, 255, 255, 0.34);
  --theme-on-accent: #181818;
}

html[data-student-theme-resolved="dark"][data-student-theme-color="warm"] body.student-page {
  --theme-accent: #f0ad37;
  --theme-accent-strong: #ffd37a;
  --theme-accent-soft: #3a2c12;
  --theme-support: #91a86a;
  --theme-support-soft: #29311f;
}

html[data-student-theme-resolved="dark"][data-student-theme-color="ocean"] body.student-page {
  --theme-accent: #70a8d9;
  --theme-accent-strong: #a7d6ee;
  --theme-accent-soft: #173244;
  --theme-support: #79aaa8;
  --theme-support-soft: #1e3434;
}

html[data-student-theme-resolved="dark"][data-student-theme-color="forest"] body.student-page {
  --theme-accent: #78a987;
  --theme-accent-strong: #a7d9ba;
  --theme-accent-soft: #173527;
  --theme-support: #a1b681;
  --theme-support-soft: #28331f;
}

html[data-student-theme-resolved="dark"][data-student-theme-color="ink"] body.student-page {
  --theme-accent: #f2f2ec;
  --theme-accent-strong: #ffffff;
  --theme-accent-soft: #373735;
  --theme-support: #b6bec5;
  --theme-support-soft: #2e3337;
}

html[data-student-theme-resolved="dark"][data-student-theme-color="wisteria"] body.student-page {
  --theme-accent: #a991ba;
  --theme-accent-strong: #d7c3ee;
  --theme-accent-soft: #302440;
  --theme-support: #c48fa9;
  --theme-support-soft: #3a2631;
}

html[data-student-theme-resolved="dark"][data-student-theme-color="coral"] body.student-page {
  --theme-accent: #d98179;
  --theme-accent-strong: #f4b4a7;
  --theme-accent-soft: #40251f;
  --theme-support: #c2a07f;
  --theme-support-soft: #392d22;
}

/* Bridge the app's historical token families to one semantic theme layer. */
body.student-page {
  --forest-paper: var(--theme-page);
  --forest-paper-deep: var(--theme-surface-soft);
  --forest-card: var(--theme-surface);
  --forest-card-soft: var(--theme-surface-raised);
  --forest-ink: var(--theme-text);
  --forest-brown: var(--theme-text-2);
  --forest-muted: var(--theme-muted);
  --forest-orange: var(--theme-accent);
  --forest-orange-deep: var(--theme-accent-strong);
  --forest-orange-soft: var(--theme-accent-soft);
  --forest-sage: var(--theme-support);
  --forest-sage-soft: var(--theme-support-soft);
  --forest-line: var(--theme-border);
  --forest-shadow: var(--theme-shadow-md);
  --forest-shadow-soft: var(--theme-shadow-sm);
  --color-bg: var(--theme-page);
  --color-surface: var(--theme-surface);
  --color-surface-soft: var(--theme-surface-soft);
  --color-text: var(--theme-text);
  --color-text-2: var(--theme-text-2);
  --color-text-3: var(--theme-muted);
  --color-border: var(--theme-border);
  --color-primary: var(--theme-accent);
  --color-primary-weak: var(--theme-accent-soft);
  --bg: var(--theme-page);
  --surface: var(--theme-surface);
  --surface-soft: var(--theme-surface-soft);
  --ink: var(--theme-text);
  --muted: var(--theme-muted);
  --line: var(--theme-border);
  --brand: var(--theme-accent);
  --brand-dark: var(--theme-accent-strong);
  --accent: var(--theme-accent);
  --student-blue: var(--theme-accent);
  --student-blue-dark: var(--theme-accent-strong);
  --student-blue-soft: var(--theme-accent-soft);
  --vf-blue: var(--theme-accent);
  --vf-blue-2: var(--theme-accent-strong);
  --vf-blue-soft: var(--theme-accent-soft);
  --vf-purple: var(--theme-support);
  --vf-purple-soft: var(--theme-support-soft);
  --otter-mint: var(--theme-support);
  --otter-mint-soft: var(--theme-support-soft);
  --rococo-blue: var(--theme-accent);
  --rococo-blue-soft: var(--theme-accent-soft);
  --shadow: var(--theme-shadow-md);
  --shadow-sm: var(--theme-shadow-sm);
  --shadow-md: var(--theme-shadow-md);
  --media-bg: #05070a;
  --media-fg: #ffffff;
  background: var(--theme-page) !important;
  color: var(--theme-text) !important;
}

body.student-page .app-shell {
  background: var(--theme-page) !important;
  color: var(--theme-text) !important;
}

body.student-page .topbar {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-glass) !important;
  color: var(--theme-text) !important;
}

body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel),
body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel) :is(.event-card, .course-card, .lesson-card, .review-card, .progress-hero-card, .progress-course-card, .profile-summary-card, .account-subsection, .output-course-directory, .output-quiz-row, .student-course-input-section, .student-chapter-card, .student-topic-node, .importance-group-section, .importance-group-card) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-md) !important;
}

body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel) :is(h1, h2, h3, h4, strong),
body.student-page .brand-lockup h1 {
  color: var(--theme-text) !important;
}

body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel) :is(p, small, .section-mini-heading span, .panel-heading span, .panel-heading p) {
  color: var(--theme-muted) !important;
}

body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel) :is(input, textarea)::placeholder {
  color: var(--theme-muted) !important;
  opacity: 0.78 !important;
}

body.student-page #loginPanel label:has(input[type="checkbox"]) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text-2) !important;
}

body.student-page #loginPanel input[type="checkbox"] {
  accent-color: var(--theme-accent);
}

body.student-page :is(#loginPanel, #coursePanel, #learningPanel, #lessonPanel, #knowledgeStudyPanel, #reviewPanel, #progressPanel, #accountPanel, #eventPanel) :is(input, select, textarea, button):focus-visible {
  outline: 3px solid var(--theme-focus) !important;
  outline-offset: 2px !important;
}

body.student-page button.primary,
body.student-page .primary,
body.student-page .primary-action,
body.student-page .start-quiz-button,
body.student-page .knowledge-next-button,
body.student-page .student-refresh-button,
body.student-page .output-continue-button {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent) !important;
  color: var(--theme-on-accent) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page button.secondary,
body.student-page .secondary,
body.student-page .ghost-button,
body.student-page .knowledge-status-actions button,
body.student-page .module-action-row button {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text-2) !important;
  box-shadow: none !important;
}

body.student-page :is(.student-course-input-toggle, .student-learning-section-toggle, .student-category-toggle, #knowledgeStudyPanel[data-knowledge-view="list"] .student-chapter-title) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page :is(.student-topic-node.active, .student-chapter-card.open, .student-course-input-section.open) {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent-soft) !important;
}

body.student-page :is(.knowledge-progress-card, .progress-hero-card, .output-directory-intro) {
  border-color: var(--theme-border) !important;
  background: var(--theme-accent-soft) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-md) !important;
}

body.student-page #knowledgeStudyPanel .knowledge-refresh-row-top .student-refresh-button {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent) !important;
  color: var(--theme-on-accent) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page #knowledgeStudyPanel .knowledge-refresh-row-top .student-refresh-button :is(strong, span) {
  color: var(--theme-on-accent) !important;
}

body.student-page #knowledgeStudyPanel .knowledge-keyword-search-bar {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page #knowledgeStudyPanel .knowledge-keyword-search-bar :is(label, .knowledge-keyword-search-icon) {
  color: var(--theme-muted) !important;
}

body.student-page #knowledgeStudyPanel :is(.student-chapter-list, .student-knowledge-detail, .empty-state) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-muted) !important;
}

body.student-page #knowledgeStudyPanel .empty-state {
  background: var(--theme-surface-raised) !important;
}

body.student-page :is(.student-course-input-toggle, .student-chapter-card, .student-topic-node, .progress-hero-card, .progress-course-card) :is(span, em, small) {
  color: var(--theme-muted) !important;
}

body.student-page :is(.student-course-input-toggle, .progress-hero-card, .progress-course-card) i {
  background: var(--theme-track) !important;
}

body.student-page :is(.student-course-input-toggle, .progress-hero-card, .progress-course-card) i b {
  background: var(--theme-accent) !important;
}

/* Account and settings surfaces. */
body.student-page .profile-summary-card,
body.student-page .account-metric,
body.student-page .account-action-list,
body.student-page .account-subsection,
body.student-page .account-topic-row,
body.student-page .account-topic-empty,
body.student-page .student-table-mark-settings,
body.student-page .podcast-autoplay-settings,
body.student-page .podcast-autoplay-toggle {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page .account-action-list > button,
body.student-page .account-detail-list > div {
  border-color: var(--theme-border) !important;
  background: transparent !important;
  color: var(--theme-text) !important;
}

body.student-page .account-action-list > button.active,
body.student-page .account-calendar-day.active {
  background: var(--theme-accent-soft) !important;
  color: var(--theme-accent-strong) !important;
}

body.student-page :is(.profile-summary-copy span, .profile-summary-copy small, .account-metric span, .account-action-list span, .account-detail-list span, .account-topic-row small, .account-calendar-note) {
  color: var(--theme-muted) !important;
}

body.student-page :is(.profile-summary-copy strong, .account-metric strong, .account-action-list strong, .account-detail-list strong, .account-topic-row strong) {
  color: var(--theme-text) !important;
}

body.student-page .profile-avatar,
body.student-page .profile-avatar-button {
  border-color: var(--theme-border) !important;
  background: var(--theme-accent-soft) !important;
  color: var(--theme-accent-strong) !important;
}

body.student-page .account-calendar-day {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text-2) !important;
}

body.student-page .account-calendar-day.today {
  border-color: var(--theme-accent) !important;
}

body.student-page .podcast-autoplay-toggle input[role="switch"] {
  border-color: var(--theme-border) !important;
  background: var(--theme-track) !important;
}

body.student-page .podcast-autoplay-toggle input[role="switch"]::after {
  background: var(--theme-surface) !important;
}

body.student-page .podcast-autoplay-toggle input[role="switch"]:checked {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent) !important;
}

/* Theme chooser: compact like 图三 and usable without opening another page. */
body.student-page .student-theme-settings {
  display: grid;
  gap: 0;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 22px;
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow-sm);
}

body.student-page .student-theme-heading {
  gap: 5px !important;
  margin: 0 !important;
  padding: 17px 18px 13px !important;
}

body.student-page .student-theme-heading strong {
  color: var(--theme-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

body.student-page .student-theme-heading span {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
}

body.student-page .student-theme-setting-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border-top: 1px solid var(--theme-border);
  padding: 10px 14px 10px 18px;
}

body.student-page .student-theme-setting-label {
  color: var(--theme-text-2);
  font-size: 14px;
  font-weight: 700;
}

body.student-page .student-theme-mode-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--theme-border);
  border-radius: 15px;
  padding: 4px;
  background: var(--theme-surface-soft);
}

body.student-page .student-theme-mode-group button {
  min-width: 0;
  min-height: 38px;
  border: 0 !important;
  border-radius: 11px !important;
  padding: 0 6px !important;
  background: transparent !important;
  color: var(--theme-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body.student-page .student-theme-mode-group button.active {
  background: var(--theme-accent) !important;
  color: var(--theme-on-accent) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page .student-theme-color-row {
  align-items: start;
  padding-block: 14px;
}

body.student-page .student-theme-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

body.student-page .student-theme-color-grid button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  align-content: start;
  gap: 6px;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 4px 1px !important;
  background: transparent !important;
  color: var(--theme-muted) !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
}

body.student-page .student-theme-swatch {
  display: block;
  width: 34px;
  height: 34px;
  border: 3px solid var(--theme-surface);
  border-radius: 50%;
  background: var(--student-theme-swatch);
  box-shadow: 0 0 0 1px var(--theme-border);
}

body.student-page .student-theme-color-grid button.active {
  color: var(--theme-text) !important;
}

body.student-page .student-theme-color-grid button.active .student-theme-swatch {
  box-shadow: 0 0 0 2px var(--theme-surface), 0 0 0 4px var(--theme-accent);
}

body.student-page .student-theme-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 14px 14px;
  border: 1px solid var(--theme-border);
  border-radius: 16px;
  padding: 12px;
  background: var(--theme-surface-raised);
}

body.student-page .student-theme-preview-kicker {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--theme-accent-soft);
  color: var(--theme-accent-strong);
  font-size: 11px;
  font-weight: 800;
}

body.student-page .student-theme-preview > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.student-page .student-theme-preview strong {
  color: var(--theme-text) !important;
  font-size: 14px !important;
}

body.student-page .student-theme-preview small {
  overflow: hidden;
  color: var(--theme-muted) !important;
  font-size: 11px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.student-page .student-theme-preview-action {
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--theme-accent);
  color: var(--theme-on-accent);
  font-size: 11px;
  font-weight: 800;
}

/* Knowledge reading surfaces and navigation. */
body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] :is(.knowledge-table-version-buttons, .student-table-recite-toolbar) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] :is(.knowledge-table-version-buttons button, .student-table-recite-toolbar button) {
  background: transparent !important;
  color: var(--theme-muted) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] :is(.knowledge-table-version-buttons button.active, .student-table-recite-toolbar button.active) {
  background: var(--theme-accent-soft) !important;
  color: var(--theme-accent-strong) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] :is(.knowledge-table-version-window, .knowledge-text-pane, .knowledge-table-version-panel > .student-module-card, .is-table-group > .student-module-card) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] .student-knowledge-table {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] .student-knowledge-table :is(th, td) {
  border-color: var(--theme-border) !important;
  background: transparent !important;
  color: var(--theme-text) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] .student-knowledge-table th,
body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] .student-knowledge-table th > span,
body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] :is(.knowledge-topic-title-frame > p, .student-module-group-head em) {
  color: var(--theme-text-2) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] .knowledge-split-divider {
  background: var(--theme-border) !important;
}

body.student-page #knowledgeStudyPanel[data-knowledge-view="detail"] .knowledge-split-divider > span {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-muted) !important;
}

body.student-page .mobile-study-nav:not(.knowledge-module-dock),
body.student-page[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="detail"] .mobile-study-nav.knowledge-module-dock {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-glass) !important;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08) !important;
}

body.student-page .mobile-study-nav:not(.knowledge-module-dock) button:not(.mobile-nav-refresh),
body.student-page[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="detail"] .mobile-study-nav.knowledge-module-dock button {
  color: var(--theme-muted) !important;
}

body.student-page .mobile-study-nav:not(.knowledge-module-dock) button:not(.mobile-nav-refresh).active,
body.student-page[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="detail"] .mobile-study-nav.knowledge-module-dock button.active,
body.student-page[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="detail"] .mobile-study-nav.knowledge-module-dock button.playing {
  color: var(--theme-accent-strong) !important;
}

body.student-page .mobile-study-nav:not(.knowledge-module-dock) .mobile-nav-refresh {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent) !important;
  color: var(--theme-on-accent) !important;
  box-shadow: none !important;
}

body.student-page .module-podcast-dock {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-glass) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-md) !important;
}

/* Planner and non-semantic exercise review chrome. */
body.student-page #studentAssistantFab.student-planner-fab,
body.student-page[data-mobile-target="knowledgeStudyPanel"][data-knowledge-view="detail"] #studentAssistantFab.student-planner-fab {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent) !important;
  color: var(--theme-on-accent) !important;
}

body.student-page #studentAssistantSheet.student-assistant-sheet {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-md) !important;
}

body.student-page .chapter-paper-review-head,
body.student-page .chapter-paper-review-filter button {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text-2) !important;
}

body.student-page #reviewPanel :is(.output-mode-choice, .output-mode-choice.knowledge, .output-mode-choice.chapter) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page #reviewPanel .output-mode-choice strong {
  color: var(--theme-text) !important;
}

body.student-page #reviewPanel :is(.output-mode-chooser-head > p, .output-mode-choice span, .output-mode-choice small) {
  color: var(--theme-muted) !important;
}

body.student-page #reviewPanel :is(.output-mode-chooser-head > span, .output-mode-choice em) {
  color: var(--theme-accent-strong) !important;
}

body.student-page #progressPanel .progress-status-section {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm) !important;
}

body.student-page #progressPanel .progress-status-section.open {
  background: var(--theme-accent-soft) !important;
}

body.student-page #progressPanel .progress-status-toggle {
  color: var(--theme-text) !important;
}

body.student-page #progressPanel .progress-status-toggle > span,
body.student-page #progressPanel .progress-status-toggle > strong {
  color: var(--theme-text) !important;
}

body.student-page #progressPanel .progress-status-toggle > em,
body.student-page #progressPanel .progress-topic-empty {
  color: var(--theme-muted) !important;
}

body.student-page #progressPanel .progress-status-toggle .learning-caret {
  background: var(--theme-accent-soft) !important;
  color: var(--theme-accent-strong) !important;
}

body.student-page #progressPanel .progress-topic-empty {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
}

body.student-page .chapter-paper-review-head strong {
  color: var(--theme-accent-strong) !important;
}

body.student-page .chapter-paper-review-head :is(span, p) {
  color: var(--theme-muted) !important;
}

body.student-page .chapter-paper-review-filter button.active {
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent-soft) !important;
  color: var(--theme-accent-strong) !important;
}

/* Artwork, image notes, immersive memory and semantic feedback retain fixed colors. */
body.student-page :is(.video-stage, .module-video-stage, .course-video, .player-fullscreen-surface) {
  background: var(--media-bg) !important;
  color: var(--media-fg) !important;
  filter: none !important;
}

body.student-page :is(.student-gallery-image img, .student-module-image img, .memory-palace-stage img, .memory-feed-slide img, .image-viewer-stage > img, .image-annotation-surface > img, video, canvas) {
  filter: none !important;
}

@media (max-width: 430px) {
  body.student-page .student-theme-settings {
    margin-inline: -2px;
    border-radius: 20px;
  }

  body.student-page .student-theme-setting-row {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 13px;
  }

  body.student-page .student-theme-mode-group button {
    padding-inline: 2px !important;
    font-size: 12px !important;
  }

  body.student-page .student-theme-color-grid {
    gap: 2px;
  }

  body.student-page .student-theme-swatch {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.student-page .student-theme-settings *,
  body.student-page .student-theme-settings *::before,
  body.student-page .student-theme-settings *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
