/* v1.0.2: Classroom movement director. Images keep their original ratio;
   only the artwork inside the rig is animated, never the camera scale. */
.scene-backdrop .world-plane {
  transition-duration:var(--travel-duration, 2200ms)!important;
  transition-timing-function:cubic-bezier(.33,.0,.2,1)!important;
}
.scene-backdrop .world-plane .world-actor {
  transition-duration:var(--travel-duration, 2200ms)!important;
  transition-timing-function:cubic-bezier(.33,.0,.2,1)!important;
}
/* Rig feet and shadow must remain on the ground even while the character bobs. */
.scene-backdrop .world-plane .world-mei-rig,
.scene-backdrop .world-plane .world-abby-rig,
.scene-backdrop .world-plane .world-luma-rig { isolation:isolate; }
.world-mei-rig::before,.world-abby-rig::before {
 content:'';position:absolute;left:18%;bottom:0;width:69%;height:7%;z-index:-1;
 border-radius:50%;background:#061326ab;filter:blur(4px);opacity:.76;
 transform-origin:center center;
}
.world[data-mei-pose="walk"] .world-mei-rig::before,
.world.world-just-traveled .world-mei-rig::before {
 animation:v102TravelShadow .52s ease-in-out infinite alternate;
}
.world[data-abby-pose="walk"] .world-abby-rig::before,
.world.world-just-traveled .world-abby-rig::before {
 animation:v102TravelShadow .43s ease-in-out infinite alternate;
}
@keyframes v102TravelShadow{to{opacity:.42;transform:scaleX(.79)}}
/* Character animations favor small recognizable motions over rubbery stretching. */
.world.world-just-traveled .world-mei-rig .actor-mei-art{
 animation:v102Walk .49s ease-in-out infinite alternate!important;
}
.world.world-just-traveled .world-abby-rig .actor-abby-art{
 animation:v102CatTrot .43s ease-in-out infinite alternate!important;
}
.world.world-just-traveled .world-luma-rig .actor-luma-art{
 animation:v102FairyGuide 1.05s ease-in-out infinite alternate!important;
}
@keyframes v102Walk{
 from{transform:translateY(0) rotate(-1.4deg)}
 to{transform:translateY(-4px) rotate(1.4deg)}
}
@keyframes v102CatTrot{
 from{transform:translate(0,1px) rotate(-2deg)}
 to{transform:translate(2px,-4px) rotate(2deg)}
}
@keyframes v102FairyGuide{
 from{transform:translate(0,0) rotate(-3deg)}
 to{transform:translate(5px,-7px) rotate(5deg)}
}
/* Position the landing anchor at its final location; leap artwork moves from
   the previous side of the bridge. Do not ALSO transition the rig position. */
