/* Screen colors. The home exhibition owns its own palette, including dark mode.
   Apply home tokens to its siblings, never to an ancestor of the exhibition. */
@media screen {
  html[data-theme] :is(body:not(.lg-home), .lg-home .lg-header, .lg-home .lg-trust,
                       .lg-home .home-edition, .lg-home .ls-footer) {
    --ls-sheet: #fff;
    --ls-canvas: #fffbfd;
    --ls-wash: #fff2f7;
    --ls-pink: #f9dce8;
    --ls-ink: #39232e;
    --ls-muted: #705563;
    --ls-edge: #ead4df;
    --ls-control-edge: #ae7f94;
    --ls-accent: #842e54;
    --ls-action-end: #a2466b;
    --ls-on-action: #fff;
    --ls-focus: #a13767;
    --ls-shadow: 0 10px 26px -16px rgb(118 49 81 / 24%);

    --ls-page: linear-gradient(145deg, var(--ls-sheet), var(--ls-canvas) 55%, var(--ls-wash));
    --ls-header: linear-gradient(110deg, var(--ls-wash), var(--ls-sheet) 52%, var(--ls-wash));
    --ls-banner: linear-gradient(112deg, var(--ls-pink), var(--ls-wash) 48%, var(--ls-sheet));
    --ls-card: linear-gradient(155deg, var(--ls-sheet) 58%, var(--ls-canvas));
    --ls-tint: linear-gradient(120deg, var(--ls-wash), var(--ls-canvas));
    --ls-action: linear-gradient(112deg, var(--ls-accent), var(--ls-action-end));

    /* Bind the older shop, home, administration and error-page components here
       so all of them inherit the same variant when the theme changes. */
    --ls-lilac: var(--ls-wash);
    --ls-peach: var(--ls-wash);
    --bg: var(--ls-canvas);
    --bg2: var(--ls-wash);
    --bg3: var(--ls-pink);
    --ink: var(--ls-ink);
    --text: var(--ls-ink);
    --muted: var(--ls-muted);
    --muted2: var(--ls-muted);
    --line: var(--ls-edge);
    --line2: var(--ls-edge);
    --rule: var(--ls-edge);
    --paper: var(--ls-canvas);
    --card: var(--ls-sheet);
    --surface: var(--ls-sheet);
    --surface2: var(--ls-wash);
    --gold: var(--ls-accent);
    --gold2: var(--ls-accent);
    --accent: var(--ls-accent);
    --accent-dark: var(--ls-accent);
    --wine: var(--ls-accent);
    --lg-paper: var(--ls-canvas);
    --lg-ink: var(--ls-ink);
    --lg-muted: var(--ls-muted);
    --lg-mute: var(--ls-muted);
    --lg-line: var(--ls-edge);
    --lg-accent: var(--ls-accent);
    --lg-wine: var(--ls-accent);
    --lg-deep: var(--ls-ink);
    --admin-surface: var(--ls-sheet);
    --admin-surface-2: var(--ls-wash);
    --admin-bg: var(--ls-canvas);
    --admin-card: var(--ls-sheet);
    --admin-text: var(--ls-ink);
    --admin-muted: var(--ls-muted);
    --admin-line: var(--ls-edge);
    --admin-line-soft: var(--ls-edge);
    --admin-gold: var(--ls-accent);
    --admin-rose: var(--ls-accent);
    --err-bg: var(--ls-canvas);
    --err-card: var(--ls-sheet);
    --err-ink: var(--ls-ink);
    --err-muted: var(--ls-muted);
    --err-border: var(--ls-edge);
    --err-accent: var(--ls-accent);
    --err-accent-dark: var(--ls-accent);
    --err-accent-soft: var(--ls-pink);
    --err-gold: var(--ls-accent);
  }

  html[data-theme="dark"] :is(body:not(.lg-home), .lg-home .lg-header, .lg-home .lg-trust,
                              .lg-home .home-edition, .lg-home .ls-footer) {
    --ls-sheet: #30242c;
    --ls-canvas: #251b21;
    --ls-wash: #3c2933;
    --ls-pink: #523446;
    --ls-ink: #fff5fa;
    --ls-muted: #dec7d3;
    --ls-edge: #694858;
    --ls-control-edge: #a97c93;
    --ls-accent: #f2b3cd;
    --ls-action-end: #f6ccdc;
    --ls-on-action: #3b1b2b;
    --ls-focus: #ffc9df;
    --ls-shadow: 0 12px 30px -18px rgb(10 5 9 / 44%);
  }

  /* The canvas is opaque. No color token or foreground style is inherited
     through the home body. */
  html[data-theme="light"] body.lg-home { background: #fffbfd; }
  html[data-theme="dark"] body.lg-home { background: #251b21; }
  html[data-theme] .lg-home :is(.lg-header, .ls-footer) {
    color: var(--ls-ink);
    background: var(--ls-header);
    border-color: var(--ls-edge);
  }
  html[data-theme] .lg-home :is(.home-edition, .lg-trust, .shop-index, .offer-band, .deal-spread) {
    color: var(--ls-ink);
    border-color: var(--ls-edge);
  }
  html[data-theme] .lg-home .home-edition { background: var(--ls-page); }
  html[data-theme] .lg-home :is(.lg-trust, .offer-band) { background: var(--ls-banner); }
  html[data-theme] .lg-home :is(.shop-index, .deal-spread) { background: var(--ls-card); }
  html[data-theme] .lg-home :is(.quiet-link, .deal-percent, .ls-footer a:hover) { color: var(--ls-accent); }
  html[data-theme] .lg-home .ls-footer a { color: var(--ls-ink); }
  html[data-theme] .lg-home :is(.lg-mark, .foot-logo) img { mix-blend-mode: normal; }
  html[data-theme] .home-edition :is(.product-shot, .deal-photo) { background: var(--ls-tint); }
  html[data-theme] .home-edition .viewed-list svg { color: var(--ls-accent); }
  html[data-theme] .home-edition :is(.category-shot, .rail-buttons button:enabled:hover) {
    background: var(--ls-tint); color: var(--ls-ink);
  }
  html[data-theme] .home-edition .cat-caption small { color: var(--ls-muted); }
  html[data-theme] .lg-home :is(.deal-buy, .rank-mark, .lg-badge, .ls-pop-panel button) {
    background: var(--ls-action); color: var(--ls-on-action);
  }
  html[data-theme] .lg-home :is(.lg-ic, .ls-pop-panel, .rail-buttons button) {
    color: var(--ls-ink); background: var(--ls-card); border-color: var(--ls-edge);
  }
  html[data-theme] .lg-home .ls-pop-panel :is(input, nav a:hover, nav a:focus-visible) {
    color: var(--ls-ink); background: var(--ls-wash); border-color: var(--ls-control-edge);
  }
  html[data-theme] .lg-home .lg-credentials dl > div { border-color: var(--ls-control-edge); }

  /* Components with legacy fixed colors, outside the home exhibition. */
  html[data-theme] body:not(.lg-home) :is(.products-page-main .catalog-search-wrap,
      .products-page-main .catalog-sort, .detail-option-group, .checkout-item, .gateway-vpn-card,
      .payment-result-info div, .admin-order-card, .admin-filter-bar, .dashboard-range-card,
      .dashboard-rank-row, .dashboard-analytics-chip, .site-owner-tabs, .site-owner-export-card,
      .po-table, .po-logout-form button) {
    color: var(--ls-ink); background: var(--ls-card); border-color: var(--ls-edge);
  }
  html[data-theme] body:not(.lg-home) :is(.detail-option.active, .site-owner-tab.is-active,
      .site-owner-export-option:has(> input:checked), .po-dropzone em) {
    background: var(--ls-tint); color: var(--ls-accent); border-color: var(--ls-control-edge);
  }
  html[data-theme] body:not(.lg-home) .payment-result-page { background: var(--ls-page); }
  html[data-theme] body[data-catalog-landing] :is(.catalog-count b, .catalog-price strong) { color: var(--ls-accent); }
  html[data-theme] body:not(.lg-home) .lg-foot-brand img { mix-blend-mode: normal; }
  html[data-theme] .po-page .po-process-track { background: var(--ls-edge); }
  html[data-theme] .po-page .po-process-spinner {
    border-color: var(--ls-edge); border-block-start-color: var(--ls-accent);
  }
  html[data-theme] .error-page-body .error-number {
    background-image: linear-gradient(115deg, var(--ls-accent), var(--ls-action-end));
  }
  html[data-theme] body:not(.lg-home) .bs-journal { color: var(--ls-ink); }
  html[data-theme] .bs-journal .bs-guide-card {
    background: var(--ls-card); border-color: var(--ls-edge);
  }
  html[data-theme] .bs-journal :is(.bs-guide-sources, .bs-guide-related) { border-color: var(--ls-edge); }
  html[data-theme] .bs-journal .bs-guide-links a { color: var(--ls-accent); }
}

/* Shared storefront header, scoped so the home hero keeps its own palette. */
html[data-theme] .lg-header.bs-shopbar {
  --bar-text:#402835; --bar-soft:#755c67; --bar-surface:#fff9fb; --bar-edge:#edd8e1;
  position:relative; inset:auto; z-index:32; box-sizing:border-box; width:100%; max-width:none;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  height:80px; margin:0; padding:0 max(16px,calc((100% - 1456px)/2)); direction:rtl;
  color:var(--bar-text); background:linear-gradient(105deg,#fffafd,#fbedf2 53%,#fff);
  border:0; border-bottom:1px solid var(--bar-edge); box-shadow:none;
}
html[data-theme="dark"] .lg-header.bs-shopbar {--bar-text:#f9e9ef;--bar-soft:#e6c4d1;--bar-surface:#392932;--bar-edge:#664751;background:linear-gradient(105deg,#32242c,#452e39)}
.bs-shopbar .lg-logo,.bs-shopbar .lg-nav,.bs-shopbar .lg-icons {display:flex;align-items:center;gap:10px}
.bs-shopbar a {text-decoration:none;color:inherit}
.bs-shopbar .lg-mark,.bs-shopbar .lg-ic {display:grid;place-items:center;position:relative;width:44px;height:44px;padding:0;border:1px solid var(--bar-edge);border-radius:15px;background:var(--bar-surface);color:var(--bar-text);box-shadow:0 7px 20px -14px #82415e}
.bs-shopbar .lg-mark img {width:38px;height:38px;object-fit:contain}
.bs-shopbar .lg-ic svg {width:19px;height:19px;fill:none;stroke:currentColor}
.bs-shopbar .lg-brand {display:grid;gap:5px;line-height:1;color:var(--bar-text)}
.bs-shopbar .lg-brand b {font-size:20px;font-weight:800}
.bs-shopbar .lg-brand small {font:10px Georgia,serif;letter-spacing:.3em;color:var(--bar-soft)}
.bs-shopbar .lg-nav {gap:clamp(18px,2.4vw,38px)}
.bs-shopbar .lg-nav a {color:var(--bar-soft);font-size:14px}
.bs-shopbar .lg-icons {gap:8px}
.bs-shopbar .ls-pop {display:block;position:relative}
.bs-shopbar .ls-pop summary {list-style:none;cursor:pointer}
.bs-shopbar .ls-pop summary::-webkit-details-marker {display:none}
.bs-shopbar .lg-menu-pop {display:none}
.bs-shopbar .ls-pop-panel {box-sizing:border-box;position:absolute;left:0;right:auto;inset-inline-end:0;top:calc(100% + 8px);z-index:6;width:min(365px,calc(100vw - 24px));max-height:min(74vh,550px);overflow:auto;padding:14px;border:1px solid var(--bar-edge);border-radius:16px;background:var(--bar-surface);color:var(--bar-text);box-shadow:0 15px 40px #572a4229;text-align:start}
.bs-shopbar .lg-search-form,.bs-shopbar .lg-menu-pop nav {position:static;inset:auto;width:auto;padding:0;margin:0;display:grid;gap:6px;background:transparent;border:0;box-shadow:none}
.bs-shopbar .lg-search-form :is(input,button) {width:100%;min-height:40px;border-radius:12px;padding:6px 10px;font:inherit}
.bs-shopbar .lg-search-form input {box-sizing:border-box;background:var(--bar-surface);color:inherit;border:1px solid var(--bar-edge)}
.bs-shopbar .lg-search-form button {background:#79415b;color:white;border:0;cursor:pointer}
.bs-shopbar .ls-pop-panel .bs-search-categories {display:flex;flex-wrap:wrap;gap:5px;margin:10px 0;overflow:visible;max-height:none}
.bs-shopbar .bs-search-categories a,.bs-shopbar .lg-menu-pop nav a {padding:4px 9px;border-radius:9px;font-size:13px;color:inherit}
.bs-shopbar .bs-search-categories a {border:1px solid var(--bar-edge)}
.bs-shopbar .bs-search-status {font-size:12px;color:var(--bar-soft)}
.bs-search-results a {display:flex;align-items:center;gap:9px;padding:7px 0;border-top:1px solid var(--bar-edge);font-size:14px}
.bs-search-results img {width:40px;height:44px;object-fit:cover;border-radius:8px}
.bs-search-results small {margin-inline-start:auto;white-space:nowrap;color:var(--bar-soft)}
.bs-shopbar .cart-badge {position:absolute;inset:-4px -4px auto auto;padding:0 4px;min-width:15px;height:15px;line-height:15px;border-radius:9px;text-align:center;font-size:10px}
.bs-shopbar [hidden] {display:none!important}
@media(max-width:1060px) {
  html[data-theme] .lg-header.bs-shopbar {height:70px}
  .bs-shopbar .lg-nav {display:none}
  .bs-shopbar .lg-menu-pop {display:block}
  .bs-shopbar .lg-menu {display:grid}
}
@media(max-width:600px) {
  .bs-shopbar .lg-search-pop {position:static}
  .bs-shopbar .lg-search-pop .ls-pop-panel {left:12px;right:12px;inset-inline:12px;width:auto;top:calc(100% - 3px)}
  .bs-shopbar .lg-brand b {font-size:17px}
  .bs-shopbar .lg-icons {gap:4px}
  .bs-shopbar .lg-ic,.bs-shopbar .lg-mark {width:36px;height:38px;border-radius:12px}
  .bs-shopbar .lg-logo {gap:6px}
}
.products-page-main .filter-category-group .filter-chip {display:flex;align-items:center;justify-content:flex-start;gap:5px;text-decoration:none;text-align:start;padding-inline:6px}
.filter-chip img {width:26px;height:26px;flex:none;object-fit:contain;border-radius:7px}
.price-input-box .price-words {display:block;min-width:0;line-height:1.55;font-size:11px;color:inherit;overflow-wrap:anywhere}
.price-input-box .price-words:empty {display:none}

.bs-collection-filter {margin:14px 0 22px;padding:12px 16px;border:1px solid #e8ccd7;border-radius:16px;background:var(--ls-surface,#fff9fb)}
.bs-collection-filter summary {font-weight:bold;cursor:pointer}
.bs-collection-filter form {padding-block:12px}
.bs-collection-filter .filter-panel {position:static!important;display:block!important;width:auto;max-height:none;transform:none!important;padding:8px 0;box-shadow:none}
.bs-collection-filter :is(.filter-drawer-footer,.filter-close,.filter-drawer-handle,.filter-title h2,.filter-eyebrow){display:none}
.bs-collection-filter .filter-chips {display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:6px}
.bs-collection-filter .filter-chip {display:flex;align-items:center;gap:5px;padding:5px;text-decoration:none}
.bs-collection-filter .price-range-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}

.bs-shopbar .lg-search-form .bs-search-refine {background:transparent;color:var(--bar-soft);border:1px solid var(--bar-edge);min-height:30px}
.bs-shopbar #bs-refinements {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.bs-shopbar #bs-refinements>label:first-child,.bs-shopbar #bs-refinements>select {grid-column:1/-1}
.bs-shopbar #bs-refinements select {width:100%;min-height:36px;font:inherit;color:inherit;border:1px solid var(--bar-edge);border-radius:10px;background:var(--bar-surface)}
.bs-shopbar #bs-refinements .price-input-box {min-width:0;font-size:12px}
.bs-shopbar #bs-refinements .price-words {white-space:normal}
.bs-shopbar .lg-search-pop .ls-pop-panel {max-height:72vh;overflow:auto;overscroll-behavior:contain}
