/* Light theme lock — load AFTER all page CSS.
 * Goal: one calm, flat daytime surface. No dark leftovers or glass effects.
 */

body.desktop-light {
  --lt-canvas: #edf4f5;
  --lt-canvas-soft: #eef5f6;
  --lt-panel: #ffffff;
  --lt-panel-strong: #ffffff;
  --lt-glass: #f7fbfb;
  --lt-line: #e0eaeb;
  --lt-line-strong: #c9dcdc;
  --lt-ink: #24383d;
  --lt-text: #3f5960;
  --lt-muted: #70858b;
  --lt-faint: #93a5aa;
  --lt-accent: #198f85;
  --lt-accent-soft: #e7f5f3;
  --lt-shadow: none;
  --shell-canvas: var(--lt-canvas);
  --shell-text: var(--lt-text);
  --shell-muted: var(--lt-muted);
  --shell-line: var(--lt-line);
  --ef-frame-bg: var(--lt-canvas);
  --ef-rail-bg: var(--lt-glass);
  --ef-panel-bg: var(--lt-panel-strong);
  --ef-panel-soft: #f2f8f8;
  --ef-line: var(--lt-line);
  --ef-line-strong: var(--lt-line-strong);
  --ef-text: var(--lt-ink);
  --ef-muted: var(--lt-muted);
  --ef-faint: var(--lt-faint);
  --ef-accent: var(--lt-accent);
  color: var(--lt-text) !important;
  background: var(--lt-canvas) !important;
}

html:has(body.desktop-light) {
  background: var(--lt-canvas) !important;
}

/* Rails */
body.desktop-light #desktop-nav,
body.desktop-light #desktop-contextbar {
  background: #f7fbfb !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-muted) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.desktop-light .desktop-nav-footer {
  background: #f2f8f8 !important;
  border-color: var(--lt-line) !important;
}

body.desktop-light #desktop-nav .desktop-nav-item:hover {
  background: rgba(15, 154, 140, 0.06) !important;
  color: var(--lt-ink) !important;
}

body.desktop-light #desktop-nav .desktop-nav-item.active {
  background: rgba(15, 154, 140, 0.10) !important;
  color: #0d4f48 !important;
}

body.desktop-light #desktop-nav .desktop-nav-item.active::before {
  background: var(--lt-accent) !important;
}

body.desktop-light #theme-toggle,
body.desktop-light .customer-support-link,
body.desktop-light .pro-upgrade-link,
body.desktop-light .desktop-home-footer {
  border-color: var(--lt-line) !important;
  background: #fff !important;
  color: var(--lt-text) !important;
}

body.desktop-light .pro-upgrade-link {
  border-color: rgba(15, 154, 140, 0.28) !important;
  background: rgba(15, 154, 140, 0.08) !important;
  color: #0d6d63 !important;
}

/* Workspace mounts that still ship dark roots */
body.desktop-light :is(
  #desktop-broadcast,
  #desktop-today,
  #desktop-checkin,
  #desktop-study-room,
  #desktop-learning-report,
  #desktop-my-data,
  #desktop-course-hub,
  #desktop-guide,
  #desktop-qa-hub,
  #desktop-grade-hub,
  #desktop-exam-hub,
  #desktop-exam-list,
  #desktop-exam-papers,
  #desktop-exam-topics,
  #desktop-exam-schools,
  #desktop-exam-school-detail,
  #desktop-exam-topic-dashboard,
  #desktop-exam-topic-detail,
  #desktop-exam-447-analysis,
  #desktop-exam-theory-schools,
  #desktop-official-library,
  #desktop-official-templates,
  #desktop-interactive-learning,
  #desktop-yibentong-landing,
  #desktop-subject-reader,
  #desktop-subject-anki,
  #desktop-admin-portal,
  #desktop-admin-dashboard,
  .desktop-data-page
) {
  background: var(--lt-canvas-soft) !important;
  color: var(--lt-text) !important;
}

body.desktop-light #desktop-home,
body.desktop-light #desktop-home .map-panel {
  background: var(--lt-canvas-soft) !important;
  color: var(--lt-ink) !important;
}

/* Translucent panels across common shells */
body.desktop-light :is(
  .broadcast-composer,
  .bc-card,
  .checkin-hero,
  .checkin-stats,
  .checkin-calendar,
  .checkin-log,
  .focus-summary,
  .classroom-panel,
  .report-head,
  .profile-page-shell > section,
  .profile-dashboard-main,
  .profile-dashboard-viz,
  .course-hero,
  .course-center-head,
  .exam-start-main,
  .exam-flow,
  .exam-primary-card,
  .school-bank-card,
  .topic-dash-overview,
  .topic-dash-row,
  .official-library-grid a,
  .interactive-hero,
  .people-rank-card,
  .people-feature,
  .agent-memory-card,
  .context-message,
  .agent-conversation-item
) {
  background: var(--lt-panel) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
  box-shadow: var(--lt-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.desktop-light #desktop-contextbar :is(
  .assistant-head,
  .context-tabs,
  .agent-context-chip,
  .context-chat,
  .agent-history-panel,
  .agent-tools-panel,
  .context-rank,
  .people-panel
) {
  background: transparent !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
}

body.desktop-light #desktop-contextbar .people-feature-stats span {
  background: rgba(236, 247, 246, 0.9) !important;
  border-color: rgba(15, 154, 140, 0.22) !important;
  color: var(--lt-muted) !important;
}

