/* Approved five palettes: design source 201cc5de, themes54/coherent56/revision61.
   Only real product surfaces; Zen keeps its independent backgrounds and controls. */
:root{--card-shadow:0 1px 2px rgba(39,38,36,.06),0 4px 14px rgba(39,38,36,.09);--fk-progress-focus:#2f6b66;--fk-progress-pause:#2f6b66}
:root[data-app-theme="silver"]{--bg:#fafafa;--study-field:#ebedef;--nav-surface:#e1e4e7;--panel:#fff;--line:#ccd0d4;--soft:#e0e4e7;--ink:#292c30;--muted:#5d6267;--accent:#495e6b;--accent-soft:#dce4e9;--fk-progress-focus:#66717c}
:root[data-app-theme="iceblue"]{--bg:#f7faff;--study-field:#e8f0fb;--nav-surface:#edf4fd;--panel:#fff;--line:#c5d8ef;--soft:#dce9fa;--ink:#173c70;--muted:#52667f;--accent:#214f8f;--accent-soft:#d5e5fc;--fk-progress-focus:#4e83b8}
:root[data-app-theme="linen"]{--bg:#f8f2ee;--nav-surface:#f8f2ee;--study-field:#efe5df;--panel:#fff;--line:#dccbc0;--soft:#e7d9d0;--muted:#5f5a52;--accent:#715044;--accent-soft:#e9d9cd;--theme-button:#272624;--fk-progress-focus:#987665}
:root[data-app-theme="dark"]{color-scheme:dark;--bg:#101112;--nav-surface:#17191b;--study-field:#1a1c1f;--panel:#23262a;--study-card:#25282c;--elevated:#2e3237;--control:#202328;--ink:#eef0f2;--muted:#bdc3ca;--line:#60666e;--soft:#363c43;--accent:#a7c7df;--accent-soft:#304657;--red:#ffb5a7;--red-soft:#4b2b28;--amber:#e8c485;--amber-soft:#4c422f;--violet:#cdc0e8;--violet-soft:#443d53;--green:#b5d2b1;--green-soft:#334637;--blue-soft:#304657;--shadow:0 3px 14px #0005;--theme-button:#050505;--theme-button-border:#7a8088;--card-shadow:0 1px 2px rgba(0,0,0,.30),0 4px 14px rgba(0,0,0,.35);--fk-progress-focus:#fff;--fk-progress-pause:#b5d2b1}
:root:where([data-app-theme]:not([data-app-theme="classic"])){--theme-card:#fff;--theme-control:#fff;--theme-elevated:#fff;--theme-positive-bg:#e7eee5;--theme-positive-ink:#486046;--theme-precision-bg:#eee7e9;--theme-precision-ink:#73505a;--theme-warn-bg:#f5ecd8;--theme-warn-ink:#725a24;--theme-stored-bg:#eae8ef;--theme-stored-ink:#635973}
:root[data-app-theme="dark"]{--theme-card:var(--study-card);--theme-control:var(--control);--theme-elevated:var(--elevated);--theme-positive-bg:#26392b;--theme-positive-ink:#c0daba;--theme-precision-bg:#3e2b33;--theme-precision-ink:#f1bbc7;--theme-warn-bg:#3b3324;--theme-warn-ink:#e7d095;--theme-stored-bg:#342d42;--theme-stored-ink:#d5c6ed}
article.task,.plan-focus-card{box-shadow:var(--card-shadow)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode){background:var(--bg);color:var(--ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.view>.card,.notes-layout>.card,.project-page>.card,.quad,.today-lane,.accountbox,.daycheck,.daily-focus-list){background:var(--study-field);border-color:var(--line);color:var(--ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.task,.pipeline-card,.project-link,.logitem,.metric,.note-card,.note-card-content,.contact-card,.delete-task-name,.settings-section,.account-data-box,.account-advanced,.delegate-box,.recur-box,.daily-pick,.daily-focus-row,.daily-work-end-row,.attachment-item,.faq-card details,.search-result,.calendar-cell,.followup-block,.follow-list,.timeline-cell,.note-link,.daily-focus-note,.auth-card){background:var(--theme-card);border-color:var(--line);color:var(--ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.modalbox,.menu,.fk-card,.fk-trackmenu,.fk-durmenu,.fkbar,.fkbar-durmenu){background:var(--theme-elevated);color:var(--ink);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(input,select,textarea,.daily-estimate-chip,.done-circle,.bulkbox,.weekday-row label,.today-focus-star,.today-star-chip,.note-bulkbox,.secondary,.iconbtn,.morebtn,.tabs button,.checkchip,.external-track,.chip,.soundline select,.moodbtn,.daily-mood-btn){background:var(--theme-control);color:var(--ink);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.primary,.secondary.active,.daily-action-primary,.today-star.is-active,.auth-tabs button.active){background:var(--theme-button,var(--accent));color:#fff;border-color:var(--theme-button-border,var(--theme-button,var(--accent)))}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.filters,.note-tagbar,.bulk-actions){background:var(--soft);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.filters button.active,.note-chip.active,.note-chip[aria-selected="true"],.tabs button.active,.task.selected,.pipeline-card.selected){background:var(--accent-soft);color:var(--ink);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.tag,.note-tag){background:var(--soft);color:var(--muted);border-color:var(--line)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) .task-estimate-chip.is-proposal{border:1px dashed var(--muted);background:transparent;color:var(--muted);font-weight:400}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.tag.project,.tag.today,.tag.q1,.tag.q2,.note-tag){background:var(--accent-soft);color:var(--accent)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.tag.eighty,.tag.green,.tag.dayfocus){background:var(--theme-positive-bg);color:var(--theme-positive-ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .tag.zero{background:var(--theme-precision-bg);color:var(--theme-precision-ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.tag.sprint,.tag.q3,.focus-pill){background:var(--theme-warn-bg);color:var(--theme-warn-ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.tag.delegate,.tag.q4){background:var(--theme-stored-bg);color:var(--theme-stored-ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.danger,.iconbtn.trash:hover){background:var(--red-soft);color:var(--red);border-color:var(--red)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .done-circle.is-done{background:var(--green);color:var(--theme-card);border-color:var(--green)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.notice,.daily-focus-confirmed){background:var(--accent-soft);color:var(--ink);border-color:var(--accent)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .barrier{background:var(--amber-soft);color:var(--amber);border-color:var(--amber)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .empty{background:transparent;color:var(--muted);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.small,.hint,.next,.menu-softlink,.note-date,.note-card-date,.note-meta,.inline-test){color:var(--muted)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(.task-title,.note-title,.note-preview,.note-body){color:var(--ink)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) :is(a,.inline-link){color:var(--accent)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .navrow{background:var(--nav-surface)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .navrow :is(.tabs button,.iconbtn,.morebtn):not(.active){background:transparent}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) #strategicContactBox .plan-focus-card{background:var(--theme-card);color:var(--ink);border-color:var(--line)}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) :is(.modal,.fk-overlay){background:#0009}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) :is(.fk-dur[aria-pressed="true"],.fk-trackopt[aria-pressed="true"]){background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) .syncchip{background:var(--green-soft);color:var(--green);border-color:var(--green)}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) .toast{background:var(--ink);color:var(--bg)}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) .toast .toast-action{color:var(--bg)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .study-step-family .study-step-play{color:var(--ink)}
/* Focus controls share their theme in every pointer and keyboard state. */
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) :is(.fk-icon,.fk-play,.fk-erledigt,.fk-dur,.fk-trackopt,.fkbar-btn){color:var(--ink)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) :is(.fk-icon,.fk-play,.fk-trackopt,.fkbar-btn):hover{background:var(--soft)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) .fk-dur:hover{border-color:var(--muted)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) .fk-dur[aria-pressed="true"]{color:var(--accent);border-color:transparent;box-shadow:0 0 0 2px var(--accent)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) .fk-trackopt[aria-pressed="true"]{color:var(--accent)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) :is(.fk-fertig,.fkbar-fertig){background:var(--soft);color:var(--ink)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) :is(.fk-fertig,.fkbar-fertig):is(:hover,:active){background:var(--line)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) :is(.fk-icon,.fk-play,.fk-erledigt,.fk-dur,.fk-trackopt,.fk-fertig,.fkbar-btn,.fkbar-fertig,.fkbar-time):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.app-theme-picker{border:0;padding:0;margin:20px 0 0;min-width:0}
.app-theme-picker legend{font-weight:700;margin-bottom:10px}
.app-theme-options{display:flex;gap:8px;flex-wrap:wrap}
.app-theme-options label{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;min-width:54px;min-height:72px;padding:6px 4px;cursor:pointer;font-size:.85rem;border-radius:10px}
.app-theme-options input{position:absolute;width:1px;height:1px;min-height:0;opacity:0;padding:0}
.app-theme-dot{display:block;width:30px;height:30px;border:1px solid #7b7b7b;border-radius:50%;box-shadow:0 0 0 3px var(--panel)}
.app-theme-options input:checked+.app-theme-dot{outline:2px solid var(--ink);outline-offset:4px}
.app-theme-options label:has(input:checked){font-weight:750}
.app-theme-options input:focus-visible+.app-theme-dot{outline:3px solid var(--accent);outline-offset:4px}

/* Four authorized Dark corrections, design lab75e9550. */
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) #captureForm>.capture-inputwrap{border-color:#fff}

#noteComposer #noteMicBtn[aria-pressed="true"]{
  background-color:var(--accent-soft);
  color:var(--accent);
  box-shadow:inset 0 0 0 2px var(--accent);
}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) #view-notes .notes-layout>.card{background:var(--study-field);color:var(--ink);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .link-line button{background:var(--soft);color:var(--ink);border-color:var(--line)}
:root[data-app-theme]:not([data-app-theme="classic"]) body:not(.zen-mode):not(.landing-mode) .link-line button:hover{background:var(--control);border-color:var(--muted)}

/* Human: only the modal subtask writing box is black with light text. */
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) #editModal .study-edit-row textarea{background:#000;color:#fff;-webkit-text-fill-color:#fff}

/* The public landing and its account dialogs keep the original V278 palette.
   App themes remain selected on the root and resume when landing mode ends. */
:root:has(body.landing-mode){color-scheme:light}
body.landing-mode{
  color-scheme:light;
  --bg:#f7f3ea;--panel:#fffdfa;--ink:#272624;--muted:#6a645c;
  --line:#e4ddd0;--soft:#f0eadf;--accent:#2f6b66;--accent-soft:#e7f1ef;
  --red:#a63a27;--red-soft:#fbe8e2;--amber:#bd7c22;--amber-soft:#fbefd9;
  --violet:#75689b;--violet-soft:#eee9f6;--green:#527b53;--green-soft:#e6f0e3;
  --blue-soft:#e6f1ff;
  --shadow:0 2px 8px rgba(39,38,36,.06),0 16px 42px rgba(39,38,36,.06);
}

/* Selection must win over the generic theme input surface. */
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) input.bulkbox:checked{background:var(--accent);border-color:var(--accent)}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) .bulkbox:checked::after{background:var(--theme-card,var(--panel))}
:root[data-app-theme] body:not(.zen-mode):not(.landing-mode) :is(#bulkActions,#noteBulkActions){background:var(--theme-elevated,var(--panel));border-color:var(--accent);box-shadow:0 4px 12px #0002,0 12px 32px #0003;justify-content:safe center}
:root[data-app-theme="dark"] body:not(.zen-mode):not(.landing-mode) #accountModal .modalhead{background:var(--theme-elevated,var(--panel))}
