/* 浅香槟金主题：颜色覆盖层。场景图片、角色、布局与训练行为保持原样。 */
:root {
  --gold-paper: #fffdf7;
  --gold-cream: #fbf6eb;
  --gold-soft: #f4ead4;
  --gold-selected: #f1e3c2;
  --gold-edge: #dccba6;
  --gold-edge-soft: #e9dfca;
  --gold-ink: #4d3c2b;
  --gold-text: #624f38;
  --gold-muted: #78654e;
  --gold-accent: #b18d49;
  --gold-focus: #946e35;
  --blue: #8e6b36;
  --blue-dark: #745229;
  --text: #4d3c2b;
  --muted: #78654e;
  --line: #e5d9bf;
  --panel: #fcf7ec;
  --mint: #cfb77f;
  --quest-ink: #4d3c2b;
  --quest-text: #624f38;
  --quest-muted: #78654e;
  --quest-accent: #a28043;
  --quest-line: #e5d9bf;
  --quest-paper: #fffdf7;
  --quest-soft: #f5ecd8;
  --control-ink: #5a4630;
  --control-border: #dac8a4;
  --control-surface: linear-gradient(155deg, #fffef9, #f8efdc) padding-box,
    linear-gradient(110deg, #e6d6b1, #d3bb87 48%, #e9ddc3) border-box;
  --glass: linear-gradient(145deg, #fffdf8f2, #faf1ded9);
  --glass-edge: #d9c6a0;
  --glass-shadow: inset 0 1px 0 #ffffffc9, 0 4px 14px #7251270c;
  --shadow: 0 8px 25px #7251270d;
  --cultivation-accent: #805f2e;
  --cultivation-accent-deep: #75582f;
  --cultivation-gold: #805f2e;
  --cultivation-ink: #4d3c2b;
  --cultivation-muted: #78654e;
  --cultivation-surface: #fbf4e4;
  --cultivation-surface-raised: #fffdf6;
  --cultivation-border: #dfcfae;
  --cultivation-track: #eaddc0;
  --cultivation-fill: #c5a365;
  --cultivation-complete: #805f2e;
  --cultivation-green: #805f2e;
  --cultivation-green-deep: #705431;
}
html.white-controls {
  color-scheme: light;
  --control-ink: #5a4630;
  --control-border: #dac8a4;
  --control-surface: linear-gradient(155deg, #fffef9, #f8efdc) padding-box,
    linear-gradient(110deg, #e6d6b1, #d3bb87 48%, #e9ddc3) border-box;
}
body.master-edition { color: var(--gold-ink); background-color: var(--gold-cream); }
body.master-edition.in-training {
  --academy-veil: linear-gradient(105deg, #fffaf0ac, #fff7e857 49%, #f7ebd83d);
  --academy-paper: #fffdf7;
  --academy-paper-edge: #e4d7b9;
}
body.master-edition.in-training .main-panel:has(#conversation:not([hidden])) { background-color: #f7efdd; }
body.master-edition ::selection { background: #ead8b0; color: #493722; }
body.master-edition :is(textarea, input, select) { caret-color: #8f692f; }
body.master-edition :is(button, a, summary, select, textarea, input):focus-visible { outline-color: var(--gold-focus); }
body.master-edition :is(textarea, input, select):focus { border-color: #c2a36a !important; box-shadow: 0 0 0 3px #d9bd7e1a; }
body.master-edition :is(.chat-scroll, .settings-panel, .history-list, .draft-comparison pre) { scrollbar-color: #cbb487 #faf4e7; }

/* 纸白与浅金承接既有的山水背景，不给插画本身染色。 */
body.master-edition .app-shell {
  background-color: var(--gold-cream);
  background-image: linear-gradient(#fffaf0ed, #fbf4e6c9), url('/assets/ink-landscape-white-v1.png');
}
body.master-edition .sidebar { background: #faf5e9ed; border-right-color: #e4d8bd; }
html.white-controls body.master-edition .topbar { background: #fffdf6ef; border-color: #e5dac1; box-shadow: 0 2px 14px #79613e06; }
body.master-edition .settings-panel { background: #fcf7ecfa; border-color: #e2d3b4; box-shadow: -10px 0 30px #785b3012; }
body.master-edition .settings-section { background: #fffdf7ef; border-color: #fdf8eb; box-shadow: 0 5px 18px #80633307; }
body.master-edition .drawer-overlay { background-color: #4c3b2840; }
html.white-controls body.master-edition .quest-nav.stage-nav { background: #fffdf6f5; border-color: #fffdf7; box-shadow: 0 0 0 1px #e1d2af, 0 6px 20px #7a61350c; }
html.white-controls body.master-edition .quest-board { background: linear-gradient(125deg, #fffdf7fc, #f7eed9fc); border-color: #dfcca3; box-shadow: 0 7px 24px #7c602e0b; }
html.white-controls body.master-edition :is(.question-card, .oral-task, .revision-review) { background: #fffdf7fc; border-color: #e3d6b8; box-shadow: 0 7px 23px #785c310c; }
html.white-controls body.master-edition .coach-next-action { background: #fbf4e4fa; border-color: #dfcea9; border-left-color: #c1a269; box-shadow: 0 5px 18px #7a613508; }
html.white-controls body.master-edition :is(.training-tip, .task-focus-toolbar, .practice-mode) { background: #fffaf0f2; border-color: #e9dec7; }
html.white-controls body.master-edition .round-summary { background: #f5ebd3fc; border-color: #dfcca4; box-shadow: 0 5px 19px #7b5b2c09; }
body.master-edition .round-summary > span { background: #e9d7ae; color: #785c30; }

/* 文字以墨棕承担对比，浅金只用于底色、边线和进度。 */
html.white-controls body.master-edition :is(.brand, .page-title strong, .settings-heading h2, .settings-section h3, .history-item strong, .quest-board h2, .question-card-heading strong, .oral-task-heading h2, .coach-next-action h2, .review-heading h2, .round-summary h2, .feedback-section h3, .reply-section h3) { color: var(--gold-ink); }
html.white-controls body.master-edition :is(.welcome-description, .quest-description, .quest-checklist li, .question-content > p, .question-requirements strong, .question-requirements p, .question-hints-content p, .oral-task-intro, .oral-task-list, .oral-task-scaffold, .oral-task-scaffold strong, .training-tip, .coach-next-action p, .feedback-section p, .reply-section p, .bubble, .revision-changes, .revision-goal label, .round-summary p, .settings-section select, .settings-section textarea) { color: var(--gold-text); }
html.white-controls body.master-edition :is(.brand small, .page-title small, .sidebar-label, .sidebar-label span, .history-item small, .empty-history, .sidebar-bottom, .sidebar-bottom small, .eyebrow, .welcome-note, .quest-eyebrow, .quest-mode-note, .practice-mode, .practice-mode small, .question-label, .question-content p.source-note, .question-hints-content p:first-child, .section-kicker, .section-eyebrow, .timer-label, .timer-status, .oral-task-note, .message-meta, .checks-label, .check-item, .input-hint, .composer-disclaimer, .field-note, .settings-note, .settings-note span, .settings-section label, .review-heading > span) { color: var(--gold-muted); }
body.master-edition :is(#questionReference, #questionTrainingGoal, #revisionSummary, #revisionGoalNote) { color: var(--gold-muted); }
body.master-edition :is(.question-hints-content a, .question-hints summary, .training-tip button) { color: #8a652e; border-color: #d9bf8e; text-decoration-color: #cbb07c; text-underline-offset: 3px; }
body.master-edition .question-requirements, body.master-edition .question-hints { border-color: #e5dac2; }
body.master-edition #questionReference { border-color: #e8dec9; }
body.master-edition .quest-mode-note { border-top-color: #e5d8ba; }
body.master-edition .quest-checklist li::before, body.master-edition .oral-task-list li::before { color: #a48349; }
body.master-edition .sidebar-bottom { border-top-color: #e4d8bd; }
body.master-edition .device-dot { background: #b49a67; }
body.master-edition .sidebar-label span { background: #efe3c9; }

/* 首页与人物底座：人物实图和书院素材保持原色。 */
body.master-edition .welcome-master { color: #73562e; }
body.master-edition .welcome-master small { color: var(--gold-muted); }
body.master-edition .quest-welcome h1 { color: #51402b; }
body.master-edition .quest-welcome h1 span:last-child { color: #947340; }
body.master-edition .quest-welcome-tasks article { background: linear-gradient(145deg, #fffdf8f2, #f8efddec); border-color: #e4d5b5; box-shadow: 0 4px 15px #7a613506; }
body.master-edition .quest-welcome-tasks h2 { color: #73572f; }
body.master-edition .quest-welcome-tasks p { color: var(--gold-muted); }
body.master-edition .quest-card-number,
body.master-edition .quest-welcome-tasks article:nth-child(2) .quest-card-number,
body.master-edition .quest-welcome-tasks article:nth-child(3) .quest-card-number { color: #896a37; background: #efe1bf; }
body.master-edition .master-portrait { background: radial-gradient(ellipse at 50% 30%, #fffdf3, #eee0bc); border-color: #dbc69a; box-shadow: inset 0 1px 0 #fff, 0 3px 11px #8162350c; }
body.master-edition .avatar { background: #f1e4c6; color: #96743a; border-color: #dbc69a; }

/* 统一控件；运行中的圆球按钮继续保留原透明收拢行为。 */
html.white-controls body.master-edition button:not(.morph-active),
html.white-controls body.master-edition select,
html.white-controls body.master-edition input { color: var(--control-ink); border-color: #e1d1ae; }
html.white-controls body.master-edition button:not(.morph-active):not(:disabled):hover,
html.white-controls body.master-edition select:not(:disabled):hover { color: #5b4226; background: #f6ead0; border-color: #cbb07a; box-shadow: inset 0 1px 0 #fffdf3, 0 4px 13px #7c5c2e0c; }
html.white-controls body.master-edition :is(.quest-primary, .outline-button, .save-preferences):not(.morph-active),
html.white-controls body.master-edition #questMainAction { color: #4b3823; background: linear-gradient(140deg, #f1e2bf, #e5cf9b); border-color: #cfb37b; box-shadow: inset 0 1px 0 #fff8e4, 0 5px 15px #8b673617; }
html.white-controls body.master-edition :is(.quest-primary, .outline-button, .save-preferences):not(.morph-active):not(:disabled):hover,
html.white-controls body.master-edition #questMainAction:not(:disabled):hover { color: #49331c; background: linear-gradient(140deg, #eddbb3, #dfc48b); border-color: #bfa168; }
body.master-edition .start-button.quest-primary > span:not(.orb-visual):not(.orb-label) { color: #6f5026; background: #fff8e975; box-shadow: none; }
html.white-controls body.master-edition :is(#taskFocusToggle, #useCoachAction, #revisionGoalSave, #roundNextRound) { color: #7b5b2d; background: #faf1de; border-color: #e1d0a8; box-shadow: none; }
html.white-controls body.master-edition .history-item { color: #725d42; background: #fffdf73d; border-color: transparent; }
html.white-controls body.master-edition .history-item.active { color: #7d5e2e; background: #f6ecd7; border-color: #d9c49c; box-shadow: 0 3px 11px #7d613009; }
body.master-edition .aurora-button::before { background: radial-gradient(ellipse at 13% 140%, #d6b56e38, transparent 45%), radial-gradient(ellipse at 75% 150%, #eadcc025, transparent 48%); }
body.master-edition .focus-view-button[aria-pressed="true"] { color: #795b2d; background: #efe0bd; border-color: #d5bc89; }
html.white-controls body.master-edition .topbar .mode-badge { color: #7b633b; background: #f4ebd7; border-color: #e1d1ac; }
html.white-controls body.master-edition .topbar .mode-badge.model { color: #745223; background: #f8ebcb; border-color: #d7bc80; }

/* 三关状态、进度与阅读小标签。 */
html.white-controls body.master-edition .quest-nav.stage-nav button { background: #fffdf7d9; border-color: #e8ddc5; }
body.master-edition .quest-nav button strong, body.master-edition .quest-nav .quest-step-status { color: var(--gold-muted); }
body.master-edition .quest-nav button > span { color: #8a7351; background: #f4ecd9; border-color: #e1d4b7; }
html.white-controls body.master-edition .quest-nav.stage-nav button.current,
html.white-controls body.master-edition .quest-nav.stage-nav button.is-current { color: #624925; background: #f3e6c8; border-color: #d9c18f; }
body.master-edition .quest-nav.stage-nav button.current strong,
body.master-edition .quest-nav.stage-nav button.is-current strong { color: #654921; }
body.master-edition .quest-nav button.current > span,
body.master-edition .quest-nav button.is-current > span { color: #503b21; background: #d9be84; border-color: #ccb176; }
body.master-edition .quest-nav button.done > span,
body.master-edition .quest-nav button.is-done > span,
body.master-edition .quest-nav button.completed > span { color: #694e27; background: #ecdcba; border-color: #d6bd8d; }
body.master-edition .quest-nav.stage-nav button:disabled strong { color: #8c7a60; }
body.master-edition .quest-nav.stage-nav i { background: #ddcba6; }
body.master-edition .quest-nav .motion-stage-indicator { background: #f3e6c8; border-color: #deca9e; box-shadow: 0 3px 9px #80612c0d; }
body.master-edition .quest-progress-text { color: #7d6030; background: #efe0bc; }
body.master-edition .quest-progress-track { background: #eaddbf; }
body.master-edition #questProgressBar { background: linear-gradient(90deg, #d5bb82, #b18a43); }
body.master-edition .practice-mode > div { background: #f2e8d2; }
html.white-controls body.master-edition .practice-mode button.selected { color: #715126; background: #fff6df; border-color: #d9c294; box-shadow: 0 2px 7px #81602d09; }
body.master-edition :is(.question-label, .question-tags span, .oral-task-heading > span) { background: #f4e9ce; color: #7e643b; }
body.master-edition .reading-timer, body.master-edition .oral-task-scaffold { background: #f8f0dd; border-color: #e4d6b8; }
body.master-edition .reading-timer strong { color: #856534; }
body.master-edition .oral-task-scaffold strong { color: #75603e; }
body.master-edition .coach-action-mark, body.master-edition .training-tip > span { color: #aa8b4e; }
body.master-edition .round-summary > span { background: #ead8ac; color: #846434; }

/* 反馈与两稿对照：纸面接近实色，避免背景影响正文阅读。 */
html.white-controls body.master-edition .message.assistant .bubble { color: #5b4833; background: #fffdf8fc; border-color: #e4d8bd; box-shadow: 0 5px 18px #8063330a; }
html.white-controls body.master-edition .message.user .bubble { color: #614a2e; background: #f3e7cdfc; border-color: #dfcda7; box-shadow: 0 4px 14px #80633309; }
html.white-controls body.master-edition .message-meta { color: var(--gold-muted); background: #fff9eefa; }
html.white-controls body.master-edition .checks { background: #fcf7eafa; border-color: #e5d7b7; }
body.master-edition .feedback-section + .feedback-section,
body.master-edition .reply-section + .reply-section { border-color: #e7dbc1; }
html.white-controls body.master-edition .draft-comparison article { background: #fdf9ef; border-color: #e4d7bb; }
html.white-controls body.master-edition .draft-comparison article:last-child { background: #fbf1db; border-color: #dcc595; }
html.white-controls body.master-edition .draft-comparison h3 { color: #876c3f; border-bottom-color: #e7d8b7; }
body.master-edition .draft-comparison pre { color: #654e32; }
body.master-edition .revision-changes, body.master-edition .revision-goal label { color: #786140; }
html.white-controls body.master-edition .revision-goal textarea { color: #59442d; background: #fffdf7; border-color: #e1d2af; }

/* 输入和加载效果沿用原交互，只改变材质与浏览器原生颜色。 */
html.white-controls body.master-edition .composer-area { background: linear-gradient(0deg, #fbf6eaf7, #fbf6eada 58%, #fbf6ea00); }
html.white-controls body.master-edition .composer { background: #fffdf7fc; border-color: #e3d4b2; box-shadow: inset 0 1px 0 #fff, 0 6px 24px #75552a12; }
html.white-controls body.master-edition .composer::before { background: radial-gradient(ellipse at 13% 130%, #dfc17e26, transparent 45%), radial-gradient(ellipse at 73% 150%, #f1e5c826, transparent 45%); }
html.white-controls body.master-edition .composer:focus-within { background: #fffdf7; border-color: #bb9a5a; box-shadow: inset 0 1px 0 #fff, 0 7px 24px #75552a17; }
html.white-controls body.master-edition .composer textarea { color: #57422c; caret-color: #896331; }
body.master-edition :is(.composer textarea, .settings-section textarea, .revision-goal textarea)::placeholder { color: #847057; opacity: 1; }
html.white-controls body.master-edition .composer-disclaimer { color: #78654e; background: #fffaf0ed; }
html.white-controls body.master-edition .composer :is(.voice-button, .outline-template-button, .stop-button, .send-button):not(.morph-active) { color: #79592e; background: #fbf2df; border-color: #dfcba2; box-shadow: inset 0 1px 0 #fffdf4, 0 3px 9px #80633309; }
html.white-controls body.master-edition .composer .send-button:not(.morph-active):not(:disabled) { background: #ecd9ae; color: #5d4220; border-color: #cfb37e; }
html.white-controls body.master-edition .voice-button.recording { color: #a45742; border-color: #dba68b; background: #fff7ec; }
body.master-edition .morph-active .orb-visual { background: #fff9e9; box-shadow: 0 0 18px #cfad5d24, inset 0 0 0 1px #cdb68542; }
body.master-edition .orb-visual canvas { filter: sepia(.82) saturate(.7); }
body.master-edition .morph-button .orb-label, body.master-edition .composer .morph-active .orb-label { color: #7b6546; }
body.master-edition .morph-resolved .orb-visual { box-shadow: 0 0 16px #c5a55729, inset 0 0 0 1px #cdb07155; }
html.white-controls body.master-edition .morph-button.morph-reduced { color: #70522a; background: #fcf3df; border-color: #d0b884; }
body.master-edition .pending .bubble b { background: #bd9f65; }
body.master-edition .pending .bubble span { color: #806b4b; }
body.master-edition .toast { color: #634d31; background: #fff9eaf5; border-color: #d8c393; box-shadow: 0 6px 22px #785b3012; }

/* 兼容旧修行组件变量，同时给后续经验展示提供相同的颜色 token。 */
html.white-controls body.master-edition #cultivationPanel {
  --cultivation-green: #805f2e;
  --cultivation-green-deep: #705431;
  --cultivation-gold: #805f2e;
  --cultivation-muted: #78654e;
  --cultivation-accent: #805f2e;
  --cultivation-accent-deep: #75582f;
  --cultivation-ink: #4d3c2b;
  --cultivation-surface: #fbf4e4;
  --cultivation-surface-raised: #fffdf6;
  --cultivation-border: #dfcfae;
  --cultivation-track: #eaddc0;
  --cultivation-fill: #c5a365;
  --cultivation-complete: #805f2e;
  color: #705431;
  background: linear-gradient(145deg, #fffaf0f7, #f6ecd6ed);
  border-color: #ddcda9;
  box-shadow: inset 0 1px 0 #fffdf5;
}
body.master-edition #cultivationPanel .cultivation-route::before { background: linear-gradient(#cbb0788c, #d9c59a66); }
body.master-edition #cultivationPanel .cultivation-task:not(:disabled):hover { color: #74542a; background: #f1e4c6cc; border-color: #d9c49b; }
body.master-edition #cultivationPanel .cultivation-node { background: #fbf4e4; border-color: #cdb991; }
body.master-edition #cultivationPanel .is-active .cultivation-node { border-color: #b18d49; box-shadow: 0 0 0 4px #c7a76419; }
body.master-edition #cultivationPanel .is-submitted .cultivation-node { background: #b18d49; border-color: #a5813e; box-shadow: 0 0 0 3px #c7a76414; }
body.master-edition #cultivationPanel .is-active :is(.cultivation-task-name, .cultivation-task-status),
body.master-edition #cultivationPanel .is-submitted .cultivation-task-status { color: #846230; }
body.master-edition #cultivationPanel .is-locked :is(.cultivation-task-name, .cultivation-task-status) { color: #8b7b63; }
@keyframes cultivation-light-on {
  0% { box-shadow: 0 0 0 1px #b7924b33, 0 0 0 #b7924b00; }
  38% { box-shadow: 0 0 0 6px #b7924b1f, 0 0 17px #b7924b42; }
  100% { box-shadow: 0 0 0 3px #b7924b17, 0 0 0 #b7924b00; }
}
@keyframes cultivation-soft-light {
  0%, 100% { background-color: transparent; }
  38% { background-color: #f3e4bd80; }
}

/* 插画青绿保留，仅开场文字与按钮接入浅金材质。 */
body.master-edition .ci-main-title { color: #654a29; text-shadow: 0 2px 0 #fffae6, 0 5px 22px #d9bf7a3b; }
body.master-edition :is(.ci-eyebrow, .ci-subtitle, .ci-corner-note) { color: #806540; }
body.master-edition .ci-title-underline { background: linear-gradient(90deg, #a5803d, #d8bd7f 58%, transparent); }
body.master-edition .challenge-intro .ci-skip { color: #795d32; border-color: #ccb88b8c; background: #fff8e9e8; box-shadow: inset 0 1px 0 #fffef5, 0 3px 14px #785b3009; }
body.master-edition .challenge-intro .ci-skip:hover { color: #60431f; background: #fff9e9; border-color: #b99c61; }
body.master-edition .ink-control-wash { background: radial-gradient(ellipse, #b18d4933, #d8c18d1c 45%, transparent 74%); }
body.master-edition .ink-control-tide { background: radial-gradient(ellipse at 50% 100%, #c6a3654d, #dac89914 54%, transparent 74%); }
body.master-edition .ink-control-particle { background: #b2935f; }

@media (max-width: 700px) {
  body.master-edition.in-training { --academy-veil: linear-gradient(105deg, #fff8eeb8, #fbf3e178 63%, #f3e9d875); }
  body.master-edition .sidebar { background: #faf4e8f7; }
  html.white-controls body.master-edition .topbar { background: #fffaf0f2; }
  html.white-controls body.master-edition .quest-nav.stage-nav { background: #fffaf0f5; }
}
@media (prefers-reduced-transparency: reduce) {
  html.white-controls body.master-edition :is(.composer, .quest-board, .question-card, .oral-task, .revision-review, .settings-section) { background: #fffaf0; }
}