body.desktop-light #desktop-contextbar .people-feature-stats b,
body.desktop-light #desktop-contextbar .people-row > b,
body.desktop-light #desktop-contextbar .people-row > span {
  color: var(--lt-accent) !important;
}

/* Soft text hierarchy */
body.desktop-light :is(h1, h2, h3, strong) {
  color: var(--lt-ink);
}

/* Home hero: clear ink, no neon-on-white leftovers */
body.desktop-light #desktop-home .home-kicker {
  color: #7a9399 !important;
  text-shadow: none !important;
}

body.desktop-light #desktop-home .home-kicker-gbc {
  color: #12a394 !important;
  text-shadow: none !important;
}

body.desktop-light #desktop-home .home-kicker-linka {
  color: #5f767d !important;
  text-shadow: none !important;
}

body.desktop-light #desktop-home h1 {
  color: #1f3d44 !important;
  font-weight: 720 !important;
  letter-spacing: -0.022em !important;
  text-shadow: none !important;
}

body.desktop-light #desktop-home .home-sub {
  color: #6e838a !important;
  max-width: 34em;
}

body.desktop-light #desktop-home .home-brand-name,
body.desktop-light #desktop-home .home-brand-name i,
body.desktop-light #desktop-home .home-brand-name b,
body.desktop-light #desktop-home .home-brand-name em {
  color: #0f766c !important;
}

body.desktop-light #desktop-home .home-brand .home-brand-tagline {
  color: #3d8f86 !important;
}

body.desktop-light #desktop-home .home-brand .home-brand-divider {
  background: rgba(15, 154, 140, 0.28) !important;
}

body.desktop-light #desktop-home .school-label rect {
  fill: rgba(255, 255, 255, 0.78) !important;
  stroke: rgba(15, 154, 140, 0.22) !important;
}

body.desktop-light #desktop-home .school-node.active .school-label rect,
body.desktop-light #desktop-home .school-node:hover .school-label rect,
body.desktop-light #desktop-home .school-node:focus .school-label rect {
  fill: rgba(236, 250, 248, 0.92) !important;
  stroke: rgba(15, 154, 140, 0.48) !important;
}

body.desktop-light #desktop-home .school-node text {
  fill: #2a6b64 !important;
}

body.desktop-light #desktop-home .school-node.active text,
body.desktop-light #desktop-home .school-node:hover text {
  fill: #0d6d63 !important;
}

/* Home auth + CTA: no charcoal leftovers */
body.desktop-light #desktop-home .home-auth-login,
body.desktop-light #desktop-home .home-auth-logout {
  border: 1px solid var(--lt-line-strong) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--lt-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.desktop-light #desktop-home .home-auth-register,
body.desktop-light #desktop-home .home-auth-console {
  border: 1px solid rgba(15, 154, 140, 0.34) !important;
  background: linear-gradient(135deg, #19b3a3, #0f9a8c) !important;
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(15, 154, 140, 0.22) !important;
}

body.desktop-light #desktop-home .home-actions button {
  border-color: transparent !important;
  background: linear-gradient(135deg, #1bb5a5, #0e9588) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(14, 149, 136, 0.22) !important;
}

body.desktop-light #desktop-home .home-actions .home-guide-link {
  border: 1px solid var(--lt-line-strong) !important;
  background: rgba(255, 255, 255, 0.66) !important;
  color: #1f5f58 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

body.desktop-light #desktop-home .home-actions .home-guide-link:hover {
  border-color: rgba(15, 154, 140, 0.45) !important;
  color: #0d6d63 !important;
  background: rgba(236, 247, 246, 0.9) !important;
}

body.desktop-light #desktop-home .home-actions span {
  border-color: var(--lt-line) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: var(--lt-muted) !important;
}

body.desktop-light #desktop-home .home-stats {
  border-color: rgba(168, 196, 198, 0.34) !important;
  background: rgba(255, 255, 255, 0.52) !important;
  box-shadow: 0 12px 40px rgba(48, 84, 90, 0.06) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
}

body.desktop-light #desktop-home .home-stat {
  border-color: rgba(168, 196, 198, 0.28) !important;
  background: transparent !important;
}

body.desktop-light #desktop-home .home-stat strong,
body.desktop-light #desktop-home .school-inspector strong {
  color: #1f3d44 !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

body.desktop-light #desktop-home .home-stat span,
body.desktop-light #desktop-home .school-inspector span,
body.desktop-light #desktop-home .school-inspector-list {
  color: #71868d !important;
}

body.desktop-light #desktop-home .home-topbar {
  border-color: transparent !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.12)) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
}

body.desktop-light #desktop-home .china-shape {
  fill: rgba(255, 255, 255, 0.62) !important;
  stroke: rgba(150, 184, 188, 0.42) !important;
  filter: drop-shadow(0 10px 28px rgba(70, 110, 118, 0.10)) !important;
}

body.desktop-light #desktop-home .network-lines {
  stroke: rgba(15, 154, 140, 0.42) !important;
  opacity: 0.42 !important;
  filter: none !important;
}

/* Forms / inputs */
body.desktop-light :is(input, textarea, select, taro-input-core, taro-textarea-core) {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-ink) !important;
}

body.desktop-light :is(input, textarea)::placeholder {
  color: var(--lt-faint) !important;
}

