/* 浅色模式：暖白纸面 + 绛红品牌色（顶栏保留绛红）。只在 :root[data-theme="light"] 下生效。 */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e7edf6; --bg-2: #dce4f1; --surface: #fafcfe; --surface-2: #f0f4fb; --surface-3: #e4eaf4;
  --line: #cbd6e6; --line-2: #b2c0d6;
  --text: #1d232b; --muted: #555e6b; --faint: #808a9a;
  --red: #2a5dc4; --red-2: #19408e; --red-soft: #2a5dc41a;
  --gold: #946420; --gold-2: #c99a55; --gold-soft: #cad9ef;
  --cyan: #1d7f7f; --cyan-soft: #1d7f7f14; --cyan-line: #1d7f7f40;
  --green: #2f7a4d; --warn: #9a6a1a; --danger: #2a5dc4;
  --shadow: 0 10px 30px #3a547a1f;
  --human: #1d7f7f; --ai: #946420;
  --screen-strong: #124a4a; --ideo-strong: #2753ac; --code-bg: #e4eaf3;
  --wood-1: #e2c29c; --wood-2: #5e82b8; --table-shadow: 0 18px 40px #3a547a40, inset 0 0 30px #3a547a26;
}
:root[data-theme="light"] body { background: radial-gradient(1000px 460px at 6% -10%, #d4e0f3 0, transparent 60%), radial-gradient(800px 420px at 100% 0%, #d3dff2 0, transparent 60%), linear-gradient(180deg, #ebf0f8 0%, #e2e9f3 100%); background-color: var(--bg); }
:root[data-theme="light"] body::before { opacity: .5; background-image: linear-gradient(#2a5dc40d 1px, transparent 1px), linear-gradient(90deg, #2a5dc40d 1px, transparent 1px); }

/* base controls */
:where(:root[data-theme="light"]) button { background: #e4eaf4; border-color: #bbc8dc; color: var(--text); }
:where(:root[data-theme="light"]) button:hover:not(:disabled) { background: #d6e0ef; border-color: #c99a55; }
:where(:root[data-theme="light"]) button.primary { background: linear-gradient(120deg, #386bd2, #1d499f); border-color: #2a5dc4; color: #f3f7fc; box-shadow: 0 6px 18px #2a5dc433; }
:where(:root[data-theme="light"]) button.gold { background: linear-gradient(120deg, #f3cf93, #d9a660); color: #0f1d33; border-color: #c99a55; }
:where(:root[data-theme="light"]) button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
:where(:root[data-theme="light"]) button.ghost:hover:not(:disabled) { background: #2a5dc40d; color: var(--text); }
:where(:root[data-theme="light"]) button.danger { background: transparent; color: var(--danger); border-color: #a3bce2; }
:where(:root[data-theme="light"]) input, :where(:root[data-theme="light"]) select, :where(:root[data-theme="light"]) textarea { background: #fff; border-color: #bbc7d9; color: var(--text); }
:root[data-theme="light"] .panel { background: linear-gradient(160deg, #fafcfe, #f0f4fb); border-color: var(--line); box-shadow: var(--shadow); }
:root[data-theme="light"] .panel h2, :root[data-theme="light"] .modal h3, :root[data-theme="light"] .sec-head h3, :root[data-theme="light"] .tour-card h4, :root[data-theme="light"] .wiz-sec h4 { color: #19408e; }
:root[data-theme="light"] .badge { background: #f2f6fb; border-color: #bdcbe0; color: var(--muted); }
:root[data-theme="light"] .badge.gold { background: #dee8f6; border-color: #d9b27a; color: #173e8c; }
:root[data-theme="light"] .badge.red { background: #e6edf8; border-color: #a2bce4; color: #234b9b; }
:root[data-theme="light"] .badge.cyan { background: #e2f4f4; border-color: #9fd3d3; color: #145a5a; }
:root[data-theme="light"] .badge.green { background: #e7f4ec; border-color: #9fcdb0; color: #2f7a4d; }
:root[data-theme="light"] .badge.warn { background: #e3ebf7; border-color: #e3bf86; color: #8a5a12; }
:root[data-theme="light"] .notice { background: #e9eff8; border-color: #e8c890; color: #1c3861; }
:root[data-theme="light"] .notice.cyan { background: #e6f6f6; border-color: #9fd3d3; color: #145a5a; }
:root[data-theme="light"] .notice.red { background: #eef3fa; border-color: #a2bce4; color: #234b9b; }
:root[data-theme="light"] table.data th { background: #ecf2fa; color: #173e8c; }
:root[data-theme="light"] .credit-pill { background: #ffffff26; border-color: #ffffff66; color: #e9eff8; }
:root[data-theme="light"] .menu-list { background: #fafcfe; border-color: var(--line); }
:root[data-theme="light"] .menu-list button:hover, :root[data-theme="light"] .menu-list a:hover { background: #e4eaf4; }
:root[data-theme="light"] .modal-back { background: #1d232b40; }
:root[data-theme="light"] .modal { background: linear-gradient(160deg, #fafcfe, #eff3fa); border-color: #d9b27a; box-shadow: 0 30px 80px #1d232b40; }
:root[data-theme="light"] .toast { background: #fafcfef5; border-color: #d9b27a; color: var(--text); }
:root[data-theme="light"] .toast.error { border-color: #a2bce4; color: #234b9b; }
:root[data-theme="light"] details.more summary, :root[data-theme="light"] a { color: #8a5a1c; }
:root[data-theme="light"] .app-header a, :root[data-theme="light"] .nav a { color: #dce6f5; }

/* home */
:root[data-theme="light"] .portal { background: #f7f9fd; border-color: #c3d0e3; box-shadow: 0 16px 40px #3a547a1f; }
:root[data-theme="light"] .portal:hover, :root[data-theme="light"] .portal:focus-visible { border-color: #c99a55; box-shadow: 0 22px 50px #3a547a33, 0 0 0 1px #c99a5566; }
:root[data-theme="light"] .portal .cap { background: linear-gradient(0deg, #f7f9fd, #f7f9fdee); border-top-color: #d0daea; }
:root[data-theme="light"] .portal .cap h2 { color: #19408e; text-shadow: none; }
:root[data-theme="light"] .portal .go { color: #8a5a1c; border-color: #d9b27a; }
:root[data-theme="light"] .photo-img { filter: saturate(.9) contrast(1.02) brightness(1.02); }
:root[data-theme="light"] .photo-grade { background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(50, 78, 120, .18) 100%), linear-gradient(180deg, transparent 60%, rgba(247, 249, 253, .55) 100%), linear-gradient(0deg, rgba(42, 93, 196, .06), rgba(42, 93, 196, .06)); }
:root[data-theme="light"] .arrow-btn { background: radial-gradient(circle at 35% 30%, #ffffff, #e2eaf6); border-color: #d9b27a; box-shadow: 0 0 0 6px #c99a5514, 0 10px 26px #3a547a26; }
:root[data-theme="light"] .arrow-btn:hover:not(:disabled) { background: radial-gradient(circle at 35% 30%, #fff, #d6e1f2); box-shadow: 0 0 0 8px #c99a5526, 0 12px 30px #3a547a33; }
:root[data-theme="light"] .arrow-btn .tip { background: #fafcfe; border-color: var(--line); color: var(--text); }
:root[data-theme="light"] .photo-credit, :root[data-theme="light"] .photo-credit a { color: var(--faint); }

/* guided annotations */
:root[data-theme="light"] .tour-ring { box-shadow: 0 0 0 9999px #1d232b40, 0 0 18px #c99a55aa; border-color: #c99a55; }
:root[data-theme="light"] .tour-card { background: #fafcfe; border-color: #d9b27a; box-shadow: 0 20px 50px #1d232b33; }
:root[data-theme="light"] .tour-card p { color: var(--text); }

/* stage: cockpit screen becomes a bright display, scene a warm room */
:root[data-theme="light"] .screen { background: linear-gradient(180deg, #f3fbfb, #f2f6fb); border-color: #9fd3d3; box-shadow: inset 0 0 40px #1d7f7f12, 0 12px 30px #3a547a1a; }
:root[data-theme="light"] .screen::before { background: repeating-linear-gradient(0deg, #1d7f7f06 0 1px, transparent 1px 4px); }
:root[data-theme="light"] .screen .live { border-right-color: #1d7f7f22; }
:root[data-theme="light"] .screen .head { color: #1d6f6f; }
:root[data-theme="light"] .subtitle { color: #1d232b; }
:root[data-theme="light"] .subtitle .who.ai { background: #f1d29a; color: #0f1d33; }
:root[data-theme="light"] .subtitle .who.sys { background: #cbd1d9; color: #30343b; }
:root[data-theme="light"] .feed .item { background: #ffffff; border-left-color: #d9a660; box-shadow: 0 1px 0 #cbd6e6; }
:root[data-theme="light"] .feed .item.human { background: #eefafa; border-left-color: #1d9f9f; }
:root[data-theme="light"] .feed .item.sys { border-left-color: #a4acb8; color: var(--muted); }
:root[data-theme="light"] .feed .item.ideo { background: #f2f6fb; border-left-color: #386bd2; }
:root[data-theme="light"] .tile { background: #ffffff; border-color: #bfe2e2; }
:root[data-theme="light"] .tile b { color: #124a4a; }
:root[data-theme="light"] .tile span { color: #4a7a7a; }
:root[data-theme="light"] .bars .bar i { background: linear-gradient(90deg, #1d9f9f, #64c3c3); }
:root[data-theme="light"] .phases span { border-color: #9fd3d3; color: #3a6f6f; }
:root[data-theme="light"] .phases span.done { background: #9fd3d3; color: #0c3434; }
:root[data-theme="light"] .phases span.now { background: #f1d29a; border-color: #d9a660; color: #0f1d33; }
:root[data-theme="light"] .clockbar .time { color: #124a4a; }
:root[data-theme="light"] .clockbar .time small, :root[data-theme="light"] .stage-left { color: #4a7a7a; }
:root[data-theme="light"] .clockbar .track { background: #1d7f7f1a; }
:root[data-theme="light"] .clockbar .track .tick { background: #f3fbfb; }
:root[data-theme="light"] .clockbar .speed button { color: #1d6f6f; border-color: #9fd3d3; background: transparent; }
:root[data-theme="light"] .clockbar .speed button.on { background: #1d9f9f; color: #fff; border-color: #1d9f9f; }
:root[data-theme="light"] .prompter { background: #fafbfd; border-color: #bfe2e2; }
:root[data-theme="light"] .prompter p { color: #7a8c8c; }
:root[data-theme="light"] .prompter p.done { color: #3b5555; }
:root[data-theme="light"] .prompter p.now { color: #1d232b; border-left-color: #d9a660; }
:root[data-theme="light"] .prompter .ptitle { color: #8a5a1c; }
:root[data-theme="light"] .scene { background: radial-gradient(ellipse at 50% 40%, #f3f7fc, #d8e1ef 75%); border-color: #bdcbe0; }
:root[data-theme="light"] .seat .ava, :root[data-theme="light"] .stu .ava { background: radial-gradient(circle at 50% 35%, #eaf0f9, #d5dfef); border-color: #a2b3cd; }
:root[data-theme="light"] .seat .plate { background: #f6f9fd; border-color: #b2c0d6; color: var(--text); }
:root[data-theme="light"] .seat.head .plate { background: linear-gradient(120deg, #f3cf93, #d9a660); color: #0f1d33; border-color: #c99a55; }
:root[data-theme="light"] .stu .grp { background: #0000000d; }
:root[data-theme="light"] .bubble { box-shadow: 0 8px 22px #3a547a33; border: 1px solid #ecd9c6; }
:root[data-theme="light"] .minimap i { background: #bac6d8; }
:root[data-theme="light"] .minimap i.win { background: #8496b0; }
:root[data-theme="light"] .composer { background: #fafcfeeb; border-color: #9fd3d3; box-shadow: 0 20px 50px #1d232b33; }
:root[data-theme="light"] .composer h4 { color: #1d6f6f; }
:root[data-theme="light"] .composer textarea { background: #fff; }
:root[data-theme="light"] .participate { box-shadow: 0 10px 26px #1d232b40, 0 0 0 4px #1d9f9f22; }
:root[data-theme="light"] .drawer { background: #fafcfef2; }
:root[data-theme="light"] .estimate { background: #dee8f6; border-color: #d9b27a; color: #1c3861; }

/* 课程思政 emphasis on light backgrounds */
:root[data-theme="light"] mark.ideo { background: linear-gradient(0deg, #cddbf1 0 45%, transparent 45%); color: #2753ac; text-shadow: none; }
:root[data-theme="light"] .subtitle mark.ideo { background: linear-gradient(0deg, #bdd0ec 0 40%, transparent 40%); color: #234b9b; }
:root[data-theme="light"] .ideo-list div { background: #f2f6fb; border-left-color: #386bd2; }

/* editor, library, wizard, job */
:root[data-theme="light"] .card { background: linear-gradient(160deg, #fafcfe, #f0f4fb); border-color: var(--line); }
:root[data-theme="light"] .chain div { background: #ecf2fa; }
:root[data-theme="light"] .etable th { color: #173e8c; }
:root[data-theme="light"] .etable th.tonly, :root[data-theme="light"] .etable td.tonly { background: #ebf1f9; }
:root[data-theme="light"] .issues .error { background: #eef3fa; color: #234b9b; }
:root[data-theme="light"] .issues .warn { background: #e9eff8; color: #1c3861; }
:root[data-theme="light"] .wiz-sec { background: #f0f4fb; }
:root[data-theme="light"] .wiz-card { background: #eef8f8; border-color: #9fd3d3; }
:root[data-theme="light"] .kp { border-color: var(--line); background: #fff; }
:root[data-theme="light"] .kp.on { background: #dee8f6; border-color: #d9b27a; }
:root[data-theme="light"] .job-steps li { background: #ecf2fa; border-left-color: #b2c0d6; }
:root[data-theme="light"] .job-steps li.running { background: #e2f4f4; }

/* admin */
:root[data-theme="light"] .kpi { background: linear-gradient(160deg, #fafcfe, #f0f4fb); border-color: var(--line); }
:root[data-theme="light"] .kpi b { color: #8a5a1c; }
:root[data-theme="light"] .admin-nav a.active { background: #e6edf8; color: #19408e; box-shadow: inset 3px 0 0 var(--red); }
:root[data-theme="light"] .admin-nav a:hover { background: #e4eaf4; color: var(--text); }

/* header: brighter crimson band; header text stays light */
:root[data-theme="light"] .app-header { background: linear-gradient(100deg, #2a58b4, #1f499b 50%, #1b3c7f); border-bottom-color: #c99a55; box-shadow: 0 4px 18px #19408e33; }
:root[data-theme="light"] .app-header button.ghost { color: #e1e9f6; }
:root[data-theme="light"] .app-header button.ghost:hover:not(:disabled) { background: #ffffff1f; color: #fff; }
:root[data-theme="light"] .brand { color: #f3f7fc; }
:root[data-theme="light"] .brand small { color: #c7d7ef; }
:root[data-theme="light"] .theme-switch { background: #00000026; border-color: #ffffff40; }
:root[data-theme="light"] .login-card .theme-switch { background: var(--surface-3); border-color: var(--line); }
:root[data-theme="light"] .app-header .muted, :root[data-theme="light"] .app-header .faint { color: #c7d7ef; }
:root[data-theme="light"] .fs-switch { background: #00000026; border-color: #ffffff40; }
:root[data-theme="light"] .login-card .fs-switch { background: var(--surface-3); border-color: var(--line); }
:root[data-theme="light"] .mode-switch .mode-card.on.demo { background: #1d8a8a; border-color: #1d8a8a; color: #fff; }
:root[data-theme="light"] .mode-cards .mode-card { background: #fff; border-color: #bbc8dc; }
:root[data-theme="light"] .mode-cards .mode-card.on.demo { background: #e6f6f6; border-color: #1d8a8a; }
:root[data-theme="light"] .mode-cards .mode-card.on.model { background: #dee8f6; border-color: #c99a55; }
:root[data-theme="light"] .login-title { color: #19408e; }
:root[data-theme="light"] .app-header { background: linear-gradient(100deg, rgba(28, 80, 184, .93), rgba(23, 69, 161, .92) 55%, rgba(27, 60, 127, .92)); border-bottom-color: rgba(235, 196, 107, .55); }
:root[data-theme="light"] .brand small.brand-en { color: #c8d8ef; }
