/* Shared theme, loaded last on every public and owner entry point. */
:root{color-scheme:light}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:46px;padding:8px 12px;border:1px solid #8a9789;border-radius:7px;background:transparent;color:var(--ink);font:inherit;white-space:nowrap;flex-shrink:0}
.theme-icon{font-size:23px;line-height:1}
.logo .brand-mark-dark{display:none}
header{flex-wrap:wrap}
.header-tools{flex-wrap:wrap}
html[data-theme=dark]{color-scheme:dark;--paper:#26292d;--ink:#edf1ed;--muted:#bec8c0;--line:#7d8980;--green:#3e664b;--lime:#3d4a35;--surface:#30353a;--raised:#394047;--accent:#b6d39a}
html[data-theme=dark] .logo .brand-mark-light{display:none}
html[data-theme=dark] .logo .brand-mark-dark{display:block}
html[data-theme=dark] :is(.eyebrow,h1 em,.filter-heading button,.prices small,.unit-price,.history-link,.owner-label,.entry-kind,.lab a){color:var(--accent)}
html[data-theme=dark] :is(.brand,.sizes,.prices del,.field,.filter-note span,footer,.quick button,.demo,.demo b,.demo button,.newsletter p,dialog p,dialog li,fieldset label,.access-panel p,.queue-empty,.lab p,.lab-card small,.delivery>section>p,.delivery .candidate-meta,.delivery .candidate-offer p){color:var(--muted)}
html[data-theme=dark] :is(.search,.price-history,.store-card,.panel,.lab-card,.queue-entry,.similar button){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] :is(.demo,.empty,.newsletter,.shop-callout,.access-panel,.owner-filters,.queue-empty,.history-prices,.history-point,.history-empty,.delivery .candidate-offer,.lab #status,.delivery #deliveryStatus){background:var(--surface);color:var(--ink)}
html[data-theme=dark] :is(.hero-art,.detail-art,.product-art){background:#495158}
html[data-theme=dark] :is(.float-tag,#savedCount,.entry-badge,.language-switch,.close,.shop-close,.feedback-close){background:var(--raised);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=range]),select,textarea){background-color:var(--surface);color:var(--ink);border-color:var(--line)!important}
html[data-theme=dark] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-theme=dark] :is(input[type=checkbox],input[type=range]){accent-color:var(--accent)}
html[data-theme=dark] :is(.search input,.search .department-select select,.results-toolbar select){background-color:transparent}
html[data-theme=dark] :is(.theme-toggle,.history-ranges button,.feedback-tabs button,.secondary,.actions button.secondary,.retailer-link){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .retailer-link:hover{background:var(--raised)}
html[data-theme=dark] :is(.history-ranges button[aria-pressed=true],.feedback-tabs button[aria-selected=true],.language-switch button[aria-pressed=true],.primary){background:var(--green);color:#fff;border-color:var(--accent)}
html[data-theme=dark] .nav.active{border-color:var(--accent)}
html[data-theme=dark] .discount{background:var(--surface);color:var(--ink)}
html[data-theme=dark] .heart{background:#30353aed;color:var(--ink)}
html[data-theme=dark] .heart.chosen{background:var(--surface);color:#ffc6b6}
html[data-theme=dark] .stock-state{background:var(--raised);color:var(--ink)}
html[data-theme=dark] :is(.stock-state.in_stock,.entry-badge.resolved,#shopStatus.success,#feedbackStatus.success,#notice.success){background:#304b3b;color:#d2edd5}
html[data-theme=dark] :is(.stock-state.out_of_stock,.stock-state.expired,#notice.error,.lab #status.error,.delivery #deliveryStatus.error){background:#533a3a;color:#ffd7d0}
html[data-theme=dark] :is(.stock-state.stale,.entry-badge.reviewing){background:#4b4432;color:#f2e1b8}
html[data-theme=dark] :is(#shopStatus.error,#feedbackStatus.error){color:#ffd7d0}
html[data-theme=dark] [aria-invalid=true]{border-color:#ffc0b5!important}
html[data-theme=dark] .lab #status:not(.error){color:var(--ink)}
html[data-theme=dark] .delivery .candidate-offer{border-left-color:var(--accent)}
html[data-theme=dark] .history-chart text{fill:var(--muted)}
html[data-theme=dark] .history-chart line{stroke:#7d8980}
html[data-theme=dark] .history-chart line[stroke-dasharray]{stroke:var(--accent)}
html[data-theme=dark] .history-chart :is(polyline,path){stroke:var(--accent)}
html[data-theme=dark] .history-chart circle{fill:var(--accent);stroke:var(--paper)}
html[data-theme=dark] :focus-visible{outline-color:var(--accent)!important}
html[data-theme=dark] dialog::backdrop{background:#171b1fc9}
html[data-theme=dark] .filters{--filter-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23bec8c0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
@media(max-width:1100px){.theme-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
@media(prefers-reduced-motion:reduce){.retailer-link{transition:none}}

/* A subtle edge keeps dark garments legible without changing product colours. */
html[data-theme=dark] .product-illustration{filter:drop-shadow(0 0 1px #e8edd99c)}

/* Native popup rows need opaque colours; transparent select faces do not
   reliably carry their background into Windows/Chromium option menus. */
select{color-scheme:light}
select :is(option,optgroup){background-color:var(--paper);color:var(--ink)}
html[data-theme=dark] select{color-scheme:dark}
html[data-theme=dark] select :is(option,optgroup){background-color:var(--surface);color:var(--ink)}
html[data-theme=dark] select option:disabled{color:var(--muted)}
html[data-theme=dark] :is(.store-options,.store-field summary){background-color:var(--surface);color:var(--ink);border-color:var(--line)}

/* One corner shape for dropdowns on every page, in either theme. */
select,.search .department-select select,.results-toolbar select,.store-field summary{border-radius:5px}

.search .department-select select,.results-toolbar select{border:1px solid var(--line);padding:9px;border-radius:5px}

/* Form-specific light backgrounds outrank the generic dark input rule. */
html[data-theme=dark] #shopForm input,html[data-theme=dark] #feedbackForm :is(input,select,textarea){background:var(--surface);color:var(--ink);caret-color:var(--ink);border-color:var(--line)}
html[data-theme=dark] #shopForm input::placeholder,html[data-theme=dark] #feedbackForm :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