/* Kill common dark residues on light pages */
body.desktop-light [style*="background:#090"],
body.desktop-light [style*="background: #090"],
body.desktop-light [style*="background:#0d0d"],
body.desktop-light [style*="background: #0d0d"],
body.desktop-light [style*="background:#111"],
body.desktop-light [style*="background: #111"],
body.desktop-light [style*="background:#151"],
body.desktop-light [style*="background: #151"],
body.desktop-light [style*="background:#171"],
body.desktop-light [style*="background: #171"] {
  background: var(--lt-panel-strong) !important;
  color: var(--lt-text) !important;
}

/* QA / Grade hubs stay airy */
body.desktop-light #desktop-qa-hub,
body.desktop-light #desktop-grade-hub {
  background:
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(74, 196, 184, 0.10), transparent 55%),
    #f4f8f9 !important;
  color: var(--lt-text) !important;
}

body.desktop-light #desktop-qa-hub :is(.desktop-qa-panel, .desktop-qa-setup, textarea),
body.desktop-light #desktop-grade-hub :is(.desktop-grade-panel, textarea) {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-ink) !important;
}

/* Soft secondary buttons sitewide in light mode */
body.desktop-light :is(button, a, [role="button"]):is(.muted, .ghost, .secondary) {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
}

/* Guide / interactive / yibentong / today — lift dark card shells */
body.desktop-light #desktop-guide {
  color: var(--lt-text) !important;
}

body.desktop-light #desktop-guide :is(
  .guide-scenario-grid a,
  .guide-flow-card,
  .guide-detail-grid > article,
  .guide-checklist-items label,
  .guide-loop
) {
  background: var(--lt-panel) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
  box-shadow: var(--lt-shadow) !important;
}

body.desktop-light #desktop-guide :is(
  .guide-hero,
  .guide-setup,
  .guide-start-kit,
  .guide-flow-grid,
  .guide-section-head,
  .guide-detail-grid,
  .guide-checklist,
  .guide-loop
) {
  border-color: var(--lt-line) !important;
}

body.desktop-light #desktop-guide :is(h1, h2, h3, strong) {
  color: var(--lt-ink) !important;
}

body.desktop-light #desktop-guide :is(p, span, .guide-back, .guide-secondary) {
  color: var(--lt-muted) !important;
}

body.desktop-light #desktop-guide .guide-back:hover,
body.desktop-light #desktop-guide .guide-inline-link,
body.desktop-light #desktop-guide .guide-eyebrow,
body.desktop-light #desktop-guide .guide-hero > span {
  color: var(--lt-accent) !important;
}

body.desktop-light #desktop-guide .guide-secondary {
  border-color: var(--lt-line-strong) !important;
  background: rgba(255, 255, 255, 0.66) !important;
  color: #1f5f58 !important;
}

body.desktop-light #desktop-guide .guide-secondary:hover {
  border-color: rgba(15, 154, 140, 0.45) !important;
  color: #0d6d63 !important;
  background: rgba(236, 247, 246, 0.92) !important;
}

body.desktop-light #desktop-guide .guide-scenario-grid a:hover,
body.desktop-light #desktop-guide .guide-flow-card:hover {
  background: rgba(236, 247, 246, 0.92) !important;
  border-color: rgba(15, 154, 140, 0.34) !important;
}

body.desktop-light #desktop-guide .guide-scenario-grid strong {
  color: var(--lt-ink) !important;
}

body.desktop-light #desktop-guide .guide-scenario-grid span,
body.desktop-light #desktop-guide .guide-flow-card p,
body.desktop-light #desktop-guide .guide-mascot > span {
  color: var(--lt-muted) !important;
}

body.desktop-light #desktop-guide .guide-scenario-grid i {
  background: rgba(15, 154, 140, 0.12) !important;
  color: #0d6d63 !important;
}

body.desktop-light #desktop-guide .guide-checklist-items label:has(input:checked) {
  background: rgba(15, 154, 140, 0.10) !important;
  border-color: rgba(15, 154, 140, 0.42) !important;
  color: #0d4f48 !important;
}

/* Role badges in nav — no charcoal pills */
body.desktop-light .desktop-role-badge {
  border-color: var(--lt-line-strong) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  color: var(--lt-muted) !important;
}

body.desktop-light .desktop-role-badge.is-student {
  border-color: rgba(15, 154, 140, 0.34) !important;
  background: rgba(15, 154, 140, 0.10) !important;
  color: #0d6d63 !important;
}

body.desktop-light .desktop-role-badge.is-admin {
  border-color: rgba(180, 140, 40, 0.36) !important;
  background: rgba(255, 236, 180, 0.45) !important;
  color: #8a6a18 !important;
}

body.desktop-light .desktop-role-badge.is-super {
  border-color: rgba(120, 100, 180, 0.32) !important;
  background: rgba(236, 230, 255, 0.55) !important;
  color: #5a4a8a !important;
}

body.desktop-light .desktop-role-badge.is-initial {
  border-color: rgba(190, 130, 70, 0.36) !important;
  background: rgba(255, 236, 210, 0.55) !important;
  color: #8a5a28 !important;
}

body.desktop-light .desktop-role-badge.is-visitor {
  border-color: rgba(90, 120, 150, 0.34) !important;
  background: rgba(230, 238, 246, 0.9) !important;
  color: #4a6478 !important;
}

