.theme-choice{display:block;font-size:.7rem;margin:4px 0 7px}.theme-choice select{width:100%;min-height:32px;font-size:.75rem;padding:4px 6px}
@media screen{
html[data-theme=dark]{--parler-tinte:#d5e3fc;--parler-papier:#131b2a;--parler-feder:#26364c;--tinte-tiefer:#9fbdf5;--blau-2:#b4ccfa;--blau-3:#8faedb;--blau-5:#354a64;--grau:#b0bdcf;--linie:#3b4b62;--linie-stark:#586d89;--bg:#131b2a;--surface:#1d293b;--surface-2:#243247;--text:#e3eaf4;--text-muted:#b0bdcf;--text-soft:#b0bdcf;--accent:#b1cbfa;--accent-600:#c8dcff;--accent-700:#b1cbfa;--on-accent:#142441;--accent-50:#273b59;--accent-100:#3b5475;--link:#b1cbfa;--border:#3b4b62;--border-strong:#586d89;--feld-rand:#8faedb;--success:#9ed6af;--success-bg:#253f35;--success-line:#50795e;--warning:#edc397;--warning-bg:#443526;--warning-line:#796348;--danger:#ffb9b0;--danger-text:#ffd0c8;--danger-bg:#4b2c35;--danger-line:#8c535e;--info:#c9dbfa;--info-bg:#293d5a;--info-line:#526c92;--purple:#d0c2f0;--purple-bg:#37314d;--kupfer-hell:#4c352e;--kupfer-dunkel:#ecb19b;--kupfer-tiefer:#f1bc9e;color-scheme:dark}
html[data-theme=dark] body{background:var(--bg);color:var(--text)}
/* Originale große Eule als angeschnittenes Wasserzeichen, unter allen Inhalten. */
html[data-theme=dark] .layout{position:relative;isolation:isolate}
html[data-theme=dark] .layout::before,html[data-theme=dark] .auth-page.auth-v3::before{content:"";position:fixed;inset:var(--topbar-h) 0 0;z-index:-1;pointer-events:none;background:url('../img/parler/Eule-gross-Weiss.png') right -190px top 18px / min(72vw,820px) auto no-repeat;opacity:.015}
html[data-theme=dark] .auth-page.auth-v3::before{position:absolute;inset:0;background-position:right -220px bottom -160px;background-size:min(82vw,1040px) auto}
html[data-theme=dark] :is(.topbar,.card,.modal,.sidebar,.sidebar-foot,.user-menu>div,.dropdown-menu,.popover,.chat-list,.chat-panel,.chat-head,.chat-input,.chat-closed,.menu-editor-list li,.stat-tile,.tile,.day-focus,.search-results,.search-select-panel){background:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme=dark] :is(input,textarea,select){background:var(--surface-2);color:var(--text);border-color:var(--feld-rand)}
html[data-theme=dark] :is(.modal-head,.modal-foot,.card-head,.chat-item,.chat-messages,.msg,.tt-cell,.tt-entry,.table th,.table td){background-color:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme=dark] :is(.btn-secondary,.btn-ghost,.nav-item,.chat-file-card){color:var(--text)}
html[data-theme=dark] :is(.nav-item:hover,.nav-item.active,.chat-item.active,.chat-item:hover,.tt-cell.today){background:var(--accent-50)}
html[data-theme=dark] .msg.mine{background:#314c78;color:#fff}
html[data-theme=dark] .msg a.chat-file-card{background:var(--surface-2);color:var(--text)}
html[data-theme=dark] .chat-pdf-preview{background:#344052}
html[data-theme=dark] .chat-pdf-preview canvas{background:white}
html[data-theme=dark] .day-focus{background:linear-gradient(110deg,#1d293bf5,#263952e6)}
html[data-theme=dark] .dashboard-hero,html[data-theme=dark] .page-head{background-color:transparent}
/* Im Dunkeln ersetzen ruhige Farbflächen die Architektur auf hellem Papier. */
html[data-theme=dark] .dashboard-welcome::before{inset:0;width:auto;height:auto;background:radial-gradient(ellipse at 85% 45%,#263b5666,transparent 70%);opacity:1;mix-blend-mode:normal;-webkit-mask-image:none;mask-image:none;border-radius:20px}
html[data-theme=dark] .auth-architecture{display:none}
html[data-theme=dark] .auth-page.auth-v3{background:radial-gradient(ellipse at 20% 40%,#263b5680,transparent 65%),var(--bg)}
html[data-theme=dark] .auth-form-panel{background:var(--surface);border-color:var(--border);box-shadow:0 14px 44px #050b1433}
html[data-theme=dark] .alert-success{color:var(--success)}
html[data-theme=dark] :is(.brand img,.auth-brand .auth-mark,body.is-bare .bare-mark){filter:brightness(0) invert(.9)}
html[data-theme=dark] .menu-star[aria-pressed=true]{background:#57452c;color:#ffcf80}
html[data-theme=dark] :is(.menu-entry-title,.msg-author,h1,h2,h3,.label,.list-title,.table){color:var(--text)}
html[data-theme=dark] .chat-image-preview{background:var(--surface-2)}
html[data-theme=dark] .btn:not(.btn-secondary):not(.btn-ghost):not(.btn-danger):not(.btn-success){background:var(--accent);color:var(--on-accent)}
html[data-theme=dark] .modal::backdrop{background:#050b14b8}
@media(max-width:600px){html[data-theme=dark] .layout::before,html[data-theme=dark] .auth-page.auth-v3::before{background-size:480px auto;background-position:right -190px top 12px;opacity:.01}}
}
@media print{html{color-scheme:light!important}.theme-choice{display:none}}
@media screen{html[data-theme=dark] input::file-selector-button{background:var(--accent);color:var(--on-accent);border:0;border-radius:6px;padding:8px 12px}}

@media screen {
html[data-theme=dark] .theme-mark-light { display:none!important; }
html[data-theme=dark] .theme-mark-dark { display:block!important; filter:none!important; }
html[data-theme=dark] :is(.card,.tile,.stat) img[src*="/parler/"][src$="-Tinte.png"]:not(.theme-mark-light) { filter:brightness(0) invert(1); }
html[data-theme=dark] :is(select,select option,select optgroup,.menu-panel,.search-select-panel,.search-select-option,.ss-panel,.ss-option,.suggest-item) { background-color:var(--surface-2); color:var(--text); color-scheme:dark; }
html[data-theme=dark] :is(.search-select-option,.ss-option):hover { background:var(--accent-50); }
}

/* Suchbare Auswahlfelder verwenden dieselbe dunkle Fläche wie native Auswahlen. */
html[data-theme="dark"] .combo-input,
html[data-theme="dark"] .combo-list { background-color: var(--surface); color: var(--text); }
html[data-theme="dark"] .combo-item { color: var(--text); }
html[data-theme="dark"] .combo-item.active,
html[data-theme="dark"] .combo-item:hover { background-color: var(--surface-2); }

/* Zentrale Farbregeln für alle nativen und suchbaren Auswahlen, auch in
   Werkzeugleisten, Tabellen und Dialogen mit eigenen Hintergrundregeln. */
@media screen {
html[data-theme="dark"] body :is(select, option, optgroup, .combo-input) {
  background-color:var(--surface-2)!important; color:var(--text)!important;
  -webkit-text-fill-color:var(--text); border-color:var(--feld-rand); color-scheme:dark;
}
html[data-theme="dark"] body :is(.combo-list,.menu-panel,.dropdown-menu,.search-select-panel,.ss-panel,.suggest-box) {
  background:var(--surface)!important; color:var(--text)!important; border-color:var(--border);
}
html[data-theme="dark"] body :is(.combo-item,.menu-item,.search-select-option,.ss-option,.suggest-item) {
  background-color:transparent; color:var(--text)!important;
}
html[data-theme="dark"] body :is(.combo-item,.menu-item,.search-select-option,.ss-option,.suggest-item):is(:hover,:focus-visible,.active,.selected,[aria-selected="true"]) {
  background-color:var(--accent-50)!important; color:var(--text)!important;
}
html[data-theme="dark"] body :is(.combo-item.disabled,select:disabled,option:disabled,.combo-group,.combo-empty,.combo-info) {
  color:var(--text-muted)!important; -webkit-text-fill-color:var(--text-muted);
}
html[data-theme="dark"] .combo-input::placeholder { color:var(--text-muted); opacity:1; }
}

@media screen{html[data-theme=dark] table.tt th:not(.tt-corner){background:var(--surface-2);color:var(--text);border:1px solid var(--border)}html[data-theme=dark] table.tt th .tt-date{color:var(--text-muted)}}

@media screen{html[data-theme=dark] .pill.active{background:var(--accent);color:var(--on-accent)}}

@media screen{html[data-theme=dark]{--shadow:0 5px 20px #050b1426;--shadow-md:0 10px 28px #050b1438;--shadow-lg:0 20px 60px #050b1466}}
