/* 显式选择优先于系统媒体查询；无脚本时仍使用各页面原有系统主题。 */
html:root[data-theme="light"]{color-scheme:light;--bg:#F7F8FA;--text:#17212D;--surface:#fff;--muted:#617084;--line:#DCE3EA;--blue:#086BD8;--wash:#EDF1F6;--nav:rgba(247,248,250,.92);--kora-wash:#F2ECE8;--code-wash:#F3ECEA;--shadow:0 18px 36px rgba(29,49,75,.10);--legacy-bg:#F7F8FA;--legacy-surface:#fff;--legacy-text:#17212D;--legacy-muted:#617084;--legacy-line:#DCE3EA;--legacy-blue:#086BD8;--legacy-wash:#EDF1F6;--legacy-nav:rgba(247,248,250,.94)}
html:root[data-theme="dark"]{color-scheme:dark;--bg:#10151D;--surface:#1A222D;--text:#F2F5FA;--muted:#A7B2C2;--line:#303C4B;--blue:#70B6FF;--wash:#202B3A;--nav:rgba(16,21,29,.92);--kora-wash:#302824;--code-wash:#30272A;--shadow:0 18px 36px rgba(0,0,0,.25);--legacy-bg:#10151D;--legacy-surface:#1A222D;--legacy-text:#F2F5FA;--legacy-muted:#A7B2C2;--legacy-line:#303C4B;--legacy-blue:#70B6FF;--legacy-wash:#202B3A;--legacy-nav:rgba(16,21,29,.94)}
html .theme-picker{display:inline-flex;position:relative;align-items:center;flex:none;margin:0;color:var(--legacy-text,var(--text))}
html .theme-picker[hidden]{display:none}
html .theme-picker svg{position:absolute;left:12px;width:18px;height:18px;pointer-events:none}
html .theme-picker select{font:inherit;font-size:12px;height:52px;min-width:124px;padding:0 25px 0 38px;border:1px solid var(--legacy-line,var(--line));border-radius:10px;background:var(--legacy-surface,var(--surface));color:var(--legacy-text,var(--text));cursor:pointer}
html .theme-picker select:focus-visible{outline:3px solid var(--legacy-blue,var(--blue));outline-offset:4px}
@media(max-width:760px){.global-nav,body.legacy-page nav.legacy-global-links{gap:8px}.header-inner,body.legacy-page .legacy-header-inner{gap:8px}.language button,body.legacy-page .legacy-language .lang-btn{padding-inline:5px}html .theme-picker select{width:44px;min-width:44px;height:50px;padding:0;color:transparent;appearance:none}html .theme-picker svg{left:13px}html .theme-picker option{color:var(--legacy-text,var(--text))}}
@media print{html .theme-picker{display:none}}