body.desktop-light .desktop-role-badge.is-pro {
  border-color: rgba(15, 154, 140, 0.42) !important;
  background: linear-gradient(135deg, rgba(15, 154, 140, 0.16), rgba(15, 154, 140, 0.08)) !important;
  color: #0b6f65 !important;
}

body.desktop-light .desktop-role-badge.is-summer {
  border-color: rgba(180, 130, 40, 0.42) !important;
  background: linear-gradient(135deg, rgba(255, 220, 140, 0.55), rgba(255, 236, 180, 0.35)) !important;
  color: #8a6418 !important;
}

body.desktop-light .pro-upgrade-link.is-ultra {
  border-color: rgba(180, 130, 40, 0.38) !important;
  background: rgba(255, 236, 180, 0.35) !important;
  color: #7a5a14 !important;
}

body.desktop-light .pro-upgrade-link.is-ultra span {
  background: #c9a24a !important;
  color: #2a1f0c !important;
}

body.desktop-light #desktop-my-data .profile-membership-badge.is-pro {
  border-color: rgba(15, 154, 140, 0.42) !important;
  color: #0b6f65 !important;
  background: linear-gradient(135deg, rgba(15, 154, 140, 0.16), rgba(15, 154, 140, 0.08)) !important;
}

body.desktop-light #desktop-my-data .profile-membership-badge.is-ultra {
  border-color: rgba(180, 130, 40, 0.42) !important;
  color: #8a6418 !important;
  background: linear-gradient(135deg, rgba(255, 220, 140, 0.55), rgba(255, 236, 180, 0.35)) !important;
}

body.desktop-light #desktop-interactive-learning :is(
  .interactive-lesson-card,
  .interactive-study-bar,
  .interactive-progress-track
) {
  background: var(--lt-panel) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
  box-shadow: var(--lt-shadow) !important;
}

body.desktop-light #desktop-interactive-learning .interactive-study-bar {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

body.desktop-light #desktop-interactive-learning .interactive-progress-track {
  background: rgba(15, 154, 140, 0.12) !important;
  box-shadow: none !important;
}

body.desktop-light #desktop-today :is(.today-card, .today-panel, .today-block, article) {
  background: var(--lt-panel) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
}

body.desktop-light #desktop-yibentong-landing :is(
  .subject-card,
  .yibentong-card,
  .landing-card,
  article,
  section.card
) {
  background: var(--lt-panel) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
  box-shadow: var(--lt-shadow) !important;
}

body.desktop-light #desktop-study-room :is(
  .study-room-hub,
  .study-buddy-panel,
  .study-workspace-nav button,
  .study-detail-head,
  .classroom-ranking,
  .classroom-ranking-list article
) {
  background: var(--lt-panel) !important;
  border-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
  box-shadow: var(--lt-shadow) !important;
}

