/* Shared, deliberately designed dark palette. No image inversion. */
html[data-theme=dark]{color-scheme:dark;--bg:#15191c;--sidebar:#1b2024;--surface:#1e2428;--surface-2:#272f34;--surface-3:#333e45;--surface2:#272f34;--line:#44515a;--text:#f4eee8;--ink:#f4eee8;--muted:#bec7cd;--subtle:#aebbc4;--portal-green:#f0b49b;--portal-green-dark:#ffd0b9;--portal-cream:#15191c;--portal-card:#1e2428;--portal-warm:#272f34;--portal-ink:#f4eee8;--portal-line:#44515a;--orange:#f0b49b;--orange2:#3b2a24;--lime:#d3dfae;--green:#bdd8b1;--green2:#293a2e;--blue:#a6cce9;--danger:#ffb3b8;--red:#ffb3b8;--yellow:#e8ca83;--pro-peach:#382b26;--pro-sage:#28372e;--shadow:0 18px 55px #0005;--portal-shadow:0 15px 35px #0003}
[data-theme=dark] body{background:var(--bg);color:var(--text)}
[data-theme=dark] .site-header,[data-theme=dark] .header-nav-wrap{background:var(--surface);border-color:var(--line)}
[data-theme=dark] .header-search,[data-theme=dark] .home-search-big{background:var(--surface-2);border-color:var(--line);box-shadow:none}
[data-theme=dark] :is(input,textarea,select){color:var(--text);background:var(--surface);border-color:var(--line);caret-color:var(--portal-green)}
[data-theme=dark] :is(input,textarea)::placeholder{color:#a7b4bd;opacity:1}
[data-theme=dark] input[type=checkbox],[data-theme=dark] input[type=radio]{accent-color:var(--portal-green)}
[data-theme=dark] .btn{background:var(--surface-2);border-color:var(--line);color:var(--text)}
[data-theme=dark] :is(.field,.profile-chip,.header-icon,.icon-button,.card-share,.card-arrow,.chip,.btn.ghost){background:var(--surface-2);border-color:var(--line);color:var(--text)}
[data-theme=dark] .btn.primary{background:#f0b49b;color:#261c17;border-color:#f0b49b}
[data-theme=dark] .btn.primary:hover{background:#ffd0b9;border-color:#ffd0b9;color:#261c17}
[data-theme=dark] .chip.active{background:var(--portal-green);border-color:var(--portal-green);color:#261c17}
[data-theme=dark] .btn.danger{background:#4b282e;color:#ffd2d6;border-color:#89515a}
[data-theme=dark] :is(.btn.soft,.btn.lime){background:#304236;color:#e2f0d7;border-color:#506756}
[data-theme=dark] :is(.panel,.modal,.recipe-section,.setting-block,.submission-card,.support-card,.report-card,.ig-search-panel,.wf-recipe){background:var(--surface);border-color:var(--line)}
[data-theme=dark] :is(.modal-header,.modal-footer){background:var(--surface);border-color:var(--line)}
[data-theme=dark] .overlay-wrap{background:rgba(4,8,11,.78);backdrop-filter:blur(7px)}
[data-theme=dark] .fav-button{background:#263139;color:#e4dcd4;border:1px solid #62717c;box-shadow:0 3px 10px #0004}
[data-theme=dark] .fav-button.on{background:#553139;color:#ffd3d7;border-color:#b8757d}
[data-theme=dark] :is(.health-mini.unknown,.rating-mini.empty-rate){background:var(--surface-2);border-color:var(--line);color:var(--muted)}
[data-theme=dark] .rating-mini{background:#3b3324;color:#f5d598;border-color:#6b5735}
[data-theme=dark] .nutrition-mini :is(span,.health-mini){background:var(--surface-2);color:var(--text)}
[data-theme=dark] .nutrition-mini .health-mini{background:#2b3c30;color:#dfedd5}
[data-theme=dark] :is(.notice,.import-warn,.pro-draft-notice){background:#3a3224;border-color:#80683a;color:#f0dab2}
[data-theme=dark] .report-strip{background:#39272b;border-color:#75515a}
[data-theme=dark] :is(.cat-big,.support-home,.category-row){background:var(--surface-2);border-color:var(--line);color:var(--text)}
[data-theme=dark] .cover-placeholder{background:var(--surface-2)!important}
[data-theme=dark] .quality-overview small,[data-theme=dark] .pro-data-note{color:var(--muted)}
[data-theme=dark] .wf-ingredient.unresolved{border-left-color:#e0b66f}
[data-theme=dark] .wf-ingredient.resolved{border-left:3px solid #aaca9c}
[data-theme=dark] .ig-results tbody tr:hover{background:#293238}
[data-theme=dark] :focus-visible{outline:3px solid #f3c4ac;outline-offset:3px}
[data-theme=dark] ::selection{background:#edb399;color:#241b16}
/* The standalone planner retains its own layout and shares these surface tokens. */
[data-theme=dark] :is(.side,.form-card,.card,.dialog,.planner-boot-card,.auth-wrap .auth-grid>section,.public-shell .invite){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.nav button,.nav a,.link-btn){color:var(--text)}
[data-theme=dark] .nav :is(button:hover,a:hover,button.active,a.active){background:var(--surface-2);color:var(--green)}
[data-theme=dark] :is(.empty,.role-guide,.role-info,.role-info.owner,.role-info.viewer,.mode-cards small,.poll-recipe-picker,.poll-recipe-choice,.poll-vote-recipe,.poll-all-choice,.contribution-entry,.contribution-existing,.edit-code-box,.picked-summary,.role-note,.task,.day,.shopping,.rsvp-card,.summary-card){background:var(--surface-2);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.poll-vote-recipe:hover,.poll-recipe-choice:hover,.poll-vote-recipe:has(input:checked),.poll-recipe-choice:has(input:checked)){background:#2d3d31;border-color:#80a174;box-shadow:none}
[data-theme=dark] :is(.role-info span,.role-note,.auth-note,.form-card .muted,.empty,.mode-help,.mode-pill,.warn-text){color:var(--muted)}
[data-theme=dark] .mode-pill{background:var(--surface-2)}
[data-theme=dark] :is(.family-hero,.hero){background:linear-gradient(125deg,#263c2e,#314d38);border-color:#57765a;color:#f0f5ec}
[data-theme=dark] :is(.family-hero,.hero) :is(p,small){color:#d1dfce}
[data-theme=dark] .family-days .day-head{background:#304d37;color:#edf4e8}
[data-theme=dark] .family-days .day{border-color:#58735c}
[data-theme=dark] :is(.guest-table,.guest-table th,.guest-table td,.planner-tabs){border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.guest-table th,.day-head){background:var(--surface-2)}
[data-theme=dark] .edit-code-box b,[data-theme=dark] .edit-code-box span{color:#d2e9bd}
[data-theme=dark] .toast{background:#293f31;color:#eef7e8;border:1px solid #76966d}
[data-theme=dark] .toast.err{background:#512c32;color:#ffe6e9;border-color:#ac6c76}
[data-theme=dark] .dialog-backdrop{background:rgba(4,8,11,.78)}
[data-theme=dark] .field>span,[data-theme=dark] .field>label,[data-theme=dark] .input-label{color:var(--muted)}
[data-theme=dark] .header-search input,[data-theme=dark] .home-search input{background:transparent}
[data-theme=dark] body[data-theme-toggle=floating] .field{background:transparent}
[data-theme=dark] :is(.mini-metrics,.invite-meta){color:var(--muted)}
[data-theme=dark] .planner-tabs button{background:var(--surface-2);border-color:var(--line);color:var(--text)}
[data-theme=dark] .planner-tabs button.active{background:var(--green);border-color:var(--green);color:#182519}
[data-theme=dark] :is(.btn.good,.status.open,.status.yes,.good-card){background:#2a3e2e;color:#d7e9c8;border-color:#537452}
[data-theme=dark] :is(.status.maybe,.status.waitlist){background:#423726;color:#efdaa6;border-color:#7b673a}
[data-theme=dark] :is(.status.no,.status.closed){background:#472a30;color:#ffd4d8;border-color:#89525b}
[data-theme=dark] :is(.detail-hero,.share-box,.copy-text,.icon-btn,.recipe-select,.task-check,.rsvp-choice label,.option){background:var(--surface-2);border-color:var(--line);color:var(--text)}
.global-theme-toggle{position:fixed;bottom:20px;left:18px;z-index:85;width:46px;height:46px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink,var(--text));font-size:23px;box-shadow:var(--shadow);cursor:pointer}
@media(max-width:760px){.global-theme-toggle{left:auto;right:16px;bottom:18px}body[data-theme-toggle=floating] .toast{bottom:76px}}
