#theme-controls{display:inline-flex;gap:2px;align-items:center;flex-shrink:0;padding:3px;border:1px solid var(--ln-line,#e5e9ef);border-radius:8px;background:var(--ln-paper,#fff);}
#theme-controls button{display:grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;margin:0;padding:0;border:0;border-radius:5px;background:transparent;color:var(--ln-muted,#717c8c);box-shadow:none;}
#theme-controls button[aria-pressed=true]{background:var(--ln-blue-soft,#edf2fc);color:var(--ln-blue,#193f8d);}
#theme-controls button:hover{background:var(--ln-blue-soft,#edf2fc);box-shadow:none;}#theme-controls button:focus-visible{outline:2px solid #6888bd;outline-offset:2px;}
html[data-theme=light]{color-scheme:light;}html[data-theme=dark]{color-scheme:dark;background:#171b24;color:#e5eaf2;--ln-page:#171b24;--ln-paper:#202632;--ln-ink:#e5eaf2;--ln-muted:#a7b1c1;--ln-line:#354052;--ln-blue:#9bbaff;--ln-blue-soft:#293c60;}
html[data-theme=dark] body{background:var(--ln-page);color:var(--ln-ink);}
html[data-theme=dark] body>header,html[data-theme=dark] dialog,html[data-theme=dark] .row-menu-body{background:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] :is(.room-card,.lesson-row,.module-zone,.student-row,.user-row,.profile-card,.create-card,.card,.exercise-card:not(.colored-note),.lesson-group,.exercise-type-picker,.exercise-type-card){background-color:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] :is(h1,h2,h3,label,.class-name,.lesson-name,.profile-person-name){color:var(--ln-ink);}
html[data-theme=dark] :is(p,.note,.class-students,.classes-summary,.course-meta){color:var(--ln-muted);}
html[data-theme=dark] :is(input:not([type=color]):not([type=checkbox]):not([type=radio]),textarea,select,.rich-area){background-color:#1a202b;color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] :is(button.secondary,button.quiet,a.secondary){background-color:transparent;color:var(--ln-blue);border-color:var(--ln-line);}
html[data-theme=dark] .primary{background:#244f9e;color:#fff;border-color:#4268ac;}
html[data-theme=dark] :is(.row-menu-body button,.exercise-actions .row-menu-body>button){background:transparent;color:var(--ln-ink);}
html[data-theme=dark] .row-menu-body button:hover{background:#293343;}
html[data-theme=dark] .danger{color:#ef9c9c;}
html[data-theme=dark]:has(body.ln-classes-view),html[data-theme=dark] body.ln-classes-view{color-scheme:dark;background:var(--ln-page);}
html[data-theme=dark] body.ln-classes-view #rooms .teacher-class-card{background:var(--ln-paper);border-color:var(--ln-line);}
html[data-theme=dark] body.ln-classes-view #dashboard #create-class-open{background:#244f9e;color:white;border-color:#4268ac;}
html[data-theme=dark] body.ln-classes-view :is(#nav-profile,#class-search,.create-class-dialog,.create-class-dialog input:not([type=checkbox]),.create-class-dialog select,#rooms .row-menu-body){background:var(--ln-paper);color:var(--ln-ink);border-color:var(--ln-line);}
html[data-theme=dark] body.ln-classes-view #rooms .row-menu-body button:hover{background:#293343;}
html[data-theme=dark] body.ln-classes-view #rooms .row-menu-body button.danger{color:#ef9c9c;}
html[data-theme=dark] .colored-note,html[data-theme=dark] .colored-note :is(p,h2){color:#263247;}
@media(max-width:680px){body>header #theme-controls{order:3;margin-left:auto;}#theme-controls button{width:38px;height:38px;}}

#theme-controls{position:relative;touch-action:pan-y;user-select:none;}#theme-controls button{position:relative;z-index:1;}#theme-controls button[aria-pressed=true],#theme-controls button:hover{background:transparent;}.theme-slider-thumb{position:absolute;top:3px;bottom:3px;left:3px;width:32px;border-radius:5px;background:var(--ln-blue-soft,#edf2fc);box-shadow:0 1px 3px #26324710;pointer-events:none;transition:transform .16s ease;}#theme-controls.is-sliding .theme-slider-thumb{transition:none;}#theme-controls.is-sliding{cursor:grabbing;}@media(max-width:680px){.theme-slider-thumb{width:38px;}}@media(prefers-reduced-motion:reduce){.theme-slider-thumb{transition:none;}}