/* Daylight authority layer: legacy routes may carry dark inline surfaces. */
body.desktop-light :is(#desktop-quick-topic-hub,#desktop-exam-hub,#desktop-exam-list,#desktop-exam-papers,#desktop-exam-topics,#desktop-exam-schools,#desktop-exam-school-detail,#desktop-exam-topic-dashboard,#desktop-exam-topic-detail,#desktop-exam-447-analysis,#desktop-exam-theory-schools,#desktop-course-hub,#desktop-my-data,#desktop-official-library,#desktop-official-templates,#desktop-interactive-learning) { background:var(--lt-canvas-soft) !important; color:var(--lt-text) !important; }

/* Route owners define their own cards and actions.  The former blanket rules
   here recolored every nested element, including deliberate dark hero cards,
   and washed out white-mode text across unrelated pages. */

/* The React-based answer and grading views share #app rather than a desktop
 * route mount. Keep their supporting copy readable without touching CTAs. */
body.desktop-light #app :is(h1,h2,h3,h4,strong,b) { color:var(--lt-ink) !important; }
body.desktop-light #app :is(p,small,label,.text-xs,.text-sm,.text-muted) { color:var(--lt-muted) !important; opacity:1 !important; }
body.desktop-light #app :is(input,textarea)::placeholder { color:#80949a !important; opacity:1 !important; }

/* Quick-topic holding page: one canvas, one quiet notice panel. */
body.desktop-light #desktop-quick-topic-hub { background:#f2f6f6 !important; }
body.desktop-light #desktop-quick-topic-hub .quick-topic-center-shell,
body.desktop-light #desktop-quick-topic-hub .quick-topic-center-shell > header { background:transparent !important; box-shadow:none !important; }
body.desktop-light #desktop-quick-topic-hub .quick-topic-center-shell > header { border-color:#dce6e6 !important; }
body.desktop-light #desktop-quick-topic-hub .quick-topic-locked { border:1px solid #dce6e6 !important; border-radius:8px; background:#fff !important; box-shadow:none !important; }

/* Personal learning desk: a daylight data panel, never a dark card with white fragments. */
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-panel { border-color:#d9e5e4 !important; background:#fff !important; box-shadow:none !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-main { background:linear-gradient(135deg,#f5fbfa,#eef7f6) !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-viz { border-left-color:#d9e5e4 !important; background:#f8fbfb !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-heading b { border-color:#a9d8d2 !important; background:#e7f7f4 !important; color:#18776d !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-main h2,
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-stats strong,
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-viz strong { color:#203b40 !important; }
body.desktop-light.route-profile #desktop-my-data :is(.profile-dashboard-main p,.profile-dashboard-stats span,.profile-dashboard-viz span) { color:#6b8185 !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-actions a { border-color:#bcd9d5 !important; background:#fff !important; color:#286b64 !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-actions .primary { border-color:#159c8e !important; background:#159c8e !important; color:#fff !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-stats a,
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-viz button { background:transparent !important; box-shadow:none !important; }
body.desktop-light.route-profile #desktop-my-data .profile-dashboard-stats a + a { border-left-color:#d9e5e4 !important; }
body.desktop-light.route-profile #desktop-my-data .profile-viz-link { border-top-color:#d9e5e4 !important; color:#18776d !important; }

/* Page-level daylight contracts.  These routes render after the desktop shell,
 * so their internal dark component rules must be neutralized as a unit. */
body.desktop-light #desktop-exam-list {
  background:#f2f6f6 !important;
}
body.desktop-light #desktop-exam-list .desktop-exam-list-head,
body.desktop-light #desktop-exam-list .desktop-exam-question-card {
  background:#fff !important;
  border-color:#dce6e6 !important;
  box-shadow:none !important;
}
body.desktop-light #desktop-exam-list .desktop-exam-list-head p,
body.desktop-light #desktop-exam-list .desktop-exam-list-status { color:#6b8185 !important; }
body.desktop-light #desktop-exam-list .desktop-exam-list-head a,
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar label,
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar select,
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar .exam-filter-reset {
  background:#fff !important;
  border-color:#c9dddd !important;
  color:#286b64 !important;
  box-shadow:none !important;
}
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar label i { color:#159c8e !important; }
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar label input { color:#203b40 !important; }
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar label input::placeholder { color:#82979b !important; }
body.desktop-light #desktop-exam-list .desktop-exam-list-toolbar .exam-filter-apply {
  background:#159c8e !important;
  border-color:#159c8e !important;
  color:#fff !important;
  box-shadow:none !important;
}
body.desktop-light #desktop-exam-list .desktop-exam-question-card:hover { background:#f8fbfb !important; border-color:#9bcfc9 !important; }
body.desktop-light #desktop-exam-list .desktop-exam-question-card strong { color:#203b40 !important; }
body.desktop-light #desktop-exam-list .desktop-exam-question-tags span {
  background:#f1f7f6 !important;
  border-color:#d2e5e2 !important;
  color:#416468 !important;
}
body.desktop-light #desktop-exam-list .desktop-exam-question-card > b {
  background:#e7f7f4 !important;
  border-color:#a9d8d2 !important;
  color:#18776d !important;
}

body.desktop-light.route-yibentong-anki #desktop-yibentong-landing,
body.desktop-light.route-learning-card-detail #desktop-subject-reader,
body.desktop-light #desktop-subject-anki {
  background:#f2f6f6 !important;
  color:#2a4148 !important;
}
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing :is(#desktop-yibentong-cover-panel,#desktop-yibentong-study-modes,#desktop-yibentong-full-catalog),
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing .desktop-yibentong-mode-grid a,
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing .desktop-yibentong-full-grid article,
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing .desktop-yibentong-full-grid details {
  background:#fff !important;
  border-color:#dce6e6 !important;
  color:#203b40 !important;
  box-shadow:none !important;
}
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing :is(p,small,span,em) { color:#6b8185 !important; }
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing :is(strong,b,h1,h2,h3) { color:#203b40 !important; }
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing :is(.desktop-yibentong-volume-picker a,.desktop-yibentong-mode-grid a,.desktop-yibentong-full-grid a) {
  background:#f7fbfa !important;
  border-color:#c9dddd !important;
  color:#286b64 !important;
}
body.desktop-light.route-yibentong-anki #desktop-yibentong-landing :is(.desktop-yibentong-volume-picker a.active,.desktop-yibentong-cover-copy > div > a:first-child) {
  background:#159c8e !important;
  border-color:#159c8e !important;
  color:#fff !important;
}

body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) .subject-reader-head,
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) :is(.subject-reader-nav,.subject-reader-main,.subject-anki-card,.subject-anki-topic-picker,.subject-anki-topic-strip) {
  background:#fff !important;
  border-color:#dce6e6 !important;
  color:#2a4148 !important;
  box-shadow:none !important;
}
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) .subject-reader-main > header {
  background:#fff !important;
  border-color:#dce6e6 !important;
}
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) :is(.subject-reader-head h1,.subject-reader-main h2,.subject-reader-point h3,.subject-reader-point-node h4,.subject-anki-face h2,.subject-reader-nav strong,.subject-anki-nav strong,.subject-anki-topic-picker h2,.subject-anki-topic-card strong) { color:#203b40 !important; }
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) :is(.subject-reader-head p,.subject-reader-main p,.subject-reader-point-node p,.subject-reader-nav small,.subject-anki-nav small,.subject-anki-face p,.subject-anki-answer,.subject-anki-topic-picker p,.subject-anki-topic-card small) { color:#5f777c !important; }
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) :is(.subject-reader-nav button,.subject-anki-nav-item,.subject-anki-topic-card,.subject-anki-topic-strip a,.subject-reader-empty button,.subject-anki-card button) {
  background:#f7fbfa !important;
  border-color:#d2e5e2 !important;
  color:#286b64 !important;
  box-shadow:none !important;
}
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) :is(.subject-reader-nav button.active,.subject-anki-nav-item.active,.subject-anki-topic-strip a.active,.subject-anki-card button.is-primary,.subject-anki-rating button:last-child) {
  background:#e7f7f4 !important;
  border-color:#8fcfc7 !important;
  color:#126f65 !important;
}
body.desktop-light :is(#desktop-subject-reader,#desktop-subject-anki) :is(.subject-reader-nav button > span,.subject-reader-point > header span,.subject-anki-nav-item > span,.subject-anki-topic-card > span) {
  background:#e7f7f4 !important;
  color:#18776d !important;
}

