/* 开发预览：?theme=light。未指定（或 theme=dark）时使用各声明中原样保留的深色回退值。
   仅在 screen 下定义浅色变量，报告打印继续使用原来的纸面配色。
   同一语义可有不同深色回退值，不把原有颜色差异合并或重新估算。 */
@media screen {
  :root[data-theme="light"] {
    color-scheme:light;
    --night:#F8F9FB;
    --night-2:#FFFFFF;
    --ink:#1C314A;
    --muted:#51647A;
    --paper:#FFFFFF;
    --paper-2:#F8F9FB;
    --gold:#87631D;
    --gold-bright:#87631D;
    --gold-dark:#87631D;
    --line:#D9DEE5;
    --glass:#FFFFFF;

    --theme-surface-page:#F8F9FB;
    --theme-surface-navigation:#FFFFFF;
    --theme-surface-card:#FFFFFF;
    --theme-surface-library:#E4EFEC;
    --theme-surface-selected:#F2EBDD;
    --theme-surface-action:#87631D;
    --theme-text-on-action:#FFFFFF;
    --theme-surface-decoration:rgba(157,130,79,.035);
    --theme-surface-error:#FFF1F2;
    --theme-surface-knob:#FFFFFF;
    --theme-surface-switch-on:#87631D;
    --theme-surface-switch-off:#75869A;
    --theme-text-primary:#1C314A;
    --theme-text-secondary:#51647A;
    --theme-text-accent:#87631D;
    --theme-text-error:#9D303B;
    --theme-icon-accent:#87631D;
    --theme-status-success:#376B55;
    --theme-text-on-error:#FFFFFF;
    --theme-chart-ji:#9D303B;
    --theme-chart-quan:#F5E5D3;
    --theme-chart-ke:#E4EFEC;
    --theme-chart-lu:#F2EBDD;
    --theme-shadow-status:rgba(55,107,85,.12);
    --theme-shadow-decoration:rgba(157,130,79,.035);
    --theme-border-subtle:#D9DEE5;
    --theme-border-control:#75869A;
    --theme-border-entry:#9D824F;
    --theme-border-accent:#87631D;
    --theme-border-error:#9D303B;
    --theme-overlay-scrim:rgba(28,49,74,.32);
    --theme-shadow-panel:rgba(28,49,74,.08);
    --theme-shadow-text:rgba(28,49,74,0);
    --theme-scene-background:#F8F9FB;
    --theme-scene-haze:rgba(255,255,255,.08);
    --theme-scene-vignette:rgba(248,249,251,0);

    /* 仅改变画笔颜色，坐标、尺寸、线宽、时间参数仍由原 Canvas 绘制函数控制。 */
    --canvas-orbit-rgb:157,130,79;
    --canvas-metal-rgb:135,99,29;
    --canvas-shadow-rgb:117,134,154;
    --canvas-sun-rgb:209,163,67;
    --canvas-highlight-rgb:255,247,219;
    --canvas-planet-1-rgb:171,137,73;
    --canvas-planet-2-rgb:98,131,170;
    --canvas-planet-3-rgb:162,107,80;
    --canvas-planet-4-rgb:103,147,161;
    --canvas-planet-5-rgb:188,150,78;
  }

  /* 单独的功能语义：资料库填充、普通分组标题和必要交互边界。 */
  /* 主操作与浅米金选中态分开；仅覆盖浅色屏幕配色，保留深色与打印原值。 */
  :root[data-theme="light"] .gold-button,
  :root[data-theme="light"] #report-view .report-bottom-bar > .gold-button,
  :root[data-theme="light"] .wheel-head [data-wheel-action="confirm"] {
    color:var(--theme-text-on-action);
    background:var(--theme-surface-action);
  }
  :root[data-theme="light"] #home-view .hero-copy h1 em { color:var(--theme-text-primary); }
  :root[data-theme="light"] .customer-profile dt { color:var(--theme-text-secondary); }
  :root[data-theme="light"] #mine-view .mine-shortcuts [data-action="profiles"] { background:var(--theme-surface-library); }
  :root[data-theme="light"] #mine-view .mine-group h2 { color:var(--theme-text-primary); }
  :root[data-theme="light"] :is(input,textarea)::placeholder { color:var(--theme-text-secondary); opacity:1; }
  :root[data-theme="light"] :is(input,textarea,select) { caret-color:var(--theme-text-primary); }
  :root[data-theme="light"] .library-toolbar label { border-color:var(--theme-border-control); }
  :root[data-theme="light"] .profile-choice { border-color:var(--theme-border-control); }
  :root[data-theme="light"] .profile-choice.selected { border-color:var(--theme-border-accent); }
  :root[data-theme="light"] #profiles-view .profile-choice { border-color:var(--theme-border-entry); }
  :root[data-theme="light"] :is(.audit-panel,.audit-technical) { color:var(--theme-text-primary); background:var(--theme-surface-card); }
  :root[data-theme="light"] ::selection { color:var(--theme-text-primary); background:var(--theme-surface-selected); }
}