.world.abby-await-leap .world-abby-rig{
 transition:none!important;
}
.world.abby-await-leap:not(.spell-acting) .world-abby-rig .actor-abby-art{
 transform:translateX(calc(-280 * var(--scene-unit,1px)))!important;
 animation:none!important;
}
.world.abby-await-leap.spell-acting[data-action="leap"] .world-abby-rig .actor-abby-art{
 animation:v102BridgeLeap 1750ms cubic-bezier(.2,.62,.31,1) 1 both!important;
}
@keyframes v102BridgeLeap{
 0% {transform:translateX(calc(-280 * var(--scene-unit,1px))) translateY(0) rotate(-8deg)}
 14% {transform:translateX(calc(-280 * var(--scene-unit,1px))) translateY(9%) rotate(-13deg)}
 25% {transform:translateX(calc(-243 * var(--scene-unit,1px))) translateY(-34%) rotate(-4deg)}
 49% {transform:translateX(calc(-144 * var(--scene-unit,1px))) translateY(-92%) rotate(5deg)}
 72% {transform:translateX(calc(-56 * var(--scene-unit,1px))) translateY(-51%) rotate(2deg)}
 89% {transform:translateX(calc(-9 * var(--scene-unit,1px))) translateY(4%) rotate(3deg)}
 100% {transform:translate(0,0) rotate(0)}
}
.world.abby-await-leap.spell-acting .world-abby-rig::before{
 animation:v102LeapShadow 1750ms ease-in-out 1 both;
}
@keyframes v102LeapShadow{
 0%{transform:translateX(calc(-280 * var(--scene-unit,1px))) scale(1);opacity:.72}
 49%{transform:translateX(calc(-144 * var(--scene-unit,1px))) scale(.47);opacity:.27}
 100%{transform:translateX(0) scale(1);opacity:.76}
}
/* Cast, pickup and celebration give localized non-essential feedback. */
.world.spell-acting[data-action="carry-lantern"] .world-mei-rig .actor-cast-glow,
.world.spell-acting[data-action="carry-flower"] .world-mei-rig .actor-cast-glow{
 animation:v102PickupFlash 900ms ease-out 1 both;
}
@keyframes v102PickupFlash{
 0%{transform:scale(.2);opacity:0}
 45%{transform:scale(1.25);opacity:.92}
 100%{transform:scale(1.9);opacity:0}
}
.world.spell-acting[data-action="open"] .world-luma-rig .actor-luma-art,
.world.spell-acting[data-action="cast"] .world-luma-rig .actor-luma-art{
 animation:v102FairyCast .46s ease-in-out 3 alternate!important;
}
@keyframes v102FairyCast{
 to{transform:translate(9px,-12px) rotate(10deg);filter:drop-shadow(0 0 14px #ffe89d)}
}
.world[data-mei-frame="celebrate"] .world-mei-rig .actor-mei-art{
 animation:v102Celebrate .55s ease-in-out 2 alternate!important;
}
@keyframes v102Celebrate{to{transform:translateY(-8%) rotate(5deg)}}
/* Keep movement and particles off when users explicitly request less motion. */
body.reduce-motion .world .world-actor,
body.reduce-motion .world .actor-art,
body.reduce-motion .world .world-mei-rig::before,
body.reduce-motion .world .world-abby-rig::before {
 animation:none!important;transition:none!important;transform:none!important;
}
@media(prefers-reduced-motion:reduce){
 .world .world-actor,.world .actor-art,
 .world .world-mei-rig::before,.world .world-abby-rig::before{
  animation:none!important;transition:none!important;transform:none!important;
 }
}

/* Reduced motion must keep the camera at its current world stop. */
body.reduce-motion .world .world-plane{transition:none!important;animation:none!important}
@media(prefers-reduced-motion:reduce){.world .world-plane{transition:none!important;animation:none!important}}
/* Keep Abby visibly grounded after the crossing instead of leaving the original
   airborne-looking art in the exact jump-end frame. A dedicated sitting/landing
   drawing remains the recommended art upgrade. */
.world[data-abby-pose="land"]:not(.spell-acting):not(.world-just-traveled) .world-abby-rig .actor-abby-art{
  animation:v102CatSettle .6s ease-out 1 both!important;
}
@keyframes v102CatSettle{
 from{transform:translateY(0) rotate(1deg)}
 to{transform:translateY(8%) rotate(0)}
}
.world.abby-await-leap.spell-acting[data-action="leap"] .world-abby-rig::after{
 content:'';position:absolute;left:14%;bottom:-1%;width:65%;height:16%;
 border:2px solid #d6eac5;border-radius:50%;opacity:0;pointer-events:none;
 animation:v102LandingPulse 1750ms ease-out both;
}
@keyframes v102LandingPulse{
 0%,84%{opacity:0;transform:scale(.45)}
 92%{opacity:.74;transform:scale(.85)}
 100%{opacity:0;transform:scale(1.55)}
}
body.reduce-motion .world .world-abby-rig::after{animation:none!important}
@media(prefers-reduced-motion:reduce){.world .world-abby-rig::after{animation:none!important}}