/* Gates are part of the visible page: daylight mode never dims the whole app
 * into a black overlay. */
body.desktop-light :is(#internal-student-card-gate,#pro-feature-gate,#visitor-registration-gate) { background:rgba(240,246,246,.72) !important; }
body.desktop-light :is(#internal-student-card-gate,#pro-feature-gate,#visitor-registration-gate) > section {
  background:#fff !important;
  border-color:#b9dcd7 !important;
  color:#203b40 !important;
  box-shadow:0 18px 42px rgba(48,84,90,.12) !important;
}
body.desktop-light :is(#internal-student-card-gate,#pro-feature-gate,#visitor-registration-gate) :is(h2,strong) { color:#203b40 !important; }
body.desktop-light :is(#internal-student-card-gate,#pro-feature-gate,#visitor-registration-gate) p { color:#6b8185 !important; }

/* White-mode canvas: the three-column desktop layout is one continuous white
 * working surface.  Keep the columns legible with hairline dividers rather
 * than giving the navigation and assistant rails a different grey backdrop. */
body.desktop-light,
html:has(body.desktop-light) {
  background:#fff !important;
}

body.desktop-light #app,
body.desktop-light.route-has-context #app,
body.desktop-light #desktop-nav,
body.desktop-light #desktop-contextbar,
body.desktop-light .desktop-nav-footer {
  background:#fff !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

body.desktop-light #desktop-nav,
body.desktop-light #desktop-contextbar {
  border-color:#e8edf0 !important;
}

body.desktop-light #desktop-nav .desktop-nav-item:hover {
  background:#f7faf9 !important;
}

body.desktop-light #desktop-nav .desktop-nav-item.active {
  background:#edf8f6 !important;
}

/* The page mount sits in the centre column.  Make its empty space white too,
 * so a long list never turns into a separate grey strip while scrolling. */
body.desktop-light :is(
  #desktop-broadcast,
  #desktop-today,
  #desktop-checkin,
  #desktop-study-room,
  #desktop-learning-report,
  #desktop-my-data,
  #desktop-course-hub,
  #desktop-guide,
  #desktop-qa-hub,
  #desktop-grade-hub,
  #desktop-exam-hub,
  #desktop-exam-list,
  #desktop-exam-papers,
  #desktop-exam-topics,
  #desktop-exam-schools,
  #desktop-exam-school-detail,
  #desktop-exam-topic-dashboard,
  #desktop-exam-topic-detail,
  #desktop-exam-447-analysis,
  #desktop-exam-theory-schools,
  #desktop-official-library,
  #desktop-official-templates,
  #desktop-interactive-learning,
  #desktop-yibentong-landing,
  #desktop-subject-reader,
  #desktop-subject-anki,
  #desktop-admin-portal,
  #desktop-admin-dashboard,
  .desktop-data-page
) {
  background:#fff !important;
}

/* Q&A uses one broad working sheet in daylight mode.  Its former drop shadow
 * made the otherwise flat white canvas look like a floating grey block. */
body.desktop-light #desktop-qa-hub .desktop-qa-workspace,
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card {
  box-shadow:none !important;
}

/* Generated answers kept dark-theme teal ink; force readable daylight body text. */
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card,
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card p,
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card li {
  color: #24383d !important;
}
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card h1,
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card h3 {
  color: #173038 !important;
}
body.desktop-light #desktop-qa-hub .desktop-qa-answer-card h2 {
  color: #14786e !important;
}
body.desktop-light #desktop-qa-hub .desktop-qa-section-marker,
body.desktop-light #desktop-qa-hub .desktop-qa-answer-label,
body.desktop-light #desktop-qa-hub .desktop-qa-answer-content strong {
  color: #0f6f65 !important;
  text-shadow: none !important;
}
body.desktop-light #desktop-grade-hub .desktop-grade-feedback p,
body.desktop-light #desktop-grade-hub .desktop-grade-suggestions li {
  color: #24383d !important;
}
body.desktop-light #desktop-grade-hub .desktop-grade-feedback h3,
body.desktop-light #desktop-grade-hub .desktop-grade-diagnosis h3,
body.desktop-light #desktop-grade-hub .desktop-grade-suggestions h3,
body.desktop-light #desktop-grade-hub .desktop-grade-priority h3,
body.desktop-light #desktop-grade-hub .desktop-grade-detail h3,
body.desktop-light #desktop-grade-hub .desktop-grade-submitted h3 {
  color: #173038 !important;
}

body.desktop-light #desktop-home .home-public-beta { color:#168d80 !important; }
body.desktop-light #desktop-home .home-public-beta::before { background:#55bdb2 !important; }
body.desktop-light #desktop-home .home-public-beta b { border-color:#a9dcd5 !important; background:#effaf8 !important; color:#19796e !important; }

/* ---- Daylight contrast lock: kill pale-on-light leftovers ---- */
body.desktop-light #desktop-nav .desktop-nav-user span,
body.desktop-light #desktop-nav .desktop-home-footer {
  color: #4f646b !important;
}

