/* The existing light palette stays intact. Dark mode uses black with crisp text and controls. */
:root{color-scheme:light}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:46px;min-height:36px;padding:6px 9px;border:1px solid #555;background:#fff;color:#20211f;font:inherit;font-size:12px;line-height:1.2;white-space:nowrap;flex-shrink:0}
.theme-toggle:hover{background:#f0f0eb}.theme-toggle:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.theme-controls{display:flex;justify-content:flex-end;margin-bottom:22px}
@media(max-width:700px){header{gap:12px}header>.brand{flex-shrink:0;width:134px}header nav{flex:1;min-width:0;flex-wrap:wrap;justify-content:flex-end;gap:8px 12px}.theme-toggle{min-width:42px;padding:6px}}
html[data-theme="dark"]{color-scheme:dark;--dark-bg:#000;--dark-panel:#101010;--dark-raised:#1c1c1c;--dark-field:#080808;--dark-text:#fff;--dark-muted:#ccc;--dark-line:#888;background:var(--dark-bg);color:var(--dark-text)}
html[data-theme="dark"] body{background:var(--dark-bg);color:var(--dark-text)}
html[data-theme="dark"] :is(button,input,select,textarea){color:var(--dark-text);accent-color:#fff}
html[data-theme="dark"] :is(button,a,input,select,textarea,summary):focus-visible{outline-color:#fff}
html[data-theme="dark"] .logo-crop img{filter:brightness(0) invert(1)}
html[data-theme="dark"] :is(header,footer,.tools,.search,.product,.about,.auth-footnote,.account-sections section,.cart-row,.checkout-row,.summary-total,.payment-method,.admin-tabs,.admin-product-row,.order-card,.category-editor,.payment-evidence,.payment-proof-link img,.discount-form,.affiliate-table th,.affiliate-table td,.order-delete-controls,.bag-totals .summary-total){border-color:var(--dark-line)}
html[data-theme="dark"] :is(.intro-copy,.art-caption,.section-heading>span,.sample-note,.product p,.about p,.auth-intro,.back-link,.auth-divider,.field-help,.auth-footnote,.preview-account,.account-sections dt,.account-empty p,.cart-row small,.cart-row .remove-item,.checkout-note,.checkout-row span:last-child,.payment-method span,.admin-product-row p,.affiliate-table th,.product-meta .kit-note,footer){color:var(--dark-muted)}
html[data-theme="dark"] :is(.about p:first-child,footer a,.underlined,.auth-footnote a,.notify-button){color:var(--dark-text)}
html[data-theme="dark"] .auth-divider:before,html[data-theme="dark"] .auth-divider:after{background:var(--dark-line)}
html[data-theme="dark"] :is(.auth-preview,.order-summary,#product-form,.photo-dropzone,dialog,#image-viewer,#count){background:var(--dark-panel);color:var(--dark-text)}
html[data-theme="dark"] :is(.product-art,.product:nth-child(2) .product-art,.product:nth-child(3) .product-art,.product-art:has(img)){background:var(--dark-panel)}
html[data-theme="dark"] .hero-art.collection-banner{background:transparent}
html[data-theme="dark"] .bottle .label{color:#20211f}
html[data-theme="dark"] :is(.theme-toggle,.google-button,.category-filters button){background:var(--dark-bg);color:var(--dark-text);border-color:var(--dark-line)}
html[data-theme="dark"] footer .footer-contact{background:var(--dark-bg);color:var(--dark-text);border-color:var(--dark-line)}
html[data-theme="dark"] :is(.theme-toggle:hover,.google-button:hover,.category-filters button:hover,footer .footer-contact:hover,.photo-dropzone.is-dragging){background:var(--dark-raised)}
html[data-theme="dark"] .button{background:#fff;color:#000;border-color:#fff}
html[data-theme="dark"] :is(.filters button[aria-pressed=true],.category-filters button[aria-pressed=true],.add:hover){background:#fff;color:#000;border-color:#fff}
html[data-theme="dark"] .button:hover{background:#dedede;color:#000}
html[data-theme="dark"] :is(.button:disabled,.button[aria-disabled=true]){background:#292929;color:#aaa;border-color:#888}
html[data-theme="dark"] :is(.filters button,.add){color:var(--dark-text);border-color:var(--dark-line)}
html[data-theme="dark"] :is(.admin-tabs button[aria-pressed=true],.notify-button){border-color:#fff}
html[data-theme="dark"] :is(.payment-choices [aria-pressed=true],.photo-dropzone.is-dragging,.admin-product-row.drop-target){outline-color:#fff}
html[data-theme="dark"] .quantity-control{background:var(--dark-field);border-color:var(--dark-line)}
html[data-theme="dark"] .quantity-control button{color:#fff!important}
html[data-theme="dark"] .quantity-control button:hover{background:#292929!important}
html[data-theme="dark"] .quantity-control button:disabled{color:#999!important}
/* These override the form-specific ID selectors in the original stylesheet. */
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){background:var(--dark-field)!important;color:var(--dark-text)!important;border-color:var(--dark-line)!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#aaa;opacity:1}
html[data-theme="dark"] :is(input:disabled,select:disabled,textarea:disabled,input[readonly]){background:#242424!important;color:#ccc!important;opacity:1}
html[data-theme="dark"] .shipping-form .state-field::after{border-color:#fff}
html[data-theme="dark"] .photo-dropzone{border-color:var(--dark-line)}
html[data-theme="dark"] .out-of-stock{color:#ff9a9a}
html[data-theme="dark"] .fulfillment-status{background:#300c0c;color:#ffb3b3;border:1px solid #ff9a9a}
html[data-theme="dark"] .fulfillment-status.is-complete{background:#092414;color:#a8f0be;border-color:#94edac}
html[data-theme="dark"] .fulfillment-feedback{color:#a8f0be}
html[data-theme="dark"] dialog::backdrop,html[data-theme="dark"] #image-viewer::backdrop{background:#000b}
/* Preserve product/proof colors. A white quiet zone keeps the Venmo QR scannable. */
html[data-theme="dark"] #venmo-qr{background:#fff}
@media(forced-colors:active){.theme-toggle{border-color:ButtonText}}
