.store-footer .footer-legal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
}

.store-footer .footer-legal nav { justify-content: center; }
.store-footer .footer-legal .theme-picker { grid-column: 1 / -1; justify-self: end; }

@media (min-width: 1100px) {
    .store-footer .footer-legal { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .store-footer .footer-legal .theme-picker { grid-column: 3; }
}

.theme-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: center;
}

.theme-options {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f4f4f4;
}

.theme-options label {
    position: relative;
    cursor: pointer;
}

.theme-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.theme-options label span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
    border-radius: 7px;
}

.theme-options svg {
    width: 20px;
    height: 20px;
}

.theme-options label:hover span { background: #e9e9e9; }
.theme-options input:checked + span {
    border-color: #d7d7d7;
    background: #fff;
}

.theme-options input:focus-visible + span {
    outline: 2px solid #126ecb;
    outline-offset: 1px;
}

:root[data-color-scheme=dark] {
    color-scheme: dark;
    --store-bg: #1b1817;
    --store-surface: #211e1d;
    --store-raised: #2b2725;
    --store-hover: #36302d;
    --store-input: #181615;
    --ink: #f5eeea;
    --muted: #bcb0aa;
    --line: #4b423e;
    --cream: #332922;
    --ds-link-color: #f5eeea;
    --ds-color-accent-text-default: #ff9a9e;
}

[data-color-scheme=dark] body { background: var(--store-bg); color: var(--ink); }

[data-color-scheme=dark] :is(.store-utility, .site-header.store-header, .store-footer,
    .store-category-menu, .search-suggestions, .bag-preview, .product-lightbox,
    .category-filters, .skip-link) {
    background: var(--store-surface);
    color: var(--ink);
    border-color: var(--line);
}

[data-color-scheme=dark] :is(.store-menu-departments > section, .footer-link-grid,
    .store-footer .footer-legal, .store-footer .footer-legal nav a, .search-matches a,
    .bag-preview-lines li, .cart-line, .category-strip, .department-card,
    .department-card li a, .category-siblings, .subcategory-card, .topic-grid a,
    .home-department-card, .store-account .account-shell, .pdp-details, .pdp-tabs,
    .pdp-service-panels > details, .pdp-sourcing, .contact-panel, .country-notes details) {
    border-color: var(--line);
}

[data-color-scheme=dark] :is(.theme-options, .store-search .search, .search-chips a,
    .active-filters a, .product-lightbox > button, .category-rail .rail-new, .category-rail .rail-brands,
    .empty-state .empty-icon, .store-not-found .empty-icon) {
    background: var(--store-raised);
    color: var(--ink);
}

[data-color-scheme=dark] :is(.theme-options label:hover span, .store-header .header-actions a:hover,
    .home-carousel-controls button:hover, .topic-grid a:hover, .store-menu-grid nav a:hover) {
    background: var(--store-hover);
}

[data-color-scheme=dark] :is(.theme-options input:checked + span, .category-rail button, .footer-back-top) {
    background: var(--store-hover);
    color: var(--ink);
    border-color: #73665f;
}

[data-color-scheme=dark] :is(.home-department-card, .brand-grid .brand-logo-tile,
    .brand-grid .brand-logo-tile:hover, .faq-list details,
    .pdp-service-panels > details, .pdp-sourcing) {
    background: var(--store-surface);
    color: var(--ink);
}

[data-color-scheme=dark] :is(.catalog-heading, .department-card-heading,
    .category-results .empty-state, .pdp-order-card, .pdp-photo-placeholder,
    .order-summary, .cart-empty, .store-not-found, .parcel-calculator, .scout-banner) {
    background: var(--store-raised);
    color: var(--ink);
}

[data-color-scheme=dark] :is(.search input, .ds-input:not([type=checkbox]), .ds-textarea,
    .ds-select, .category-toolbar .category-sort select, .category-mobile-sort .category-sort select) {
    color: var(--ink);
}

[data-color-scheme=dark] :is(.store-search .search:focus-within, .ds-input:not([type=checkbox]),
    .ds-textarea, .ds-select, .service-page .brand-filter input, .destination-directory .destination-filter input,
    .category-toolbar .category-sort select, .category-mobile-sort .category-sort select) {
    background: var(--store-input);
    border-color: #756861;
}

[data-color-scheme=dark] input::placeholder,
[data-color-scheme=dark] textarea::placeholder { color: #b0a39c; opacity: 1; }

[data-color-scheme=dark] :is(.breadcrumbs, .pdp-breadcrumbs > [aria-current], .utility,
    .search-status, .service-bar, .section-intro, .page-top > p, .prose,
    .empty-state p, .product-copy .eyebrow, .pack-count, .category-results .pack-count,
    .category-results .category-toolbar > p, .filter-value small, .catalog-heading p,
    .catalog-heading .eyebrow, .department-card-heading p, .department-card li small,
    .subcategory-card-label small, .subcategory-card[data-empty] .subcategory-card-label small,
    .bag-preview-lines small, .bag-page-top h1 small, .brand-label small, .topic-grid span,
    .directory-filter [role=status], .faq-list details > div, .contact-form label span,
    .service-form-layout .contact-form .ds-label, .gallery-caption, .pdp-product-heading .pdp-brand,
    .pdp-order-card .pdp-price-note, .page-product .pdp-stage-note, .pdp-service-panels summary small,
    .pdp-tabs > button, .product-facts dt, .product-lightbox p, .cart-line .eyebrow,
    .remove-line, .clear-bag, .footer-top .footer-payment-note, .country-notes-content h3) {
    color: var(--muted);
}

[data-color-scheme=dark] :is(.product-copy .price, .topic-grid a, .pdp-tabs > button[aria-selected=true]) {
    color: var(--ink);
}

[data-color-scheme=dark] :is(.category-strip .new-link, .category-filters nav a[aria-current],
    .department-card li a:hover, .destination-directory .destination-card-status-closed) {
    color: #ff9a9e;
}

[data-color-scheme=dark] :is(.pdp-tabs > button[aria-selected=true], .pdp-pack-thumbs > a.selected) {
    border-color: #f5eeea;
}

[data-color-scheme=dark] :is(.button-dark, .filter-value.is-selected .filter-box, .pagination .MarkupPagerNavOn a) {
    color: #211a14;
    background: #e9d2bd;
    border-color: #e9d2bd;
}

[data-color-scheme=dark] .button-dark:hover {
    background: #ffead6;
    border-color: #ffead6;
}

[data-color-scheme=dark] .home-carousel-controls [aria-current="true"]::before { background: var(--ink); }

[data-color-scheme=dark] :is(.service-page, .cart-review-layout) {
    --service-line: var(--line);
    --service-paper: var(--store-raised);
    --service-ink-soft: var(--muted);
}

[data-color-scheme=dark] :is(.destination-directory, .country-page) {
    --destination-line: var(--line);
    --destination-warm: var(--store-raised);
    --destination-muted: var(--muted);
}

[data-color-scheme=dark] :is(.destination-directory .destination-regions a,
    .destination-directory .destination-grid > a:not([hidden])) {
    background: var(--store-surface);
    color: var(--ink);
}

[data-color-scheme=dark] :is(.destination-directory .destination-regions a:hover,
    .destination-directory .destination-grid > a:not([hidden]):hover) {
    background: var(--store-hover);
}

[data-color-scheme=dark] .form-feedback { background: #243a2b; color: #d8f2df; }
[data-color-scheme=dark] .form-feedback[role=alert] { background: #45262b; color: #ffe0e4; }

/* Images, brand marks and the editorial hero retain their original palette. */
[data-color-scheme=dark] :is(.home-carousel .hero-copy, .favorite-button,
    .pdp-favorite, .pdp-photo-badge, .photo-zoom, .footer-payments li) {
    color: #26211e;
}

[data-color-scheme=dark] .home-carousel .button-dark {
    color: #fff;
    background: #26211e;
    border-color: #26211e;
}

[data-color-scheme=dark] .brand-art { color: #26211e; }
[data-color-scheme=dark] .account-shell #Access {
    --ac-text-primary: var(--ink);
    --ac-text-secondary: var(--muted);
    --ac-text-placeholder: #b0a39c;
    --ac-text-error: #ffaaa7;
    --ac-text-success: #b4dfc6;
    --ac-bg-input: var(--store-input);
    --ac-bg-input-hover: var(--store-input);
    --ac-bg-input-focus: var(--store-input);
    --ac-bg-btn-primary: #6a5345;
    --ac-bg-btn-primary-hover: #7b6050;
    --ac-bg-btn-primary-active: #584539;
    --ac-bg-error: #402826;
    --ac-bg-success: #24372e;
    --ac-border-input: #756861;
    --ac-border-input-hover: #a08d82;
    --ac-text-link: #f3d7bb;
    --ac-border-input-focus: #e9d2bd;
}

[data-color-scheme=dark] .account-shell #Access .AccessPanel,
[data-color-scheme=dark] .account-shell #Access :is(.AccessBtnSecondary, .AccessAccountLinks a,
    .AccessBackupCodes, .AccessBackupCode, .AccessCard, .AccessCardBtn, .AccessMethodBadge,
    .AccessSessionActions button, [name=totp_disable]) {
    background: var(--store-raised);
    border-color: var(--line);
}

[data-color-scheme=dark] .account-shell #Access :is(.AccessAccountLinks a:hover,
    .AccessCardBtn:hover, .AccessSessionActions button:hover, [name=totp_disable]:hover) {
    background: var(--store-hover);
}
