/* V4.10 dark-first palette, isolated from admin/POS and printing. */
html[data-theme="dark"]{color-scheme:dark;background:#121018}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"] body.twr-store{--paper:#121018;--ink:#f4efe5;--soft:#b8b0c2;--edge:#3a3344;--gold:#ecd176;--gold-light:#f5e4ab;--forest:#91d9b4;--purple:#c3a2e7;--surface:#1e1a27;--surface-raised:#282132;--shadow:0 8px 28px #00000030}
html[data-theme="dark"] .twr-store :is(.shop-sidebar,.shop-checkout-card,.shop-account-history,.shop-account-cards a,.shop-wanted-list>article,.public-auth-form,.shop-member-invite,.cms-public-block,.info-card,.truck-calendar,.truck-event-card,.shop-bottom-cta,.shop-detail,.shop-contact-card){background:var(--surface)!important;color:var(--ink);border-color:var(--edge);box-shadow:none}
html[data-theme="dark"] .twr-store :is(input,select,textarea):not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]){background:#19151f!important;color:var(--ink)!important;border-color:var(--edge)!important;box-shadow:none}
html[data-theme="dark"] .twr-store ::placeholder{color:#a69bb2;opacity:1}
html[data-theme="dark"] .twr-store :is(.shop-search-box,.shop-sidebar-note,.shop-mini-items,.shop-calendar-widget,.shop-sidebar-cart,.shop-category-tabs,.shop-sort-form,.shop-view-toggle,.shop-invoice-note,.shop-guest-wanted,.cms-home-intro,.hero__copy,.shop-home-intro,.shop-cart-disclaimer){background:var(--surface)!important;border-color:var(--edge);color:var(--ink)}
html[data-theme="dark"] .twr-store :is(.shop-category-tabs a.is-active,.shop-view-toggle button.is-active,.shop-active-filters a,.shop-type,.shop-format-stamp,.shop-quantity-form button,.shop-month-grid button,.shop-calendar-more,.shop-sidebar-rail){background:var(--surface-raised)!important;color:var(--gold-light);border-color:var(--edge)}
html[data-theme="dark"] .twr-store :is(.shop-record,.shop-record-copy){color:var(--ink)}
html[data-theme="dark"] .twr-store .shop-record-status{color:#9ee0bb}
html[data-theme="dark"] .twr-store .shop-record--supplier .shop-record-status{color:var(--gold-light)}
html[data-theme="dark"] .twr-store :is(.shop-availability,.shop-message,.shop-success){background:#19362b!important;color:#bbefd1;border-color:#315b44}
html[data-theme="dark"] .twr-store :is(.shop-availability.is-supplier,.shop-supplier-note,.public-more-titles){background:#30291c!important;color:#efdeb2;border-color:#655437}
html[data-theme="dark"] .twr-store :is(.shop-message.is-error,.shop-cart-warning){background:#3d2028;color:#ffd2cf;border-color:#7e4350}
html[data-theme="dark"] .twr-store :is(.shop-success p,.shop-success h2){color:#bbefd1}
html[data-theme="dark"] .twr-store .button--ghost{background:var(--surface-raised)!important;border:1px solid var(--edge)!important;color:var(--ink)!important;box-shadow:none}
html[data-theme="dark"] .twr-store :is(.button--primary,.shop-add,.shop-checkout-link){background:var(--gold)!important;color:#221b17!important;border-color:var(--gold)!important}
html[data-theme="dark"] .twr-store .shop-ticker{background:#211b29;color:var(--gold-light);border-color:var(--edge)}
html[data-theme="dark"] .twr-store :is(.shop-footer,.shop-footer p,.shop-footer small){color:var(--soft);border-color:var(--edge)}
html[data-theme="dark"] .twr-store :is(.public-search-result,.public-example-card,.crate-note,.crate-request-form,.public-wanted-cta){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--edge)}
html[data-theme="dark"] .twr-store .condition-line{color:var(--gold-light)!important}
html[data-theme="dark"] .twr-store .public-status{color:var(--gold);background:var(--surface-raised)}
html[data-theme="dark"] .twr-store .shop-dialog-x{background:var(--surface-raised)!important;color:var(--ink)}
html[data-theme="dark"] .twr-store .shop-mobile-bar{background:#19151f;color:var(--ink);border-color:var(--edge)}
html[data-theme="dark"] .twr-store .shop-mobile-bar button{color:var(--ink);border-color:var(--edge)}
html[data-theme="dark"] .twr-store .shop-sleeve{background:linear-gradient(135deg,#483d58,#211c2b);color:#f5e6ca}
html[data-theme="dark"] .twr-store .shop-sleeve :is(b,span,small){color:inherit}
html[data-theme="dark"] .twr-store .shop-cover{background:#221d2b}
html[data-theme="dark"] .twr-store .shop-header-image,.cms-header-image{background:transparent}
html[data-theme="dark"] .twr-store .shop-detail-tags span{background:var(--surface-raised);color:var(--gold-light)}
html[data-theme="dark"] .twr-store :is(.shop-contact-links,.shop-contact-grid>article){background:var(--surface)!important}
.twr-store .shop-theme-toggle{font-size:24px;color:#f2dc90;min-width:36px;line-height:1}
.twr-store .shop-theme-toggle:focus-visible{outline:3px solid var(--gold)}
.twr-store .shop-genre-tree{border:1px solid var(--edge);border-radius:12px;padding:9px 10px;margin:5px 0;font-size:12px}
.shop-genre-tree-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:2px 0 7px}.shop-genre-tree-head a{font-size:10px;color:var(--purple)!important}
.shop-genre-tree details{border-top:1px solid var(--edge)}.shop-genre-tree summary{display:flex;align-items:center;gap:5px;cursor:pointer;min-height:32px;font-size:11px;font-weight:650;list-style:none}.shop-genre-tree summary::-webkit-details-marker{display:none}
.shop-genre-tree summary:before{content:'\203A';font-size:17px;color:var(--purple);width:10px}.shop-genre-tree details[open]>summary:before{transform:rotate(90deg)}.shop-genre-tree summary small{margin-left:auto;color:var(--soft);font-weight:400}
.shop-subgenres{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow:auto;padding:0 0 8px 12px;scrollbar-width:thin}.shop-subgenres a{font-size:11px;padding:6px 5px;border-radius:5px;text-decoration:none;line-height:1.35}.shop-subgenres a:hover,.shop-subgenres a.is-active{background:#67528020;color:var(--purple)}
.shop-genre-tree details:not([open])>.shop-subgenres{display:none}
.shop-availability-unknown{color:var(--gold-light)}
.shop-month-grid .out-of-window{opacity:.35}.shop-calendar-month button:disabled{opacity:.25;cursor:not-allowed}
.shop-record--merchandise .shop-sleeve-disc{border-radius:12px;transform:rotate(-8deg);background:linear-gradient(135deg,#796282,#33303d)}
.shop-theme-toggle [aria-hidden]{pointer-events:none}
@media(max-width:1040px){.twr-store .shop-nav{gap:16px}.twr-store .shop-header-actions{gap:5px}.twr-store .shop-brand strong{font-size:14px}}
@media(max-width:760px){.twr-store .shop-nav{gap:19px;overflow:auto;scrollbar-width:none}.twr-store .shop-theme-toggle{width:32px;height:32px;padding:4px}.shop-genre-tree summary{min-height:38px}.shop-subgenres a{min-height:34px}}
/* Complete surfaces and text pairing: do not leave light cards in dark mode. */
html[data-theme="dark"] .twr-store :is(.shop-record,.shop-empty-state,.page-hero,.stock-search-panel,.cms-featured-releases,.public-new-in,.cms-featured-release-card,.shop-price-range>label,.public-stock-search__field){background:var(--surface)!important;border-color:var(--edge)!important;color:var(--ink)!important}
html[data-theme="dark"] .twr-store :is(.shop-record-title>span,.shop-record-genre,.shop-record-condition,.shop-detail h2,.cms-featured-release-card p,.cms-featured-release-card h3){color:var(--soft)!important}
html[data-theme="dark"] .twr-store :is(.shop-filter-shortcuts a,.shop-card-buttons .shop-icon-button,.hero__tags li,.shop-detail-tags>a){background:var(--surface-raised)!important;color:var(--gold-light)!important;border-color:var(--edge)}
html[data-theme="dark"] .twr-store :is(.shop-record-bottom,.shop-mini-item,.shop-event){border-color:var(--edge)}
html[data-theme="dark"] .twr-store .shop-record-status{white-space:normal;line-height:1.4}
html[data-theme="dark"] .twr-store .cms-featured-release-card .cms-release-availability{color:var(--gold-light)}
html[data-theme="dark"] .twr-store .shop-cart-dialog,html[data-theme="dark"] .twr-store .shop-calendar-dialog{background:var(--surface)!important;color:var(--ink)!important}
html[data-theme="dark"] .twr-store .shop-month-grid .has-event{background:var(--gold)!important;color:#211b28!important}
html[data-theme="dark"] .twr-store .shop-checkout-form input[readonly]{background:#27212f!important;color:var(--soft)!important}
@media(min-width:761px) and (max-width:1040px){.twr-store .shop-masthead{flex-wrap:wrap;gap:6px 15px;padding-block:10px}.twr-store .shop-brand{flex:1 1 auto}.twr-store .shop-header-actions{margin-left:auto;flex:none}.twr-store .shop-nav{order:3;width:100%;margin:0;justify-content:center;gap:22px;flex-wrap:wrap}.twr-store .shop-nav a{padding-block:6px}.twr-store .shop-sidebar-dock{top:150px}.twr-store .shop-sidebar{max-height:calc(100dvh - 165px)}}
html[data-theme="dark"] .twr-store .shop-event-date{background:var(--gold)!important;color:#241d20!important}
html[data-theme="dark"] .twr-store .shop-event-date :is(b,small){color:#241d20!important}
html[data-theme="dark"] .twr-store .shop-month-grid button{background:#483b58!important;color:#faedc6!important;border-color:#7d6894}

/* Merchandise shares the cover grid, but never pretends to be a vinyl sleeve. */
.shop-cover .shop-merch-symbol{display:grid;place-items:center;width:40%;aspect-ratio:1;margin:0 auto 1rem;color:inherit;opacity:.65}
.shop-cover .shop-merch-symbol .shop-icon{width:100%;height:100%}

/* V4.11 progressive genre navigation, compact on desktop and mobile. */
.shop-genre-selectors{display:grid;gap:7px;min-width:0}
.shop-genre-selector-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.shop-genre-selector-head label{margin:0!important;font-size:12px!important;font-weight:650}.shop-genre-selector-head a{font-size:11px;color:var(--shop-muted,inherit);text-decoration:underline}
.shop-genre-selectors select{width:100%;max-width:100%;min-width:0}
.shop-subgenre-selector{display:grid;gap:7px;border-left:2px solid var(--shop-line,#5a4b31);padding:10px 0 2px 12px;margin-top:3px}
.shop-subgenre-selector label{font-size:12px!important;margin:0!important}
.shop-subgenre-selector small{font-size:11px;line-height:1.45;opacity:.75}
