/* Spellbound Relics v1.0: artwork keeps natural proportions. The world plane
   and every rig share the existing 4000-unit map. No stretched sprite sheets. */
.scene-backdrop .world-plane .world-backdrop{
 object-fit:cover!important;object-position:center center!important;
 image-rendering:auto;
}
/* Stage-height ratios: Mei .56, Abby .38, Luma .32, lantern .18,
   bridge .72, gate .85. These ratios are deliberate and audited. */
.scene-backdrop .world-plane .world-mei-rig{
 height:56%!important;aspect-ratio:362 / 537;width:auto!important;z-index:6;
}
.scene-backdrop .world-plane .world-abby-rig{
 height:32%!important;aspect-ratio:374 / 380;width:auto!important;z-index:7;
}
.scene-backdrop .world-plane .world-luma-rig{
 height:26%!important;aspect-ratio:403 / 511;width:auto!important;z-index:9;
}
.scene-backdrop .world-plane .world-lantern-ground{
 height:18%!important;aspect-ratio:269 / 381;width:auto!important;z-index:5;
 opacity:1;transition:opacity .3s,filter .3s;
}
.world[data-lantern-held="true"] .world-lantern-ground{opacity:0!important}
.scene-backdrop .world-plane .world-mei-rig .actor-art,
.scene-backdrop .world-plane .world-abby-rig .actor-art,
.scene-backdrop .world-plane .world-luma-rig .actor-art{
 display:block;position:absolute;inset:0;width:100%;height:100%;
 object-fit:contain!important;max-width:none!important;
 transform-origin:center bottom;filter:drop-shadow(0 4px 4px #050d22a8);
}
.scene-backdrop .world-plane .world-mei-rig .actor-prop{
 position:absolute;display:block;width:auto;height:auto;object-fit:contain!important;
 max-width:none!important;pointer-events:none;z-index:10;transform-origin:50% 15%;
}
.scene-backdrop .world-plane .world-mei-rig .hand-lantern{
 height:32%;left:71%;top:52%;opacity:0;filter:drop-shadow(0 0 3px #ffd575);
}
.world[data-lantern-held="true"] .hand-lantern{opacity:1!important}
.world[data-lantern-lit="true"] .hand-lantern{filter:brightness(1.35) drop-shadow(0 0 13px #ffe19c)!important;animation:lanternHandPulse 2.3s ease-in-out infinite alternate}
.scene-backdrop .world-plane .world-mei-rig .hand-flower{
 height:20%;left:76%;top:51%;opacity:0;filter:drop-shadow(0 0 6px #efbad5);
}
.world[data-flower-carried="true"] .hand-flower{opacity:1!important}
.world[data-flower-glowing="true"] .hand-flower{filter:brightness(1.4) drop-shadow(0 0 12px #ffc1f3)!important}
.actor-cast-glow{
 position:absolute;left:61%;top:42%;width:35%;aspect-ratio:1;
 background:radial-gradient(circle,#ffeec0a9,transparent 65%);
 pointer-events:none;opacity:0;
}
.world[data-mei-pose="idle"] .actor-mei-art{animation:meiIdle 3.5s ease-in-out infinite alternate}
.world[data-mei-pose="walk"] .actor-mei-art{animation:meiWalk .46s ease-in-out infinite alternate}
.world[data-mei-pose="carry"] .actor-mei-art{animation:meiCarry 2.3s ease-in-out infinite alternate}
.world[data-abby-pose="idle"] .actor-abby-art{animation:abbyIdle 3.2s ease-in-out infinite alternate}
.world[data-abby-pose="walk"] .actor-abby-art{animation:abbyWalk .42s ease-in-out infinite alternate}
.world[data-abby-pose="land"] .actor-abby-art{animation:abbyLand 2.4s ease-in-out infinite alternate}
.world[data-luma-pose="hover"] .actor-luma-art{animation:lumaFloat 2.4s ease-in-out infinite alternate}
.world[data-luma-pose="guide"] .actor-luma-art{animation:lumaGuide .8s ease-in-out infinite alternate}
.world.spell-acting[data-action="carry-lantern"] .actor-mei-art,
.world.spell-acting[data-action="carry-flower"] .actor-mei-art{animation:meiReach 1.1s ease-in-out 1!important}
.world.spell-acting[data-action="leap"] .actor-abby-art{animation:abbyLeap 1.65s cubic-bezier(.2,.7,.3,1) 1 both!important}
.world.spell-acting[data-action="open"] .actor-mei-art,
.world.spell-acting[data-action="cast"] .actor-mei-art{animation:meiCast .95s ease-in-out 1!important}
.world.spell-acting[data-action="open"] .actor-luma-art,
.world.spell-acting[data-action="cast"] .actor-luma-art{animation:lumaGuide .6s ease-in-out 3!important}
.world.spell-acting[data-action="open"] .actor-cast-glow,
.world.spell-acting[data-action="cast"] .actor-cast-glow{animation:castGlow 1.1s ease-out 1}
@keyframes meiIdle{to{transform:translateY(-2px) rotate(-.7deg)}}
@keyframes meiWalk{to{transform:translateY(-5px) rotate(2deg)}}
@keyframes meiCarry{to{transform:translateY(-2px) rotate(.7deg)}}
@keyframes meiReach{0%,100%{transform:translate(0,0) rotate(0)}40%{transform:translate(4%,-3%) rotate(-8deg)}65%{transform:translate(3%,-2%) rotate(-4deg)}}
@keyframes meiCast{0%,100%{transform:rotate(0)}45%{transform:translateY(-3%) rotate(-12deg)}}
@keyframes abbyIdle{to{transform:translateY(-2px) rotate(.9deg)}}
@keyframes abbyWalk{to{transform:translateY(-4px) rotate(-2deg)}}
@keyframes abbyLand{from{transform:scaleY(.97)}to{transform:scaleY(1)}}
@keyframes abbyLeap{
 0%{transform:translateX(calc(-405 * var(--scene-unit,1px))) translateY(0) scaleY(.8) rotate(-10deg)}
 16%{transform:translateX(calc(-346 * var(--scene-unit,1px))) translateY(0) scaleY(.85) rotate(-10deg)}
 53%{transform:translateX(calc(-183 * var(--scene-unit,1px))) translateY(-85%) rotate(5deg)}
 81%{transform:translateX(calc(-52 * var(--scene-unit,1px))) translateY(-22%) rotate(3deg)}
 100%{transform:translateX(0) translateY(0) scaleY(1) rotate(0)}
}
@keyframes lumaFloat{to{transform:translate(2px,-6px) rotate(3deg)}}
@keyframes lumaGuide{to{transform:translate(8px,-8px) rotate(-7deg)}}
@keyframes castGlow{35%{opacity:1;transform:scale(1.7)}100%{opacity:0;transform:scale(2.2)}}
@keyframes lanternHandPulse{to{filter:brightness(1.55) drop-shadow(0 0 17px #ffe0a0)}}
/* Ground landmarks are sized to their own source aspect ratios. */
.world-plane .world-bridge{height:72%!important;aspect-ratio:1000/667!important;top:23%!important;z-index:4}
.world-plane .world-bridge>img{object-fit:contain!important;width:100%;height:100%}
.world-plane .world-gate{height:86%!important;top:9%!important}
/* Animations do not overwrite the scene camera's transition. */
.world.world-just-traveled .world-mei-rig .actor-mei-art{animation:meiWalk .46s ease-in-out infinite alternate}
.world.world-just-traveled .world-abby-rig .actor-abby-art{animation:abbyWalk .42s ease-in-out infinite alternate}
/* WCAG motion preference: explicit visual world states remain, movement stops. */
body.reduce-motion .world .actor-art,
body.reduce-motion .world .actor-prop,
body.reduce-motion .world .actor-cast-glow{animation:none!important;transition:none!important;transform:none!important}
@media(prefers-reduced-motion:reduce){
 .world .actor-art,.world .actor-prop,.world .actor-cast-glow{animation:none!important;transition:none!important;transform:none!important}
}
@media(max-width:720px){
 .scene-backdrop .world-plane .world-mei-rig{height:54%!important}
 .scene-backdrop .world-plane .world-abby-rig{height:31%!important}
 .scene-backdrop .world-plane .world-luma-rig{height:24%!important}
 .scene-backdrop .world-plane .world-lantern-ground{height:18%!important}
 .world-plane .world-bridge{height:67%!important}
 .world-plane .world-gate{height:82%!important}
}

/* Riverbank and bridge landings: low-contrast ground layers under actors;
   they do not cover the scenery or alter gameplay object locations. */
.world-shore{position:absolute;z-index:3;bottom:-2%;height:10%;pointer-events:none;
 background:linear-gradient(180deg,transparent 0%,#60647c79 20%,#283344e0 65%,#121f30ed 100%);
 border-top:2px solid #b4a6a26b;border-radius:52% 48% 0 0/56% 56% 0 0;
 box-shadow:0 -3px 14px #1b365238;opacity:.78;
}
.world-shore-river{left:7.0%;width:15.5%;}
.world-shore-bridge{left:54.0%;width:13.5%;opacity:.42;}

/* Preserve recognizability on phones; mobile is intentionally scrollable. */
@media(max-width:720px){.world{height:clamp(205px,54vw,245px)!important;aspect-ratio:auto!important}}
