.theme-toggle{border:1px solid var(--line);background:transparent;color:var(--ink);border-radius:50px;padding:8px 12px;font:inherit;font-size:12px;white-space:nowrap}
.nav{gap:20px}
html[data-theme=dark] body.studio{--bg:#13201e;--ink:#edf5ef;--muted:#adbbb3;--accent:#8bd5b9;--soft:#20332c;--line:#3b5146;--panel:#192923;--coretext:#10261d}
html[data-theme=dark] body.notebook{--bg:#231f2a;--ink:#f5eef8;--muted:#c1b5cb;--accent:#c8aff5;--soft:#342b43;--line:#51435f;--panel:#2b2533;--coretext:#23172e}
html[data-theme=light] body.lab{--bg:#f5f8fc;--ink:#172c40;--muted:#566e82;--accent:#245f94;--soft:#e6eef7;--line:#cbd9e6;--panel:#fff;--coretext:#fff}
html[data-theme=dark] .notebook .visual{background:var(--soft)}
html[data-theme=dark] .notebook .lab-section{background:#2e2831}
html[data-theme=dark] .notebook .bottom{background:var(--soft)}
html[data-theme=light] .lab .visual{background:radial-gradient(ellipse at center,#d9e9f7,#edf3fa 72%)}
html[data-theme=light] .lab .bottom{background:var(--soft)}
html[data-theme=light] .lab .btn:not(.secondary){color:#fff}
html[data-theme=light] .lab .bottom .btn{background:var(--accent)}
@media(prefers-reduced-motion:no-preference){body,.top,.preview-note,.visual,.node,.result,.course,.miniapp,.ministat div,.lab-section,.bottom,dialog,footer,.btn,.filter,.theme-toggle,.sound{transition-property:background-color,color,border-color,box-shadow,transform;transition-duration:.22s;transition-timing-function:ease}}
@media(max-width:850px){.nav{gap:12px}nav{gap:14px}.theme-toggle,.sound{padding:8px 10px}}
@media(max-width:650px){.brand{font-size:19px}.theme-toggle,.sound{font-size:11px;padding:7px 8px}.nav{column-gap:8px}}
/* Native selector keeps all three choices discoverable and keyboard accessible. */
.theme-select{cursor:pointer;background:var(--panel);color:var(--ink);min-width:108px;padding-right:8px}
.theme-select option{background:var(--panel);color:var(--ink)}
.theme-select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
