/* Appearance changes surfaces and controls, preserving food photography and art. */
:root{color-scheme:light}
:root[data-theme="dark"]{
 color-scheme:dark;
 --paper:#1c1a18;--card:#27231f;--ink:#f2eae0;--muted:#bdb2a6;
 --wine:#e7afc1;--wine-dark:#f3c5d3;--pink:#3b2931;--sage:#2f372b;--olive:#c3d2ae;
 --line:#4a4139;--shadow:0 12px 40px #0005;
 --accent-fill:#914560;--accent-hover:#a6506e;--olive-fill:#4b603c;
 --surface-soft:#302b25;--cream:#302b25;--warning-bg:#3b3020;--warning-line:#705b35;--warning-ink:#ecd3a1;
 --danger-bg:#442925;--danger-ink:#f1b09f;
}

.app-options-list .theme-toggle{display:grid;grid-template-columns:1fr 38px 1fr;align-items:center;gap:10px;min-height:48px;padding:10px 12px;width:100%;font-size:13px}
.theme-toggle .theme-light-label{text-align:right;font-weight:600}
.theme-toggle .theme-dark-label{text-align:left;color:var(--muted);font-weight:400}
.theme-toggle .theme-track{display:block;width:38px;height:22px;border-radius:20px;background:var(--line);padding:3px;transition:background .15s}
.theme-toggle .theme-track>span{display:block;width:16px;height:16px;border-radius:50%;background:var(--card);box-shadow:0 1px 3px #0003;transition:transform .15s}
.theme-toggle[aria-checked="true"] .theme-track{background:var(--accent-fill,#713747)}
.theme-toggle[aria-checked="true"] .theme-track>span{transform:translateX(16px);background:#fff4f6}
.theme-toggle[aria-checked="true"] .theme-light-label{color:var(--muted);font-weight:400}
.theme-toggle[aria-checked="true"] .theme-dark-label{color:var(--ink);font-weight:600}

:root[data-theme="dark"] .btn:where(:not(.secondary,.soft,.ghost,.danger)),
:root[data-theme="dark"] .nav-link.active,
:root[data-theme="dark"] .pantry-filters .chip.selected,
:root[data-theme="dark"] .inventory-view-switch>.btn[aria-pressed="true"],
:root[data-theme="dark"] .to-cook-meal-control label:has(input:checked),
:root[data-theme="dark"] .to-cook-storage button[aria-pressed="true"]{background:var(--accent-fill);color:#fff4f6}
:root[data-theme="dark"] .btn:where(:not(.secondary,.soft,.ghost,.danger)):hover{background:var(--accent-hover)}
:root[data-theme="dark"] .chip.active{background:var(--accent-fill);border-color:var(--accent-fill);color:#fff4f6}
:root[data-theme="dark"] .decision .chip.active,:root[data-theme="dark"] .decision .btn{background:var(--olive-fill);border-color:var(--olive-fill);color:#f5f8f0}
:root[data-theme="dark"] .toast{background:#373029;color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow)}
:root[data-theme="dark"] .toast[data-kind="error"]{background:var(--danger-bg);border-color:#805649}
:root[data-theme="dark"] .toast-action{color:var(--warning-ink)}
:root[data-theme="dark"] .navigation{background:#27231ff5}
:root[data-theme="dark"] .skip,:root[data-theme="dark"] .dialog-destination{background:var(--card)}
:root[data-theme="dark"] dialog{box-shadow:0 20px 100px #0009}
:root[data-theme="dark"] dialog::backdrop{background:#080605a6}
:root[data-theme="dark"] input.field,:root[data-theme="dark"] textarea.field,:root[data-theme="dark"] select.field{border-color:var(--line)}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#afa194;opacity:1}
:root[data-theme="dark"] input[type="checkbox"],:root[data-theme="dark"] input[type="radio"]{accent-color:#cb8da4}
:root[data-theme="dark"] .art-fav{background:#27231fee}
:root[data-theme="dark"] .recipe-art.rose{background:#422d2b}
:root[data-theme="dark"] .recipe-art.sand{background:#3b3424}
:root[data-theme="dark"] .recipe-art.lilac{background:#382e3a}

:root[data-theme="dark"] .stock-item,:root[data-theme="dark"] .food-suggestion,
:root[data-theme="dark"] .food-catalog-card,:root[data-theme="dark"] .pantry-suggestion,
:root[data-theme="dark"] .prepared-plain,:root[data-theme="dark"] .receipt-save,
:root[data-theme="dark"] .today-meal,
:root[data-theme="dark"] .ready-meal,:root[data-theme="dark"] .product-group,
:root[data-theme="dark"] .to-cook-card,:root[data-theme="dark"] .basic-jar-detail,
:root[data-theme="dark"] .inventory-view-switch,:root[data-theme="dark"] .workspace-toolbar select,
:root[data-theme="dark"] .shop-review-list .shop-section,:root[data-theme="dark"] .shop-section>summary>small,
:root[data-theme="dark"] .priority-reference.priority-compact{background:var(--card)}

:root[data-theme="dark"] .subtle-panel,:root[data-theme="dark"] .receipt-upload,
:root[data-theme="dark"] .food-icon-field,:root[data-theme="dark"] .food-catalog-add,
:root[data-theme="dark"] .workspace-toolbar,:root[data-theme="dark"] .sync-status:hover,
:root[data-theme="dark"] .shop-section>summary,:root[data-theme="dark"] .shop-edit-context,
:root[data-theme="dark"] .habitual-status,:root[data-theme="dark"] .repeat-product,
:root[data-theme="dark"] .inventory-basics{background:var(--surface-soft)}
:root[data-theme="dark"] .to-cook-picker-row:hover,:root[data-theme="dark"] .to-cook-command.is-selected,
:root[data-theme="dark"] .to-cook-destinations label:has(input:checked),
:root[data-theme="dark"] .to-cook-count,:root[data-theme="dark"] .shop-quantity,
:root[data-theme="dark"] .shop-quantity-preview{background:var(--pink)}

:root[data-theme="dark"] .decision .chip,:root[data-theme="dark"] .meal-slot.has-meal,
:root[data-theme="dark"] .stock-undo,:root[data-theme="dark"] .stock-base-groups,
:root[data-theme="dark"] .stock-card-note,:root[data-theme="dark"] .product-bought,
:root[data-theme="dark"] .shop-badges>span,:root[data-theme="dark"] .shop-stock-hint,
:root[data-theme="dark"] .shop-help,:root[data-theme="dark"] .kitchen-summary,
:root[data-theme="dark"] .inventory-undo,:root[data-theme="dark"] .quick-consumption-stock,
:root[data-theme="dark"] .meal-state-badge{background:var(--sage)}
:root[data-theme="dark"] .product-bought:hover{background:#3a4734}
:root[data-theme="dark"] .shop-product.is-bought .shop-quantity{background:var(--surface-soft)}
:root[data-theme="dark"] .kitchen-summary>strong,:root[data-theme="dark"] .shopping-side p,
:root[data-theme="dark"] .shop-help-note,:root[data-theme="dark"] .idea-stock-status.enough,
:root[data-theme="dark"] .idea-stock-status.ready{color:var(--olive)}

:root[data-theme="dark"] .notice,:root[data-theme="dark"] .shop-review-list,
:root[data-theme="dark"] .shop-notice,:root[data-theme="dark"] .priority-reference,
:root[data-theme="dark"] .habitual-status.low,:root[data-theme="dark"] .quantity-proposal{background:var(--warning-bg);color:var(--warning-ink);border-color:var(--warning-line)}
:root[data-theme="dark"] .priority-reference small{color:#c8b89e}
:root[data-theme="dark"] .shop-review-list .shop-product{border-color:var(--warning-line)}
:root[data-theme="dark"] .availability-warnings,:root[data-theme="dark"] .idea-stock-status,
:root[data-theme="dark"] .idea-stock-status.has-warnings,:root[data-theme="dark"] .quantity-proposal{color:var(--warning-ink)}
:root[data-theme="dark"] .btn.danger,:root[data-theme="dark"] .stock-badge.urgent,
:root[data-theme="dark"] .stock-card-note.urgent,:root[data-theme="dark"] .shop-badges>span.needs-review,
:root[data-theme="dark"] .habitual-status.empty,:root[data-theme="dark"] .habitual-status.review,
:root[data-theme="dark"] [data-pantry-section="review"] .priority-compact,
:root[data-theme="dark"] .picker-item.priority{background:var(--danger-bg);color:var(--danger-ink);border-color:#735045}
:root[data-theme="dark"] .stock-badge.expired{background:#493136;color:#f1b5bc}
:root[data-theme="dark"] .stock-badge{background:var(--surface-soft);color:var(--olive)}
:root[data-theme="dark"] .shop-review-note,:root[data-theme="dark"] .idea-priority,
:root[data-theme="dark"] .idea-stock-status.missing{color:var(--danger-ink)}
:root[data-theme="dark"] .shop-item-details>summary,:root[data-theme="dark"] .product-group-heading p,
:root[data-theme="dark"] .repeat-product small,:root[data-theme="dark"] .habitual-status,
:root[data-theme="dark"] .inventory-basics>summary small,:root[data-theme="dark"] .waste-table th,
:root[data-theme="dark"] .meal-empty{color:var(--muted)}
:root[data-theme="dark"] .basics-cabinet .basics-family-heading h3{color:var(--ink)}
:root[data-theme="dark"] .basic-actions .basic-buy{color:var(--wine)}

:root[data-theme="dark"] .subtle-panel,:root[data-theme="dark"] .meal-empty,
:root[data-theme="dark"] .ready-meal,:root[data-theme="dark"] .product-group,
:root[data-theme="dark"] .stock-lot,
:root[data-theme="dark"] .basics-list .basic-product:first-child,:root[data-theme="dark"] .basic-product,
:root[data-theme="dark"] .repeat-product,:root[data-theme="dark"] .repeat-review fieldset,
:root[data-theme="dark"] .inventory-basics,:root[data-theme="dark"] .pantry-toolbar,
:root[data-theme="dark"] .waste-table th,:root[data-theme="dark"] .waste-table td,
:root[data-theme="dark"] .shop-quantity,:root[data-theme="dark"] .shop-help,
:root[data-theme="dark"] .shop-help-note,:root[data-theme="dark"] .decision .chip,
:root[data-theme="dark"] .kitchen-summary,:root[data-theme="dark"] .inventory-undo,
:root[data-theme="dark"] .product-bought,:root[data-theme="dark"] .quick-consumption-stock{border-color:var(--line)}
:root[data-theme="dark"] .day-row.is-today{border-color:#778967}
:root[data-theme="dark"] .idea-photo{background:#393126}
:root[data-theme="dark"] .report-bar{background:var(--line)}
:root[data-theme="dark"] .report-bar>i{background:#cb8da4}
:root[data-theme="dark"] .dialog-destination{border-color:var(--line)}

:root[data-theme="dark"] .batch-row,:root[data-theme="dark"] .batch-sticky,
:root[data-theme="dark"] .availability-grid>article{background:var(--card)}
:root[data-theme="dark"] .batch-row legend{color:var(--muted)}
:root[data-theme="dark"] .decide-panel,:root[data-theme="dark"] .week-copy-row,
:root[data-theme="dark"] .price-card-head{background:var(--surface-soft)}
:root[data-theme="dark"] .batch-duplicate,:root[data-theme="dark"] .draft-notice,
:root[data-theme="dark"] .batch-parse-notes,:root[data-theme="dark"] .test-environment,
:root[data-theme="dark"] .availability-result.unknown{background:var(--warning-bg);border-color:var(--warning-line);color:var(--warning-ink)}
:root[data-theme="dark"] .batch-saved,:root[data-theme="dark"] .price-store.is-best,
:root[data-theme="dark"] .price-source-status,:root[data-theme="dark"] .availability-result.enough,
:root[data-theme="dark"] .availability-result.ready{background:var(--sage);border-color:var(--olive-fill);color:var(--olive)}
:root[data-theme="dark"] .shop-choice-banner{background:var(--pink)}
:root[data-theme="dark"] .availability-result.missing{background:var(--danger-bg);color:var(--danger-ink)}
:root[data-theme="dark"] .sync-status[data-status="synced"] .sync-dot{background:#98b47b}
:root[data-theme="dark"] .sync-status[data-status="syncing"] .sync-dot{background:#be93af}
:root[data-theme="dark"] .sync-status[data-status="offline"] .sync-dot,:root[data-theme="dark"] .sync-status[data-status="pending"] .sync-dot{background:#d4ae64}
:root[data-theme="dark"] .sync-status[data-status="conflict"] .sync-dot,:root[data-theme="dark"] .sync-status[data-status="error"] .sync-dot,:root[data-theme="dark"] .sync-status[data-status="auth"] .sync-dot{background:#e28994}

@media(prefers-reduced-motion:reduce){.theme-toggle .theme-track,.theme-toggle .theme-track>span{transition:none}}
