/* Dark Mode: nur CSS-Variablen und lokale Overrides, Design und HTML bleiben getrennt. */
:root{--card:#fff;--hover:#eff5fe;--pill:#eef2f8;--muted-surface:#f8fafd;--correct-bg:#eafaf2;--wrong-bg:#fff0ed}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#111820;--ink:#e9eef5;--muted:#a9b5c5;--line:#344052;--accent:#8ab4f8;--accentlite:#203b61;
  --card:#1b2532;--hover:#27394f;--pill:#2c3a4d;--muted-surface:#222f40;--correct-bg:#173a30;--wrong-bg:#452821;
}
[data-theme="dark"] body,[data-theme="dark"] .app-header{background:var(--bg);color:var(--ink)}
[data-theme="dark"] .brand,[data-theme="dark"] .mode{color:var(--muted)}
[data-theme="dark"] .searchbox{background:#283447}
[data-theme="dark"] .searchbox svg{stroke:var(--muted)}
[data-theme="dark"] .searchbox input{color:var(--ink)}
[data-theme="dark"] .searchbox input::placeholder{color:#a1afc1}
[data-theme="dark"] .compose{background:#294d69;color:#e6f2fe}
[data-theme="dark"] .compose:hover{background:#355e80}
[data-theme="dark"] .folder{color:#c2cedd}
[data-theme="dark"] .folder.active{background:#2b4569;color:#f4f8ff}
[data-theme="dark"] .folder:hover:not(.active){background:var(--hover)}
[data-theme="dark"] .panel{background:var(--card);border-color:var(--line);box-shadow:none}
[data-theme="dark"] .toolbar{color:var(--muted);border-color:var(--line)}
[data-theme="dark"] .ico{color:var(--muted)}
[data-theme="dark"] .ico:hover{background:#304156}
[data-theme="dark"] .toolbar-count,[data-theme="dark"] .date,[data-theme="dark"] .date small,[data-theme="dark"] .address,[data-theme="dark"] .to,[data-theme="dark"] .small-footer{color:var(--muted)}
[data-theme="dark"] .letter{background:var(--card);border-color:var(--line)}
[data-theme="dark"] .letter h2,[data-theme="dark"] .message-title,[data-theme="dark"] .sender-name{color:var(--ink)}
[data-theme="dark"] .letter p,[data-theme="dark"] .eyebrow,[data-theme="dark"] .signoff{color:var(--muted)!important}
[data-theme="dark"] .activity{background:var(--muted-surface);border-color:var(--line)}
[data-theme="dark"] .activity b,[data-theme="dark"] dt{color:var(--muted)}
[data-theme="dark"] dd{color:var(--ink)}
[data-theme="dark"] .login{background:#3b82df;color:#fff}
[data-theme="dark"] .login:hover{background:#2871c8}
[data-theme="dark"] .list-item{background:var(--card);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .list-item.unread{background:#24354a}
[data-theme="dark"] .list-item:hover{background:var(--hover)}
[data-theme="dark"] .list-item .snippet,[data-theme="dark"] .list-item .time{color:var(--muted)}
[data-theme="dark"] .list-star{color:#8493a7}
[data-theme="dark"] .list-star.active{color:#e6b654}
[data-theme="dark"] .empty,[data-theme="dark"] .empty b{color:var(--muted)}
[data-theme="dark"] .mk-logo{color:#d4dbe5}
[data-theme="dark"] .generic-logo{background:#2b4562;color:#cfe1f9}
[data-theme="dark"] .attachment-symbol{background:#2a3b50}
[data-theme="dark"] .lesson-badge{background:#244c7e;color:#dfedff}
[data-theme="dark"] .tag-correct{color:#a7efd2;background:#214b3f}
[data-theme="dark"] .lesson-feedback{color:var(--ink)}
[data-theme="dark"] .reveal,[data-theme="dark"] .editor-dialog,[data-theme="dark"] .dialog{background:var(--card);color:var(--ink)}
[data-theme="dark"] .reveal p{color:var(--muted)}
[data-theme="dark"] .tip{background:#263f5c;color:#dceafa}
[data-theme="dark"] .secondary{background:#283a4f;border-color:#53657a;color:#dceafa}
[data-theme="dark"] .dialog-head{background:#283950}
[data-theme="dark"] .dialog-row{border-color:var(--line)}
[data-theme="dark"] .dialog input,[data-theme="dark"] .dialog textarea{background:var(--card);color:var(--ink)}
[data-theme="dark"] .training-banner{background:#3a321d;color:#f8df9c;border-color:#7a6330}
[data-theme="dark"] .training-note{background:#473a1c;color:#ffe9aa}
[data-theme="dark"] .editor-full input,[data-theme="dark"] .editor-full textarea,[data-theme="dark"] .editor-grid input,[data-theme="dark"] .editor-grid select,[data-theme="dark"] .domain-field{background:var(--card);color:var(--ink)}
[data-theme="dark"] .top-btn{background:var(--card);color:var(--ink);border-color:var(--line)}
[data-theme="dark"] .top-btn:hover{background:var(--hover)}
[data-theme="dark"] .modal-sub{color:var(--muted)}
@media print{
  :root[data-theme="dark"]{color-scheme:light;--bg:#fff;--ink:#222;--card:#fff;--muted:#666;--line:#ddd;--muted-surface:#f7f8fa}
}
