/* Appearance controls: preserve the existing header layout in both color schemes. */
html{color-scheme:light}
.crystore-site .cs-theme-toggle[hidden]{display:none!important}
.crystore-site .cs-header-actions{grid-template-columns:minmax(180px,560px) repeat(3,44px)}
.crystore-site .cs-header-search{grid-column:1;grid-row:1}
.crystore-site .cs-theme-toggle{grid-column:2;grid-row:1}
.crystore-site .cs-account-link{grid-column:3;grid-row:1}
.crystore-site .cs-cart-link{grid-column:4;grid-row:1}
.crystore-site .cs-theme-sun{display:none}
.crystore-site .cs-brand-horizontal.cs-brand-dark{display:none}
html[data-cs-theme=dark] .crystore-site .cs-brand-horizontal:not(.cs-brand-dark){display:none}
html[data-cs-theme=dark] .crystore-site .cs-brand-horizontal.cs-brand-dark{display:block}
html[data-cs-theme=dark] .cs-theme-sun{display:block}
html[data-cs-theme=dark] .cs-theme-moon{display:none}
@media(min-width:768px) and (max-width:1024px){
 .crystore-site .cs-header-inner{grid-template-columns:170px minmax(0,1fr);gap:16px}
 .crystore-site .cs-header .cs-brand-horizontal{width:170px}
 .crystore-site .cs-header-actions{grid-template-columns:minmax(100px,1fr) repeat(4,44px);gap:6px}
 .crystore-site .cs-menu-toggle{grid-column:5;grid-row:1}
}
@media(max-width:767px){
 .crystore-site .cs-header-search{grid-column:1/4;grid-row:2}
 .crystore-site .cs-header .cs-theme-toggle{grid-column:4;grid-row:2;border:1px solid #e2e5ec;background:#f7f8fa!important}
 .crystore-site .cs-account-link{grid-column:2;grid-row:1}
 .crystore-site .cs-cart-link{grid-column:3;grid-row:1}
 .crystore-site .cs-menu-toggle{grid-column:4;grid-row:1}
}

/* Deep slate surfaces, lavender links and deliberately unchanged product artwork. */
html[data-cs-theme=dark],html[data-cs-theme=dark] body.crystore-site{
 color-scheme:dark;--cs-bg:#101522;--cs-soft:#192131;--cs-surface:#192131;--cs-raised:#232d40;
 --cs-ink:#eef1f8;--cs-muted:#b4bfd2;--cs-line:#354057;--cs-primary:#aaa5ff;--cs-primary-dark:#c7c3ff;
 --cs-action:#6359d8;--cs-action-hover:#756be8;--cs-tint:#2b2850;
 --global-palette1:#aaa5ff;--global-palette2:#c7c3ff;--global-palette3:#eef1f8;--global-palette4:#d4dced;
 --global-palette5:#b4bfd2;--global-palette6:#9baac2;--global-palette7:#354057;--global-palette8:#192131;--global-palette9:#101522;
 background:var(--cs-bg);color:var(--cs-ink)
}
html[data-cs-theme=dark] .crystore-site ::selection{background:#47417b;color:#fff}
html[data-cs-theme=dark] .crystore-site :is(.cs-header,.cs-footer,.cs-mobile-nav){background:var(--cs-bg);border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site .cs-header .cs-icon-button{color:var(--cs-ink)!important;border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site .cs-header .cs-icon-button:hover{background:var(--cs-raised)!important}
html[data-cs-theme=dark] .crystore-site .cs-header .cs-theme-toggle{background:var(--cs-surface)!important;border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site .cs-header .cs-theme-toggle[aria-pressed=true]{color:#c7c3ff!important}
html[data-cs-theme=dark] .crystore-site .cs-brand-horizontal{background:transparent;border-radius:10px;padding:0;box-sizing:border-box}
html[data-cs-theme=dark] .crystore-site .cs-brand-name{color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site :is(.cs-breadcrumb a,.cs-password-help,.cs-footer-social-wrap>span){color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site .cs-password-help{color:var(--cs-muted)!important}
html[data-cs-theme=dark] .crystore-site :is(.cs-info-article .cs-info-eyebrow,.cs-footer-email){color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site :is(.cs-commerce-nav,.cs-footer-bottom,.cs-shop-categories,.cs-social-login,.cs-info-sidebar-note){border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site :is(.cs-commerce-nav a:first-child,.cs-store-help-grid span,.cs-footer-email,.cs-info-sidebar-note a,.cs-info-article a,.cs-shop-categories a.is-current){color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site :is(.cs-store-intro p,.cs-store-text-link,.cs-store-section-heading p,.cs-catalog-category,.cs-catalog-description,.cs-custom-request p,.cs-store-help-grid p,.cs-store-help-grid>a>.cs-icon,.cs-store-policy-links,.cs-footer-about>p,.cs-footer li,.cs-footer h2,.cs-footer-bottom,.cs-footer-copyright,.cs-locale,.cs-breadcrumb,.woocommerce-breadcrumb,.woocommerce-breadcrumb a,.cs-info-article,.cs-info-article .cs-info-lead,.cs-info-sidebar>p,.cs-info-sidebar-note,.cs-info-article .cs-info-date){color:var(--cs-muted)}

/* Category accents remain recognisable in low light. */
html[data-cs-theme=dark] .crystore-site .cs-store-category.cs-tone-indigo{--cs-category-bg:#292340;--cs-category-line:#493d65;--cs-category-ink:#c9b9ff}
html[data-cs-theme=dark] .crystore-site .cs-store-category.cs-tone-peach{--cs-category-bg:#33291f;--cs-category-line:#5c4630;--cs-category-ink:#f1bc85}
html[data-cs-theme=dark] .crystore-site .cs-store-category.cs-tone-mint{--cs-category-bg:#1d302c;--cs-category-line:#34564b;--cs-category-ink:#97d8ba}
html[data-cs-theme=dark] .crystore-site .cs-store-category.cs-tone-blue{--cs-category-bg:#1e2d43;--cs-category-line:#354e70;--cs-category-ink:#a4ceff}
html[data-cs-theme=dark] .crystore-site .cs-store-category strong{color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site .cs-store-category small{color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site .cs-store-category-icon{background:#ffffff09}
html[data-cs-theme=dark] .crystore-site :is(.cs-custom-request,.cs-custom-icon){background:#1e2d43;border-color:#354e70;color:#a4ceff}

/* Cards, shopping guides and policy pages. */
html[data-cs-theme=dark] .crystore-site :is(.entry-content-wrap,.cs-catalog-details,.cs-info-card,.cs-info-sidebar,.cs-info-contact,.cs-info-article details,.cs-store-help-grid>a,.cs-store-empty,.cs-post-card){background:var(--cs-surface);border-color:var(--cs-line);color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site .cs-storefront .woocommerce ul.cs-product-grid li.cs-catalog-card{background:var(--cs-surface)}
html[data-cs-theme=dark] .crystore-site :is(.cs-catalog-image,.woocommerce-loop-image-link){background:transparent}
html[data-cs-theme=dark] .crystore-site :is(.cs-catalog-image,.woocommerce-loop-image-link):has(img[src*="product-placeholder.svg"]){background:#f7f8fa}
html[data-cs-theme=dark] .crystore-site :is(.cs-catalog-price,.cs-info-article summary,.cs-info-card h3,.cs-info-sidebar nav a){color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site :is(.cs-info-card p,.cs-info-card li,.cs-info-contact p,.cs-info-contact li){color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site :is(.cs-store-help-grid,.cs-info-card,.cs-info-contact){border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site :is(.cs-shop-categories a,.cs-footer .cs-social-links a){background:var(--cs-surface);border-color:var(--cs-line);color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site :is(.cs-info-notice,.cs-shop-categories a.is-current,.cs-shop-categories a:hover,.cs-info-sidebar nav a:hover,.cs-info-sidebar nav a[aria-current=page],.cs-footer .cs-social-links a:hover){background:var(--cs-tint);border-color:#504a7c;color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site :is(.cs-info-notice p,.cs-info-notice li){color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site .cs-store-help-grid>a:hover{background:var(--cs-raised)}
html[data-cs-theme=dark] .crystore-site .cs-product-tag{background:var(--cs-surface);border-color:var(--cs-line);color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site .cs-info-article :is(h2,h3,summary){color:var(--cs-ink)}

/* Product details, account forms, cart and checkout share the same field system. */
html[data-cs-theme=dark] .crystore-site :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]),select,textarea,.select2-selection--single,.select2-dropdown,.select2-search__field){background:var(--cs-surface)!important;border-color:var(--cs-line)!important;color:var(--cs-ink)!important}
html[data-cs-theme=dark] .crystore-site :is(input,textarea)::placeholder{color:#9baac2;opacity:1}
html[data-cs-theme=dark] .crystore-site :is(input,select,textarea):focus{border-color:#aaa5ff!important;box-shadow:inset 0 0 0 1px #aaa5ff!important}
html[data-cs-theme=dark] .crystore-site :is(input[type=checkbox],input[type=radio]){accent-color:#aaa5ff}
/* Scope the ink override to dropdowns, including native OS option popups. */
html[data-cs-theme=dark] .crystore-site :is(select,.select2-container){--cs-ink:#fff;color-scheme:dark}
html[data-cs-theme=dark] .crystore-site :is(select,select option,select optgroup){color:#fff!important;-webkit-text-fill-color:currentColor}
html[data-cs-theme=dark] .crystore-site :is(select option,select optgroup){background:var(--cs-surface)!important}
html[data-cs-theme=dark] .crystore-site :is(.select2-selection__rendered,.select2-selection__placeholder,.select2-results__option,.select2-results__group){color:#fff!important;-webkit-text-fill-color:currentColor}
html[data-cs-theme=dark] .crystore-site .select2-results__option[data-selected=true]{background:var(--cs-raised)}
html[data-cs-theme=dark] .crystore-site .select2-results__option--highlighted[aria-selected]{background:var(--cs-action)!important;color:#fff!important}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce form .form-row label,.cs-purchase-form,.cs-hoyo-fields legend,.cs-account-page .form-row label,.cs-account-page #customer_login h2,.woocommerce-MyAccount-content legend){color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site :is(.cs-hoyo-note,.cs-purchase-note,.cs-currency small,.cs-purchase-price>span,.cs-purchase-price small,.woocommerce-privacy-policy-text,.woocommerce-MyAccount-content,.woocommerce-MyAccount-navigation li a,.product_meta,.woocommerce-product-details__short-description){color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site :is(.cs-purchase-price,.cs-currency span,.cs-account-page #customer_login>[class*="u-column"],.cs-account-page .woocommerce-MyAccount-content,.cs-account-page .account-navigation-wrap,.woocommerce .track_order,.woocommerce-ResetPassword,.woocommerce form.checkout_coupon,.wc-block-components-sidebar){background:var(--cs-surface);border-color:var(--cs-line);color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site .cs-currency input:checked+span{background:var(--cs-tint);border-color:#aaa5ff;box-shadow:inset 0 0 0 1px #aaa5ff;color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site :is(.cs-purchase-price output,.woocommerce ul.products li.product .price,.woocommerce div.product p.price,.woocommerce div.product span.price,.price,.product_meta a,.product_meta .sku,.woocommerce-MyAccount-content a:not(.button)){color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site .woocommerce-MyAccount-navigation li:is(.is-active,:hover) a{background:var(--cs-tint);color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce-message,.woocommerce-info){background:var(--cs-tint);color:var(--cs-ink);border-color:#504a7c}
html[data-cs-theme=dark] .crystore-site .woocommerce-error{background:#38222f;color:#ffd5df;border-color:#8c465e}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce .required,.cs-hoyo-fields label span){color:#ffb0c2}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce table.shop_table,.woocommerce table.shop_table td,.woocommerce table.shop_table th,.woocommerce .cart-collaterals .cart_totals){border-color:var(--cs-line);color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce table.shop_table th,.woocommerce table.shop_table_responsive tr:nth-child(2n) td){background:var(--cs-surface);color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site .woocommerce #payment{background:var(--cs-surface)!important;border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site .woocommerce #payment ul.payment_methods{border-color:var(--cs-line)!important}
html[data-cs-theme=dark] .crystore-site .woocommerce #payment ul.payment_methods li.wc_payment_method{background:var(--cs-bg);border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site .woocommerce #payment ul.payment_methods li.wc_payment_method:has(input:checked){background:var(--cs-tint);border-color:#aaa5ff;box-shadow:inset 0 0 0 1px #aaa5ff}
html[data-cs-theme=dark] .crystore-site .woocommerce #payment ul.payment_methods li.wc_payment_method>label{color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site .woocommerce #payment div.payment_box{color:var(--cs-muted)!important}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,a.button,button.button,.cs-button,.wc-block-components-button:not(.is-link)){background:var(--cs-action);color:#fff}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce a.button,.woocommerce button.button,a.button,button.button,.cs-button):hover{background:var(--cs-action-hover);color:#fff}
html[data-cs-theme=dark] .crystore-site :is(ul.products li.product a.button,.cs-storefront .cs-catalog-action a.button){background:var(--cs-tint)!important;color:#d0cdff!important;border-color:#504a7c!important}
html[data-cs-theme=dark] .crystore-site :is(ul.products li.product a.button,.cs-storefront .cs-catalog-action a.button):hover{background:#423b74!important;color:#fff!important}
html[data-cs-theme=dark] .crystore-site :is(.woocommerce .button.alt,.button.alt){background:var(--cs-action);color:#fff}
html[data-cs-theme=dark] .crystore-site .nsl-button{color-scheme:light}

/* The on-demand AI panel stays coordinated even when its CSS loads later. */
html[data-cs-theme=dark] .crystore-site .csai-panel{background:var(--cs-surface);color:var(--cs-ink);border-color:var(--cs-line);box-shadow:0 20px 70px #0006}
html[data-cs-theme=dark] .crystore-site :is(.csai-header,.csai-tools,.csai-order-section,.csai-human-area,.csai-human-bar){background:var(--cs-surface);color:var(--cs-ink);border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site :is(.csai-log,.csai-quick,.csai-thread-list,.csai-handoff,.csai-compose){background:var(--cs-bg);border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site :is(.csai-message,.csai-thread-card,.csai-order-card){background:var(--cs-raised);border-color:var(--cs-line)}
html[data-cs-theme=dark] .crystore-site .csai-user{background:#5147b4;border-color:#6e64d3;color:#fff}
html[data-cs-theme=dark] .crystore-site .csai-staff{background:var(--cs-tint);border-color:#504a7c}
html[data-cs-theme=dark] .crystore-site .csai-system{background:transparent}
html[data-cs-theme=dark] .crystore-site :is(.csai-header span,.csai-note,.csai-message .csai-role,.csai-panel .csai-status,.csai-system,.csai-privacy){color:var(--cs-muted)}
html[data-cs-theme=dark] .crystore-site .csai-user .csai-role{color:#e3e0ff}
html[data-cs-theme=dark] .crystore-site .csai-panel button{background:var(--cs-raised);border-color:var(--cs-line);color:var(--cs-ink)}
html[data-cs-theme=dark] .crystore-site .csai-panel button:hover{background:var(--cs-tint);color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site :is(.csai-panel a,.csai-tools #csai-human-button){color:var(--cs-primary)}
html[data-cs-theme=dark] .crystore-site .csai-panel .csai-send{background:var(--cs-action);color:#fff}
html[data-cs-theme=dark] .crystore-site .csai-panel .csai-thread-open{color:var(--cs-ink)!important}
html[data-cs-theme=dark] .crystore-site .csai-panel button:disabled{background:var(--cs-raised);color:var(--cs-muted);opacity:.5}
@media(forced-colors:active){.crystore-site .cs-theme-toggle{border:1px solid ButtonText!important}.crystore-site .cs-theme-toggle[aria-pressed=true]{outline:2px solid Highlight}}
