/* Paint tokens only. Card faces, felt, input geometry and game engines are untouched. */
:root{--bg:#f8f3e9;--surface:#fffaf1;--text:#203d35;--accent:#d7ae56;--accent-secondary:#18634f;--border-color:#dcd0bd;--muted:#52675b;--shadow:0 8px 24px #221b1515;--hero-image:none;--card-background:#fffaf1;--theme-hero:#175f43;--theme-hero-text:#fffdf3}
html[data-theme]:not([data-theme=default]) body.ludicera-lounge{background:var(--bg);color:var(--text)}
html[data-theme]:not([data-theme=default]) .ludicera-backdrop-picture{visibility:hidden}
.theme-backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none;user-select:none;background:var(--bg);background-image:var(--theme-background);background-size:100% 100%;background-repeat:no-repeat}
.theme-backdrop[hidden]{display:none}.theme-decor[hidden]{display:none}
html[data-theme]:not([data-theme=default]) :is(.ludicera-header,#menu>.window,#menu .discover-games,#game-guide,.game-help-card,.ludicera-legal-dialog,.ludicera-consent-notice){background:var(--surface)!important;color:var(--text)!important;border-color:var(--border-color)!important;box-shadow:var(--shadow)}
html[data-theme]:not([data-theme=default]) :is(.ludicera-header h1,.ludicera-header .brand-title,#menu h2,#game-guide h2,#game-guide h3,.table-head h1,.table-head h2,.table-head .game-title){color:var(--text)!important}
html[data-theme]:not([data-theme=default]) :is(.ludicera-header p,.table-head p,.table-note,.foot,.ludicera-version,#game-guide p){color:var(--muted)!important}
html[data-theme]:not([data-theme=default]) :is(#menu .game,#menu .actions button,.table-tools button,.theme-button,#menu .more-games button){background:var(--card-background)!important;color:var(--text)!important;border-color:var(--border-color)!important}
html[data-theme]:not([data-theme=default]) #menu .game.selected{background:var(--accent-secondary)!important;color:#fff!important}
html[data-theme]:not([data-theme=default]) #menu .game small{color:inherit!important;opacity:.85}
html[data-theme]:not([data-theme=default]) #preview{background:var(--theme-hero)!important;color:var(--theme-hero-text)!important;background-image:var(--hero-image)!important;background-size:cover!important}
html[data-theme]:not([data-theme=default]) #preview :is(h2,p){color:var(--theme-hero-text)!important}
html[data-theme]:not([data-theme=default]) #preview .start{background:var(--accent)!important;color:#201b15!important}
html[data-theme]:not([data-theme=default]) #game-guide a{color:var(--text);text-decoration:underline}
/* New blocks use their own sizing, never selectors for .card/.column/.felt. */
.theme-daily{box-sizing:border-box;display:flex;align-items:center;gap:18px;padding:18px 22px;margin:16px 0;border:1px solid var(--border-color);border-radius:16px;background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
.theme-daily img{width:68px;height:68px;object-fit:contain;flex:none}.theme-daily h2{font:600 22px Georgia,serif;margin:0 0 5px}.theme-daily p{margin:4px 0;line-height:1.5}.theme-daily a{display:inline-block;margin-left:auto;padding:12px 18px;background:var(--accent);border-radius:10px;color:#201b15;font-weight:600;text-decoration:none;white-space:nowrap}.theme-daily small{display:block;color:var(--muted)}
.theme-season{margin:14px 0 0;padding:12px 18px;border-radius:12px;background:var(--surface);color:var(--text);border:1px solid var(--border-color);line-height:1.5}.theme-season strong{font:600 18px Georgia,serif}.theme-season p{margin:4px 0 0;color:var(--muted)}
.theme-button{font:inherit;cursor:pointer}.ludicera-version .theme-button{background:none;border:0;color:inherit;text-decoration:underline;padding:0;font-size:inherit}
#theme-dialog{box-sizing:border-box;width:560px;max-width:calc(100vw - 24px)!important;max-height:90dvh;overflow:auto;border:1px solid var(--border-color);border-radius:16px;padding:22px;background:var(--surface);color:var(--text)}
#theme-dialog::backdrop{background:#10261d80}#theme-dialog h2{font:600 24px Georgia,serif;margin:0 0 14px}#theme-dialog label{display:block;margin:14px 0 6px}#theme-dialog select{display:block;width:100%;padding:10px;font:inherit;border:1px solid var(--border-color);border-radius:8px;background:var(--surface);color:var(--text)}#theme-dialog input[type=checkbox]{margin-right:8px}#theme-dialog button{font:inherit;border:1px solid var(--border-color);padding:10px 16px;border-radius:9px;background:var(--surface);color:var(--text);cursor:pointer}#theme-dialog p{line-height:1.5}#theme-dialog .theme-swatches{display:flex;gap:8px;padding:12px 0}.theme-swatches span{width:42px;height:28px;border-radius:7px;border:1px solid var(--border-color)}
.theme-decor{position:fixed;inset:0;overflow:hidden;z-index:-1;pointer-events:none;user-select:none;contain:strict}.theme-decor img{position:absolute;width:clamp(28px,4vw,60px);height:auto;opacity:.55;animation:theme-sway 12s ease-in-out infinite alternate;pointer-events:none}.theme-decor img:nth-child(2n){animation-delay:-5s}.theme-decor[data-motion=off] img{animation:none}@keyframes theme-sway{to{transform:translateY(18px) rotate(12deg)}}
@media(max-width:768px){.theme-backdrop{background-image:var(--theme-mobile-background)}.theme-decor img:nth-child(n+3){display:none}.theme-decor img{opacity:.3}.theme-daily{gap:12px;padding:14px;flex-wrap:wrap}.theme-daily img{width:48px;height:48px}.theme-daily a{width:100%;text-align:center;margin:0;box-sizing:border-box}.theme-season{padding:12px}.theme-daily h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.theme-decor img{animation:none!important}}
html[data-theme]:not([data-theme=default]) #menu .menu-discover{background:var(--surface)!important;border-color:var(--border-color)!important;color:var(--text)!important}
html[data-theme]:not([data-theme=default]) #menu .menu-discover button{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border-color)!important}
html[data-theme]:not([data-theme=default]) #menu :is(.label,.menu-discover strong,.menu-discover small){color:var(--text)!important}
html[data-theme]:not([data-theme=default]) #menu .game::before{color:var(--accent)!important}
html[data-theme]:not([data-theme=default]) :is(.ludicera-header .logo img,.menu-joker img){mix-blend-mode:normal!important}
html[data-theme]:not([data-theme=default]) .ludicera-decor-copy-layer{display:none!important}
#menu .theme-button:before{content:'◈';display:inline-grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:var(--accent-secondary);color:#fff;margin-right:10px;font:20px Arial}

/* V38.80: Halloween paint only; no geometry or card/game overrides. */
html:root[data-theme=halloween] .theme-backdrop{background-size:cover;background-position:center}
html:root[data-theme=halloween] :is(.ludicera-header,#menu>.window,#menu .menu-discover,.theme-season,.theme-daily){background:linear-gradient(125deg,rgba(12,20,39,.97),rgba(38,25,54,.96))!important;box-shadow:0 8px 24px #0007,inset 0 0 0 1px #f5c46b16}
html:root[data-theme=halloween] #menu :is(.game,.actions button,.menu-discover button){background:linear-gradient(120deg,#18223a,#292039)!important;border-color:#8d704f!important;box-shadow:inset 0 1px #f5ce8a12}
html:root[data-theme=halloween] #menu .game.selected{background:linear-gradient(110deg,#6d3980,#9c4924)!important;border-color:#e9b565!important;box-shadow:inset 0 0 0 1px #ffc66e40,0 0 12px #e3872025}
html:root[data-theme=halloween] #menu .actions button::before{background:linear-gradient(#b86b28,#70411d)!important;color:#fff2ce!important}
html:root[data-theme=halloween] #preview{background-image:linear-gradient(90deg,#07112650,#12122555),var(--hero-image)!important;background-position:center!important;box-shadow:inset 0 0 0 1px #edbc68,0 8px 22px #0006}
html:root[data-theme=halloween] #preview :is(h2,p){text-shadow:0 2px 5px #000,0 0 14px #000}
html:root[data-theme=halloween] #preview .start{background:linear-gradient(#ffe2a0,#e7aa46)!important;box-shadow:0 5px 0 #98651f,0 0 20px #ee9d2930}
html:root[data-theme=halloween] :is(.ludicera-header .brand-title,#menu h2){color:#ffe0a0!important}
html:root[data-theme=halloween] .menu-joker img{filter:drop-shadow(0 0 10px #efa33f55)}
html:root[data-theme=halloween] .ludicera-counter{background:#111c30!important;color:#efdab8!important;border-color:#8d704f!important}
html:root[data-theme=halloween] #menu .menu-discover button{background-image:linear-gradient(#111b30db,#21152cf2),url('/themes/halloween/night-desktop.webp')!important;background-size:cover!important}
html:root[data-theme=halloween] :is(button,a):focus-visible{outline-color:#ffd17a}
@media(max-width:768px){html:root[data-theme=halloween] .theme-backdrop{background-size:100% 100%;background-position:center}html:root[data-theme=halloween] #preview{background-image:linear-gradient(#10172b48,#10172b88),var(--hero-image)!important}}

html:root[data-theme=halloween] #menu.premium-menu-v386 nav:before{color:#ffe0a0!important}
html:root[data-theme=halloween] #menu.premium-menu-v386 .actions .action-icon{background:linear-gradient(#b86b28,#70411d)!important;color:#fff2ce!important}
/* V38.81 modular Halloween effects. Fixed, inert, behind the content. */
.halloween-effects{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;user-select:none;contain:strict}
.halloween-effects[hidden]{display:none}.halloween-effects *{pointer-events:none}
.hw-light-scene{position:absolute;left:50%;top:50%;width:max(100vw,177.6833vh);height:max(100vh,56.2799vw);transform:translate(-50%,-50%)}
.hw-glow{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,#ffe1a373,#ff9e3029 35%,transparent 72%);opacity:.16;animation-delay:var(--delay)!important}
.hw-candles{animation:hw-candle 4.9s ease-in-out infinite alternate}.hw-lanterns{animation:hw-lantern 8.7s ease-in-out infinite alternate}.hw-pumpkins{animation:hw-pumpkin 11.3s ease-in-out infinite alternate}
.hw-corner{position:absolute;left:0;top:0;width:var(--hw-gutter);height:125px;overflow:hidden}.hw-web{position:absolute;inset:0;width:100%;height:auto}.hw-spider{position:absolute;left:0;top:0;width:100%;height:110px;overflow:visible}.hw-spider-sway{transform-origin:28px 0;animation:hw-sway 9s ease-in-out infinite alternate}.hw-spider-bob{animation:hw-bob 12s ease-in-out infinite alternate}
.hw-flight{position:absolute;left:0;top:0;width:100%;height:var(--hw-top);overflow:hidden}.hw-bat{position:absolute;top:1px;width:22px;height:11px;opacity:0;animation:hw-flight 53s linear infinite}.hw-bat-1{animation-delay:26s}
@keyframes hw-bob{from{transform:translateY(-5px)}to{transform:translateY(5px)}}
@keyframes hw-sway{from{transform:rotate(-2deg)}to{transform:rotate(2deg)}}
@keyframes hw-flight{0%{transform:translateX(-30px);opacity:0}70%{transform:translateX(-30px);opacity:0}72%{opacity:.35}96%{opacity:.35}99%{transform:translateX(100vw);opacity:0}100%{transform:translateX(100vw);opacity:0}}
@keyframes hw-candle{0%{opacity:.13}100%{opacity:.13}23%{opacity:.22}48%{opacity:.16}74%{opacity:.25}}
@keyframes hw-lantern{from{opacity:.11}to{opacity:.24}}
@keyframes hw-pumpkin{from{opacity:.10}to{opacity:.21}}
.halloween-effects[data-spider=off] .hw-corner{display:none}.halloween-effects[data-corner=no] .hw-corner{display:none}.halloween-effects[data-bats=off] .hw-flight{display:none}.halloween-effects[data-flight=no] .hw-flight{display:none}.halloween-effects[data-candles=off] .hw-candles{display:none}.halloween-effects[data-lanterns=off] .hw-lanterns{display:none}.halloween-effects[data-pumpkins=off] .hw-pumpkins{display:none}
.halloween-effects[data-motion=off] *{animation:none!important}.halloween-effects[data-motion=off] .hw-flight{display:none}.halloween-effects[data-paused=yes] *{animation-play-state:paused!important}
@media(max-width:768px){.hw-light-scene{width:100%;height:100%}.hw-candles.hw-side-0{left:19%;top:82%;width:3%;height:3%}.hw-candles.hw-side-1{left:82%;top:87%;width:3%;height:3%}.hw-lanterns.hw-side-0{left:13%;top:12%;width:8%;height:9%}.hw-lanterns.hw-side-1{left:6%;top:77%;width:7%;height:5%}.hw-pumpkins.hw-side-0{left:13%;top:84%;width:17%;height:7%}.hw-pumpkins.hw-side-1{left:87%;top:83%;width:17%;height:7%}}
@media(prefers-reduced-motion:reduce){.halloween-effects *{animation:none!important}.halloween-effects .hw-flight{display:none}}
html[data-theme=halloween] #preview{isolation:isolate}
.hw-hero-effects{position:absolute;inset:0;z-index:-1;border-radius:inherit}
.hw-hero-effects .hw-light-scene{width:var(--hw-hero-size);height:var(--hw-hero-size)}
.hw-hero-effects .hw-candles.hw-side-0{left:3%;top:72%;width:2%;height:5%}.hw-hero-effects .hw-candles.hw-side-1{left:82%;top:82%;width:2%;height:5%}
.hw-hero-effects .hw-lanterns.hw-side-0{left:10%;top:11%;width:4%;height:6%}.hw-hero-effects .hw-lanterns.hw-side-1{left:94%;top:69%;width:4%;height:6%}
.hw-hero-effects .hw-pumpkins.hw-side-0{left:13%;top:80%;width:13%;height:8%}.hw-hero-effects .hw-pumpkins.hw-side-1{left:95%;top:78%;width:13%;height:8%}
html[data-theme=halloween] #preview > .hw-hero-effects{position:absolute!important;inset:0!important;z-index:-1!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;transform:none!important}

/* V38.82: visible initial flight and safe preview corner, unchanged layout. */
.hw-bat{width:28px;height:14px;animation:hw-flight-visible 40s linear infinite}.hw-bat-1{animation-delay:20s}
@keyframes hw-flight-visible{0%{transform:translateX(-32px);opacity:0}4%{transform:translateX(-32px);opacity:0}7%{opacity:.65}32%{opacity:.65}36%{transform:translateX(100vw);opacity:0}100%{transform:translateX(100vw);opacity:0}}
.hw-spider-bob{animation:hw-bob-visible 9s ease-in-out infinite alternate}
@keyframes hw-bob-visible{from{transform:translateY(-8px)}to{transform:translateY(8px)}}
.hw-glow{background:radial-gradient(ellipse,#fff1bdcc,#ffad4b66 35%,transparent 72%)}
@keyframes hw-candle{0%{opacity:.20}100%{opacity:.20}23%{opacity:.38}48%{opacity:.25}74%{opacity:.40}}
@keyframes hw-lantern{from{opacity:.18}to{opacity:.38}}
@keyframes hw-pumpkin{from{opacity:.17}to{opacity:.34}}
.hw-hero-effects .hw-corner{height:var(--hw-corner-height,0px)}
.hw-hero-effects .hw-flight{top:var(--hw-flight-start,0px)}
.hw-hero-effects .hw-bat{animation-name:hw-hero-flight}
@keyframes hw-hero-flight{0%{left:-32px;transform:none;opacity:0}4%{left:-32px;transform:none;opacity:0}7%{opacity:.65}32%{opacity:.65}36%{left:100%;transform:none;opacity:0}100%{left:100%;transform:none;opacity:0}}

/* V38.83 P1: only Spider and only Halloween. */
html:root[data-theme=halloween] body #table .felt{background:radial-gradient(ellipse at top,#103f40,#052526)!important;row-gap:10px!important}
html:root[data-theme=halloween] body #table .felt .table-top{margin:0!important;column-gap:12px!important;row-gap:10px!important}
html:root[data-theme=halloween] body #table .felt #stock{position:relative!important;display:block!important;width:calc(var(--card-width) + 16px)!important;min-width:calc(var(--card-width) + 16px)!important;height:var(--card-height)!important;padding:0!important}
html:root[data-theme=halloween] body #table .felt #stock .playing-card{position:absolute!important;top:0!important;left:0!important;margin:0!important;transform:none!important;box-shadow:0 1px 2px #0004!important}
html:root[data-theme=halloween] body #table .felt #stock .playing-card:nth-child(2){left:4px!important}
html:root[data-theme=halloween] body #table .felt #stock .playing-card:nth-child(3){left:8px!important}
html:root[data-theme=halloween] body #table .felt #stock .playing-card:nth-child(4){left:12px!important}
html:root[data-theme=halloween] body #table .felt #stock .playing-card:nth-child(5){left:16px!important}
.hw-p1-deals{display:none}
html[data-theme=halloween] #table .hw-p1-deals{display:block;font-size:11px;line-height:1.3;color:#d9e6df;margin-top:3px}
html[data-theme=halloween] #table .hw-p1-spacing-label{position:absolute;right:0;bottom:calc(100% + 5px);font-size:10px;white-space:nowrap;color:#ffe2ad;background:#10262e;border:1px solid #967749;border-radius:5px;padding:3px 5px;pointer-events:none}
.hw-p1-spacing-label{display:none}
html[data-theme=halloween] #table .hw-p1-spacing-label{display:block}
html.hw-spider-p1 .halloween-effects:not(.hw-hero-effects) .hw-web{opacity:.9}
html.hw-spider-p1 .halloween-effects:not(.hw-hero-effects) .hw-spider{filter:drop-shadow(0 0 2px #eeb75a80)}

html[data-theme=halloween] #table .card-spacing-side-control{position:relative}
html[data-theme=halloween] #table #stock-count{display:inline-block}
html[data-theme=halloween] #table .hw-p1-deals{display:inline-block;margin:0 0 0 8px}
@media(max-width:600px){html[data-theme=halloween] #table .hw-p1-deals{font-size:10px;margin-left:5px}}
@media(min-width:601px) and (max-width:1000px){html:root[data-theme=halloween] body #table #foundations{display:grid!important;grid-template-columns:repeat(4,var(--card-width))!important;width:max-content!important;gap:8px!important}}

/* V38.84 readable Spider tableau: scroll horizontally instead of crushing ranks. */
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 html body #table .table-scroll{overflow-x:auto!important}
 html body #table .felt{min-width:590px!important}
 html body #table #columns{gap:3px!important}
}

/* V38.85 Autumn paint only. No layout or game selectors. */
html:root[data-theme=autumn] .theme-backdrop{background-size:cover;background-position:center}
html:root[data-theme=autumn] :is(.ludicera-header,#menu>.window,#menu .menu-discover,.theme-season,.theme-daily){background:linear-gradient(120deg,#382515f5,#52331df5)!important;border-color:#b78142!important;box-shadow:0 8px 24px #44200850,inset 0 0 0 1px #f5c46b22}
html:root[data-theme=autumn] #menu :is(.game,.actions button,.menu-discover button){background:linear-gradient(110deg,#6a421f,#3e2e1c)!important;border-color:#bc8a4c!important;color:#fff0d2!important}
html:root[data-theme=autumn] #menu .game.selected{background:linear-gradient(110deg,#a94b12,#74401e)!important;border-color:#ffc66e!important;box-shadow:inset 0 0 0 1px #ffc66e80,0 0 10px #ef9a3040}
html:root[data-theme=autumn] #menu.premium-menu-v386 .actions .action-icon{background:linear-gradient(#df942b,#9a5016)!important;color:#fff8df!important}
html:root[data-theme=autumn] :is(.ludicera-header .brand-title,#menu h2){color:#ffe1a0!important}
html:root[data-theme=autumn] #menu.premium-menu-v386 nav:before{color:#ffe1a0!important}
html:root[data-theme=autumn] #preview{background-image:linear-gradient(#3a230b1a,#35210b88),var(--hero-image)!important;background-position:center!important;box-shadow:inset 0 0 0 1px #f7c778,0 8px 22px #46240850}
html:root[data-theme=autumn] #preview :is(h2,p){text-shadow:0 2px 5px #321a09}
html:root[data-theme=autumn] #preview .start{background:linear-gradient(#ffe49b,#e8ab38)!important;box-shadow:0 5px 0 #a16b21}
html:root[data-theme=autumn] .ludicera-counter{background:#4a321d!important;color:#ffe3b3!important;border-color:#b78142!important}
html:root[data-theme=autumn] #menu .menu-discover button{background-image:linear-gradient(#3d2818c9,#352617eb),url('/themes/autumn/autumn-desktop.webp')!important;background-size:cover!important}
@media(max-width:768px){html:root[data-theme=autumn] .theme-backdrop{background-size:100% 100%;background-position:center}}

html[lang=uk] #menu.premium-menu-v386 nav:before{content:"🎮  Обрати гру"}

/* Transparent mascot: preserve dimensions and placement. */
html body .ludicera-header .logo{background:transparent!important;box-shadow:none!important;mix-blend-mode:normal!important}html body .ludicera-header .logo img{background:transparent!important;box-shadow:none!important;mix-blend-mode:normal!important}html body .menu-joker{background:transparent!important;box-shadow:none!important;mix-blend-mode:normal!important}html body .menu-joker img{background:transparent!important;box-shadow:none!important;mix-blend-mode:normal!important}

/* V38.87: paint only inside the seasonal Discover block. */
html:root[data-theme=halloween] #menu .menu-discover{background:linear-gradient(125deg,#0b1424,#211329)!important;border-color:#c49a51!important}
html:root[data-theme=halloween] #menu .menu-discover h2{color:#f8d793!important}
html:root[data-theme=autumn] #menu .menu-discover{background:repeating-linear-gradient(3deg,#8c572908 0 2px,transparent 2px 15px),linear-gradient(125deg,#fff2d8,#e8c79c)!important;border-color:#ad793c!important;box-shadow:0 8px 24px #57341330,inset 0 1px #fff8}
html:root[data-theme=autumn] #menu .menu-discover h2{color:#4a301c!important}
html:root[data-theme=halloween] #menu .menu-discover .discover-tile{background:radial-gradient(ellipse at 30% 0,var(--preview-light),transparent 75%),linear-gradient(180deg,var(--preview-color) 0%,var(--preview-dark) 55%,#101322 56%,#1e1425 100%)!important;border-color:#cba65d!important;box-shadow:inset 0 1px #ffe8a633,0 3px 9px #0005;color:#fff1d5!important;transition:filter .16s ease,transform .16s ease}
html:root[data-theme=autumn] #menu .menu-discover .discover-tile{background:radial-gradient(ellipse at 22% 0,var(--preview-light),transparent 75%),linear-gradient(180deg,var(--preview-color) 0%,var(--preview-dark) 55%,#fff2da 56%,#eed4ad 100%)!important;border-color:var(--preview-edge,#ae783a)!important;box-shadow:inset 0 1px #fff5,0 3px 9px #63361825;transition:filter .16s ease,transform .16s ease}
html:root[data-theme=halloween] #menu .menu-discover .discover-tile :is(strong,small){color:#fff1d5!important;text-shadow:0 1px 2px #000}
html:root[data-theme=autumn] #menu .menu-discover .discover-tile :is(strong,small){color:#352416!important;text-shadow:none}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover .discover-tile:hover{filter:brightness(1.055);transform:translateY(-1px)}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover .discover-tile:focus-visible{outline:3px solid #e6ad45;outline-offset:3px}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover .discover-cards i{font-size:0!important;color:transparent!important;background-color:#fffdf1!important;background-image:var(--preview-card);background-size:contain;background-position:center;background-repeat:no-repeat;border-color:#d5ad66!important;border-radius:5px;box-shadow:0 3px 6px #0008}
@media(prefers-reduced-motion:reduce){html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover .discover-tile{transition:none}html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover .discover-tile:hover{transform:none}}
html:root[data-theme=halloween] #menu .menu-discover [data-target="klondike"]{--preview-color:#216c45;--preview-dark:#092d26;--preview-light:#ba8a3666}
html:root[data-theme=halloween] #menu .menu-discover [data-target="freecell"]{--preview-color:#126986;--preview-dark:#102b55;--preview-light:#3dabbc66}
html:root[data-theme=halloween] #menu .menu-discover [data-target="forty"]{--preview-color:#8c233c;--preview-dark:#3b1223;--preview-light:#ce8b3266}
html:root[data-theme=halloween] #menu .menu-discover [data-target="double-klondike"]{--preview-color:#694698;--preview-dark:#202d63;--preview-light:#836bb666}
html:root[data-theme=autumn] #menu .menu-discover [data-target="klondike"]{--preview-color:#6d8150;--preview-dark:#405c3e;--preview-light:#efd07899}
html:root[data-theme=autumn] #menu .menu-discover [data-target="freecell"]{--preview-color:#4a8992;--preview-dark:#345b6b;--preview-light:#b3d4d099}
html:root[data-theme=autumn] #menu .menu-discover [data-target="forty"]{--preview-color:#b65d39;--preview-dark:#75452b;--preview-light:#ecc17499}
html:root[data-theme=autumn] #menu .menu-discover [data-target="double-klondike"]{--preview-color:#91647d;--preview-dark:#664058;--preview-light:#dba07899}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="klondike"] .discover-cards i:nth-child(1){--preview-card:url("/cards/QH.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="klondike"] .discover-cards i:nth-child(2){--preview-card:url("/cards/AH.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="klondike"] .discover-cards i:nth-child(3){--preview-card:url("/cards/KS.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="freecell"] .discover-cards i:nth-child(1){--preview-card:url("/cards/QH.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="freecell"] .discover-cards i:nth-child(2){--preview-card:url("/cards/8C.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="freecell"] .discover-cards i:nth-child(3){--preview-card:url("/cards/4D.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="forty"] .discover-cards i:nth-child(1){--preview-card:url("/cards/JD.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="forty"] .discover-cards i:nth-child(2){--preview-card:url("/cards/QS.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="forty"] .discover-cards i:nth-child(3){--preview-card:url("/cards/KH.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="double-klondike"] .discover-cards i:nth-child(1){--preview-card:url("/cards/KS.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="double-klondike"] .discover-cards i:nth-child(2){--preview-card:url("/cards/AS.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween]) #menu .menu-discover [data-target="double-klondike"] .discover-cards i:nth-child(3){--preview-card:url("/cards/AH.webp")}

/* V38.88 Winter paint. Existing dimensions and game surfaces retained. */
html:root[data-theme=winter] :is(.ludicera-header,#menu>.window,.theme-season,.theme-daily){background:linear-gradient(125deg,#0b2035f5,#1d3952f5)!important;border-color:#a6bed1!important;box-shadow:0 8px 24px #00122160,inset 0 1px #fff2}
html:root[data-theme=winter] #menu :is(.game,.actions button){background:linear-gradient(120deg,#254b68,#142b43)!important;border-color:#91a9bf!important;color:#f5f9ff!important}
html:root[data-theme=winter] #menu .game[aria-pressed=true]{background:linear-gradient(120deg,#24638d,#173c60)!important;border-color:#c6dced!important;box-shadow:inset 0 0 0 1px #c6dced60}
html:root[data-theme=winter] #menu .preview{background:linear-gradient(#0b203520,#081c3866),var(--hero-image)!important;background-size:cover!important;background-position:center!important;border-color:#a6bed1!important;color:#fff!important}
html:root[data-theme=winter] #menu .preview :is(h2,p,.benefits){color:#f5f9ff!important;text-shadow:0 2px 4px #001020}
html:root[data-theme=winter] #menu .preview .start{background:linear-gradient(#ffe1a0,#d9a344)!important;color:#2f261a!important;border-color:#e2bd77!important}
html:root[data-theme=winter] #menu .menu-discover{background:linear-gradient(125deg,#10283e,#1a2c49)!important;border-color:#a6bed1!important}
html:root[data-theme=winter] #menu .menu-discover h2{color:#f1f7ff!important}
@media(max-width:768px){html[data-theme=winter] .theme-backdrop{background-size:100% 100%!important}}
/* Scene atlas, four independent columns per seasonal row. No text baked into images. */
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover .discover-tile{isolation:isolate;background:#101b2b!important;border-color:#cba65d!important;transition:filter .16s ease,transform .16s ease}
html:root[data-theme=autumn] #menu .menu-discover .discover-tile{background:#f4dfbd!important}
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover .discover-tile:before{content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;background-image:url('/themes/winter/seasonal-previews.webp');background-size:400% 300%;background-position:var(--scene-x) var(--scene-y)}
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover .discover-tile:after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(transparent 30%,#080e1cdd 64%,#080e1cf5)}
html:root[data-theme=autumn] #menu .menu-discover .discover-tile:after{background:linear-gradient(transparent 30%,#f8e8cced 64%,#efd8b6fa)}
html:root[data-theme=autumn] #menu .menu-discover{--scene-y:0%}
html:root[data-theme=halloween] #menu .menu-discover{--scene-y:50%}
html:root[data-theme=winter] #menu .menu-discover{--scene-y:100%}
html:root:is([data-theme=halloween],[data-theme=winter]) #menu .menu-discover .discover-tile :is(strong,small){color:#fff3da!important;text-shadow:0 1px 2px #000}
html:root[data-theme=winter] #menu .menu-discover .discover-tile{border-color:#cba65d!important}
html:root[data-theme=winter] #menu .menu-discover .discover-cards i{font-size:0!important;color:transparent!important;background-color:#fffdf1!important;background-image:var(--preview-card);background-size:contain;background-position:center;background-repeat:no-repeat;border-color:#b9cedd!important;border-radius:5px;box-shadow:0 3px 6px #0008}
html:root[data-theme=winter] #menu .menu-discover .discover-tile:hover{filter:brightness(1.055);transform:translateY(-1px)}
@media(prefers-reduced-motion:reduce){html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover .discover-tile{transition:none}html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover .discover-tile:hover{transform:none}}
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover [data-target="klondike"]{--scene-x:0.0%}
html:root[data-theme=winter] #menu .menu-discover [data-target="klondike"] .discover-cards i:nth-child(1){--preview-card:url("/cards/QH.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="klondike"] .discover-cards i:nth-child(2){--preview-card:url("/cards/AH.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="klondike"] .discover-cards i:nth-child(3){--preview-card:url("/cards/KS.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover [data-target="freecell"]{--scene-x:33.333333333333336%}
html:root[data-theme=winter] #menu .menu-discover [data-target="freecell"] .discover-cards i:nth-child(1){--preview-card:url("/cards/QH.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="freecell"] .discover-cards i:nth-child(2){--preview-card:url("/cards/8C.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="freecell"] .discover-cards i:nth-child(3){--preview-card:url("/cards/4D.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover [data-target="forty"]{--scene-x:66.66666666666667%}
html:root[data-theme=winter] #menu .menu-discover [data-target="forty"] .discover-cards i:nth-child(1){--preview-card:url("/cards/JD.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="forty"] .discover-cards i:nth-child(2){--preview-card:url("/cards/QS.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="forty"] .discover-cards i:nth-child(3){--preview-card:url("/cards/KH.webp")}
html:root:is([data-theme=autumn],[data-theme=halloween],[data-theme=winter]) #menu .menu-discover [data-target="double-klondike"]{--scene-x:100.0%}
html:root[data-theme=winter] #menu .menu-discover [data-target="double-klondike"] .discover-cards i:nth-child(1){--preview-card:url("/cards/KS.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="double-klondike"] .discover-cards i:nth-child(2){--preview-card:url("/cards/AS.webp")}
html:root[data-theme=winter] #menu .menu-discover [data-target="double-klondike"] .discover-cards i:nth-child(3){--preview-card:url("/cards/AH.webp")}
html:root[data-theme=winter] #menu .label{color:#f1f7ff!important}html:root[data-theme=winter] #menu nav:before{color:#f1f7ff!important}

/* Static backdrop is present before the first body paint. */
html:not([data-theme]) .theme-backdrop{display:none}html[data-theme=default] .theme-backdrop{display:none}
