.rai-scene-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:8;isolation:isolate;color:#eef6ff}
.rai-scene-text{position:absolute;transform:translate(-50%,-115%);max-width:min(30rem,60%);padding:.42rem .7rem;border:1px solid #658bb0;border-radius:.7rem;background:#0b1838e8;box-shadow:0 4px 16px #0009,0 0 12px #33669977;text-align:center;font:600 clamp(11px,1.2vw,15px)/1.35 system-ui;white-space:pre-wrap;overflow-wrap:anywhere;text-shadow:0 1px 3px #000}
.rai-scene-effect{position:absolute;width:3rem;height:3rem;transform:translate(-50%,-50%);border:2px solid #8bb8df;border-radius:50%;background:#33669955;box-shadow:0 0 18px #336699,0 0 38px #33669988}
.rai-scene-effect--pulse{animation:rai-scene-pulse 1.5s ease-out infinite}
.rai-scene-effect--sparks{border-style:dotted;animation:rai-scene-sparks 1.2s steps(4) infinite}
.rai-scene-effect--glow{background:#d9ebff66;box-shadow:0 0 24px #91c7f0,0 0 48px #336699}
.rai-scene-effect--still,.rai-scene-still .rai-scene-effect{animation:none}
@keyframes rai-scene-pulse{0%{opacity:.9;scale:.65}75%{opacity:.25;scale:1.35}100%{opacity:.1;scale:1.45}}
@keyframes rai-scene-sparks{0%{opacity:.2;rotate:0deg}50%{opacity:1;rotate:40deg}100%{opacity:.2;rotate:90deg}}
/* Precipitation is drawn in the existing game tick: CSS viewport-height loops removed. */
.rai-scene-precipitation{position:absolute;inset:0;width:100%;height:100%;display:none;pointer-events:none;z-index:1}
.rai-scene-layer[data-weather="RAIN"] .rai-scene-precipitation,.rai-scene-layer[data-weather="SNOW"] .rai-scene-precipitation{display:block}
.rai-scene-fog{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;background:radial-gradient(ellipse at var(--fog-x,50%) var(--fog-y,50%),#24374808 0px,#24374810 var(--fog-inner,65px),#243748 var(--fog-outer,240px))}
.rai-scene-fog--canvas{background:none;image-rendering:auto}
.rai-scene-fog[hidden],.rai-scene-precipitation[hidden]{display:none!important}
.rai-scene-text{z-index:3}
.rai-scene-effect{z-index:0}
.rai-scene-layer[data-weather="SUNSET"]{background:linear-gradient(#a7612420,#0000 45%)}
.rai-scene-layer[data-weather="NIGHT"]{background:#08162640}
.rai-scene-layer[data-weather="RAIN"]{background:#1b365424}
.rai-scene-layer[data-weather="SNOW"]{background:#d9ecff16}
.rai-scene-under-roof .rai-scene-precipitation{display:none!important}
.rai-scene-weather-paused .rai-scene-effect{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.rai-scene-layer *{animation:none!important}}

/* Never let precipitation, fog or storm light escape the game viewport. */
.rai-scene-layer{contain:paint;clip-path:inset(0);max-width:100%;max-height:100%}
