/** RC10.67. Four reversible premium skins, each with Glass and Solid finishes. Layout/commerce untouched.
 * Scope MUST stay under body.gl-preset-* so previous settings remain available
 * under Custom. Theme design rules may set component vars directly; selected
 * presets deliberately outrank those saved paints without deleting them.
 */
body.gl-theme.gl-preset-obsidian {
  --gl-preset-canvas: #090A0C;
  --gl-preset-soft: #13161B;
  --gl-preset-surface: #191B20;
  --gl-preset-raised: #252830;
  --gl-preset-input: #16191E;
  --gl-preset-border: #424752;
  --gl-preset-text: #F6F7FB;
  --gl-preset-body: #D1D5DE;
  --gl-preset-muted: #ADB4C0;
  --gl-preset-glass: linear-gradient(153deg,rgba(255,255,255,.145) 0%,rgba(255,255,255,.055) 21%,rgba(255,255,255,.015) 52%,rgba(0,0,0,.075) 100%),rgba(24,27,33,.88);
  --gl-preset-panel: linear-gradient(145deg,rgba(255,255,255,.12) 0%,rgba(255,255,255,.032) 34%,rgba(10,12,17,.08) 100%),rgba(28,31,37,.94);
  --gl-preset-edge: rgba(210,221,236,.23);
  --gl-preset-sheen: inset 0 1px 0 rgba(255,255,255,.21),inset 0 0 0 1px rgba(255,255,255,.018),0 14px 30px rgba(0,0,0,.33);
  --gl-preset-frost: 12px;
  --gl-preset-hover-edge: rgba(158,119,255,.59);
  --gl-preset-glow: rgba(72,11,203,.30);
  --gl-preset-active: rgba(72,11,203,.17);
  --gl-preset-secondary: #292E37;
  --gl-preset-secondary-hover: #343B47;
  --gl-preset-gradient: linear-gradient(144deg,#090A0C,#14171B 46%,#0A0B0E 100%);
}
body.gl-theme.gl-preset-titanium {
  --gl-preset-canvas: #181B20;
  --gl-preset-soft: #20242A;
  --gl-preset-surface: #252A31;
  --gl-preset-raised: #303640;
  --gl-preset-input: #1D2128;
  --gl-preset-border: #49515F;
  --gl-preset-text: #F6F7FB;
  --gl-preset-body: #D2D7E0;
  --gl-preset-muted: #B5BEC9;
  --gl-preset-glass: linear-gradient(150deg,rgba(255,255,255,.17) 0%,rgba(255,255,255,.06) 23%,rgba(255,255,255,.015) 57%,rgba(0,0,0,.05) 100%),rgba(37,42,49,.87);
  --gl-preset-panel: linear-gradient(140deg,rgba(255,255,255,.125),rgba(255,255,255,.032) 52%,rgba(0,0,0,.065)),rgba(47,53,63,.94);
  --gl-preset-edge: rgba(224,231,244,.23);
  --gl-preset-sheen: inset 0 1px 0 rgba(255,255,255,.23),0 12px 27px rgba(0,0,0,.27);
  --gl-preset-frost: 12px;
  --gl-preset-hover-edge: rgba(160,124,255,.62);
  --gl-preset-glow: rgba(72,11,203,.28);
  --gl-preset-active: rgba(72,11,203,.17);
  --gl-preset-secondary: #343C47;
  --gl-preset-secondary-hover: #424B58;
  --gl-preset-gradient: linear-gradient(142deg,#181B20,#22262C 47%,#191C22 100%);
}
/* RC10.65 / Option 4 ONLY: colors sampled from the supplied screenshots
 * of the REFERENCE HOMEPAGE, not other page templates or the XStore chrome.
 * Verified flat colors: page #191A1D; header, panels, cards #23262F;
 * CTA #776BF8; white text; muted #A3A1AF; borders #4C4F56;
 * secondary controls #383D5C. The green SALE/orange HOT states are kept
 * as product-specific statuses, not recolored by this preset.
 * Glass is an optional semi-transparent treatment using the same base palette;
 * Solid uses the owner-selected #191A1D canvas, with no ambient gradient.
 */
body.gl-theme.gl-preset-midnight {
  --gl-preset-canvas: #191A1D;
  --gl-preset-soft: #191A1D;
  --gl-preset-surface: #23262F;
  --gl-preset-raised: #23262F;
  --gl-preset-input: #23262F;
  /* Softer neutral outline over the #23262F surfaces.
     Keep the RGB palette unchanged; soften only the drawn edge. */
  --gl-preset-border: rgba(174,183,200,.16);
  --gl-preset-separator: rgba(174,183,200,.10);
  --gl-preset-input-edge: rgba(174,183,200,.20);
  --gl-preset-text: #FFFFFF;
  --gl-preset-body: #D4D5DC;
  --gl-preset-link: #B3A9FF;
  --gl-preset-positive: #53D6A0;
  --gl-preset-negative: #FF8297;
  --gl-preset-warning: #FFC46B;
  --gl-preset-muted: #A3A1AF;
  --gl-preset-glass: linear-gradient(156deg,rgba(255,255,255,.075) 0%,rgba(255,255,255,.02) 35%,rgba(0,0,0,.035) 100%),rgba(35,38,47,.92);
  --gl-preset-panel: linear-gradient(146deg,rgba(255,255,255,.075) 0%,rgba(255,255,255,.018) 47%,rgba(0,0,0,.035) 100%),rgba(35,38,47,.94);
  --gl-preset-edge: rgba(174,183,200,.14);
  --gl-preset-sheen: inset 0 1px 0 rgba(255,255,255,.075),0 9px 25px rgba(0,0,0,.19);
  --gl-preset-frost: 10px;
  --gl-preset-hover-edge: rgba(119,107,248,.40);
  --gl-preset-glow: rgba(119,107,248,.16);
  --gl-preset-active: rgba(119,107,248,.15);
  /* Sampled from the Euro/English control fill in the owner's screenshot:
     RGB(63,69,84). Only small utility controls receive this paint. */
  --gl-preset-utility: #3F4554;
  --gl-preset-utility-hover: #4B5263;
  --gl-preset-secondary: #383D5C;
  --gl-preset-secondary-hover: #494F71;
  --gl-preset-gradient: #191A1D;
}

body.gl-theme.gl-preset-pearl {
  --gl-preset-canvas: #F3F3F1;
  --gl-preset-soft: #EBEDF0;
  --gl-preset-surface: #FFFFFF;
  --gl-preset-raised: #FAFAFC;
  --gl-preset-input: #FFFFFF;
  --gl-preset-border: #CDD1DA;
  --gl-preset-text: #191B24;
  --gl-preset-body: #373C48;
  --gl-preset-muted: #525B6A;
  --gl-preset-glass: linear-gradient(155deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.66) 52%,rgba(232,235,242,.63) 100%),rgba(255,255,255,.82);
  --gl-preset-panel: linear-gradient(146deg,rgba(255,255,255,1),rgba(255,255,255,.78) 52%,rgba(229,233,239,.5)),rgba(252,252,254,.98);
  --gl-preset-edge: rgba(142,153,174,.38);
  --gl-preset-sheen: inset 0 1px 0 rgba(255,255,255,1),0 12px 28px rgba(44,51,68,.11);
  --gl-preset-frost: 10px;
  --gl-preset-hover-edge: rgba(72,11,203,.55);
  --gl-preset-glow: rgba(72,11,203,.16);
  --gl-preset-active: rgba(72,11,203,.09);
  --gl-preset-secondary: #F1F1F6;
  --gl-preset-secondary-hover: #E7E4F2;
  --gl-preset-gradient: linear-gradient(138deg,#F3F3F1,#F9FAFC 44%,#E9EBF0 100%);
}

/* RC10.63 — Solid finish overrides MATERIAL only. No translucency, glass
 * sheen, blur or reflective edge; product layouts and CTA lighting are shared.
 * Variables are defined on body so existing component selectors continue
 * to resolve the selected palette without replacing saved merchant settings.
 */
body.gl-theme.gl-finish-solid:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) {
  --gl-preset-glass: var(--gl-preset-surface);
  --gl-preset-panel: var(--gl-preset-raised);
  --gl-preset-edge: var(--gl-preset-border);
  --gl-preset-gradient: var(--gl-preset-canvas);
  --gl-preset-frost: 0px;
  --gl-preset-sheen: 0 10px 24px rgba(0,0,0,.22);
}
body.gl-theme.gl-finish-solid.gl-preset-midnight {
  --gl-preset-sheen: 0 5px 14px rgba(0,0,0,.12);
}
body.gl-theme.gl-finish-solid.gl-preset-pearl {
  --gl-preset-sheen: 0 8px 20px rgba(37,45,59,.08);
}
/* Scope the glass-removal strictly to preset-managed surfaces, not media,
 * payment widgets or custom merchant controls. */
body.gl-theme.gl-finish-solid:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .gl-storefront-header,.gl-pdp-summary,.gl-checkout-summary,
  .gl-game-card,#main ul.products li.product,.gl-pdp-related-card,
  .glpd-benefits-after-payment,.gl-cart-rec,.glpm-option,
  .gl-cart-total-hero,.cart_totals,#customer_details,
  .gl-checkout-payment-section,.woocommerce-MyAccount-content,
  .woocommerce-MyAccount-navigation,.gl-pdp-short-copy,
  .gl-site-footer.gl-gpsn-footer,.gl-transaction-footer,.gl-storefront-footer,
  .glpm-dialog,#gl-auth-modal,#gl-auth-document
) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Apply a unified palette after any saved legacy Identity/Material/Component paint. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) {
  --gs-color-canvas: var(--gl-preset-canvas) !important;
  --gs-color-canvas-soft: var(--gl-preset-soft) !important;
  --gs-color-surface: var(--gl-preset-surface) !important;
  --gs-color-surface-raised: var(--gl-preset-raised) !important;
  --gs-color-input: var(--gl-preset-input) !important;
  --gs-color-border: var(--gl-preset-border) !important;
  --gs-color-control-border: var(--gl-preset-border) !important;
  --gs-color-text-primary: var(--gl-preset-text) !important;
  --gs-color-text-body: var(--gl-preset-body) !important;
  --gs-color-text-secondary: var(--gl-preset-muted) !important;
  --gs-color-link: #8652E2 !important;
  --gs-color-focus: #8255E4 !important;
  --gs-color-action-primary-start: #480BCB !important;
  --gs-color-action-primary-end: #6527D9 !important;
  --gs-color-action-primary-hover-start: #5C20D6 !important;
  --gs-color-action-primary-hover-end: #722FDB !important;
  --gs-color-action-primary-border: #7D4BEC !important;
  --gs-gradient-action-primary:linear-gradient(135deg,#480BCB,#6527D9) !important;
  --gs-gradient-action-primary-hover:linear-gradient(135deg,#5C20D6,#722FDB) !important;
  --gs-color-on-action: #FFFFFF !important;
  --gs-color-action-secondary-bg: var(--gl-preset-secondary) !important;
  --gs-color-on-action-secondary: var(--gl-preset-text) !important;
  --gs-color-action-secondary-border: var(--gl-preset-border) !important;
  --gs-color-action-secondary-hover: var(--gl-preset-secondary-hover) !important;
  --gs-color-action-secondary-pressed: var(--gl-preset-secondary) !important;
  --gs-color-glass-edge: var(--gl-preset-edge) !important;
  --gs-gradient-canvas: var(--gl-preset-gradient) !important;
  --gs-gradient-ambient: none !important;
  --gs-page-material: var(--gl-preset-gradient) !important;
  --gs-material-glass: var(--gl-preset-glass) !important;
  --gs-card-background: var(--gl-preset-glass) !important;
  --gs-card-border: var(--gl-preset-edge) !important;
  --gs-card-shadow: var(--gl-preset-sheen) !important;
  --gs-shadow-card: var(--gl-preset-sheen) !important;
  --gs-shadow-action: 0 7px 19px rgba(72,11,203,.22),inset 0 1px 0 rgba(255,255,255,.22) !important;
  --gs-shadow-action-hover: 0 11px 29px rgba(72,11,203,.35),0 0 0 1px rgba(171,143,255,.28),inset 0 1px 0 rgba(255,255,255,.26) !important;
  --gs-color-selected-bg: var(--gl-preset-active) !important;
  background:var(--gl-preset-gradient) !important;
  color:var(--gl-preset-body);
}
/* The source stylesheet may set scoped component variables directly on the element.
 * Preset selectors below intentionally take priority without deleting settings. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .gl-game-card,
  #main ul.products li.product,
  .gl-pdp-related-card,
  .glpd-benefits-after-payment,
  .gl-cart-rec,
  .glpm-option
){
  --gs-x-card-bg:var(--gl-preset-glass) !important;
  --gs-x-card-border:var(--gl-preset-edge) !important;
  --gs-x-card-shadow:var(--gl-preset-sheen) !important;
  --gs-x-product_benefits-bg:var(--gl-preset-glass) !important;
  --gs-x-product_benefits-border:var(--gl-preset-edge) !important;
  background:var(--gl-preset-glass) !important;
  border-color:var(--gl-preset-edge) !important;
  box-shadow:var(--gl-preset-sheen) !important;
}
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .gl-pdp-summary,
  .gl-cart-total-hero,
  .cart_totals,
  #customer_details,
  .gl-checkout-summary,
  .gl-checkout-payment-section,
  .woocommerce-MyAccount-content,
  .woocommerce-MyAccount-navigation,
  .gl-pdp-short-copy
){
  --gs-x-purchase-bg:var(--gl-preset-panel) !important;
  --gs-x-purchase-border:var(--gl-preset-edge) !important;
  --gs-x-cart_summary-bg:var(--gl-preset-panel) !important;
  --gs-x-cart_summary-border:var(--gl-preset-edge) !important;
  --gs-x-billing-bg:var(--gl-preset-panel) !important;
  --gs-x-checkout_summary-bg:var(--gl-preset-panel) !important;
  --gs-x-payment-bg:var(--gl-preset-panel) !important;
  --gs-x-account_content-bg:var(--gl-preset-panel) !important;
  --gs-x-account_nav-bg:var(--gl-preset-panel) !important;
  background:var(--gl-preset-panel) !important;
  border-color:var(--gl-preset-edge) !important;
  box-shadow:var(--gl-preset-sheen) !important;
}
/* Glass header/navigation: blur only a few large surfaces, never dozens of cards. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) .gl-storefront-header {
  --gs-x-header-bg:var(--gl-preset-glass) !important;
  --gs-x-header-border:var(--gl-preset-edge) !important;
  --gs-x-header-text:var(--gl-preset-body) !important;
  --gs-x-header-muted:var(--gl-preset-muted) !important;
  --gs-x-header-input_bg:var(--gl-preset-input) !important;
  --gs-x-header-input_text:var(--gl-preset-text) !important;
  background:var(--gl-preset-glass) !important;
  border-color:var(--gl-preset-edge) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.17),0 8px 25px rgba(0,0,0,.13) !important;
  -webkit-backdrop-filter:blur(var(--gl-preset-frost)) saturate(122%) !important;
  backdrop-filter:blur(var(--gl-preset-frost)) saturate(122%) !important;
}
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(.gl-pdp-summary,.gl-checkout-summary) {
  -webkit-backdrop-filter:blur(var(--gl-preset-frost)) saturate(115%);
  backdrop-filter:blur(var(--gl-preset-frost)) saturate(115%);
}
/* A complete visual preset also wins over old component-level purchase button colors.
 * Disabled buttons keep their native inactive styling. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .single_add_to_cart_button:not(:disabled),
  a.checkout-button,
  #place_order:not(:disabled),
  .woocommerce a.button.alt,
  .woocommerce button.button.alt:not(:disabled)
){background:var(--gs-gradient-action-primary) !important;color:#FFFFFF !important;}
@media(hover:hover){
  body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
    .single_add_to_cart_button:not(:disabled),a.checkout-button,#place_order:not(:disabled),
    .woocommerce a.button.alt,.woocommerce button.button.alt:not(:disabled)
  ):hover{background:var(--gs-gradient-action-primary-hover) !important;}
}
/* Decorative lighting belongs to actionable controls, not text or general surfaces. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .single_add_to_cart_button,
  a.checkout-button,
  #place_order,
  .woocommerce a.button.alt,
  .woocommerce button.button.alt
){
  box-shadow:var(--gs-shadow-action) !important;
  border-color:#7950E8 !important;
  color:#FFFFFF !important;
}
@media(hover:hover){
  body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(.single_add_to_cart_button,a.checkout-button,#place_order,.woocommerce a.button.alt,.woocommerce button.button.alt):hover{
    box-shadow:var(--gs-shadow-action-hover) !important;
    border-color:#A681FF !important;
  }
  body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(.gl-game-card,#main ul.products li.product,.gl-pdp-related-card):hover {
    border-color:var(--gl-preset-hover-edge) !important;
    box-shadow:var(--gl-preset-sheen),0 0 0 1px var(--gl-preset-glow) !important;
  }
}
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(.single_add_to_cart_button,a.checkout-button,#place_order):focus-visible {
  outline:3px solid #A684FF !important;
  outline-offset:3px;
}
/* Footer, popups and customer account wrappers share the same preset finish. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .gl-site-footer.gl-gpsn-footer,.gl-transaction-footer,.gl-storefront-footer
){
  --gs-x-footer-bg:var(--gl-preset-glass) !important;
  --gs-x-footer-border:var(--gl-preset-edge) !important;
  --gs-x-footer-text:var(--gl-preset-body) !important;
  --gs-x-footer-title:var(--gl-preset-text) !important;
  --gs-x-footer-muted:var(--gl-preset-muted) !important;
  --gs-x-footer-shadow:var(--gl-preset-sheen) !important;
  background:var(--gl-preset-glass) !important;
  color:var(--gl-preset-body) !important;
  border-color:var(--gl-preset-edge) !important;
}
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(
  .glpm-dialog,#gl-auth-modal,#gl-auth-document
){
  --gs-x-popup-bg:var(--gl-preset-panel) !important;
  --gs-x-popup-border:var(--gl-preset-edge) !important;
  --gs-x-auth-bg:var(--gl-preset-panel) !important;
  --gs-x-auth-text:var(--gl-preset-body) !important;
  --gs-x-auth-border:var(--gl-preset-edge) !important;
  background:var(--gl-preset-panel) !important;
  color:var(--gl-preset-body) !important;
  border-color:var(--gl-preset-edge) !important;
  box-shadow:var(--gl-preset-sheen) !important;
}
/* Pearl needs dark prose on glass. Preserve white primary-CTA text and native error/success states. */
body.gl-theme.gl-preset-pearl :is(.gl-game-card,#main ul.products li.product,.gl-pdp-summary,.gl-checkout-summary,.cart_totals,.woocommerce-MyAccount-content,.glpd-benefits-after-payment) {
  color:var(--gl-preset-body) !important;
  --gs-x-card-title:var(--gl-preset-text) !important;
  --gs-x-card-text:var(--gl-preset-body) !important;
  --gs-x-purchase-text:var(--gl-preset-body) !important;
  --gs-x-purchase-title:var(--gl-preset-text) !important;
  --gs-x-purchase-muted:var(--gl-preset-muted) !important;
  --gs-x-checkout_summary-text:var(--gl-preset-body) !important;
  --gs-x-account_content-text:var(--gl-preset-text) !important;
  --gs-x-product_benefits-text:var(--gl-preset-body) !important;
}
body.gl-theme.gl-preset-pearl :is(.gl-pdp-summary,.gl-game-card,.woocommerce-MyAccount-content,.glpd-benefits-after-payment) :is(h1,h2,h3,h4) {color:var(--gl-preset-text) !important}
body.gl-theme.gl-preset-pearl :is(.gl-pdp-summary,.gl-game-card,.woocommerce-MyAccount-content,.glpd-benefits-after-payment) p {color:var(--gl-preset-body)}
body.gl-theme.gl-preset-pearl :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {color:var(--gl-preset-text);background-color:var(--gl-preset-input)}
/* Avoid continuous glossy animation and respect reduced-motion preferences. */
@media(prefers-reduced-motion:reduce){body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) :is(.gl-game-card,#main ul.products li.product){transition:none!important;}}

/* Preserve the merchant's stored page-background rules, but do not render them
 * over an explicitly selected full-site preset. Custom restores them unchanged. */
body.gl-theme:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) > .gl-pb-canvas {display:none!important}

/* RC10.63 — header's direct sheen was not a variable in RC10.60. */
body.gl-theme.gl-finish-solid:is(.gl-preset-obsidian,.gl-preset-titanium,.gl-preset-pearl,.gl-preset-midnight) .gl-storefront-header {
  box-shadow:var(--gl-preset-sheen) !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}

/* RC10.63 / Option 4 ONLY: match the reference homepage's FLAT
 * #776BF8 purchase controls. Reference hover is white with violet text.
 * Do not change any other preset, payment behavior or disabled controls.
 */
body.gl-theme.gl-preset-midnight {
  --gs-color-link: var(--gl-preset-link) !important;
  --gs-color-focus: #B3A9FF !important;
  --gs-color-success: var(--gl-preset-positive) !important;
  --gs-color-savings: var(--gl-preset-positive) !important;
  --gs-color-error: var(--gl-preset-negative) !important;
  --gs-color-discount: var(--gl-preset-negative) !important;
  --gs-color-pending: var(--gl-preset-warning) !important;
  --gs-color-action-primary-start: #776BF8 !important;
  --gs-color-action-primary-end: #776BF8 !important;
  --gs-color-action-primary-hover-start: #887EFF !important;
  --gs-color-action-primary-hover-end: #887EFF !important;
  --gs-color-action-primary-border: #776BF8 !important;
  --gs-gradient-action-primary: #776BF8 !important;
  --gs-gradient-action-primary-hover: #887EFF !important;
  --gs-shadow-action: 0 7px 18px rgba(119,107,248,.21) !important;
  --gs-shadow-action-hover: 0 10px 25px rgba(119,107,248,.32),0 0 0 1px rgba(176,169,255,.28) !important;
}
body.gl-theme.gl-preset-midnight :is(
  .single_add_to_cart_button:not(:disabled),
  a.checkout-button,
  #place_order:not(:disabled),
  .woocommerce a.button.alt,
  .woocommerce button.button.alt:not(:disabled)
) {
  background:#776BF8 !important;
  border-color:#776BF8 !important;
  color:#FFFFFF !important;
}
@media(hover:hover) {
  body.gl-theme.gl-preset-midnight :is(
    .single_add_to_cart_button:not(:disabled),
    a.checkout-button,
    #place_order:not(:disabled),
    .woocommerce a.button.alt,
    .woocommerce button.button.alt:not(:disabled)
  ):hover {
    background:#887EFF !important;
    border-color:#9D94FF !important;
    color:#FFFFFF !important;
  }
}
body.gl-theme.gl-preset-midnight :is(.single_add_to_cart_button,a.checkout-button,#place_order):focus-visible {
  outline-color:#776BF8 !important;
}


/* RC10.64 — OPTION 4 ONLY: quiet, storewide borders. The requested change is
 * not limited to the four example screenshots. It covers cart, PDP, checkout,
 * header, search/results, home, catalogs, popups, drawers, account and footer.
 * Do NOT use '* {border:0}' or recolor success/error/focus/selection states.
 * Widths, radii, layout, JS behaviour and payment widgets remain untouched.
 */
body.gl-theme.gl-preset-midnight {
  --gs-color-control-border: var(--gl-preset-input-edge) !important;
  --gs-card-border: var(--gl-preset-edge) !important;
  --gs-x-form-input_border: var(--gl-preset-input-edge) !important;
}
/* Explicit saved component overrides live on descendants. Cover their paint
 * aliases locally, since body-only tokens cannot always outrank local vars. */
body.gl-theme.gl-preset-midnight :is(
  .gl-storefront-header,.gl-storefront-footer,.gl-site-footer,
  .gl-game-card,#main ul.products li.product,.gl-pdp-related-card,
  .gl-pdp-summary,.gl-pdp-short-copy,.gl-pdp-description,
  .glpd-benefits-after-payment,.glpd-ao-dialog,
  #main tr.cart_item,.gl-cart-item,.gl-cart-recs,.gl-cart-rec,.gl-cart-mobile-sticky,
  .cart_totals,.gl-cart-total-hero,.gl-checkout-summary,#customer_details,
  .gl-checkout-payment-section,#payment,.gl-checkout-product-card,
  .woocommerce-MyAccount-content,.woocommerce-MyAccount-navigation,
  .glpm-dialog,.glpm-head,.glpm-line,.glpm-option,.glpm-selected,.glpm-promo,
  .glpm-qty,.glpm-footer,#gl-auth-modal,#gl-auth-document
) {
  --gs-x-header-border:var(--gl-preset-edge) !important;
  --gs-x-card-border:var(--gl-preset-edge) !important;
  --gs-x-purchase-border:var(--gl-preset-edge) !important;
  --gs-x-product_benefits-border:var(--gl-preset-edge) !important;
  --gs-x-description-border:var(--gl-preset-edge) !important;
  --gs-x-cart_item-border:var(--gl-preset-edge) !important;
  --gs-x-cart_summary-border:var(--gl-preset-edge) !important;
  --gs-x-checkout_summary-border:var(--gl-preset-edge) !important;
  --gs-x-billing-border:var(--gl-preset-edge) !important;
  --gs-x-payment-border:var(--gl-preset-edge) !important;
  --gs-x-popup-border:var(--gl-preset-edge) !important;
  --gs-x-popup_details-border:var(--gl-preset-separator) !important;
  --gs-x-account_content-border:var(--gl-preset-edge) !important;
  --gs-x-account_nav-border:var(--gl-preset-edge) !important;
  --gs-x-auth-border:var(--gl-preset-edge) !important;
  --gs-x-footer-border:var(--gl-preset-edge) !important;
  --gs-x-shop-border:var(--gl-preset-edge) !important;
  border-color:var(--gl-preset-edge) !important;
}
/* Slightly more separation for focusable controls, less for interior dividers. */
body.gl-theme.gl-preset-midnight :where(
  input.input-text:not(:focus):not([aria-invalid=true]),
  input.search-field:not(:focus),
  input[type="search"]:not(:focus),
  input[type="number"]:not(:focus),
  input[type="text"]:not(:focus),
  input[type="email"]:not(:focus),
  input[type="tel"]:not(:focus),
  select:not(:focus),textarea:not(:focus),
  .select2-selection:not(:focus-within),
  .quantity:not(:focus-within),
  .glpm-qty:not(:focus-within),
  .gl-cart-fixed-qty,
  .glpm-line .glpm-qty:not(:focus-within)
) {
  --gs-x-purchase-input_border:var(--gl-preset-input-edge) !important;
  --gs-x-cart_item-input_border:var(--gl-preset-input-edge) !important;
  --gs-x-billing-input_border:var(--gl-preset-input-edge) !important;
  --gs-x-cart_coupon-input_border:var(--gl-preset-input-edge) !important;
  --gs-x-form-input_border:var(--gl-preset-input-edge) !important;
  border-color:var(--gl-preset-input-edge) !important;
}
body.gl-theme.gl-preset-midnight :is(
  .glpm-head,.glpm-footer,.glpm-row-heading,.glpm-message,
  .gl-cart-summary-title,.gl-cart-item-footer,
  .gl-checkout-summary hr,.gl-checkout-trust,
  .cart_totals hr,.cart_totals table.shop_table tr,
  #order_review table.shop_table tr,
  #customer_details .gl-billing-details-head,
  .gl-filter-group,.gl-filter-panel-head,
  .gl-site-footer hr,.gl-storefront-footer hr
) {
  border-color:var(--gl-preset-separator) !important;
}
/* Selected items, invalid fields, brand CTAs and keyboard-focus outlines retain
 * their clearly visible semantic edges. Styling is limited to Option 4. */
body.gl-theme.gl-preset-midnight :is(
  input,select,textarea,.select2-selection
):focus-visible {
  border-color:#776BF8 !important;
}
body.gl-theme.gl-preset-midnight :is(
  .glpm-line,.glpm-option,.gl-game-card,.gl-pdp-related-card
):focus-visible {
  outline-color:#776BF8 !important;
}
body.gl-theme.gl-preset-midnight :is(
  input[aria-invalid="true"],input.woocommerce-invalid,
  .woocommerce-invalid input
) {
  border-color:var(--gs-color-error,#E9667F) !important;
}
/* Original high-specificity WooCommerce hover selectors use their own saved
 * per-component variables. Override those aliases on the relevant ancestors;
 * otherwise an old white hover can combine with the white button label. */
body.gl-theme.gl-preset-midnight :is(
  .gl-pdp-summary,.gl-pdp-cart-form,.single_add_to_cart_button,
  .cart_totals,.gl-cart-mobile-sticky,
  #payment,.gl-checkout-payment-section,
  .glpm-dialog,.glpm-primary
) {
  --gs-x-purchase-button_bg:#776BF8 !important;
  --gs-x-purchase-button_hover_bg:#887EFF !important;
  --gs-x-cart_summary-button_bg:#776BF8 !important;
  --gs-x-cart_summary-button_hover_bg:#887EFF !important;
  --gs-x-cart_summary-button_text:#FFFFFF !important;
  --gs-x-payment-button_hover_bg:#887EFF !important;
}
/* Native checkout and popup purchase CTAs remain lavender, with an accessible
 * bright lavender hover and white copy; never turn the hover button white. */
body.gl-theme.gl-preset-midnight :is(
  .single_add_to_cart_button:not(:disabled),
  a.checkout-button,#place_order:not(:disabled),
  .woocommerce a.button.alt,.woocommerce button.button.alt:not(:disabled),
  .glpm-primary:not(:disabled)
) {
  transition:background-color .2s ease,box-shadow .2s ease,border-color .2s ease !important;
}
@media(hover:hover) {
  body.gl-theme.gl-preset-midnight :is(
    .single_add_to_cart_button:not(:disabled),
    a.checkout-button,#place_order:not(:disabled),
    .woocommerce a.button.alt,.woocommerce button.button.alt:not(:disabled),
    .glpm-primary:not(:disabled)
  ):hover {
    background:#887EFF !important;
    border-color:#9D94FF !important;
    color:#FFFFFF !important;
    box-shadow:var(--gs-shadow-action-hover) !important;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.gl-theme.gl-preset-midnight :is(
    .single_add_to_cart_button,a.checkout-button,#place_order,.glpm-primary
  ) {transition:none !important;}
}


/* RC10.65 — OPTION 4 ONLY. Sampled utility control color #3F4554.
 * Keep the brand lavender CTA, neutral #23262F cards, soft borders, and
 * interaction/focus semantics. Never recolor the primary Add to Cart,
 * checkout payment actions, sale/status labels, or payment-provider widgets.
 * Narrow selectors prevent extra surfaces taking the utility color.
 */
body.gl-theme.gl-preset-midnight .gl-storefront-header :is(
  .gl-header-action:not(.gl-header-telegram),
  .gl-search-submit,
  .gl-menu-toggle
),
body.gl-theme.gl-preset-midnight :is(
  .gl-cart-mini-icon,
  .gl-cart-fixed-qty,
  #gl-premium-cart-root .glpm-qty
) {
  background:var(--gl-preset-utility) !important;
  border-color:var(--gl-preset-edge) !important;
  color:#FFFFFF !important;
}
/* Local color aliases must agree because some chrome rules use !important. */
body.gl-theme.gl-preset-midnight .gl-storefront-header .gl-header-action:not(.gl-header-telegram),
body.gl-theme.gl-preset-midnight .gl-cart-mini-icon {
  --gs-x-header-action_bg:var(--gl-preset-utility) !important;
}
@media (hover:hover) {
  body.gl-theme.gl-preset-midnight .gl-storefront-header :is(
    .gl-header-action:not(.gl-header-telegram),
    .gl-search-submit,
    .gl-menu-toggle
  ):hover,
  body.gl-theme.gl-preset-midnight :is(
    .gl-cart-mini-icon,
    #gl-premium-cart-root .glpm-qty
  ):hover {
    background:var(--gl-preset-utility-hover) !important;
    color:#FFFFFF !important;
  }
}
/* Do not paint selected checkout steps/disabled quantity controls, and leave
 * their existing focus-visible outlines/validation states unharmed. */

/* RC10.66: Manual component color overrides are emitted via wp_add_inline_style()
 * after this stylesheet. Never append generic preset overrides after them. */

/* RC10.67 — Option 4 ONLY: restore readable text hierarchy without changing
 * font family, sizes, weights, component geometry or merchant-entered colors.
 * Context-specific component variables are used wherever available so manual
 * "Customize separately" and Private Preview can still override these defaults.
 * Status and payment-brand widgets are excluded from the generic prose paint.
 * All selectors start with the single Option 4 body class and apply equally to
 * its Glass and Solid materials; Options 1–3 and Custom remain untouched. */
body.gl-theme.gl-preset-midnight {
  --gl-preset-text:#FFFFFF;
  --gl-preset-body:#D4D5DC;
  --gl-preset-muted:#A3A1AF;
  --gl-preset-link:#B3A9FF;
  --gs-color-price-catalog:var(--gl-preset-text) !important;
}
/* Headings and money totals: white, but no extra glow or font-size changes. */
body.gl-theme.gl-preset-midnight :where(
  #main,.gl-home,.gl-pdp-v1430,.gl-cart-v1421,.gl-premium-checkout,
  .glpm-dialog,.woocommerce-MyAccount-content,.gl-site-footer,.gl-storefront-footer
) :where(h1,h2,h3,h4,h5,h6) {
  color:var(--gs-color-text-primary);
}
body.gl-theme.gl-preset-midnight :where(
  .gl-pdp-summary,.gl-checkout-summary,.cart_totals,.gl-cart-total-hero,
  .gl-checkout-total-hero,.glpm-dialog
) :where(.amount,.woocommerce-Price-amount,.order-total strong) {
  color:var(--gs-color-text-primary);
}
/* Descriptive text only; no status badges, active icons, or button descendants. */
body.gl-theme.gl-preset-midnight :where(
  .gl-pdp-description,.glpd-benefits-after-payment,.woocommerce-MyAccount-content,
  .gl-checkout-summary,.glpm-promo,.gl-home,.gl-cart-v1421
) :where(p,li,dd):not(:is(
  .woocommerce-error *, .woocommerce-message *, .woocommerce-info *,
  .gl-pdp-stock *, .gl-pdp-stock, .glpd-delivery-badge *, .glpd-delivery-badge,
  .gl-badge,.gl-game-badge,.onsale,.gl-savings,.gl-discount,
  .glpm-primary,.button,.added_to_cart,.woocommerce-button
)) {
  color:var(--gs-color-text-body);
}
/* Each of these cards has its own saved component paint tokens. */
body.gl-theme.gl-preset-midnight :where(.gl-game-card,.gl-pdp-related-card,#main ul.products li.product) :where(
  h2,h3,.woocommerce-loop-product__title,.gl-game-card-title
) { color:var(--gs-x-card-title,var(--gs-color-text-primary)); }
body.gl-theme.gl-preset-midnight :where(.gl-game-card,.gl-pdp-related-card,#main ul.products li.product) :where(
  .gl-home-card-facts,.gl-game-card-meta,.gl-game-card-facts,.gl-card-platform,.gl-card-region
) { color:var(--gs-x-card-muted,var(--gs-color-text-secondary)); }
body.gl-theme.gl-preset-midnight .gl-pdp-summary :where(h1,h2,h3,.gl-pdp-title) {
  color:var(--gs-x-purchase-title,var(--gs-color-text-primary));
}
body.gl-theme.gl-preset-midnight .gl-pdp-summary :where(.gl-pdp-price,.gl-pdp-price ins,.gl-pdp-price ins .woocommerce-Price-amount) {
  color:var(--gs-x-purchase-price,var(--gs-color-text-primary));
}
body.gl-theme.gl-preset-midnight .gl-pdp-summary :where(.gl-pdp-price del,.gl-pdp-price del .woocommerce-Price-amount) {
  color:var(--gs-x-purchase-old_price,var(--gs-color-text-secondary));
}
body.gl-theme.gl-preset-midnight .gl-pdp-summary :where(.gl-pdp-price-label,.gl-pdp-fact,.gl-pdp-platform,.gl-pdp-region) {
  color:var(--gs-x-purchase-muted,var(--gs-color-text-secondary));
}
body.gl-theme.gl-preset-midnight .gl-pdp-short-copy :where(p,li,dd) {
  color:var(--gs-x-access-text,var(--gs-color-text-body));
}
body.gl-theme.gl-preset-midnight .gl-pdp-short-copy :where(h2,h3,summary) {
  color:var(--gs-x-access-title,var(--gs-color-text-primary));
}
body.gl-theme.gl-preset-midnight .gl-pdp-description :where(p,li,dd) {
  color:var(--gs-x-description-text,var(--gs-color-text-body));
}
body.gl-theme.gl-preset-midnight .gl-pdp-description :where(h2,h3,h4) {
  color:var(--gs-x-description-title,var(--gs-color-text-primary));
}
/* Labels and merchandise metadata should recede relative to final prices. */
body.gl-theme.gl-preset-midnight :where(
  .gl-cart-v1421,.gl-checkout-summary,.glpm-dialog,.gl-storefront-header
) :where(.gl-cart-item-footer,.glpm-line-info small,.gl-checkout-product-meta,.gl-cart-item-meta,.gl-checkout-subtext) {
  color:var(--gs-color-text-secondary);
}
body.gl-theme.gl-preset-midnight #gl-premium-cart-root .glpm-line-name {
  color:var(--gs-x-popup-text,var(--gs-color-text-primary)) !important;
}
body.gl-theme.gl-preset-midnight #gl-premium-cart-root .glpm-line-info small {
  color:var(--gs-x-popup-muted,var(--gs-color-text-secondary));
}
body.gl-theme.gl-preset-midnight .gl-storefront-header :where(.gl-header-muted,.gl-header-meta,.gl-header-subtitle) {
  color:var(--gs-x-header-muted,var(--gs-color-text-secondary));
}
body.gl-theme.gl-preset-midnight :where(#customer_details,.gl-checkout-summary,.cart_totals) :where(
  .form-row label,.woocommerce-billing-fields label,.gl-checkout-assist,.description
) { color:var(--gs-color-text-body); }
body.gl-theme.gl-preset-midnight :where(.gl-storefront-header,#customer_details,.gl-checkout-summary,.cart_totals) :where(
  input::placeholder,textarea::placeholder
) { color:var(--gs-color-text-secondary); }
/* Content links, not navigation, action buttons or payment-provider controls. */
body.gl-theme.gl-preset-midnight :where(
  .gl-pdp-description,.gl-pdp-short-copy,.woocommerce-MyAccount-content,
  .glpm-dialog,.gl-site-footer,.gl-storefront-footer
) a:not(:is(.button,.checkout-button,.single_add_to_cart_button,.added_to_cart,.glpm-primary,[role=button])) {
  color:var(--gs-color-link);
}
body.gl-theme.gl-preset-midnight :where(.gl-pdp-short-copy,.gl-pdp-description) a:not(.button) {
  color:var(--gs-x-access-link,var(--gs-color-link));
}
/* Footer headings remain white, ordinary links match a controlled secondary
 * hierarchy. On hover, links become the accessible lavender accent. */
body.gl-theme.gl-preset-midnight :where(.gl-site-footer,.gl-storefront-footer,.gl-transaction-footer) :where(p,small) {
  color:var(--gs-x-footer-text,var(--gs-color-text-body));
}
body.gl-theme.gl-preset-midnight :where(.gl-site-footer,.gl-storefront-footer,.gl-transaction-footer) a:not(.button) {
  color:var(--gs-x-footer-muted,var(--gs-color-text-secondary));
}
@media(hover:hover) {
  body.gl-theme.gl-preset-midnight :where(.gl-site-footer,.gl-storefront-footer,.gl-transaction-footer) a:not(.button):hover {
    color:var(--gs-color-link);
  }
}
/* Text colors for semantic states remain distinct, while explicitly custom
 * component colors are emitted AFTER this file by gl_visual_preset_manual_css. */
