/* Keep the existing light palette; dark mode uses the same evergreen/copper identity. */
:root{color-scheme:light}
.appearance-choice{display:block;min-width:180px;max-width:100%;font-size:14px}
.appearance-choice select{margin-top:5px}
:root[data-theme="dark"]{
 color-scheme:dark;--ink:#edf5ef;--muted:#b1c2b8;--green:#8fd5b3;
 --light:#263e32;--line:#40574a;--bg:#101b17;--white:#1b2b23;--orange:#e7ac7b;
 --on-accent:#10251b;--error-bg:#442b29;--error-text:#ffc2b4;
}
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .nav,
:root[data-theme="dark"] .chip,
:root[data-theme="dark"] dialog,
:root[data-theme="dark"] .modal-head,
:root[data-theme="dark"] .day,
:root[data-theme="dark"] .exercise,
:root[data-theme="dark"] .ring:before,
:root[data-theme="dark"] .coach-prompt,
:root[data-theme="dark"] .coach-plan,
:root[data-theme="dark"] .quick-action,
:root[data-theme="dark"] .today-metric,
:root[data-theme="dark"] .minimal-card,
:root[data-theme="dark"] .workout-style{background:var(--white)}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea{background:var(--bg);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder{color:var(--muted);opacity:1}
:root[data-theme="dark"] input[type="checkbox"],
:root[data-theme="dark"] input[type="radio"]{accent-color:var(--green)}
:root[data-theme="dark"] .avatar,
:root[data-theme="dark"] .coach-intro,
:root[data-theme="dark"] .coach-cta,
:root[data-theme="dark"] .coach-voice-panel,
:root[data-theme="dark"] .photo-result,
:root[data-theme="dark"] .meal-photo-preview,
:root[data-theme="dark"] .coach-badge,
:root[data-theme="dark"] .workout-style:has(input:checked){background:var(--light)}
:root[data-theme="dark"] .coach-badge{color:var(--green)}
:root[data-theme="dark"] .context-preview{background:var(--bg)}
:root[data-theme="dark"] .coach-plan{border-color:var(--line)}
:root[data-theme="dark"] .btn:not(.secondary):not(.ghost):not(.danger):not(.light),
:root[data-theme="dark"] .chip.active,
:root[data-theme="dark"] .day.active,
:root[data-theme="dark"] .nav .nav-add span,
:root[data-theme="dark"] .brandmark{background:var(--green);color:var(--on-accent)}
:root[data-theme="dark"] .btn.light{background:var(--light);color:var(--green)}
:root[data-theme="dark"] .notice{background:#333b28;color:#e0e7c8}
:root[data-theme="dark"] .coach-error,
:root[data-theme="dark"] .btn.danger{background:var(--error-bg);color:var(--error-text)}
:root[data-theme="dark"] .coach-message.urgent{background:var(--error-bg);border-color:#f5a89d}
:root[data-theme="dark"] .coach-recording{color:var(--error-text)}
:root[data-theme="dark"] .record{color:var(--orange)}
:root[data-theme="dark"] .delete{color:var(--muted)}
:root[data-theme="dark"] .progress{background:#33483c}
:root[data-theme="dark"] .progress>span{background:#8fc49b}
:root[data-theme="dark"] .macro:nth-child(2) .progress>span{background:#e7ac7b}
:root[data-theme="dark"] .macro:nth-child(3) .progress>span{background:#bdbee4}
:root[data-theme="dark"] .drop{background:#33474c}
:root[data-theme="dark"] .drop.full{background:#8bc6d7}
:root[data-theme="dark"] .ring{background:conic-gradient(#8fc49b var(--percent),#33483c 0)}
:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .coach-message.user{background:#246853;color:#fff}
:root[data-theme="dark"] #toast{background:#d6efdf;color:#10251b}
:root[data-theme="dark"] dialog::backdrop{background:#0009}
:root[data-theme="dark"] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #e7ac7b;outline-offset:3px}
/* Preserve the actual photo, branded raster logo and street-map colors. */
:root[data-theme="dark"] .brand-logo-link{color:var(--ink);outline-offset:4px}
:root[data-theme="dark"] .route-live-map{color:#203c32}
:root[data-theme="dark"] .route-live-map .empty{color:#43574b}
@media(max-width:520px){.appearance-choice{width:100%}}
