.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #d5cfc8;
  border-radius: 999px;
  background: #f6f3ef;
  color: #191715;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color .18s ease, border-color .18s ease, transform .15s ease;
}
.theme-toggle:hover { background: #ebe5dd; border-color: #b4aba1; }
.theme-toggle:active { transform: scale(.95); }
.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.piece-header .theme-toggle { margin-right: 10px; }
.info-head { gap: 12px; }
.info-head a:nth-child(2) { margin-left: auto; }

@media (max-width: 450px) {
  .piece-header { gap: 4px; }
  .piece-header .return-link { padding: 0 10px; margin-right: 4px; font-size: .8rem; }
  .piece-header .theme-toggle { margin-right: 4px; width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
  .piece-header .bag-button { padding: 5px 8px 5px 12px; font-size: 12px; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3ede5;
  --muted: #b8afa5;
  --line: #322d28;
  --warm: #1b1917;
  --accent: #d4a373;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body:has(.info-copy) {
  background: #121110;
  color: #f3ede5;
}

html[data-theme="dark"] .skip-link {
  background: #1b1917;
  color: #f3ede5;
  border: 1px solid #4d453d;
}

html[data-theme="dark"] .announce {
  background: #0a0908;
  color: #f3ede5;
  border-bottom: 1px solid #26221e;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .info-head {
  background: #121110;
  border-bottom-color: #2f2a25;
}

html[data-theme="dark"] .site-header .wordmark,
html[data-theme="dark"] .site-header .main-nav a,
html[data-theme="dark"] .header-actions button,
html[data-theme="dark"] .piece-header .return-link {
  color: #f3ede5;
}

html[data-theme="dark"] .site-header .main-nav a::after {
  background: #d4a373;
}

html[data-theme="dark"] .wordmark .brand-logo,
html[data-theme="dark"] .info-head img {
  border: 1px solid #3c342b;
  border-radius: 8px;
}

html[data-theme="dark"] .theme-toggle {
  background: #23201d;
  border-color: #463f38;
  color: #f3d28e;
}
html[data-theme="dark"] .theme-toggle:hover {
  background: #2e2a26;
  border-color: #6b5f52;
}

html[data-theme="dark"] .header-actions .icon-button {
  color: #f3ede5;
}
html[data-theme="dark"] .header-actions .icon-button:hover {
  color: #d4a373;
}

html[data-theme="dark"] .header-actions .bag-button,
html[data-theme="dark"] .piece-header .bag-button,
html[data-theme="dark"] .product-card .card-add-mobile {
  background: linear-gradient(165deg, #2b2723, #1d1a17 75%);
  color: #f3ede5;
  border-color: #4b433b;
  box-shadow: inset 0 0 0 1px rgb(255 247 232 / 10%), 0 2px 6px rgb(0 0 0 / 35%);
}
html[data-theme="dark"] .bag-button .bag-count {
  background: #f3ede5;
  color: #121110;
}
html[data-theme="dark"] .bag-button .bag-count[data-filled="true"] {
  background: #b52b47;
  color: #fff;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero-visual {
  background: #121110;
  border-color: #2f2a25;
}
html[data-theme="dark"] .hero-copy .hero-line,
html[data-theme="dark"] .hero-copy .hero-line i,
html[data-theme="dark"] .hero-copy h1 {
  color: #f5efe7;
}
html[data-theme="dark"] .hero-copy p:not(.eyebrow),
html[data-theme="dark"] .hero-line-two {
  color: #bfb5aa;
}
html[data-theme="dark"] .hero-gallery,
html[data-theme="dark"] .hero-slide {
  background: #ffffff;
  border-radius: 14px;
}
html[data-theme="dark"] .hero-gallery {
  border: 1px solid #352f29;
  box-shadow: 0 20px 50px rgb(0 0 0 / 48%);
}

html[data-theme="dark"] .collection-intro-panel,
html[data-theme="dark"] .collection-intro-details {
  border-color: #322d28;
}
html[data-theme="dark"] .collection-intro-panel .eyebrow,
html[data-theme="dark"] .collection-intro-panel h2 i,
html[data-theme="dark"] .intro h2 i,
html[data-theme="dark"] .section-heading h2 i,
html[data-theme="dark"] .story h2 i,
html[data-theme="dark"] .faq h2 i,
html[data-theme="dark"] #collection .section-heading h2 i,
html[data-theme="dark"] #collection .section-heading .eyebrow,
html[data-theme="dark"] .eyebrow {
  color: #d4a373;
}
html[data-theme="dark"] .collection-intro-details .intro-copy,
html[data-theme="dark"] #collection .section-note,
html[data-theme="dark"] .result-note,
html[data-theme="dark"] .story-copy p:not(.eyebrow),
html[data-theme="dark"] .kani-editorial p:not(.eyebrow),
html[data-theme="dark"] .image-caption,
html[data-theme="dark"] .story-number {
  color: #b8afa5;
}
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .collection-intro-details .text-link {
  color: #f3ede5;
  border-bottom-color: #8d7160;
}
html[data-theme="dark"] .text-link span {
  color: #d4a373;
}

html[data-theme="dark"] .collection-ribbon {
  background: #1b1815;
  border-block: 1px solid #302a25;
}
html[data-theme="dark"] .ribbon-fragrance {
  background: #e11d2a;
  color: #fff;
}

html[data-theme="dark"] #collection .collection-tools {
  border-color: #322d28;
}
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] #collection .filter-chip {
  background: #1b1917;
  color: #f3ede5;
  border-color: #3a342e;
}
html[data-theme="dark"] .filter-chip:hover,
html[data-theme="dark"] #collection .filter-chip:hover {
  background: #26221e;
}
html[data-theme="dark"] .filter-chip.is-active,
html[data-theme="dark"] #collection .filter-chip.is-active {
  background: #f3ede5;
  color: #121110;
  border-color: #f3ede5;
}