body.desktop-light #desktop-nav .desktop-admin-link {
  color: #6b4e0f !important;
}
body.desktop-light #desktop-nav .desktop-admin-link small {
  color: #7a6428 !important;
}

html body.desktop-light.route-profile #desktop-my-data .profile-page-head.profile-home-hero {
  border-color: #d2e0e2 !important;
  background:
    radial-gradient(circle at 92% 3%, rgba(25, 143, 133, 0.10), transparent 32%),
    radial-gradient(circle at 6% 100%, rgba(25, 143, 133, 0.06), transparent 30%),
    linear-gradient(120deg, #f7fbfb, #eef6f6 66%) !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-hero::before {
  border-color: rgba(25, 143, 133, 0.14) !important;
  box-shadow:
    0 0 0 30px rgba(25, 143, 133, 0.03),
    0 0 0 60px rgba(25, 143, 133, 0.015) !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-hero .profile-person-avatar {
  border-color: #9ecfc8 !important;
  background: linear-gradient(145deg, #e7f7f4, #d9efec) !important;
  color: #14786e !important;
  box-shadow: inset 0 0 0 4px rgba(20, 120, 110, 0.05) !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-hero .profile-person h1,
html body.desktop-light.route-profile #desktop-my-data .profile-person h1 {
  color: #20383d !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-hero .profile-person p,
html body.desktop-light.route-profile #desktop-my-data .profile-person p,
html body.desktop-light.route-profile #desktop-my-data [data-profile-meta] {
  color: #536a70 !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-person small,
html body.desktop-light.route-profile #desktop-my-data .profile-page-head > div > span,
html body.desktop-light.route-profile #desktop-my-data .profile-home-note > span {
  color: #178f83 !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-note {
  border-left-color: rgba(40, 90, 95, 0.16) !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-note strong {
  color: #24383d !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-home-note small {
  color: #60767c !important;
}

html body.desktop-light.route-profile #desktop-my-data .profile-membership-badge,
html body.desktop-light.route-profile #desktop-my-data .profile-membership-badge.is-pro {
  border-color: rgba(15, 154, 140, 0.42) !important;
  color: #0b6f65 !important;
  background: linear-gradient(135deg, rgba(15, 154, 140, 0.16), rgba(15, 154, 140, 0.08)) !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-membership-badge.is-ultra {
  border-color: rgba(180, 130, 40, 0.42) !important;
  color: #7a5610 !important;
  background: linear-gradient(135deg, rgba(255, 220, 140, 0.55), rgba(255, 236, 180, 0.35)) !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-membership-remain {
  color: #14685f !important;
}

html body.desktop-light.route-profile #desktop-my-data .profile-beta-badge {
  border-color: rgba(180, 130, 40, 0.40) !important;
  background: rgba(255, 236, 180, 0.55) !important;
  color: #7a5610 !important;
}

html body.desktop-light.route-profile #desktop-my-data .profile-level-badge {
  border-color: rgba(15, 154, 140, 0.34) !important;
  background: rgba(15, 154, 140, 0.10) !important;
  color: #0d6d63 !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-level-badge b {
  color: #145f57 !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-level-badge.is-max {
  border-color: rgba(180, 130, 40, 0.42) !important;
  background: rgba(255, 236, 180, 0.45) !important;
  color: #7a5610 !important;
}

html body.desktop-light.route-profile #desktop-my-data .profile-points-pill {
  border-color: rgba(15, 154, 140, 0.34) !important;
  background: linear-gradient(135deg, rgba(15, 154, 140, 0.12), rgba(15, 154, 140, 0.06)) !important;
  color: #145f57 !important;
}
html body.desktop-light.route-profile #desktop-my-data .profile-points-pill b {
  color: #178278 !important;
}

body.desktop-light .pro-eyebrow {
  color: #138679 !important;
}
body.desktop-light .pro-close {
  color: #5a6d75 !important;
}
body.desktop-light .pro-close:hover {
  color: #20383d !important;
}
body.desktop-light .pro-one-time-note {
  color: #5d7279 !important;
}
body.desktop-light .pro-payment-steps span {
  border-color: #d2e0e4 !important;
  background: #f4f8f9 !important;
  color: #536a70 !important;
}
body.desktop-light .pro-payment-steps span:first-child {
  border-color: #9ecfc8 !important;
  background: #e7f6f3 !important;
  color: #14685f !important;
}
body.desktop-light .pro-payment-order-summary {
  border-color: #b7ddd7 !important;
  background: linear-gradient(120deg, #eef9f7, #f4fafb) !important;
}
body.desktop-light .pro-payment-order-summary span {
  color: #5d7279 !important;
}
body.desktop-light .pro-payment-order-summary b {
  color: #20383d !important;
}
body.desktop-light .pro-payment-order-summary strong {
  color: #456168 !important;
}
body.desktop-light .pro-payment-order-summary em {
  color: #138679 !important;
}
body.desktop-light .pro-plan.is-locked {
  border-color: #d5e0e4 !important;
  background: #f3f6f7 !important;
  color: #6a7e85 !important;
}
body.desktop-light .pro-plan.is-locked .pro-plan-price,
body.desktop-light .pro-plan.is-locked .pro-plan-note,
body.desktop-light .pro-plan.is-locked .pro-plan-price em,
body.desktop-light .pro-plan.is-locked .pro-plan-tag {
  color: #6a7e85 !important;
}
body.desktop-light .pro-confirm:disabled {
  background: #cfd9dc !important;
  color: #5d7279 !important;
}

/* Route-owned daylight contrast repairs.  Keep intentional dark feature
   surfaces dark; give them their own readable foreground rather than applying
   a page-wide grey text override. */
body.desktop-light #desktop-course-hub .course-main-product-card {
  background:#fff !important;
  border-color:#cbdade !important;
  box-shadow:0 8px 22px rgba(28,54,60,.06) !important;
}
body.desktop-light #desktop-course-hub .course-main-product-card :is(strong,b) { color:#1d363b !important; }
body.desktop-light #desktop-course-hub .course-main-product-card :is(p,small) { color:#587176 !important; }
body.desktop-light #desktop-course-hub .course-main-product-card > span { color:#168a7d !important; }
body.desktop-light #desktop-course-hub .course-main-product-card > b em { color:#176f67 !important; }
body.desktop-light #desktop-course-hub .course-main-product-card.is-essay > i {
  background:linear-gradient(145deg,#eee9fa,#d9d4ed) !important;
  border-color:#c5b6e1 !important;
  color:#5f4e91 !important;
}
body.desktop-light #desktop-course-hub .course-main-product-card > i small { background:rgba(255,255,255,.72) !important; color:currentColor !important; }

