.theme-toggle{flex:0 0 auto;border:1px solid #cbd9ca;border-radius:999px;background:#fff;color:#284b3d;padding:9px 13px;font-size:12px;font-weight:700;white-space:nowrap}
.theme-toggle:hover{border-color:#6b9276;background:#edf4e9}
.theme-toggle:focus-visible{outline:3px solid #89b883}
.auth-theme-bar{display:flex;justify-content:flex-end;margin-bottom:16px}
.auth-theme-bar .theme-toggle{font-size:13px}
@media(max-width:760px){header .theme-toggle{width:100%}}

:root[data-theme="dark"]{color-scheme:dark;--night:#152329;--night-deep:#101b20;--night-card:#203239;--night-border:#35504d;--night-text:#e9f1e9;--night-muted:#b5c9bf;--night-accent:#b9de9c}
[data-theme="dark"] body{background:var(--night);color:var(--night-text)}
[data-theme="dark"] a{color:#c4e9aa}
[data-theme="dark"] small,[data-theme="dark"] .muted,[data-theme="dark"] .empty,[data-theme="dark"] .loading{color:var(--night-muted)}
[data-theme="dark"] .sidebar{background:var(--night-deep);border-color:var(--night-border)}
[data-theme="dark"] .brand{color:var(--night-text)}
[data-theme="dark"] .mark{background:#b9de9c;color:#13251e}
[data-theme="dark"] .local,[data-theme="dark"] .eyebrow,[data-theme="dark"] .kicker{color:#b6d5a3}
[data-theme="dark"] .sidebar nav button{color:#d2e2d9}
[data-theme="dark"] .sidebar nav button:hover,[data-theme="dark"] .sidebar nav button.active{background:#29433e;color:#e4f4d7}
[data-theme="dark"] header,[data-theme="dark"] footer{border-color:var(--night-border)}
[data-theme="dark"] #breadcrumb,[data-theme="dark"] .selects label,[data-theme="dark"] .audio-speed-control,[data-theme="dark"] .account-actions small,[data-theme="dark"] footer{color:var(--night-muted)}
[data-theme="dark"] .selects select{color:var(--night-text)}
[data-theme="dark"] .selects option{background:var(--night-card);color:var(--night-text)}
[data-theme="dark"] .hero p{color:var(--night-muted)}
[data-theme="dark"] .hero-visual{background:#29443c;border-color:var(--night-border)}
[data-theme="dark"] .hero-visual strong{color:#d4edc5}
[data-theme="dark"] .card,[data-theme="dark"] .message,[data-theme="dark"] .guide,[data-theme="dark"] .auth-card{background:var(--night-card);border-color:var(--night-border);color:var(--night-text)}
[data-theme="dark"] .subtle,[data-theme="dark"] .message.user{background:#2b453d}
[data-theme="dark"] .tag,[data-theme="dark"] .tabs button.active{background:#315343;color:#e1f5d4}
[data-theme="dark"] .course .bigword{color:#b8d7a9}
[data-theme="dark"] .btn{background:#b9de9c;border-color:#b9de9c;color:#10251d}
[data-theme="dark"] .btn.secondary,[data-theme="dark"] .theme-toggle{background:#253b3e;border-color:#5c7970;color:#e6f2e7}
[data-theme="dark"] .btn.secondary:hover,[data-theme="dark"] .theme-toggle:hover{background:#35534f}
[data-theme="dark"] .theme-toggle:focus-visible{outline-color:#c4e9aa}
[data-theme="dark"] .notice{color:#d1e2cf;border-color:#8ab97b}
[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select{background:#172a2d;border-color:#58716c;color:var(--night-text)}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#a8beb4}
[data-theme="dark"] input:focus-visible,[data-theme="dark"] textarea:focus-visible,[data-theme="dark"] select:focus-visible,[data-theme="dark"] button:focus-visible,[data-theme="dark"] a:focus-visible{outline-color:#b9de9c}
[data-theme="dark"] .audio-speed-control select{background:#172a2d}
[data-theme="dark"] .options button,[data-theme="dark"] .tabs button,[data-theme="dark"] .ipa-choices button,[data-theme="dark"] .dictionary-words button{background:#294044;border-color:#55726b;color:var(--night-text)}
[data-theme="dark"] .options button:hover,[data-theme="dark"] .tabs button:hover,[data-theme="dark"] .ipa-choices button:hover,[data-theme="dark"] .dictionary-words button:hover{background:#355751}
[data-theme="dark"] .options button.selected,[data-theme="dark"] .ipa-lesson.active{background:#385b49;border-color:#b9de9c;color:#f1f9e9}
[data-theme="dark"] .feedback,[data-theme="dark"] .ipa-example,[data-theme="dark"] .recording-lab{background:#29443c;border-color:var(--night-border)}
[data-theme="dark"] .feedback.incorrect{background:#493d2e;color:#ffebd3}
[data-theme="dark"] .source,[data-theme="dark"] th,[data-theme="dark"] td,[data-theme="dark"] .course-unit,[data-theme="dark"] .ipa-lesson,[data-theme="dark"] .divider{border-color:var(--night-border)}
[data-theme="dark"] .source a,[data-theme="dark"] .ipa-overview a{color:#c4e9aa}
[data-theme="dark"] .guide summary::after,[data-theme="dark"] .ipa-example span,[data-theme="dark"] .ipa-line,[data-theme="dark"] .ipa-contrast span,[data-theme="dark"] .ipa-sound strong{color:#c7e6b2}
[data-theme="dark"] .ipa-lesson{color:var(--night-text)}
[data-theme="dark"] .ipa-lesson small,[data-theme="dark"] .ipa-example small,[data-theme="dark"] .ipa-overview span,[data-theme="dark"] .ipa-contrast small,[data-theme="dark"] .ipa-contrast p,[data-theme="dark"] .dictionary-entry summary small,[data-theme="dark"] .pronunciation-result small{color:var(--night-muted)}
[data-theme="dark"] .articulation,[data-theme="dark"] .ipa-contrast,[data-theme="dark"] .ipa-sound,[data-theme="dark"] .supported-text,[data-theme="dark"] .pronunciation-result{background:#1a2d31;border-color:var(--night-border);color:var(--night-text)}
[data-theme="dark"] .recording-status,[data-theme="dark"] .recording-lab .notice{color:#d2e6cf}
[data-theme="dark"] .recording-status.recording-active{color:#ffb3a9}
[data-theme="dark"] .bar{background:#35504d}
[data-theme="dark"] .bar span{background:#b9de9c}
[data-theme="dark"] fieldset{border-color:var(--night-border)}
[data-theme="dark"] legend{color:#c8e2c1}
[data-theme="dark"] #selectionSpeak,[data-theme="dark"] #toast{background:#b9de9c;border-color:#b9de9c;color:#10251d}
[data-theme="dark"] .auth-shell{background:radial-gradient(circle at top left,#294741,transparent 55%),var(--night)}
[data-theme="dark"] .auth-card{box-shadow:0 18px 60px #07101477}
[data-theme="dark"] .auth-card .terms-check{background:#1a2d31;border-color:var(--night-border)}
[data-theme="dark"] .auth-card .terms-check input[type="checkbox"]{accent-color:#b9de9c}
[data-theme="dark"] .auth-login{background:radial-gradient(ellipse at 15% 15%,#28443c55,transparent 65%),var(--night)}
[data-theme="dark"] .auth-intro,[data-theme="dark"] .auth-features span,[data-theme="dark"] .auth-collaboration>span{color:var(--night-muted)}
[data-theme="dark"] .auth-language-art{border-color:#486357;color:#c5e1b6}
[data-theme="dark"] .partner-dawn{color:#dfc27d}
[data-theme="dark"] .partner-logo-light{display:none}
[data-theme="dark"] .partner-logo-dark{display:block}
[data-theme="dark"] .policy-date{color:var(--night-muted)}
[data-theme="dark"] .policy-nav{border-color:var(--night-border)}
