/* Site-wide Halloween atmosphere: violet wisps, a few amber embers, quiet silhouettes. */
.haunted-atmosphere{position:fixed;inset:0;overflow:hidden;z-index:25;pointer-events:none;user-select:none;contain:strict}
.haunted-atmosphere *{pointer-events:none}
.haunted-orb{position:absolute;left:var(--x);bottom:-20px;width:var(--size);height:var(--size);border-radius:50%;background:#d2a2ff;box-shadow:0 0 7px 2px #9b45e599,0 0 19px 5px #8c35db33;opacity:0;animation:haunted-rise var(--duration) var(--delay) linear infinite;will-change:auto}
.haunted-ember{background:#ffc17d;box-shadow:0 0 7px 2px #ed913b77,0 0 17px 5px #ec813022}
@keyframes haunted-rise{0%{transform:translate(0,0);opacity:0}8%{opacity:.55}40%{transform:translate3d(var(--sway),-42vh,0);opacity:.4}75%{opacity:.65}95%{opacity:.25}100%{transform:translate3d(calc(var(--sway)*-.4),calc(-100vh - 45px),0);opacity:0}}
.haunted-mist{position:absolute;inset:70% -20% -30%;background:radial-gradient(ellipse at 20% 65%,#a054e710,transparent 50%),radial-gradient(ellipse at 70% 60%,#bc76ff0d,transparent 45%);animation:none}
@keyframes haunted-mist{from{transform:translate3d(-4%,0,0)}to{transform:translate3d(4%,-5%,0)}}
.haunted-bat{position:absolute;width:48px;fill:#21112f;opacity:.3;animation:haunted-hover 11s ease-in-out infinite alternate}.haunted-bat-one{top:145px;left:4%;transform:rotate(-14deg)}.haunted-bat-two{top:210px;right:5%;width:32px;animation-delay:-6s;opacity:.25}
@keyframes haunted-hover{from{translate:0 0;rotate:-6deg}to{translate:12px -9px;rotate:5deg}}
.nav-centered{border-bottom-color:#bf82e94d;box-shadow:inset 0 1px #e7c8ff06,0 5px 28px #6c2ca229}.nav-centered:after{background:linear-gradient(90deg,transparent,#aa69d84d 20%,#d6a5ff80 45%,#e9a35b66 70%,transparent);box-shadow:0 1px 13px #a157e126}
@media(max-width:600px){.haunted-orb:nth-of-type(n+15){display:none}.haunted-bat-one{top:160px;width:32px}.haunted-bat-two{top:240px;width:24px}.haunted-orb{box-shadow:0 0 6px 1px #9b45e577}}
@media(prefers-reduced-motion:reduce){.haunted-orb,.haunted-mist,.haunted-bat{animation:none}.haunted-orb{display:none}.haunted-bat{opacity:.18}}
@media print{.haunted-atmosphere{display:none}}
/* Local image fields scroll with their artwork, behind the section content. */
.haunted-image-surface{position:relative;isolation:isolate}
.haunted-atmosphere{display:none}
.haunted-atmosphere.is-local{display:block;position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;contain:strict;mask-image:none;-webkit-mask-image:none}
.realm-hero-content,.realm-scroll,.realm-download> :not(.haunted-atmosphere),.play-page{position:relative;z-index:1}
.realm-hero .realm-scroll{position:absolute}
.realm-feature-art>span,.home-news-art> :not(.haunted-atmosphere),.news-visual> :not(.haunted-atmosphere){z-index:2}
.play-platform{background:linear-gradient(145deg,#1a1225,#100c17)}
.play-java{background:#110c18}
@keyframes haunted-rise{0%{transform:translate(0,0);opacity:0}8%{opacity:.55}40%{transform:translate(var(--sway),calc(var(--field-height)*-.42));opacity:.4}75%{opacity:.65}95%{opacity:.25}100%{transform:translate(calc(var(--sway)*-.4),calc(var(--field-height)*-1));opacity:0}}

.haunted-atmosphere.is-paused *{animation-play-state:paused!important}
/* Small static ornaments add a seasonal accent without more animation layers. */
.haunted-pumpkin{position:absolute;width:66px;height:auto;bottom:35px;opacity:.85}.haunted-pumpkin-left{left:2.5%;rotate:-9deg}.haunted-pumpkin-right{right:2.5%;width:48px;bottom:30px;rotate:12deg}.pumpkin-carving{stroke:#ffdf8c;stroke-width:.5}.haunted-web{position:absolute;top:0;width:135px;height:135px;color:#c7a0dd;opacity:.23}.haunted-web-left{left:0}.haunted-web-right{right:0;transform:scaleX(-1)}
body[data-page="play"] .haunted-pumpkin{bottom:60px}
@media(max-width:600px){.haunted-pumpkin{width:40px;bottom:18px}.haunted-pumpkin-right{width:32px;bottom:18px}.haunted-web{width:82px;height:82px;opacity:.18}body[data-page="play"] .haunted-pumpkin{bottom:25px}}
/* Fade artwork independently so navigation and controls remain immediately usable. */
@keyframes realm-artwork-arrive{from{opacity:0}to{opacity:1}}
@keyframes realm-backdrop-arrive{from{opacity:0}to{opacity:.88}}
body[data-page="play"] main:before,body[data-page="vote"] main:before{animation:realm-backdrop-arrive .85s ease-out both}
.realm-hero,.realm-download{background-image:none}
.realm-hero:after,.realm-download:after{content:'';position:absolute;inset:0;z-index:-2;background-position:center;background-size:cover;background-repeat:no-repeat;animation:realm-artwork-arrive .85s ease-out both;pointer-events:none}
.realm-hero:after{background-image:url('../img/catalyst-realm-hero.webp');background-position:center 46%}
.realm-download{position:relative;isolation:isolate;background:#0b0713}
.realm-download:after{background-image:linear-gradient(#0b0713a6,#0b0713ed),url('../img/catalyst-realm-gateway.webp');background-position:center 55%}
@media(max-width:850px){.realm-hero:after{background-position:48% center}}
@media(max-width:600px){.realm-hero:after{background-position:46% center}}
@media(prefers-reduced-motion:reduce){.realm-hero:after,.realm-download:after,body[data-page="play"] main:before,body[data-page="vote"] main:before{animation:none}}