html[data-theme="dark"] .search-field,
html[data-theme="dark"] .sort-field,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .sort-field select {
  background: #1b1917;
  color: #f3ede5;
  border-color: #49423a;
}
html[data-theme="dark"] .search-field input::placeholder {
  color: #8f867d;
}

html[data-theme="dark"] .product-card {
  border-bottom-color: #2c2723;
}
html[data-theme="dark"] .card-media {
  background: #ffffff;
  border-color: #352f29;
  border-radius: 10px;
}
html[data-theme="dark"] .card-media .card-quick {
  color: #24201c;
}
html[data-theme="dark"] .card-category {
  color: #24201c;
}
html[data-theme="dark"] .card-name,
html[data-theme="dark"] .card-price {
  color: #f3ede5;
}
html[data-theme="dark"] .card-meta,
html[data-theme="dark"] .product-card[data-category="perfume"] .card-meta,
html[data-theme="dark"] del {
  color: #b8afa5;
}
html[data-theme="dark"] .price-saving {
  color: #e3a776;
}
html[data-theme="dark"] .card-info select[name="size"] {
  background: #1b1917;
  color: #f3ede5;
  border: 1px solid #4c443c;
  border-radius: 6px;
}
html[data-theme="dark"] .purchase-actions button {
  background: #1b1917;
  color: #f3ede5;
  border-color: #4c443c;
}
html[data-theme="dark"] .purchase-actions button:first-child {
  background: #f3ede5;
  color: #121110;
  border-color: #f3ede5;
}
html[data-theme="dark"] .purchase-actions button[value="cart"] {
  box-shadow: 0 2px 0 #4c443c;
}
html[data-theme="dark"] .purchase-actions button[value="cart"]:active {
  background: #282420;
}

html[data-theme="dark"] .perfume-edit {
  --gallery-paper: #171513;
  background: #171513;
}
html[data-theme="dark"] .perfume-edit-controls button {
  background: #24201d;
  color: #f3ede5;
  border-color: #3f3932;
}
html[data-theme="dark"] .perfume-edit-copy p {
  color: #c7bdb2;
}
html[data-theme="dark"] .scent-ribbon {
  background: #0a0908;
  border-block: 1px solid #2a2520;
}

html[data-theme="dark"] .story-image img {
  background: #ffffff;
  border: 1px solid #352f29;
  border-radius: 12px;
}

html[data-theme="dark"] .closing {
  background: #181614;
  border-block: 1px solid #2c2723;
}
html[data-theme="dark"] .closing .button {
  background: #f3ede5;
  color: #121110;
}
html[data-theme="dark"] .closing .button:hover {
  background: #dfd5c8;
}

html[data-theme="dark"] .faq {
  background: #171513;
}
html[data-theme="dark"] .faq details {
  border-bottom-color: #322d28;
}
html[data-theme="dark"] .faq details p {
  color: #b8afa5;
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] body:has(.piece-page) footer {
  background: #0b0a09;
  color: #f3ede5;
  border-top: 1px solid #2b2723;
}
html[data-theme="dark"] .site-footer p,
html[data-theme="dark"] .site-footer small {
  color: #b8afa5;
}

