/* Winter Wonderland V23 — scoped to this theme only. */
html:has(body[data-elo-theme="winter-wonderland-v31"]){background:#172c43;}
body[data-elo-theme="winter-wonderland-v31"]{--elo-granite:#dce5ed;--elo-quartz:#f2f6fa;--elo-pine:#234a68;--elo-gold:#9bbbd4;--elo-border:#aabfce;--elo-muted:#425b70;background-color:#172c43;background-image:url("images/blue-grain.webp");}
body[data-elo-theme="winter-wonderland-v31"] > header.elo-site-header{background-color:#365a78;background-image:linear-gradient(90deg,#102c4b88,transparent 70%),url("images/frozen-lake.webp");background-size:cover;background-position:center 58%;}
body[data-elo-theme="winter-wonderland-v31"] > nav[aria-label="Main navigation"]{background:#10394d;border-bottom-color:#91b6d4;}
body[data-elo-theme="winter-wonderland-v31"] > main{position:relative;z-index:1;}
body[data-elo-theme="winter-wonderland-v31"] > main:not(:has(.elo-home)){background:#dce5ed!important;background-image:linear-gradient(145deg,#e7eef5,#c9d8e5)!important;border-color:#aabfce!important;color:#19394f;}
body[data-elo-theme="winter-wonderland-v31"] > main :is(.section,.form-card,.welcome,.gb-entry,.chat-create,.chat-log,.disc-side,.disc-search,.disc-compose,.elo-roster-panel,#voice-panel,#chat-log,.video-tile,.elo-collection-toolbar,.elo-tile,.elo-bottom){background:linear-gradient(145deg,#f4f8fb,#dce7ef)!important;border-color:#a7bccd!important;color:#203c54;}
body[data-elo-theme="winter-wonderland-v31"] > main :is(.section,.form-card,.welcome,.gb-entry,.chat-create,.chat-log,.disc-side,.disc-search,.disc-compose,.elo-roster-panel,.video-tile) :is(h2,h3,.help,.chat-small){color:#29485e!important;}
body[data-elo-theme="winter-wonderland-v31"] > main :is(a:not(.primary-link),.member-link){color:#245476;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-section-head :is(h2,p){color:#e2eff9;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-actions a{color:#fff;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-tile-icon{background:#c6dbea;color:#234a68;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-tile-action{color:#234a68;}
body[data-elo-theme="winter-wonderland-v31"] > main :is(.primary-link,button.primary,#chat-button,#voice-join),body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-actions a:not(.elo-secondary){background:#284f70!important;border-color:#456a87!important;color:white!important;}
body[data-elo-theme="winter-wonderland-v31"] > main :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea){background:#f6f9fc!important;border-color:#a1b6c8!important;color:#203c54!important;}
body[data-elo-theme="winter-wonderland-v31"] .elo-photo-frame{background:#edf4f9;border-color:#9db5c7;}
body[data-elo-theme="winter-wonderland-v31"] > footer{position:relative;z-index:1;color:#d6e5f1;}
/* Independent back, middle and front forest layers; all artwork fits inside the margin. */
body[data-elo-theme="winter-wonderland-v31"]::before,body[data-elo-theme="winter-wonderland-v31"]::after{content:"";position:fixed;bottom:0px;width:clamp(0px,calc((100vw - 1390px)/2 - 18px),310px);height:min(48vh,490px);pointer-events:none;z-index:0;background-repeat:no-repeat;}
body[data-elo-theme="winter-wonderland-v31"]::before{left:10px;background-image:url("images/forest-left.webp");background-size:100% auto;background-position:center bottom;}
body[data-elo-theme="winter-wonderland-v31"]::after{right:10px;background-image:url("images/snowman.webp"),url("images/forest-right.webp");background-size:65% auto,100% auto;background-position:58% bottom,center bottom;}
.elo-winter-snow{position:fixed;inset:0;pointer-events:none;z-index:2;overflow:hidden;}
.elo-winter-flake{position:absolute;top:-12px;left:var(--x);width:var(--s);height:var(--s);border-radius:50%;background:#f7fcff;opacity:var(--o);box-shadow:0 0 3px #e8f6ff88;animation:elo-winter-fall var(--d) linear var(--delay) infinite;}
@keyframes elo-winter-fall{0%{transform:translate(0,-12px)}50%{transform:translate(var(--drift),50vh)}100%{transform:translate(0,calc(100vh + 20px))}}
@media(max-width:1450px){body[data-elo-theme="winter-wonderland-v31"]::before,body[data-elo-theme="winter-wonderland-v31"]::after{display:none;}}
@media(max-width:600px){body[data-elo-theme="winter-wonderland-v31"] > header.elo-site-header{background-position:68% 55%;}}
@media(prefers-reduced-motion:reduce){.elo-winter-snow{display:none!important;}}
body[data-elo-theme="winter-wonderland-v31"] > header.elo-site-header{position:relative;isolation:isolate;overflow:hidden;}
body[data-elo-theme="winter-wonderland-v31"] > header.elo-site-header > :is(h1,p){position:relative;z-index:2;}
.elo-winter-skating-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:1;}
.elo-winter-skating-layer svg{position:absolute;overflow:visible;display:block;will-change:transform;transform-origin:50% 100%;}
@media(prefers-reduced-motion:reduce){.elo-winter-skating-layer{display:none!important;}}

.elo-winter-rock-mask{position:absolute;inset:0;pointer-events:none;z-index:2;}
.elo-winter-rock-mask[hidden]{display:none!important;}

/* Festive lights and icicles along the lower blue navigation border. */
body[data-elo-theme="winter-wonderland-v31"] nav[aria-label="Main navigation"]{position:relative;overflow:visible;z-index:4;}
.elo-festive-trim{position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;z-index:5;}
.elo-festive-trim::before{content:"";position:absolute;left:0;right:0;top:-1px;height:2px;background:#345568;box-shadow:0 1px 1px #b5d8ea80;}
.elo-festive-icicle{position:absolute;top:1px;width:var(--width);height:var(--length);background:linear-gradient(100deg,#c3e6f5aa 0%,#f6fcffed 42%,#77aaca9c 70%,#d6f3ff9c 100%);clip-path:polygon(0 0,100% 0,76% 40%,58% 82%,46% 100%,29% 62%);filter:drop-shadow(0 1px 1px #163951);}
.elo-festive-bulb{position:absolute;top:-1px;width:7px;height:10px;transform:translateX(-50%);border-radius:45% 45% 55% 55%;background:var(--bulb);box-shadow:0 0 6px var(--bulb),0 0 12px var(--bulb);animation:elo-festive-glow var(--duration) ease-in-out var(--delay) infinite alternate;}
.elo-festive-bulb::before{content:"";position:absolute;top:-3px;left:1px;right:1px;height:4px;background:#233d43;border-radius:1px;}
@keyframes elo-festive-glow{0%,20%{opacity:.45;filter:brightness(.85)}65%,100%{opacity:1;filter:brightness(1.15)}}
body[data-elo-animations="false"] .elo-festive-bulb{animation:none;}
@media(prefers-reduced-motion:reduce){.elo-festive-bulb{animation:none!important;}}
@media(max-width:600px){.elo-festive-icicle{height:calc(var(--length)*.7)}.elo-festive-bulb{width:5px;height:8px}}

.elo-winter-parallax-snow{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;display:block;}
@media(prefers-reduced-motion:reduce){.elo-winter-parallax-snow{display:none!important;}}

.elo-ice-fishing{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;}
@media(prefers-reduced-motion:reduce){.elo-ice-fishing{display:none!important;}}

.elo-winter-snowbanks{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;display:block;}
@media(prefers-reduced-motion:reduce){.elo-winter-snowbanks{display:none!important;}}

/* Ground depth: distant forest, accumulating bank, foreground trees and snowman, local drifts. */
body[data-elo-theme="winter-wonderland-v31"]:has(.elo-winter-ground)::before,
body[data-elo-theme="winter-wonderland-v31"]:has(.elo-winter-ground)::after{display:none;}
.elo-winter-ground{position:fixed;inset:0;pointer-events:none;z-index:0;isolation:isolate;overflow:hidden;--ground-margin:clamp(0px,calc((100vw - 1390px)/2 - 18px),310px);}
.elo-winter-ground::before,.elo-winter-ground::after{content:"";position:absolute;bottom:0px;width:var(--ground-margin);height:min(48vh,490px);background-repeat:no-repeat;background-size:100% auto;background-position:center bottom;z-index:0;}
.elo-winter-ground::before{left:10px;background-image:url("images/forest-left.webp");}
.elo-winter-ground::after{right:10px;background-image:url("images/forest-right.webp");}
.elo-winter-ground .elo-winter-snowbanks{position:absolute;z-index:1;}
.elo-winter-ground-foreground{position:absolute;inset:0;z-index:2;}
.elo-winter-front-tree,.elo-winter-ground-snowman{position:absolute;background-repeat:no-repeat;background-position:center bottom;background-size:contain;}
.elo-winter-front-tree{width:calc(var(--ground-margin)*.64);height:min(40vh,420px);bottom:0;background-image:url("images/front-pine.webp");}
.elo-winter-front-tree.left{left:calc(10px + var(--ground-margin)*.04);}
.elo-winter-front-tree.right{right:calc(10px - var(--ground-margin)*.12);width:calc(var(--ground-margin)*.52);height:min(33vh,360px);}
.elo-winter-ground-snowman{right:calc(10px + var(--ground-margin)*.15);bottom:0px;width:calc(var(--ground-margin)*.65);height:min(40vh,400px);background-image:url("images/snowman.webp");}
.elo-winter-front-banks{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;}
@media(max-width:1450px){.elo-winter-ground::before,.elo-winter-ground::after,.elo-winter-ground-foreground{display:none;}}

.elo-winter-branch-snow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;}

/* Spaced individual spruces, with measured branch geometry. */
.elo-winter-ground::before,.elo-winter-ground::after{display:none;}
.elo-winter-front-tree{background-image:url("images/detailed-pine.webp");width:calc(var(--ground-margin)*.47);height:min(39vh,400px);}
.elo-winter-front-tree.left{left:12px;}
.elo-winter-front-tree.left.rear{left:calc(12px + var(--ground-margin)*.48);width:calc(var(--ground-margin)*.42);height:min(32vh,340px);}
.elo-winter-front-tree.right{right:8px;width:calc(var(--ground-margin)*.42);height:min(36vh,380px);}
.elo-winter-front-tree.right.rear{right:calc(12px + var(--ground-margin)*.55);width:calc(var(--ground-margin)*.42);height:min(40vh,410px);}
.elo-winter-ground-snowman{right:calc(12px + var(--ground-margin)*.20);}
.elo-scarf{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:min(100%, calc(min(40vh,400px)*400/501));height:auto;overflow:visible;pointer-events:none;}

/* Broader, larger spruces with room between trunks. */
.elo-winter-front-tree.left{left:2px;width:calc(var(--ground-margin)*.55);height:min(44vh,440px);}
.elo-winter-front-tree.left.rear{left:calc(var(--ground-margin)*.57);width:calc(var(--ground-margin)*.48);height:min(36vh,380px);}
.elo-winter-front-tree.right{right:0;width:calc(var(--ground-margin)*.50);height:min(41vh,420px);}
.elo-winter-front-tree.right.rear{right:calc(var(--ground-margin)*.59);width:calc(var(--ground-margin)*.52);height:min(44vh,450px);}

/* Mature, individually spaced spruce trees. */
.elo-winter-front-tree.left,.elo-winter-front-tree.right{background-image:url("images/real-spruce-0.webp");width:calc(var(--ground-margin)*.95);height:min(67vh,650px);}
.elo-winter-front-tree.left{left:-18px;}
.elo-winter-front-tree.right{right:-28px;}
.elo-winter-front-tree.left.rear,.elo-winter-front-tree.right.rear{background-image:url("images/real-spruce-1.webp");width:calc(var(--ground-margin)*.76);height:min(55vh,540px);filter:brightness(.82);}
.elo-winter-front-tree.left.rear{left:calc(var(--ground-margin)*.56);}
.elo-winter-front-tree.right.rear{right:calc(var(--ground-margin)*.56);}
.elo-winter-ground-snowman{width:calc(var(--ground-margin)*.52);z-index:2;}

/* Extra forest depth: retain V21 mature trees exactly; distant rows sit behind the snowbank. */
.elo-winter-depth-forest{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;}
.elo-winter-depth-tree{position:absolute;bottom:0;width:calc(var(--ground-margin)*var(--size));height:min(var(--height),var(--cap));background:url("images/real-spruce-0.webp") center bottom/contain no-repeat;filter:brightness(var(--light)) saturate(var(--sat));opacity:var(--alpha);}
.elo-winter-depth-tree.left{left:calc(var(--ground-margin)*var(--offset));}
.elo-winter-depth-tree.right{right:calc(var(--ground-margin)*var(--offset));}
.elo-winter-depth-tree.depth-0{--offset:-.24;--size:.68;--height:47vh;--cap:410px;--light:.68;--sat:.55;--alpha:.55;}
.elo-winter-depth-tree.depth-1{--offset:.36;--size:.60;--height:39vh;--cap:350px;--light:.72;--sat:.52;--alpha:.58;background-image:url("images/real-spruce-1.webp");}
.elo-winter-depth-tree.depth-2{--offset:.88;--size:.59;--height:35vh;--cap:320px;--light:.68;--sat:.55;--alpha:.58;}
.elo-winter-depth-tree.depth-3{--offset:.12;--size:.70;--height:52vh;--cap:460px;--light:.87;--sat:.72;--alpha:.79;background-image:url("images/real-spruce-1.webp");}
.elo-winter-depth-tree.depth-4{--offset:.72;--size:.73;--height:46vh;--cap:430px;--light:.82;--sat:.72;--alpha:.80;}
.elo-winter-depth-tree.right.depth-0{--offset:-.13;--height:42vh;}
.elo-winter-depth-tree.right.depth-1{--offset:.46;--height:43vh;}
.elo-winter-depth-tree.right.depth-3{--offset:.25;--height:47vh;}
.elo-winter-depth-tree.right.depth-4{--offset:.86;--height:49vh;}
@media(max-width:1450px){.elo-winter-depth-forest{display:none;}}

/* Environmental lighting only: content, navigation and hero artwork retain their colours. */
body[data-elo-theme="winter-wonderland-v31"]{isolation:isolate;}
.elo-winter-sky{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;background:linear-gradient(180deg,var(--sky-top,#0a1524),var(--sky-mid,#101f2f) 55%,var(--sky-low,#1c2f40));}
.elo-winter-sky::after{content:"";position:absolute;inset:0;background:url("images/blue-grain.webp");mix-blend-mode:soft-light;opacity:.20;}
.elo-winter-celestial{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-ground{filter:brightness(var(--sky-bright,1)) sepia(var(--sky-warm,0));}
body[data-elo-theme="winter-wonderland-v31"][data-sky-day="true"] .elo-home .elo-section-head :is(h2,p),body[data-elo-theme="winter-wonderland-v31"][data-sky-day="true"] > footer{color:#142f43;}
body[data-elo-theme="winter-wonderland-v31"] .elo-festive-bulb{box-shadow:0 0 var(--sky-glow,6px) var(--bulb),0 0 calc(var(--sky-glow,6px)*2) var(--bulb);}
.elo-sky-settings{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;margin:10px 0;border:1px solid #aabfce;border-radius:6px;background:#edf4f9;color:#19394f;font-size:.85rem;}
.elo-sky-settings select{max-width:100%;}

/* Snowman: independent arms below the original body and animated scarf. */
.elo-waving-snowman{background-image:none;}
.elo-waving-snowman::before,.elo-snowman-arms{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:min(100%, calc(min(40vh,400px)*400/501));aspect-ratio:400/501;height:auto;pointer-events:none;}
.elo-waving-snowman::before{content:"";background:url("images/snowman-body.webp") center bottom/contain no-repeat;z-index:1;}
.elo-snowman-arms{z-index:0;overflow:visible;}
.elo-waving-snowman .elo-scarf{z-index:2;}
.elo-snowman-wave-button{position:absolute;z-index:3;bottom:0;left:22%;width:56%;height:min(calc(var(--ground-margin)*.52*1.1), 350px);border:0;background:transparent;pointer-events:auto;cursor:pointer;padding:0;box-shadow:none;}
.elo-snowman-wave-button:hover{background:transparent;}
.elo-snowman-wave-button:focus-visible{outline:2px dashed #90b9d4;outline-offset:2px;}

/* V25: reveal the living sky behind the welcome copy; winter theme only. */
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-hero {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  aspect-ratio: auto !important;
  min-height: 0 !important;
  padding: clamp(24px,4vw,52px) 16px;
  justify-content: center;
  text-align: center;
  overflow: visible;
}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-hero-copy {
  width: 100%; max-width: 720px;
  color: #f4f8fc;
  text-shadow: 0 1px 3px #102438, 0 0 12px #10243880;
}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-hero :is(h2,p,.elo-eyebrow) {color: inherit;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-hero p {max-width: 620px; margin-inline: auto;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-actions {justify-content: center;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-actions a {text-shadow: none;}
body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-actions a.elo-secondary {background: #173a54e8; color: #fff; border-color: #a8c5dc;}
body[data-elo-theme="winter-wonderland-v31"][data-sky-day="true"] .elo-home .elo-hero-copy {color: #102f45; text-shadow: 0 1px 2px #f0f7ff80;}
@media(max-width:560px){body[data-elo-theme="winter-wonderland-v31"] .elo-home .elo-hero {padding: 28px 12px;}}

/* Snowman performance: independent actor and detachable hat. */
.elo-snowman-travel-stage{position:fixed;inset:0;z-index:3;pointer-events:none;overflow:hidden;--ground-margin:clamp(0px,calc((100vw - 1390px)/2 - 18px),310px);filter:brightness(var(--sky-bright,1)) sepia(var(--sky-warm,0));}
.elo-waving-snowman::before{display:none;}
.elo-snowman-actor{position:absolute;inset:0;transform-origin:50% 100%;pointer-events:none;}
.elo-snowman-actor::before,.elo-snowman-hat{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:min(100%, calc(min(40vh,400px)*400/501));aspect-ratio:400/501;height:auto;pointer-events:none;}
.elo-snowman-actor::before{content:"";background:url("images/snowman-body.webp") center bottom/contain no-repeat;z-index:1;}
.elo-snowman-nohat .elo-snowman-actor::before{background-image:url("images/snowman-hatless.webp");}
.elo-snowman-hat{background:url("images/snowman-hat.webp") center bottom/contain no-repeat;z-index:3;visibility:hidden;transform-origin:50% 16%;}
.elo-snowman-performing .elo-snowman-wave-button{pointer-events:none;}
@media(max-width:1450px){.elo-snowman-travel-stage{display:none;}}

/* Side profile uses full-sized snowballs rather than a horizontal squash. */
.elo-snowman-profile .elo-snowman-actor::before{background-image:url("images/snowman-profile.webp");}
/* Profile-specific limbs: one behind the body and one on the visible side. */
.elo-profile-near-arm{display:none;position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:min(100%, calc(min(40vh,400px)*400/501));aspect-ratio:400/501;height:auto;pointer-events:none;overflow:visible;}
.elo-snowman-profile .elo-snowman-arms{display:none;}

.elo-snowman-profile .elo-profile-near-arm{display:block;z-index:2;}

.elo-snowman-actor{transform-origin:50% 100%;}

/* Keep front-facing arms hidden throughout the entire profile sequence. */
.elo-snowman-profile .elo-snowman-actor > .elo-snowman-arms{display:none !important;}
.elo-snowman-profile .elo-snowman-actor > .elo-profile-near-arm{display:block;z-index:2;}

/* V31: shared night illumination, applied only to decorative layers. */
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-ground,
body[data-elo-theme="winter-wonderland-v31"] .elo-snowman-travel-stage{filter:brightness(calc(var(--sky-bright,1) * var(--night-ground,1))) sepia(var(--sky-warm,0));}
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-depth-forest{filter:brightness(var(--night-tree,1));}
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-front-tree{filter:brightness(var(--night-tree,1));}
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-front-tree.rear{filter:brightness(calc(.82 * var(--night-tree,1)));}
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-branch-snow{filter:brightness(var(--night-branch,1));}
body[data-elo-theme="winter-wonderland-v31"] .elo-winter-parallax-snow{filter:brightness(var(--night-snow,1));}
/* Overlay the frozen lake AND its animated characters, not the header text. */
body[data-elo-theme="winter-wonderland-v31"] > header.elo-site-header::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;background:rgba(0,5,17,var(--night-header,0));}
body[data-elo-theme="winter-wonderland-v31"] > header.elo-site-header > :is(h1,p){z-index:3;}
/* Keep the footer legible even when a pale snowbank rises behind it. */
body[data-elo-theme="winter-wonderland-v31"] > footer{position:relative;z-index:1;}
