/* Theme selector plus explicit legacy-theme boundary. The legacy palette remains in styles.css. */
html[data-theme="classic"] { color-scheme:dark; }
html[data-theme="classic"] body { background:var(--bg);color:var(--text); }

.theme-control {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:0 8px;
  border:1px solid var(--line-strong);
  border-radius:10px;
  color:var(--mint);
  background:var(--surface-soft);
}
.theme-control svg { flex:0 0 18px;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.theme-select { min-width:112px;min-height:44px;border:0;color:var(--text);background:transparent;font:inherit;font-size:11px;font-weight:800;cursor:pointer;touch-action:manipulation; }
.theme-select option { color:#10231b;background:#fff; }
.theme-select:focus-visible { outline:3px solid var(--gold);outline-offset:3px; }

@media(max-width:1024px){.theme-control{order:5}.language-select{order:6}}
@media(max-width:767px){.theme-control{flex:1 1 116px;max-width:154px}.theme-select{width:100%;min-width:0}.theme-control svg{display:none}}
@media(max-width:380px){.theme-control{flex-basis:108px;max-width:132px;padding-inline:5px}.theme-select{font-size:10px}}
@media(prefers-reduced-motion:reduce){html[data-theme] body{transition:none}}
