/* Layout-neutral. Background never receives input or filters live content. */
:root[data-customer-background]{background-color:var(--cb-pearl);color-scheme:only light;--cb-pearl:#fffefb;--cb-tint:#f6e7cb;--cb-surface:#fffcf5;--cb-edge:#b0955a}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2){isolation:isolate;background:transparent!important;background-image:none!important;color:#492330!important;min-height:100dvh}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2)::before,html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2)::after{background:none!important;background-image:none!important;animation:none!important;pointer-events:none!important}
#customer-liquid-background{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;background-color:var(--cb-pearl);background-image:url('/assets/customer-pearl-liquid.webp'),linear-gradient(135deg,var(--cb-pearl),var(--cb-tint));background-size:cover;background-position:center;background-blend-mode:multiply;contain:strict}
/* Opaque base remains painted on every scroll frame, with or without motion. */
#customer-liquid-background::before,#customer-liquid-background::after{content:'';position:absolute;inset:-36px;pointer-events:none;display:none}
#customer-liquid-background[data-moving=true]::before{display:block;background-color:var(--cb-pearl);background-image:url('/assets/customer-pearl-liquid.webp'),linear-gradient(135deg,var(--cb-pearl),var(--cb-tint));background-size:cover;background-position:center;background-blend-mode:multiply;animation:cb-liquid-drift 18s ease-in-out infinite}
#customer-liquid-background[data-moving=true]::after{display:block;background:linear-gradient(112deg,transparent 36%,#fff9 50%,transparent 64%);opacity:calc(var(--cb-motion-strength,.8)*.22);animation:cb-liquid-light 22s ease-in-out infinite}
@keyframes cb-liquid-drift{0%,100%{transform:translate(calc(var(--cb-motion-distance,11px)*-.65),calc(var(--cb-motion-distance,11px)*-.5))}50%{transform:translate(var(--cb-motion-distance,11px),calc(var(--cb-motion-distance,11px)*1.2))}}
@keyframes cb-liquid-light{0%,100%{transform:translateX(-24%)}50%{transform:translateX(24%)}}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(.identity-card,.member-register-form,.customer-recovery-card,.customer-security){color:#492330!important;border-color:var(--cb-edge)!important;background:linear-gradient(145deg,var(--cb-pearl),var(--cb-surface))!important;box-shadow:0 5px 22px #49233012,inset 0 1px 0 #fff}
html[data-customer-background] body[data-page="recover"][data-customer-background] main{color:#492330;background:linear-gradient(145deg,var(--cb-pearl),var(--cb-surface));border-color:var(--cb-edge)}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(.identity-card,.member-register-form,.customer-security,[data-recovery-host]) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){color:#492330!important;background:linear-gradient(135deg,#fff,var(--cb-surface))!important;border-color:#b9a992!important}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(.primary,.mp-primary,.identity-submit){background:linear-gradient(125deg,#800020,#9a3655)!important;color:#fffaf1!important}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(.identity-card,.member-register-form,.customer-security,[data-recovery-host]) :is(h1,h2,h3,label,summary){color:#542331!important}
@media(prefers-reduced-motion:reduce){#customer-liquid-background::before,#customer-liquid-background::after{display:none!important;animation:none!important}}
@media print{#customer-liquid-background{display:none!important}}
html[data-customer-background] body[data-customer-background][data-identity-glass]:not(#ku0):not(#ku1):not(#ku2){--id-bg:var(--cb-pearl);--id-ink:#492330;--id-muted:#705861;--id-accent:#800020;--id-edge:var(--cb-edge);--id-surface:var(--cb-surface);--id-input:#fffdf8;--id-detail:var(--cb-surface);--id-line:#c9b99a;--id-shadow:inset 0 1px 1px #fff,0 12px 40px #49233012}
html[data-customer-background] body[data-customer-background][data-member-page]:not(#ku0):not(#ku1):not(#ku2){--m-bg:var(--cb-pearl);--m-ink:#492330;--m-muted:#705861;--m-wine:#800020;--m-line:var(--cb-edge);--m-glass:var(--cb-surface);--m-input:#fffdf8}

/* 1.130.1: local dialog/member tokens used to keep their legacy dark material.
   Scope every override to enabled customer palettes; disabling restores old themes.
   Opaque reading surfaces keep contrast stable over moving liquid and photographs. */
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is([data-mp-host],#member-quick-panel){
 --mp-bg:var(--cb-surface);--mp-ink:#492330;--mp-muted:#705861;
 --mp-line:var(--cb-edge);--mp-input:var(--cb-pearl);--mp-wine:#800020;
}
html[data-customer-background] body[data-customer-background][data-member-page]:not(#ku0):not(#ku1):not(#ku2){
 --ms-bg:var(--cb-surface);--ms-ink:#492330;--ms-ink2:#5c3b46;
 --ms-line:#b9a992;--ms-line-strong:var(--cb-edge);--ms-accent:#800020;--ms-tab-ink:#fffaf1;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3):not(#cb0) #item-detail{
 --item-glass-surface:var(--cb-surface);--item-glass-ink:#492330;
 --item-glass-heading:#800020;--item-glass-edge:var(--cb-edge);
 --item-glass-shell:linear-gradient(145deg,var(--cb-pearl),var(--cb-surface));
 --item-glass-rim:linear-gradient(115deg,var(--cb-pearl),var(--cb-surface));
 --item-glass-panel:var(--cb-surface);--item-glass-input:var(--cb-pearl);--item-glass-light:#fff;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3) #media-viewer{
 --reader-ink:#492330;--reader-strong:#800020;--reader-muted:#5c3b46;
 --reader-surface:var(--cb-surface);--reader-glass:linear-gradient(145deg,var(--cb-pearl),var(--cb-surface));
 --reader-edge:var(--cb-edge);--reader-rim:#c9b99a;--reader-quote:var(--cb-surface);
 --reader-accent-glow:#80002008;--reader-texture:#80002004;
 --viewer-shell:var(--cb-surface);--viewer-rim:var(--cb-surface);--viewer-inner:var(--cb-surface);
 --viewer-button:var(--cb-pearl);--viewer-light:#fff;--viewer-shadow:#49233033;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3) #order-receipt .order-payment-card{
 --transfer-bg:var(--cb-surface);--ku-ink:#492330;--ku-ink-2:#5c3b46;
 --ku-accent:#800020;--ku-chip:var(--cb-pearl);--ku-line:var(--cb-edge);--ku-line-strong:var(--cb-edge);
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3) #checkout :is(#payment-choices label.kb-pay-card,.cash-tendered){
 background:var(--cb-surface)!important;color:#492330!important;border-color:var(--cb-edge)!important;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3) #checkout #payment-choices label.kb-pay-card:has(input:checked){
 background:var(--cb-pearl)!important;color:#800020!important;border:2px solid #800020!important;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3) #checkout .cash-tendered-head :is(h3,small){color:#492330}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(input,textarea)::placeholder{color:#705861!important;opacity:1!important}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) .member-sheet-status.member-message-error{color:#a32744!important}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #800020!important;outline-offset:3px}

/* Member navigation can appear inline at registration or inside a dialog. */
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3):not(#cb0) .member-glass-link{
 background:linear-gradient(140deg,var(--cb-pearl),var(--cb-surface))!important;
 color:#800020!important;-webkit-text-fill-color:#800020;border-color:var(--cb-edge)!important;
 box-shadow:inset 0 1px 0 #fff,0 3px 8px #49233012;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3):not(#cb0) .member-glass-link :is(svg,span){color:#800020!important;-webkit-text-fill-color:#800020}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2):not(#ku3):not(#cb0) .member-glass-link>svg{stroke:#800020!important;opacity:1}

/* Notification colors follow the actual pearl surface, including at night.
   Applies to welcome/cancel dialogs, saved cart and promotion notices. */
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2){
 --notice-surface:var(--cb-surface);--notice-panel:var(--cb-pearl);
 --notice-text:#492330;--notice-link:#800020;--notice-border:var(--cb-edge);
 --notice-action:#800020;--notice-action-text:#fffaf1;--notice-focus:#800020;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is(.customer-notice,#basket-promotion-status,#cart-draft-status){
 background:var(--cb-surface)!important;color:#492330!important;border-color:var(--cb-edge)!important;
}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) .customer-notice :is(p,b,strong){color:#492330!important}
html[data-customer-background] body[data-customer-background]:not(#ku0):not(#ku1):not(#ku2) :is([data-customer-orders],#dock-orders)[data-order-phase=confirmed]{color:#1c5a45!important}
