html[data-shop-theme="dark"]{color-scheme:dark;--ys-bg:#111318;--ys-fg:#eef0f5;--ys-panel:#1b1e25;--ys-surface:#242832;--ys-line:#3d424f;--ys-muted:#b2b9c9}html[data-shop-theme="light"]{color-scheme:light;--ys-bg:#ffffff;--ys-fg:#34343d;--ys-panel:#faf9fc;--ys-surface:#f1f0f5;--ys-line:#dcdde4;--ys-muted:#626575}html[data-shop-theme] body,html[data-shop-theme] .store,html[data-shop-theme] dialog{--background:var(--ys-bg)!important;--foreground:var(--ys-fg)!important;--panel:var(--ys-panel)!important;--surface:var(--ys-surface)!important;--line:var(--ys-line)!important;--muted:var(--ys-muted)!important;background:var(--ys-bg)!important;color:var(--ys-fg)!important}html[data-shop-theme] .shop-boot{background:var(--ys-bg)!important;color:var(--ys-fg)!important}#shop-theme-toggle{position:fixed;right:18px;bottom:18px;z-index:9000;border:1px solid var(--ys-line);border-radius:24px;padding:10px 16px;min-height:44px;background:var(--ys-panel);color:var(--ys-fg);box-shadow:0 4px 18px #0002;font:600 14px/1.5 system-ui,Tahoma,sans-serif;cursor:pointer}#shop-theme-toggle:focus-visible{outline:3px solid var(--accent,var(--gold,#667086));outline-offset:3px}html[data-shop-theme="dark"] .store :is(.filters,.selection,.product,.product-card,.account-panel,.profile-overview,.profile-sidebar,.profile-content,.promotion-news,.promotion-announcements,.game-choice,.game-choice-card,.cookie-banner,.cookie-settings,.cart-item,.history-card){background:var(--ys-panel)!important;color:var(--ys-fg)!important;border-color:var(--ys-line)!important}html[data-shop-theme="dark"] .store :is(input,select,textarea,button:not(.primary):not([aria-pressed="true"])){background:var(--ys-surface);color:var(--ys-fg);border-color:var(--ys-line)}html[data-shop-theme="dark"] :is(.hint,.muted,small){color:var(--ys-muted)}html[data-shop-theme="dark"] .store :is(header,footer){background:var(--ys-panel);color:var(--ys-fg);border-color:var(--ys-line)}html[data-shop-theme="dark"] .store :is(.game-choice-card-copy,.promotion-announcement-list article){background:var(--ys-panel);color:var(--ys-fg)}html[data-shop-theme="dark"] .transaction-dialog{background:var(--ys-panel)!important;color:var(--ys-fg)!important}html[data-shop-theme="dark"] .store :is(th,td){border-color:var(--ys-line)}html[data-shop-theme="dark"] .store th{background:var(--ys-surface)}@media print{#shop-theme-toggle{display:none!important}}@media(max-width:600px){#shop-theme-toggle{right:12px;bottom:max(12px,env(safe-area-inset-bottom));padding:9px 13px;font-size:12px}}

/* Dark theme: catalog controls, game currency and primary button contrast. */
html[data-shop-theme="dark"] .store .layout-bar>.catalog-view-picker{background:var(--ys-panel)!important;border-color:var(--ys-line)!important}
html[data-shop-theme="dark"] .store .catalog-view-picker button{background:var(--ys-surface);color:var(--ys-fg);border-color:transparent}
html[data-shop-theme="dark"] .store .catalog-view-picker button:hover{background:#303644;border-color:#667086}
html[data-shop-theme="dark"] .store .catalog-view-picker button[aria-pressed=true]{background:var(--accent)!important;color:var(--button-text,#111318)!important;border-color:var(--accent)!important}
html[data-shop-theme="dark"] .store .stats>.ranger-resource{background:var(--ys-surface)!important;border-color:#505766!important;color:var(--ys-fg)!important}
html[data-shop-theme="dark"] .store :is(button.primary,a.primary,button[aria-pressed=true]){color:var(--button-text,#111318)!important}
html[data-shop-theme="dark"] .store :is(.badge,.stock-badge){background:#18352b;color:#b6f1d5;border-color:#376c56}
html[data-shop-theme="dark"] .store :is(input,textarea)::placeholder{color:#abb3c4;opacity:1}
html[data-shop-theme="dark"] .store .catalog-label small{background:var(--ys-surface);color:var(--ys-muted)}
html[data-shop-theme="dark"] .store :is(button,a):focus-visible{outline-color:var(--accent,var(--gold,#667086))}

/* Animate only an intentional theme switch, never the initial page load. */
html.shop-theme-switching,html.shop-theme-switching body,html.shop-theme-switching .store,html.shop-theme-switching .store *,html.shop-theme-switching dialog,html.shop-theme-switching dialog *,html.shop-theme-switching #shop-theme-toggle{transition-property:background-color,color,border-color,box-shadow,fill,stroke!important;transition-duration:420ms!important;transition-timing-function:cubic-bezier(.22,.61,.36,1)!important}
@media(prefers-reduced-motion:reduce){html.shop-theme-switching,html.shop-theme-switching *,html.shop-theme-switching *::before,html.shop-theme-switching *::after{transition:none!important}}

/* Keep cart totals readable in dark dialogs. */
html[data-shop-theme="dark"] .cart-quote{background:var(--ys-surface,#242832)!important;color:var(--ys-fg,#eef0f5)!important;border:1px solid var(--ys-line,#3d424f)!important}
html[data-shop-theme="dark"] .cart-quote :is(p,span,strong,b){color:var(--ys-fg,#eef0f5)!important;border-color:var(--ys-line,#3d424f)!important}
html[data-shop-theme="dark"] .cart-quote :is(small,.hint){color:var(--ys-muted,#b2b9c9)!important}
html[data-shop-theme="dark"] dialog :is(input,textarea,select){background:var(--ys-surface,#242832);color:var(--ys-fg,#eef0f5);border-color:var(--ys-line,#3d424f)}

/* Brand interactions inherit the chosen accent; status colors remain semantic. */
html[data-shop-theme] .store :is(button,a,summary):focus-visible{outline-color:var(--accent)!important}
html[data-shop-theme] .store button:not(:disabled):not(.primary):not([aria-pressed=true]):hover{background:color-mix(in srgb,var(--accent) 9%,var(--ys-surface))!important;border-color:var(--accent)!important}
html[data-shop-theme] .store .products article:hover{border-color:var(--accent)!important}
html[data-shop-theme] .store :is(.heading small,.heading h1 em){color:color-mix(in srgb,var(--accent) 65%,var(--ys-fg))!important}

html[data-shop-theme="light"] .store :is(.price,.heading small,.heading h1 em){color:color-mix(in srgb,var(--accent) 40%,var(--ys-fg))!important}
html[data-shop-theme="light"] .store :is(.eyebrow,.shop-hero em){color:color-mix(in srgb,var(--accent) 40%,var(--ys-fg))!important}
