:root{--accent-fill:#315744;--accent-base:#315744;color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;--line:#35433a;--paper:#242e28;--sage:#334438;--muted:#b5c4b4;color:#edf2e9;background:#171f1b}

.appearance-panel{grid-column:1/-1}
.appearance-label{font-size:12px;font-weight:700;margin:22px 0 10px}
.appearance-modes,.appearance-colors{display:flex;flex-wrap:wrap;gap:9px}
.appearance-modes button{border:1px solid var(--line);border-radius:10px;background:var(--paper);padding:9px 17px;min-height:44px}
.appearance-modes button.selected{border-color:var(--accent-fill);box-shadow:inset 0 0 0 1px var(--accent-fill);font-weight:700}
.appearance-swatch{--swatch:#315744;width:46px;height:46px;min-height:46px;border:2px solid transparent;border-radius:50%;background:var(--swatch);color:#fff;display:grid;place-items:center;font-size:21px;box-shadow:0 0 0 1px var(--line)}
.appearance-swatch[data-accent="#a64f3b"]{--swatch:#a64f3b}.appearance-swatch[data-accent="#28647d"]{--swatch:#28647d}.appearance-swatch[data-accent="#754875"]{--swatch:#754875}.appearance-swatch[data-accent="#8a6225"]{--swatch:#8a6225}
.appearance-swatch.selected{outline:2px solid var(--green);outline-offset:3px}
.appearance-custom{display:flex;align-items:center;gap:12px;margin-top:20px;font-size:13px;font-weight:650;flex-wrap:wrap}
.appearance-custom input{width:64px;height:44px;padding:3px;border:1px solid var(--line);border-radius:9px;background:var(--paper);cursor:pointer}
.appearance-custom span{color:var(--muted);font-size:12px}
.button:not(.secondary):not(.quiet):not(.danger),.brand>span,.chip.active,.mobile-nav .add-nav{background:var(--accent-fill);color:#fff}
.button.secondary,.button.quiet,.chip.active,.nav button.active,.mobile-nav button.active,.book-picker,.search input{accent-color:var(--accent-fill)}
.nav button.active,.mobile-nav button.active,.quality-badge,.cooking-progress,.cooking-progress progress{color:var(--green)}
.cooking-progress progress,.shopping-row input,.shopping-choice-row input,.meal-pick input,.form-check input{accent-color:var(--accent-fill)}

:root[data-theme="dark"] .sidebar{background:#202a23}
:root[data-theme="dark"] .brand small,:root[data-theme="dark"] .nav-label,:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .card-category,:root[data-theme="dark"] .card-meta,:root[data-theme="dark"] .footer-note,:root[data-theme="dark"] .quantity,:root[data-theme="dark"] .meal-empty,:root[data-theme="dark"] .shortcuts-list,:root[data-theme="dark"] .detail-intro,:root[data-theme="dark"] .steps li{color:#b5c4b4}
:root[data-theme="dark"] .nav button,:root[data-theme="dark"] .chip,:root[data-theme="dark"] .breadcrumb,:root[data-theme="dark"] .sort,:root[data-theme="dark"] .mobile-nav button{color:#c3d0c0}
:root[data-theme="dark"] .nav button.active,:root[data-theme="dark"] .nav button:hover,:root[data-theme="dark"] .tabs button.active{background:#354738;color:var(--green)}
:root[data-theme="dark"] .side-tip,:root[data-theme="dark"] .hero,:root[data-theme="dark"] .hero-art,:root[data-theme="dark"] .book-cover,:root[data-theme="dark"] .count,:root[data-theme="dark"] .pill,:root[data-theme="dark"] .notice,:root[data-theme="dark"] .import-preview,:root[data-theme="dark"] .nutrition-editor,:root[data-theme="dark"] .nutrition-facts .nutrition-head,:root[data-theme="dark"] .cooking-current,:root[data-theme="dark"] .cooking-timer,:root[data-theme="dark"] .ingredient-editor,:root[data-theme="dark"] pre{background:#303d32;color:#e8f0e4}
:root[data-theme="dark"] .hero p,:root[data-theme="dark"] .side-tip p,:root[data-theme="dark"] .import-preview-copy p,:root[data-theme="dark"] .import-preview h3 small,:root[data-theme="dark"] .meal-export p{color:#c1d0bc}
:root[data-theme="dark"] .book-card,:root[data-theme="dark"] .recipe-card,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .meal-day,:root[data-theme="dark"] .cooking-ingredients,:root[data-theme="dark"] .shopping-choice-row{background:var(--paper);color:#edf2e9}
:root[data-theme="dark"] .meal-day.today{background:#2b3b2f}
:root[data-theme="dark"] .mobile-nav{background:#202a23f2;border-top-color:var(--line)}
:root[data-theme="dark"] .mobile-nav button.active{color:var(--green)}
:root[data-theme="dark"] .mobile-nav .add-nav{color:#fff}
:root[data-theme="dark"] .button.secondary,:root[data-theme="dark"] .icon-button{background:var(--paper);border-color:var(--line);color:var(--green)}
:root[data-theme="dark"] .button.quiet,:root[data-theme="dark"] .side-tip button{color:var(--green)}
:root[data-theme="dark"] .search input,:root[data-theme="dark"] label.field input,:root[data-theme="dark"] label.field textarea,:root[data-theme="dark"] label.field select,:root[data-theme="dark"] .inline-form input,:root[data-theme="dark"] .member select,:root[data-theme="dark"] .sort,:root[data-theme="dark"] .book-picker{background:#1d2720;border-color:var(--line);color:#edf2e9}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#aabbab}
:root[data-theme="dark"] .import-preview-image,:root[data-theme="dark"] .quality-badge,:root[data-theme="dark"] .steps li:before,:root[data-theme="dark"] .stepper button{background:#394b3b;color:#eaf1e5}
:root[data-theme="dark"] .quality-badge.uncertain,:root[data-theme="dark"] .quality-badge.ai_derived,:root[data-theme="dark"] .notice.warning{background:#4d402c;color:#ffdfa3}
:root[data-theme="dark"] .quality-badge.missing,:root[data-theme="dark"] .cooking-timer.done{background:#513831;color:#ffd0c3}
:root[data-theme="dark"] .quality-badge.user_edited{background:#30465a;color:#cfebff}
:root[data-theme="dark"] .heart,:root[data-theme="dark"] .tag,:root[data-theme="dark"] .hero-sticker{background:#28372c;color:#eaf1e5}
:root[data-theme="dark"] .empty{border-color:var(--line);color:#c3d0c0}
:root[data-theme="dark"] .empty h3{color:#edf2e9}
:root[data-theme="dark"] dialog{border-color:var(--line);color:#edf2e9}
:root[data-theme="dark"] dialog::backdrop{background:#050b08a6}
:root[data-theme="dark"] #toast,:root[data-theme="dark"] #dialog-status{background:#365543;color:#fff}
:root[data-theme="dark"] .form-note{color:#b5c4b4!important}
:root[data-theme="dark"] .form-error{color:#ffb8a8}
:root[data-theme="dark"] .offline{background:#4d402c;color:#ffdfa3}
:root[data-theme="dark"] .shopping-row.checked,:root[data-theme="dark"] .shopping-row.checked strong{color:#b5c4b4}
:root[data-theme="dark"] .appearance-modes button{color:#edf2e9}
@media print{:root[data-theme="dark"]{color-scheme:light;color:#253d33;background:#fff}}
