/* Translucent light only. Text retains its original, higher stacking layer. */
.scene-motion{--light:255,183,98;position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0;contain:paint}
.scene-motion span{position:absolute;display:block;pointer-events:none;animation-play-state:paused!important}
.scene-motion.is-running span{animation-play-state:running!important}
.scene-glow{inset:0;opacity:.22;background:radial-gradient(ellipse at 73% 42%,rgba(var(--light),.3),transparent 48%);mix-blend-mode:screen;animation:scene-breathe 7s ease-in-out infinite alternate}
.scene-haze{width:125%;height:45%;left:-15%;bottom:4%;opacity:.2;background:radial-gradient(ellipse at 35% 60%,rgba(var(--light),.2),transparent 62%),radial-gradient(ellipse at 75% 75%,rgba(var(--light),.22),transparent 55%);animation:scene-drift 23s ease-in-out infinite alternate}
.scene-mote{left:var(--x);top:var(--y);width:2px;height:2px;border-radius:50%;background:rgb(var(--light));box-shadow:0 0 7px rgba(var(--light),.7);opacity:0;animation:scene-rise var(--duration) linear var(--delay) infinite}
.scene-embers{--light:255,133,69}.scene-embers .scene-mote{height:4px;width:2px}.scene-embers .scene-glow{background:radial-gradient(ellipse at 55% 43%,#ff842e60,transparent 43%)}
.scene-water{--light:165,240,220}.scene-water .scene-haze{height:60%;opacity:.35;animation-duration:28s}.scene-water .scene-glow{background:radial-gradient(ellipse at 66% 76%,#c8fff938,transparent 38%);animation-duration:9s}
.scene-sunlight{--light:255,220,157}.scene-sunlight .scene-glow{background:linear-gradient(115deg,transparent 35%,#ffe8ac24 48%,transparent 57%);animation:scene-sun 19s ease-in-out infinite alternate}.scene-sunlight .scene-haze{bottom:30%;height:55%;animation-duration:32s}
.scene-city,.scene-final{--light:153,197,255}.scene-city .scene-mote,.scene-final .scene-mote{width:2px;height:6px;animation-name:scene-signal}.scene-city .scene-glow,.scene-final .scene-glow{background:radial-gradient(ellipse at 60% 46%,#82baff55,transparent 48%);animation-duration:8s}
.hero-art:after{z-index:1;pointer-events:none}.scene-portal{mask-image:linear-gradient(0deg,#000 0%,#000 35%,transparent 68%)}
/* The portrait itself remains still; only its surroundings move. */
.hero-art img{transform:none!important}
.closing .scene-motion{z-index:-1}.closing:before{z-index:0;pointer-events:none}.closing>p,.closing>h2,.closing>a{position:relative;z-index:1}
@keyframes scene-breathe{from{opacity:.12}to{opacity:.55}}
@keyframes scene-drift{from{transform:translate3d(-3%,0,0);opacity:.15}to{transform:translate3d(8%,-5%,0);opacity:.4}}
@keyframes scene-rise{0%{transform:translate3d(0,32px,0);opacity:0}20%{opacity:.6}75%{opacity:.35}100%{transform:translate3d(var(--drift),-90px,0);opacity:0}}
@keyframes scene-signal{0%,100%{opacity:0;transform:translateY(12px)}45%{opacity:.65}80%{transform:translateY(-22px);opacity:.15}}
@keyframes scene-sun{from{transform:translateX(-8%);opacity:.2}to{transform:translateX(7%);opacity:.5}}
@media(max-width:700px){.scene-mote:nth-child(n+9){display:none}.scene-motion{opacity:.75}.scene-haze{animation-duration:30s}.scene-portal{mask-image:linear-gradient(0deg,#000 0%,#000 28%,transparent 60%)}}
@media(prefers-reduced-motion:reduce){.scene-motion{display:none}}
.portal-light{position:absolute;display:block;pointer-events:none;overflow:visible;z-index:0;mix-blend-mode:screen}
.world-card .scene-motion,.world-card .portal-light{opacity:0;transition:opacity .3s ease}
.world-card .scene-motion.is-running,.world-card .portal-light.is-running{opacity:1}
.portal-arc{stroke-dasharray:1.8 .9 4.2 1.4 .4 2.1;stroke-linecap:round;animation:portal-circuit var(--flow-time) linear var(--flow-delay) infinite;animation-play-state:paused}
.portal-light.is-running .portal-arc,.portal-light.is-running .portal-spark{animation-play-state:running}
.portal-halo{stroke:var(--portal-color);stroke-width:9px;filter:blur(4px);opacity:.55;stroke-dasharray:4 2 8 3}
.portal-core{stroke:var(--portal-color);stroke-width:1.6px;opacity:.85;filter:drop-shadow(0 0 2px var(--portal-color))}
.portal-filament{stroke:#fff7df;stroke-width:.7px;opacity:.65;stroke-dasharray:.2 2 1.2 4 .4 1.8 2.1 3}
.portal-spark{stroke:var(--portal-color);stroke-width:1.2px;stroke-linecap:round;stroke-dasharray:.13 .87;opacity:0;animation:portal-spark-flight var(--spark-time) ease-out var(--spark-delay) infinite;animation-play-state:paused}
.portal-light-city .portal-halo{stroke-width:5px;opacity:.32;filter:blur(2px)}
.world-art .portal-light{transform:translate(var(--card-x,0px),var(--card-y,0px)) scale(1.025);transition:transform .6s ease-out}
.closing .portal-light{z-index:0}.closing:before{z-index:0}
@keyframes portal-circuit{from{stroke-dashoffset:0}to{stroke-dashoffset:-100}}
@keyframes portal-spark-flight{0%{stroke-dashoffset:.13;opacity:0}12%{opacity:.95}48%{opacity:.7}78%,100%{stroke-dashoffset:-.87;opacity:0}}
@media(max-width:700px){.portal-halo{stroke-width:6px;filter:blur(2px)}.portal-spark:nth-child(2n){display:none}.portal-spark{stroke-width:1px}}
@media(prefers-reduced-motion:reduce){.portal-light{display:none}}
