/* GENERATED by scripts/build-dark.js — do not edit by hand */
:root[data-theme="dark"] { --bg: #0f172a; --surface: #1e293b; --text: #e5e7eb; --muted: #94a3b8; --border: #334155; --shadow: 0 6px 24px rgba(0,0,0,0.35); color-scheme: dark; }

/* ---- public/shared/style.css ---- */
:root[data-theme="dark"] input[type="text"], :root[data-theme="dark"] input[type="email"], :root[data-theme="dark"] input[type="password"], :root[data-theme="dark"] input[type="search"], :root[data-theme="dark"] input[type="url"], :root[data-theme="dark"] input[type="tel"] { background: var(--surface); }
:root[data-theme="dark"] .btn.secondary { background: #2a3650; }
:root[data-theme="dark"] .badge.on { background: #14352a; }
:root[data-theme="dark"] .badge.off { background: #3b1f1f; }
:root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--surface); }
:root[data-theme="dark"] input[type="date"], :root[data-theme="dark"] input[type="number"], :root[data-theme="dark"] input[type="file"] { background: var(--surface); }
:root[data-theme="dark"] .subform { background: #243047; }
:root[data-theme="dark"] .list li:hover { background: #243047; }
:root[data-theme="dark"] .list li.active { background: #1e2f52; }
:root[data-theme="dark"] .chip { background: #2a3650; }
:root[data-theme="dark"] tr.active td { background: #1e2f52; }
:root[data-theme="dark"] .badge.warn { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .badge.info { background: #1e2f52; color: #93c5fd; }
:root[data-theme="dark"] .badge.danger { background: #3b1f1f; }
:root[data-theme="dark"] .seg-excused input:checked + span { background: #9aa6bf; }
:root[data-theme="dark"] .dot.excused { background: #9aa6bf; }
:root[data-theme="dark"] .stat { background: #243047; }
:root[data-theme="dark"] .cred { background: #243047; }
:root[data-theme="dark"] .sid { background: #2a3650; }
:root[data-theme="dark"] tr.clickable:hover td { background: #243047; }
:root[data-theme="dark"] .chip-avatars .avatar { border: 2px solid var(--surface); }
:root[data-theme="dark"] input[type="time"] { background: var(--surface); }
:root[data-theme="dark"] .cal-day:hover { background: #243047; }
:root[data-theme="dark"] .cal-day.other { background: #1a2437; }
:root[data-theme="dark"] .cal-chip { background: #1e2f52; border: 1px solid #3a4d75; }
:root[data-theme="dark"] .cal-chip:hover { background: #2b3a5c; }
:root[data-theme="dark"] .wd span { background: var(--surface); }
:root[data-theme="dark"] .checklist { background: var(--surface); }
:root[data-theme="dark"] .av-dot { border: 2px solid var(--surface); }
:root[data-theme="dark"] .msg.theirs { background: #2a3650; }
:root[data-theme="dark"] .warn-text { color: #fbbf24; }
:root[data-theme="dark"] .nc-panel { background: var(--surface, var(--surface)); border: 1px solid var(--border, #3a4a66); }
:root[data-theme="dark"] .nc-head { border-bottom: 1px solid var(--border, #3a4a66); background: var(--surface, var(--surface)); }
:root[data-theme="dark"] .nc-link { color: var(--primary, #93c5fd); }
:root[data-theme="dark"] .nc-item { border-bottom: 1px solid var(--border, #2a3650); }
:root[data-theme="dark"] .nc-prefs th, :root[data-theme="dark"] .nc-prefs td { border-bottom: 1px solid var(--border, #2a3650); }
:root[data-theme="dark"] .segbtn { background: #2a3650; }
:root[data-theme="dark"] .segbtn button.active { background: var(--surface); }
:root[data-theme="dark"] .tstatus.pending { background: #2a3650; color: #9aa6bf; }
:root[data-theme="dark"] .tstatus.in_progress { background: #1e2f52; color: #93c5fd; }
:root[data-theme="dark"] .tstatus.submitted { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .tstatus.needs_resubmission { background: #3b1f1f; color: #f87171; }
:root[data-theme="dark"] .tstatus.completed { background: #14352a; }
:root[data-theme="dark"] .tstatus.overdue { background: #3b1f1f; color: #f87171; }
:root[data-theme="dark"] .tbar { background: #2a3650; }
:root[data-theme="dark"] .tbar .needs_resubmission { background: #f87171; }
:root[data-theme="dark"] .tbar .in_progress { background: #93c5fd; }
:root[data-theme="dark"] .c-strip span { background: #2a3650; }
:root[data-theme="dark"] .c-strip span.on.hot { background: var(--primary, #93c5fd); }
:root[data-theme="dark"] .att-row { border: 1px solid var(--border, #3a4a66); background: var(--surface); }
:root[data-theme="dark"] .att-items a { background: var(--bg); }
:root[data-theme="dark"] .att-items a.high { background: #3b1f1f; color: #f87171; }
:root[data-theme="dark"] .att-items a.medium { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .push-help-card { background: var(--surface, var(--surface)); }
:root[data-theme="dark"] .auth-field .af-eye:hover { background: #2a3650; }
:root[data-theme="dark"] .auth-error { background: #3b1f1f; color: #f87171; }
:root[data-theme="dark"] .maint-banner { background: #3a2f12; border-bottom: 1px solid #7a5a12; }
:root[data-theme="dark"] .nc-master { border-bottom: 1px solid var(--border, #3a4a66); background: #14352a; }
:root[data-theme="dark"] .nc-master.off { background: #3b1f1f; }
:root[data-theme="dark"] .nc-slider { background: #4b5b78; }
:root[data-theme="dark"] .nc-slider::after { background: var(--surface); }
:root[data-theme="dark"] .mic-btn { background: #2a3650; }
:root[data-theme="dark"] .mic-btn.active { background: #3b1f1f; }
:root[data-theme="dark"] .rec-bar { background: #3b1f1f; border: 1px solid #7a2e2e; }
:root[data-theme="dark"] .modal > .row { background: var(--surface, var(--surface)); border-top: 1px solid var(--border, #3a4a66); }
:root[data-theme="dark"] .modal-section { border: 1px solid var(--border, #3a4a66); }
:root[data-theme="dark"] .modal-section[open] > summary { border-bottom: 1px solid var(--border, #3a4a66); }
:root[data-theme="dark"] .maint-card { background: var(--surface); }
:root[data-theme="dark"] .maint-card p { color: #cbd5e1; }
:root[data-theme="dark"] .maint-until { color: #e5e7eb !important; }

/* ---- public/app/app.css ---- */
:root[data-theme="dark"] .back { background: #2a3650; }
:root[data-theme="dark"] .tile.warn .tile-v { color: #fbbf24; }
:root[data-theme="dark"] .lesson-card:active { background: #243047; }
:root[data-theme="dark"] .lesson-card .meta .due-soon { color: #fbbf24; }
:root[data-theme="dark"] .mat:active { background: #243047; }
:root[data-theme="dark"] .done-banner { background: #14352a; }
:root[data-theme="dark"] .bar { background: #2a3650; }
:root[data-theme="dark"] .score.warn { color: #fbbf24; }
:root[data-theme="dark"] .status-tag.present { background: #14352a; }
:root[data-theme="dark"] .status-tag.late { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .status-tag.absent { background: #3b1f1f; }
:root[data-theme="dark"] .status-tag.excused { background: #2a3650; color: #9aa6bf; }
:root[data-theme="dark"] .class-card.big { background: #1e2f52; }
:root[data-theme="dark"] .seg-switch { background: #2a3650; }
:root[data-theme="dark"] .offline { background: #3a2f12; }
:root[data-theme="dark"] .icon-btn { background: #2a3650; }
:root[data-theme="dark"] .nudge { background: #1e2f52; border: 1px solid #3a4d75; }
:root[data-theme="dark"] .warn-text { color: #fbbf24; }
:root[data-theme="dark"] .ws-day.today { background: #1e2f52; }
:root[data-theme="dark"] .wstatus.learning { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .wstatus.mastered { background: #14352a; }
:root[data-theme="dark"] .summary-score.warn { color: #fbbf24; }
:root[data-theme="dark"] .def-opt:has(input:checked) { background: #1e2a44; }
:root[data-theme="dark"] .menu-btn { background: #2a3650; }
:root[data-theme="dark"] .task-instructions { background: #243047; }
:root[data-theme="dark"] .task-review.ok { background: #14352a; border: 1px solid #1f6b46; }
:root[data-theme="dark"] .task-review.redo { background: #3a2f12; border: 1px solid #7a5a12; }
:root[data-theme="dark"] .task-readonly { background: #243047; }
:root[data-theme="dark"] .task-upload { background: #243047; }
:root[data-theme="dark"] .rec-btn { background: var(--surface); }
:root[data-theme="dark"] .rec-btn.on .rec-dot { background: var(--surface); }
:root[data-theme="dark"] .goal-card.reached { border-color: #1f6b46; }
:root[data-theme="dark"] .goal-bar { background: #2a3650; }
:root[data-theme="dark"] .lb-chip { background: #2a3650; }
:root[data-theme="dark"] .lb-chip.me { background: #1e2f52; }
:root[data-theme="dark"] .cal-day.selected { background: #1e2f52; }
:root[data-theme="dark"] .cal-chip.s.present { background: #14352a; border-color: #1f6b46; }
:root[data-theme="dark"] .cal-chip.s.late { background: #3a2f12; border-color: #7a5a12; }
:root[data-theme="dark"] .cal-chip.s.absent { background: #3b1f1f; border-color: #7a2e2e; }
:root[data-theme="dark"] .cal-chip.s.excused { background: #2a3650; }
@media (max-width: 700px) { :root[data-theme="dark"] .cal-chip.s.past { background: #4b5b78; } }
:root[data-theme="dark"] .cm-chip.gold { color: #5a3d00; }
:root[data-theme="dark"] .card-flat .cm-chip { background: #2a3650; }
:root[data-theme="dark"] .cm-tabs { background: #2a3650; }
:root[data-theme="dark"] .challenge.reached { border-color: #1f6b46; }
:root[data-theme="dark"] .podium-mini .pm { background: #2a3650; }
:root[data-theme="dark"] .podium-mini .pm.me { background: #1e2f52; }
:root[data-theme="dark"] .btn.like.on { background: #3b1f1f; border-color: #7a2e2e; color: #f87171; }
:root[data-theme="dark"] .starter { background: #243047; }
:root[data-theme="dark"] .starter:active { background: #1e2f52; }
:root[data-theme="dark"] .hero-chip.gold { color: #5a3d00; }
:root[data-theme="dark"] .cm-count { background: #33415c; }
:root[data-theme="dark"] .task-popup { border: 1px solid #7a5a12; }
:root[data-theme="dark"] .tstatus.new-tag { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .react { background: #243047; }
:root[data-theme="dark"] .react.on { background: #1e2f52; }
:root[data-theme="dark"] .react[data-kind=love].on { background: #3b1f1f; border-color: #7a2e2e; color: #f87171; }
:root[data-theme="dark"] .quick-replies button { background: #243047; }
:root[data-theme="dark"] .quick-replies button:active { background: #1e2f52; }
:root[data-theme="dark"] .emoji-bar button:active { background: #2a3650; }
:root[data-theme="dark"] .week-cmp > div { background: #243047; }
:root[data-theme="dark"] .delta.up { background: #14352a; }
:root[data-theme="dark"] .delta.down { background: #3b1f1f; }
:root[data-theme="dark"] .badge-card { background: #243047; }
:root[data-theme="dark"] .badge-card.earned .badge-h { color: #fbbf24; }
:root[data-theme="dark"] .chat-row:active { background: #243047; }
:root[data-theme="dark"] .chat-row.unread { border-color: #3b5aa0; background: #1e2a44; }
:root[data-theme="dark"] .level-badges { color: #fbbf24; }
:root[data-theme="dark"] .insight { background: #243047; }
:root[data-theme="dark"] .insight.streak { background: #3a2f12; }
:root[data-theme="dark"] .insight.rank { background: #3a2f12; }
:root[data-theme="dark"] .insight.goal { background: #1e2f52; }
:root[data-theme="dark"] .insight.week { background: #14352a; }
:root[data-theme="dark"] .insight.badge { background: #2a2145; }
:root[data-theme="dark"] .kudos { background: var(--surface); }
:root[data-theme="dark"] .kudos-react .react { background: #243047; }
:root[data-theme="dark"] .kudos-react .react.on { background: #1e2f52; border-color: #3b5aa0; }
:root[data-theme="dark"] .badge-bar { background: #3a4a66; }
:root[data-theme="dark"] .lc-due.soon { color: #fbbf24; }
:root[data-theme="dark"] .theme-row { background: #243047; }
:root[data-theme="dark"] .theme-btn { background: #2a3650; }
:root[data-theme="dark"] .wotd-react .react:hover { background: #2a3650; }
:root[data-theme="dark"] .wotd-react .react.on { background: #1e2f52; }
:root[data-theme="dark"] .sec-n { background: #2a3650; }
:root[data-theme="dark"] .goal-card.reached { border-color: #1f6b46; }
:root[data-theme="dark"] .dx-kind { background: #2a2145; color: #c4b5fd; }
:root[data-theme="dark"] .dx-suggest button:hover, :root[data-theme="dark"] .dx-suggest button:focus { background: #1e2a44; }
:root[data-theme="dark"] .dx-n { background: #2a3650; }
:root[data-theme="dark"] .dx-tip { background: #3a2f12; }

/* ---- public/admin/admin.css ---- */
:root[data-theme="dark"] .sb-nav a.active { background: #1e2f52; }
:root[data-theme="dark"] .menu-btn { background: #2a3650; }
:root[data-theme="dark"] details.add-panel > summary:hover { background: #243047; }
:root[data-theme="dark"] .pills { background: #2a3650; }
:root[data-theme="dark"] .dash-msg:hover { background: #243047; }
:root[data-theme="dark"] .rec-fb-text { background: #2a2145; }
:root[data-theme="dark"] .dropzone { background: var(--surface); }
:root[data-theme="dark"] .dropzone:hover, :root[data-theme="dark"] .dropzone.over { background: #1e2f52; }
:root[data-theme="dark"] .setup-steps { background: #243047; }
:root[data-theme="dark"] .task-card { background: var(--surface); }
:root[data-theme="dark"] .td-instructions { background: #243047; }
:root[data-theme="dark"] .td-files a { background: var(--surface); }
:root[data-theme="dark"] .sub-row { background: var(--surface); }
:root[data-theme="dark"] .sub-answer { background: #243047; }
:root[data-theme="dark"] .review-done { background: #14352a; }
:root[data-theme="dark"] .goal-card.reached { border-color: #1f6b46; }
:root[data-theme="dark"] .goal-bar { background: #2a3650; }
:root[data-theme="dark"] .switch .slider { background: #4b5b78; }
:root[data-theme="dark"] .switch .slider::after { background: var(--surface); }
:root[data-theme="dark"] .cm-msg { background: #243047; }
:root[data-theme="dark"] .hero-chip.gold { color: #5a3d00; }
:root[data-theme="dark"] .sb-nav a:hover { background: var(--bg); }
:root[data-theme="dark"] .quick-replies button { background: #243047; }
:root[data-theme="dark"] .quick-replies button:hover { background: #1e2f52; }
:root[data-theme="dark"] .emoji-bar button:hover { background: #2a3650; }
:root[data-theme="dark"] .emoji-btn { background: #2a3650; }
@media (max-width: 800px) { :root[data-theme="dark"] .chat-back { background: #2a3650; } }
:root[data-theme="dark"] .pills { background: #2a3650; }
:root[data-theme="dark"] .pills .pill.active { background: var(--surface); }
:root[data-theme="dark"] .panel { border: 1px solid #2a3650; }
@media (max-width: 800px) { :root[data-theme="dark"] .table-wrap tr { background: var(--surface); } }
:root[data-theme="dark"] .dev-log { background: #0b1220; }
:root[data-theme="dark"] .pw-note { background: #3a2f12; border: 1px solid #7a5a12; }
:root[data-theme="dark"] code.pw { background: #0b1220; }
:root[data-theme="dark"] .dev-pill { background: var(--bg); }
:root[data-theme="dark"] .dev-pill.ok { background: #14352a; }
:root[data-theme="dark"] .dev-pill.warn { background: #3a2f12; color: #fbbf24; }
:root[data-theme="dark"] .dev-cell { background: #243047; }
:root[data-theme="dark"] .dev-tip { background: #1e2f52; border: 1px solid #3a4d75; }
:root[data-theme="dark"] .pv-device iframe { background: var(--surface); }
:root[data-theme="dark"] table.dt th { background: #243047; }
:root[data-theme="dark"] .today-panel .today-time { background: #1e2f52; color: #93c5fd; }
:root[data-theme="dark"] .cal-day.selected { background: #1e2f52; }
:root[data-theme="dark"] .ds-head .icon-btn { background: #2a3650; }
@media (max-width: 700px) { :root[data-theme="dark"] .cal-chip.k-excused { background: #9aa6bf; } }
@media (max-width: 700px) { :root[data-theme="dark"] .cal-chip.k-past { background: #4b5b78; } }
:root[data-theme="dark"] .cal-chip.k-excused { border-left: 3px solid #9aa6bf; }
:root[data-theme="dark"] .chat-chips button { background: #243047; }
:root[data-theme="dark"] .chat-chips button.active .nav-badge { background: var(--surface); }
:root[data-theme="dark"] .chat-rows li.unread { border-color: #3b5aa0; background: #1e2a44; }
@media (max-width: 800px) { :root[data-theme="dark"] .chat-layout.room-open .chat-messages { background: #1a2437; } }
:root[data-theme="dark"] .pg-bar { background: #2a3650; }
:root[data-theme="dark"] .pg-bar span { background: #4b5b78; }
:root[data-theme="dark"] .cm-feature { background: var(--surface); }
:root[data-theme="dark"] .cm-feature.on { border-color: #3b5aa0; background: #1e2a44; }
:root[data-theme="dark"] .cm-card { background: var(--surface); }
:root[data-theme="dark"] .chip-btn { background: #243047; }
:root[data-theme="dark"] .chip-btn:hover { background: #1e2f52; border-color: #3b5aa0; }
:root[data-theme="dark"] .pair-note { background: #3a2f12; }
:root[data-theme="dark"] .sw-likes { color: #f87171; }
:root[data-theme="dark"] .cm-feature.master { background: #3a2f12; border-color: #7a5a12; }
:root[data-theme="dark"] .cm-feature.master.on { background: #14352a; border-color: #1f6b46; }
:root[data-theme="dark"] .suggest { background: var(--surface); }
:root[data-theme="dark"] .suggest:hover { background: #3a2f12; }
:root[data-theme="dark"] .emoji-pick span { background: #243047; }
:root[data-theme="dark"] .emoji-pick input:checked + span { background: #1e2f52; box-shadow: 0 0 0 2px #3b5aa0; }
:root[data-theme="dark"] .gr-card { background: var(--surface); border-left: 5px solid #c4b5fd; }
:root[data-theme="dark"] .gr-avatars .avatar { border: 2px solid var(--surface); }
:root[data-theme="dark"] .gr-att.good { color: #6ee7a8; }
:root[data-theme="dark"] .gr-att.mid { color: #fbbf24; }
:root[data-theme="dark"] .gr-att.low { color: #f87171; }
:root[data-theme="dark"] .gr-detail-head .btn.small:not(.secondary):not(.danger) { background: var(--surface); }
:root[data-theme="dark"] .gr-member { background: var(--surface); }
:root[data-theme="dark"] .gr-member-meta .good { color: #6ee7a8; }
:root[data-theme="dark"] .gr-member-meta .mid { color: #fbbf24; }
:root[data-theme="dark"] .gr-member-meta .low { color: #f87171; }
:root[data-theme="dark"] .warn-chip { background: #3a2f12 !important; color: #fbbf24 !important; }
:root[data-theme="dark"] .ls-detail-head .btn.small:not(.secondary):not(.danger) { background: var(--surface); }
:root[data-theme="dark"] .mat-card { background: var(--surface); }
:root[data-theme="dark"] .assign-chip { background: #2a3650; }
:root[data-theme="dark"] .assign-chip button { background: var(--surface); }
:root[data-theme="dark"] .gr-member.done { background: #14352a; border-color: #1f6b46; }
:root[data-theme="dark"] .st-card { background: var(--surface); }
:root[data-theme="dark"] .tools-hero .tools-hero-btn { background: var(--surface); }
:root[data-theme="dark"] .dash-tc { background: var(--surface); }
:root[data-theme="dark"] .today-state { background: #2a3650; }
:root[data-theme="dark"] .today-state.live { background: #14352a; color: #6ee7a8; }
:root[data-theme="dark"] .today-state.done { background: #2a3650; }
:root[data-theme="dark"] .cal-daypanel .ds-head .icon-btn { background: #2a3650; }
:root[data-theme="dark"] .hist-head:hover { background: #243047; }
:root[data-theme="dark"] .hist-file { background: #2a3650; }
:root[data-theme="dark"] .hist-file.s-A { background: #14352a; color: #6ee7a8; }
:root[data-theme="dark"] .hist-file.s-D { background: #3b1f1f; }

:root[data-theme="dark"] body { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #0f172a; color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] img.avatar, :root[data-theme="dark"] .avatar img { filter: brightness(0.95); }
:root[data-theme="dark"] .msg.mine .voice-msg audio { filter: none; }
:root[data-theme="dark"] .voice-msg audio { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
:root[data-theme="dark"] .badge-card:not(.earned) { background: #243047; }
:root[data-theme="dark"] .pod-2 .pod-bar, :root[data-theme="dark"] .pod-bar { background: linear-gradient(180deg, #3a4a66, #2a3650); }
:root[data-theme="dark"] .push-help-card, :root[data-theme="dark"] .maint-card { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .maint-card p { color: var(--muted); }
:root[data-theme="dark"] .toast { background: #334155; color: #fff; }
/* Tab strips (community, progress, words): a dark track with a clearly lighter active tab */
:root[data-theme="dark"] .cm-tabs { background: #101a2e; border: 1px solid #2a3650; }
:root[data-theme="dark"] .cm-tab { color: #9fb0cc; }
:root[data-theme="dark"] .cm-tab.active { background: #33456b; color: #fff; box-shadow: none; }
:root[data-theme="dark"] .level-bar { background: #101a2e; }
:root[data-theme="dark"] .badge-bar { background: #101a2e; }
:root[data-theme="dark"] .level-card { background: linear-gradient(135deg, #3b2f0f, #1b2540); border-color: #a87a1a; }
:root[data-theme="dark"] .level-card .level-name { color: #ffd77a; }
:root[data-theme="dark"] .level-card .muted { color: #e0c58a; }
:root[data-theme="dark"] .level-card .level-badges { color: #ffd77a; }
:root[data-theme="dark"] .len-card.active { background: #1e2f52; }
:root[data-theme="dark"] .pool-card.active { background: #1e2f52; }
:root[data-theme="dark"] .mode-btn.active { background: #1e2f52; }
:root[data-theme="dark"] .wotd-react .react.on { background: #1e2f52; border-color: #3b5aa0; }
:root[data-theme="dark"] .wotd-react .react:hover { background: #243047; }
:root[data-theme="dark"] .sec-n { background: #243047; }
:root[data-theme="dark"] .goal-card.reached { background: #14352a; border-color: #2f6b4b; }
