/* Shared dark palette; product photos and brand assets keep their original colours. */
:root[data-theme="dark"]{--ink:#edf5ef;--muted:#b0c2b8;--cream:#111b18;--paper:#1b2923;--orange:#ff9b75;--peach:#3b2b26;--sage:#243b30;--line:#3a4e42;--green:#80dbad;color-scheme:dark;color:var(--ink);background:#0a1210}
html[data-theme="dark"] body,html[data-theme="dark"] .phone-shell{background:var(--cream);color:var(--ink)}
html[data-theme="dark"] :is(.auth-card,.auth-panel,.profile-panel,.profile-subview,.notification-prompt-card,.onboarding-card,.menu-item,.catalog-item,.product-content,.saved-card,.swap-card,.swap-calendar,.subscription-card,.friend-card,.insight-card,.pro-card,.buy-list-form,.buy-list-items li,.wishlist-category,.notice,.card,main){background:var(--paper)!important;color:var(--ink);border-color:var(--line)!important}
html[data-theme="dark"] :is(.topbar,.subbar,.smart-app-header,.smart-tab-bar,.bottom-nav,.wishlist-tabs,.you-tabs,.profile-subview-header){background:#17241ff5!important;color:var(--ink);border-color:var(--line)!important}
html[data-theme="dark"] :is(.auth-screen,#login-screen,#signup-screen,#reset-screen,.success-screen,#wishlist-screen .cart-content){background:var(--cream)!important;color:var(--ink)}
html[data-theme="dark"] :is(input,select,textarea){background:#14251d!important;color:var(--ink)!important;border-color:#52695b!important;accent-color:var(--green)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#a1b6a8}
html[data-theme="dark"] :is(.primary-button,.auth-submit,.add-button,.cart-float,.wishlist-tab.active){background:#80dbad!important;color:#102219!important}
html[data-theme="dark"] .avatar{background-color:#80dbad!important;color:#102219!important}
html[data-theme="dark"] :is(.prompt-card,.reflection,.buy-list-intro,.notification-settings,.profile-settings-row,.swap-actions button,.quantity button,.store-chip,.filter-chip,.plan-card,.reason-chip){background:var(--sage)!important;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.success-copy,.list-description,.auth-note,.auth-description,.profile-settings-message,.profile-settings-row small,.notification-permission,.disclaimer,.updated,.buy-list-copy small){color:var(--muted)!important}
html[data-theme="dark"] :is(a,.text-button,.green){color:var(--green)}
html[data-theme="dark"] :is(.auth-submit,.primary-button) a{color:#102219}
html[data-theme="dark"] .profile-settings-list{border-color:var(--line)}
html[data-theme="dark"] :is(.you-tab-icon,.profile-settings-entry svg){stroke:currentColor}
html[data-theme="dark"] :is(.notification-time,.notification-select,.profile-settings-entry,.profile-subview-header){border-color:var(--line)}
html[data-theme="dark"] .swap-calendar-day{color:var(--ink);background:var(--paper)}
html[data-theme="dark"] .swap-calendar-day.completed{background:#286649;color:#fff}
html[data-theme="dark"] :is(.buy-add-button,#open-buy-form,.swap-actions button,.profile-subview-close,.profile-subview-back){background:#294438!important;color:var(--ink)!important}
html[data-theme="dark"] .bottom-nav .nav-link{color:#c0d0c5!important}
html[data-theme="dark"] .bottom-nav .nav-link.active{background:#314b3e!important;color:#ffb08e!important;box-shadow:0 0 0 1px #62866d}
html[data-theme="dark"] :is(.notification-toggle,.notification-time,.notification-select){color:var(--ink)}
html[data-theme="dark"] :is(.profile-fields,.profile-heading,.profile-points,.profile-points-labels p,.close-profile,.insight-grid,.insight-metric,.premium-preview,.premium-insights-panel){background:var(--paper)!important;color:var(--ink);border-color:var(--line)!important}
html[data-theme="dark"] :is(.profile-fields label,.profile-points-labels p,.level-progress p){color:var(--muted)!important}
html[data-theme="dark"] .profile-settings-row input[role="switch"]:checked{background:var(--green)!important}
html[data-theme="dark"] .orders-stats>div{background:#392d27!important;border-color:var(--line)!important;color:var(--ink)}
html[data-theme="dark"] .orders-stats>div:nth-child(2){background:#233d32!important}
html[data-theme="dark"] .orders-stats>div:nth-child(3){background:#30293f!important}
html[data-theme="dark"] .orders-stats>div:nth-child(4){background:#3d381f!important}
html[data-theme="dark"] .orders-stats strong{color:var(--ink)!important}
html[data-theme="dark"] .orders-stats small{color:var(--muted)!important}
html[data-theme="dark"] :is(.insight-range button,.order-history-tab,.friends-created-code,.order-card){background:var(--paper)!important;color:var(--ink);border-color:var(--line)!important}
html[data-theme="dark"] :is(.insight-range button.active,.friends-primary,.subscription-submit){background:#80dbad!important;color:#102219!important}
html[data-theme="dark"] .insight-lock{background:#111b18ed!important;color:var(--ink)}

/* Explicit control surfaces: never pair inherited light text with a light chip. */
html[data-theme="dark"] :is(.food-cuisine-chip,.diet-filter,.ordering-reasons label,.buy-list-form fieldset label,.order-reason,.fashion-size-options button,.menu-toppings label){background:#263b32!important;color:#edf5ef!important;border:1px solid #496253}
html[data-theme="dark"] .diet-toggle{background:#14221c;border:1px solid var(--line)}
html[data-theme="dark"] :is(.food-cuisine-chip.active,.diet-filter.active,.fashion-size-options button.active,.store-chip.active){background:#80dbad!important;color:#102219!important;border-color:#80dbad;box-shadow:0 3px 12px #0003}
html[data-theme="dark"] :is(.ordering-reasons label,.buy-list-form fieldset label,.menu-toppings label):has(input:checked){background:#314d40!important;color:#f3fff7!important;border-color:#80dbad}
html[data-theme="dark"] :is(.ordering-reasons input,.buy-list-check input):checked{background:#80dbad!important;border-color:#80dbad!important}
html[data-theme="dark"] .ordering-reasons input:checked::after{background:#102219}
html[data-theme="dark"] .buy-list-check input:checked::after{color:#102219}
html[data-theme="dark"] .menu-cuisine-chip{background:#402e28;color:#ffb99c;border-color:#765044}
html[data-theme="dark"] .diet-dot.veg,html[data-theme="dark"] .diet-mark.veg{color:#80dbad}
html[data-theme="dark"] .diet-dot.nonveg,html[data-theme="dark"] .diet-mark.nonveg{color:#ff9b8a}
html[data-theme="dark"] #global-cart{background:linear-gradient(120deg,#305f49,#244837)!important;color:#f0fff5!important;border:1px solid #659c7e;box-shadow:0 8px 24px #0005}
html[data-theme="dark"] :is(.catalog-add,.quantity-increase,.profile-save,#product-add,.buy-list-form .auth-submit){background:#80dbad!important;color:#102219!important}
html[data-theme="dark"] .release-slide-thumb{background:#102e21;color:#b6f3cf;border-color:#80dbad}
html[data-theme="dark"] .buy-add-button span,html[data-theme="dark"] .buy-list-intro::after{background:#80dbad;color:#102219}
html[data-theme="dark"] :is(.wish-small,.remove-wish){background:#392c29!important;color:#ffb08e!important}
html[data-theme="dark"] .bottom-nav::before{opacity:.08}
html[data-theme="dark"] .bottom-nav{box-shadow:0 10px 32px #0005!important}
html[data-theme="dark"] :is(.food-cuisine-chip,.diet-filter,.ordering-reasons label,.buy-list-form fieldset label):hover{border-color:#92b5a0}
html[data-theme="dark"] :is(.pending-release-notice,#cart-save-status){background:#402b27;color:#ffc3ad}
html[data-theme="dark"] :is(.friend-comparison,.friend-metric-card,.friends-request-preview){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.friend-metric-value.yours,.friends-created-code button){background:#263f32;color:#edf5ef}
html[data-theme="dark"] :is(.friend-metric-value.friend,.friend-metric-icon){background:#402e28;color:#edf5ef}
html[data-theme="dark"] .friend-initial{color:#2c1e17}
html[data-theme="dark"] .friends-message[data-state="error"],html[data-theme="dark"] .buy-list-error{color:#ffad98}
html[data-theme="dark"] .friends-message[data-state="success"]{color:#80dbad}
html[data-theme="dark"] :is(.profile-picture-trigger,.profile-picture-picker,.order-browse){background:#243b30!important;color:#edf5ef!important;border-color:#52695b!important}
html[data-theme="dark"] .profile-avatar-option:hover,html[data-theme="dark"] .profile-avatar-option:focus-visible{background:#263e32}
html[data-theme="dark"] .profile-avatar-option[aria-checked="true"]{background:#402e28;color:#ffb08e;border-color:#ff9b75}
html[data-theme="dark"] :is(.avatar-choice-visual,.profile-avatar,#profile-button){outline:2px solid #09130f;outline-offset:1px;box-shadow:0 0 0 4px #496253}
html[data-theme="dark"] :is(.avatar-choice-visual,.profile-avatar):not(.has-profile-picture){background:#163324;color:#edf5ef}
html[data-theme="dark"] :is(.profile-save-status,.profile-points-status)[data-state="error"]{color:#ffad98}
html[data-theme="dark"] .profile-points-status{color:#ffad98!important}

/* Dark control contrast: dietary marks stay distinct on the selected mint chip. */
html[data-theme="dark"] :is(.diet-dot,.diet-mark){width:15px;height:15px;flex-shrink:0;border-width:2px;border-radius:2px;box-shadow:0 0 0 1px #091b1266}
html[data-theme="dark"] :is(.diet-dot.veg,.diet-mark.veg){color:#9be8b8;background:#123321}
html[data-theme="dark"] :is(.diet-dot.nonveg,.diet-mark.nonveg){color:#ffb39f;background:#3b211b}
html[data-theme="dark"] .diet-filter.active .diet-dot.veg{color:#155737;background:#effff3;outline:1px solid #155737;outline-offset:1px}
html[data-theme="dark"] .diet-filter.active .diet-dot.nonveg{color:#983e2b;background:#fff3ec;outline:1px solid #983e2b;outline-offset:1px}

/* Released orders: defined card edges and a quiet, inset period selector. */
html[data-theme="dark"] .order-card{border:1px solid #506f5c!important;background:linear-gradient(145deg,#20382b,#18271f 72%)!important;box-shadow:inset 0 1px #b3e9c50d,0 12px 28px #00000029}
html[data-theme="dark"] .order-card:after{background:#82b99a;opacity:.07}
html[data-theme="dark"] .order-win-badge{border:1px solid #4b725a;background:#284734;color:#c4f2d4;font-weight:600;letter-spacing:.7px}
html[data-theme="dark"] .order-card .order-date{color:#adc5b6}
html[data-theme="dark"] .order-card .order-total{border-color:#496452!important;color:#a6e7c0}
html[data-theme="dark"] .order-history-tabs{gap:6px;padding:6px;border:1px solid #3e5949;border-radius:19px;background:linear-gradient(135deg,#101e17,#192c21);box-shadow:inset 0 2px 7px #0003,0 6px 16px #0002}
html[data-theme="dark"] .order-history-tab{min-height:52px;padding:11px 9px;border:1px solid transparent;border-radius:13px;background:transparent!important;color:#b4c9bc;font:600 12px/1.45 'DM Sans',sans-serif;transition:background .15s,border-color .15s}
html[data-theme="dark"] .order-history-tab.active{border-color:#6a967b!important;background:linear-gradient(135deg,#345f48,#284a37)!important;color:#edfff3;box-shadow:inset 0 1px #d1f7df20,0 4px 10px #0004}
html[data-theme="dark"] .order-history-tab:not(.active):hover{border-color:#536e5d!important;background:#243b2d!important;color:#e2f0e7}
html[data-theme="dark"] .order-history-tab:focus-visible{outline:2px solid #a6e7c0;outline-offset:2px}

/* Wishlist: soft type, restrained accents and layered dark surfaces. */
html[data-theme="dark"] #wishlist-panel>.list-description{display:flex;align-items:center;width:fit-content;max-width:100%;padding:11px 15px;border:1px solid #486652;border-radius:15px;background:linear-gradient(120deg,#2a4534,#1d3025);color:#d0e8d8!important;font:600 12px/1.55 'DM Sans',sans-serif;letter-spacing:.1px;box-shadow:inset 0 1px #c7f3d50b,0 5px 16px #0002}
html[data-theme="dark"] #wishlist-screen .cart-content:before{background:#6b8e72;opacity:.09}
html[data-theme="dark"] #wishlist-screen .wishlist-category{--wish-accent:#a6e7c0;border:1px solid #415c4b!important;background:linear-gradient(140deg,#22392c,#192a20)!important;box-shadow:inset 0 1px #bfe7ce0d,0 8px 22px #0002}
html[data-theme="dark"] #wishlist-screen .wishlist-category[data-category="food"]{--wish-accent:#efbd99}
html[data-theme="dark"] #wishlist-screen .wishlist-category[data-category="fashion"]{--wish-accent:#d0baf0}
html[data-theme="dark"] #wishlist-screen .wishlist-category[data-category="gadgets"]{--wish-accent:#a6cde9}
html[data-theme="dark"] #wishlist-screen .wishlist-category h3{border:1px solid #435f4e;background:#122219;color:var(--wish-accent);font-weight:600;letter-spacing:.8px}
html[data-theme="dark"] #wishlist-screen .wishlist-category:after,html[data-theme="dark"] #wishlist-screen .wishlist-category h3:before{color:var(--wish-accent);opacity:.8}
html[data-theme="dark"] #wishlist-screen .wishlist-name-item{border-color:#395240}
html[data-theme="dark"] #wishlist-screen .wishlist-open{min-width:0;min-height:44px;color:#e3f1e8;font-weight:600;font-size:15px;line-height:1.5;letter-spacing:0;text-align:start;overflow-wrap:anywhere}
html[data-theme="dark"] #wishlist-screen .wishlist-name-item .remove-wish{border:1px solid #745244;background:#3c2d26!important;color:#ffc3a2!important;box-shadow:none}

/* Bug report: a unified dark panel with visible secondary and primary actions. */
html[data-theme="dark"] .report-bug-trigger{border-color:#815746;background:#3c2a24;color:#ffb998;box-shadow:0 3px 10px #0002}
html[data-theme="dark"] .bug-report-form{padding:19px;border:1px solid #486b55;border-radius:23px;background:radial-gradient(ellipse at 100% 0,#34503c44,transparent 55%),linear-gradient(145deg,#20362a,#17271f);color:#edf5ef;box-shadow:inset 0 1px #bde7ca14,0 14px 32px #0003}
html[data-theme="dark"] .bug-report-form h3{color:#effaf2;font:700 22px/1.2 'DM Sans',sans-serif;letter-spacing:-.5px}
html[data-theme="dark"] .bug-report-form>p{color:#b8cebf;font:400 13px/1.6 'DM Sans',sans-serif}
html[data-theme="dark"] .bug-report-form label{color:#d1e5d8;font:600 13px/1.45 'DM Sans',sans-serif;letter-spacing:0;text-transform:none}
html[data-theme="dark"] .bug-report-form textarea{min-height:104px;border-color:#4e705b!important;border-radius:14px;background:#102219!important;color:#f0f9f3!important;font:400 14px/1.6 'DM Sans',sans-serif;caret-color:#a6e7c0;box-shadow:inset 0 2px 5px #0002}
html[data-theme="dark"] .bug-report-form textarea::placeholder{color:#9fb9a8;opacity:1}
html[data-theme="dark"] .bug-report-form textarea:focus{border-color:#9be1b6!important;outline:0;box-shadow:0 0 0 3px #80dbad26}
html[data-theme="dark"] .bug-report-actions{gap:10px;margin-top:18px}
html[data-theme="dark"] .bug-report-actions button{min-width:0;min-height:48px;padding:11px 10px;border-radius:14px;font:600 13px/1.4 'DM Sans',sans-serif}
html[data-theme="dark"] .bug-report-cancel{border:1px solid #637f6c;background:#273e2f;color:#ecf7ef!important;box-shadow:inset 0 1px #b7dfc30d}
html[data-theme="dark"] .bug-report-cancel:hover{background:#34513e;border-color:#8eb79b}
html[data-theme="dark"] .bug-report-submit{border:1px solid #f8c1a4;background:linear-gradient(120deg,#ffc4a4,#f6a27f);color:#332117;box-shadow:0 4px 13px #0003}
html[data-theme="dark"] .bug-report-actions button:focus-visible{outline:2px solid #b6ebc9;outline-offset:3px}
html[data-theme="dark"] .bug-report-form .bug-report-status:empty{display:none}
html[data-theme="dark"] .bug-report-form .bug-report-status:not(:empty){padding:10px 12px;border:1px solid #405f4b;border-radius:12px;background:#1b3225;color:#cfebd8}
html[data-theme="dark"] .bug-report-form .bug-report-status[data-state="error"]{border-color:#89604c;background:#3c2b23;color:#ffbea3}
html[data-theme="dark"] .bug-report-form .bug-report-status[data-state="success"]{border-color:#4b7c5d;background:#1d3d2a;color:#b5efc8}
@media(prefers-reduced-motion:reduce){html[data-theme="dark"] .order-history-tab{transition:none}}