html[data-theme="dark"] .button-dark {
  background: linear-gradient(165deg, #f3ede5, #ded5c9 75%);
  color: #121110;
  border-color: #f3ede5;
}

html[data-theme="dark"] .product-dialog,
html[data-theme="dark"] .bag-drawer,
html[data-theme="dark"] .order-dialog,
html[data-theme="dark"] .delivery-error,
html[data-theme="dark"] .review-notice {
  background: #1b1917;
  color: #f3ede5;
  border: 1px solid #36302a;
}
html[data-theme="dark"] .dialog-close {
  background: #26221f;
  color: #f3ede5;
  border-color: #443d36;
}
html[data-theme="dark"] .dialog-media {
  background: #24201d;
}
html[data-theme="dark"] .dialog-media img {
  background: #ffffff;
  border-radius: 8px;
}
html[data-theme="dark"] .detail-view-toggle button,
html[data-theme="dark"] .size-pick button,
html[data-theme="dark"] .quantity-control button,
html[data-theme="dark"] .remove-line {
  background: #25221f;
  color: #f3ede5;
  border-color: #443d36;
}
html[data-theme="dark"] .detail-view-toggle button.is-active,
html[data-theme="dark"] .size-pick button.is-active {
  background: #f3ede5;
  color: #121110;
  border-color: #f3ede5;
}
html[data-theme="dark"] .bag-line img,
html[data-theme="dark"] .order-summary img {
  background: #ffffff;
  border-radius: 6px;
}
html[data-theme="dark"] .order-head {
  background: #0d0c0b;
  border-bottom: 1px solid #2e2924;
}
html[data-theme="dark"] .order-summary {
  background: #24211e;
}
html[data-theme="dark"] .order-summary li,
html[data-theme="dark"] .bag-line,
html[data-theme="dark"] .drawer-head,
html[data-theme="dark"] .bag-footer {
  border-color: #36302a;
}
html[data-theme="dark"] .order-summary small,
html[data-theme="dark"] .order-breakdown {
  color: #c2b8ad;
}
html[data-theme="dark"] .order-total {
  background: #121110;
  border: 1px solid #3a342e;
}
html[data-theme="dark"] :focus-visible {
  outline: 2px solid #d4a373;
  outline-offset: 4px;
}

html[data-theme="dark"] #deliveryForm input,
html[data-theme="dark"] #deliveryForm select,
html[data-theme="dark"] #deliveryForm textarea,
html[data-theme="dark"] .review-form input,
html[data-theme="dark"] .review-form select,
html[data-theme="dark"] .review-form textarea,
html[data-theme="dark"] .purchase-quantity input {
  background: #121110;
  color: #f3ede5;
  border-color: #49423a;
}
html[data-theme="dark"] .checkout-copy,
html[data-theme="dark"] .order-edit {
  color: #d4a373;
}
html[data-theme="dark"] .order-remove {
  background: #1b1917;
  color: #f3ede5;
  border-color: #544c44;
}
html[data-theme="dark"] .toast {
  background: #f3ede5;
  color: #121110;
}

/* Product page */
html[data-theme="dark"] .piece-header .return-link {
  border-color: #49423a;
}
html[data-theme="dark"] .piece-crumb,
html[data-theme="dark"] .piece-caption {
  color: #b8afa5;
}
html[data-theme="dark"] .piece-price,
html[data-theme="dark"] .piece-description,
html[data-theme="dark"] .piece-related,
html[data-theme="dark"] .piece-reviews,
html[data-theme="dark"] .review-list article {
  border-color: #2f2a25;
}
html[data-theme="dark"] .piece-gallery figure,
html[data-theme="dark"] .piece-related img {
  background: #ffffff;
  border: 1px solid #352f29;
  border-radius: 10px;
}
html[data-theme="dark"] .piece-views button {
  background: #1b1917;
  color: #f3ede5;
  border-color: #443d36;
}
html[data-theme="dark"] .piece-views button[aria-pressed="true"] {
  background: #f3ede5;
  color: #121110;
  border-color: #f3ede5;
}
html[data-theme="dark"] .piece-sizes span {
  border-color: #4c443c;
  color: #f3ede5;
}
html[data-theme="dark"] .piece-sizes input:checked + span {
  background: #f3ede5;
  color: #121110;
  border-color: #f3ede5;
}
html[data-theme="dark"] .piece-volume strong {
  border-color: #5c534a;
  color: #f3ede5;
}
html[data-theme="dark"] .perfume-wave text[fill="black"] {
  fill: #f3ede5;
}
html[data-theme="dark"] .review-rating span {
  color: #1b1917;
  -webkit-text-stroke: 1px #e2a93b;
}
html[data-theme="dark"] .review-rating label:has(input:checked) span,
html[data-theme="dark"] .review-rating label:has(~ label input:checked) span {
  color: #f0b83c;
}
html[data-theme="dark"] .review-stars {
  color: #f0b83c;
}

/* Info pages */
html[data-theme="dark"] .info-copy .info-action,
html[data-theme="dark"] .info-copy button,
html[data-theme="dark"] .ga-choice button {
  background: #f3ede5;
  color: #121110;
}
html[data-theme="dark"] .info-copy .info-back {
  border-color: #49423a;
  color: #f3ede5;
}
html[data-theme="dark"] .info-back:hover,
html[data-theme="dark"] .info-back:focus-visible {
  background: #25221f;
}
html[data-theme="dark"] .ga-choice {
  background: #1b1917;
  color: #f3ede5;
  border-color: #3d3731;
}