body.desktop-light #desktop-official-library .official-command-primary.official-yibentong-hero {
  border-color:#7889db !important;
  background:linear-gradient(125deg,#182650,#121a37 58%,#1a1732) !important;
  box-shadow:0 14px 30px rgba(31,43,103,.18) !important;
}
body.desktop-light #desktop-official-library .official-yibentong-hero :is(h2,strong,b) { color:#f5f7ff !important; }
body.desktop-light #desktop-official-library .official-yibentong-hero :is(p,small,footer span) { color:#cbd5ef !important; }
body.desktop-light #desktop-official-library .official-yibentong-hero :is(.official-command-mark span,.official-yibentong-hero-copy > small) { color:#b9c7ff !important; }
body.desktop-light #desktop-official-library .official-yibentong-hero .official-yibentong-badge { color:#f5f6ff !important; }
body.desktop-light #desktop-official-library .official-puzzle-quick-link {
  border-color:#becfdb !important;
  background:#f5fafb !important;
}
body.desktop-light #desktop-official-library .official-puzzle-quick-link :is(strong,b) { color:#203b40 !important; }
body.desktop-light #desktop-official-library .official-puzzle-quick-link :is(small,em) { color:#5f777c !important; }

body.desktop-light.route-profile .profile-page-shell .pixel-cat-settings-card {
  border-color:#2b9d91 !important;
  background:linear-gradient(112deg,#133b37,#14282d 66%,#172026) !important;
}
body.desktop-light.route-profile .profile-page-shell .pixel-cat-settings-copy strong,
body.desktop-light.route-profile .profile-page-shell .pixel-cat-care-status strong { color:#f2fffc !important; }
body.desktop-light.route-profile .profile-page-shell .pixel-cat-settings-copy > div > span,
body.desktop-light.route-profile .profile-page-shell .pixel-cat-progress-note,
body.desktop-light.route-profile .profile-page-shell .pixel-cat-care-status p { color:#bdd8d4 !important; }
body.desktop-light.route-profile .profile-page-shell .pixel-cat-care {
  border-color:rgba(116,232,216,.46) !important;
  background:rgba(5,24,28,.62) !important;
}
body.desktop-light.route-profile .profile-page-shell .pixel-cat-care :is(b,[data-cat-level]) { color:#83ecdf !important; }
body.desktop-light.route-profile .profile-page-shell .pixel-cat-care em { background:#275c56 !important; color:#b8f4ed !important; }

body.desktop-light #desktop-study-room { background:#f5f8f9 !important; color:#20383d !important; }
body.desktop-light #desktop-study-room :is(.focus-summary,.focus-timer-panel,.focus-insights,.focus-history,.classroom-panel) {
  border-color:#d5e1e3 !important;
  background:#fff !important;
}
body.desktop-light #desktop-study-room :is(.focus-head h1,.focus-section-head h2,.focus-category-title h3,.classroom-head h2,.focus-summary strong) { color:#20383d !important; }
body.desktop-light #desktop-study-room :is(.focus-head p,.focus-head span,.focus-summary span,.focus-summary small,.focus-clock span,.focus-view-total,.focus-bars span,.focus-bars small,.focus-category-title span,.focus-category-list span,.focus-category-list strong,.focus-empty) { color:#60777c !important; }
body.desktop-light #desktop-study-room :is(.focus-category,.focus-manage-categories,.focus-presets button,.focus-presets label,.focus-task,.focus-reset,.focus-view-tabs,.focus-month-heading button) {
  border-color:#cbdadd !important;
  background:#f7fafb !important;
  color:#294449 !important;
}
body.desktop-light #desktop-study-room .focus-clock { background:conic-gradient(#1aa99a var(--progress),#dce8e9 0) !important; }
body.desktop-light #desktop-study-room .focus-clock::before { background:#17383b !important; }
body.desktop-light #desktop-study-room .focus-clock strong { color:#effffc !important; }
body.desktop-light #desktop-study-room .focus-primary { border-color:#168f83 !important; background:#20cbb9 !important; color:#073430 !important; }
