:root {
  --site-bg:#FCFCFC; --site-surface:#FFFFFF; --site-soft:#F1F4F7;
  --site-text:#0A1317; --site-muted:#5D6C7B; --site-border:#DADDE1;
  --site-primary:#0457CB; --site-primary-hover:#0349AE; --site-primary-soft:#E8F1FF;
  --site-on-primary:#FFFFFF; --site-control-border:#828589;
  --site-success:#237A39; --site-success-soft:#EAF5EC;
  --site-danger:#B42318; --site-danger-soft:#FFF0EE;
  --site-warning:#795400; --site-warning-soft:#FFF4D8;
}
:root[data-theme='dark'] {
  --site-bg:#10171D; --site-surface:#182129; --site-soft:#232F3A;
  --site-text:#F0F4F8; --site-muted:#ACBAC8; --site-border:#3D4A57;
  --site-primary:#8CBFFF; --site-primary-hover:#B4D5FF; --site-primary-soft:#193452;
  --site-on-primary:#0A203C; --site-control-border:#8292A1;
  --site-success:#94D6A4; --site-success-soft:#183B2B;
  --site-danger:#FFB4AB; --site-danger-soft:#432522;
  --site-warning:#F5D588; --site-warning-soft:#3B301B;
}
.site-preferences { display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--site-text); }
.site-preference { display:flex; align-items:center; gap:5px; position:relative; margin:0; padding:0 9px; border-radius:999px; background:var(--site-soft); color:var(--site-text); font:400 13px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif; }
.site-preference-icon { display:flex; align-items:center; width:18px; flex-shrink:0; }
.site-preference-icon svg { display:block; width:18px; height:18px; }
.site-preference select { color:inherit; background:transparent; border:0; border-radius:999px; min-height:40px; height:40px; padding:0 2px; width:auto; max-width:132px; font:inherit; cursor:pointer; }
.site-preference select option { color:var(--site-text); background:var(--site-surface); }
.site-preference select:focus-visible { outline:2px solid var(--site-primary); outline-offset:3px; }
.site-preference-name { position:absolute; top:calc(100% + 7px); right:0; white-space:nowrap; padding:5px 10px; background:var(--site-surface); border:1px solid var(--site-border); color:var(--site-text); border-radius:10px; visibility:hidden; opacity:0; z-index:100; pointer-events:none; }
.site-preference:focus-within .site-preference-name,.site-preference:hover .site-preference-name { opacity:1; visibility:visible; }
.site-theme-highlight { opacity:0; }
.site-preference:focus-within .site-theme-highlight,.site-preference:hover .site-theme-highlight { opacity:1; }
@media(max-width:480px) { .site-preferences { gap:6px; }.site-preference { padding-inline:7px; font-size:12px; }.site-preference select { min-height:44px; height:44px; max-width:105px; } }
@media(prefers-reduced-motion:reduce) { .site-preferences * { transition:none!important; animation:none!important; } }
