/* One vertical final descent. Finish the orientation correction in air;
   land exactly on the camera-matched original desk coordinates. */
.flight[data-motion][data-ending] .flight-object{animation-name:flight-setdown}
.flight[data-motion][data-ending] .flight-desk{animation-name:landing-studio}
.flight[data-motion][data-ending] .flight-contact{animation-name:landing-setdown-shadow}
@keyframes flight-setdown{
 0%,3%{transform:perspective(1300px) translate3d(var(--hero-leading,calc(var(--cab-w,400px)*-.07)),calc(var(--fall,200px)*-.85),0) rotate(var(--fall-roll,0deg)) rotateX(0) rotateY(0) scale(1.06)}
 15%{transform:perspective(1300px) translate3d(calc(var(--cab-w,400px)*-.09),calc(var(--fall,200px)*-.79),0) rotate(var(--fall-roll,0deg)) rotateX(-8deg) rotateY(-12deg) scale(.95)}
 28%{transform:perspective(1300px) translate3d(calc(var(--cab-w,400px)*-.19),calc(var(--assembly-drop,var(--drop-span,200px))*-1.05),0) rotate(var(--fall-roll,0deg)) rotateX(16deg) rotateY(12deg) scale(.78);animation-timing-function:cubic-bezier(.33,.30,.67,.80)}
 38%{transform:perspective(1300px) translate3d(calc(var(--cab-w,400px)*-.06),calc(var(--assembly-drop,var(--drop-span,200px))*-.95),0) rotate(var(--fall-roll,0deg)) rotateX(-3deg) rotateY(0) scale(.90);animation-timing-function:cubic-bezier(.34,.67,.66,1)}
 44%{transform:perspective(1300px) translate3d(0,calc(var(--assembly-drop,var(--drop-span,200px))*-.88),0) rotate(var(--fall-roll,0deg)) rotateX(0) rotateY(0) scale(.94)}
 51%{transform:perspective(1300px) translate3d(0,calc(var(--assembly-drop,var(--drop-span,200px))*-.81),0) rotate(var(--fall-roll,0deg)) rotateX(0) rotateY(0) scale(.94)}
 61%{transform:perspective(1300px) translate3d(0,calc(var(--assembly-drop,var(--drop-span,200px))*-.70),0) rotate(var(--fall-roll,0deg)) rotateX(0) rotateY(0) scale(.954);animation-timing-function:cubic-bezier(.35,.29,.64,.74)}
 72%{transform:perspective(1300px) translate3d(0,calc(var(--assembly-drop,var(--drop-span,200px))*-.57),0) rotate(var(--fall-roll,0deg)) rotateX(3deg) rotateY(-4deg) scale(.98);animation-timing-function:cubic-bezier(.36,.16,.70,.61)}
 82%{transform:perspective(1300px) translate3d(0,calc(var(--assembly-drop,var(--drop-span,200px))*-.32),0) rotate(var(--fall-roll,0deg)) rotateX(1deg) rotateY(-1deg) scale(1);animation-timing-function:cubic-bezier(.42,.28,.70,.58)}
 90%,100%{transform:perspective(1300px) translate3d(0,0,0) rotate(var(--fall-roll,0deg)) rotateX(0) rotateY(0) scale(1)}
}
/* Narrow the profile at its quarter turns on short screens without changing contact. */
.flight[data-motion][data-ending] .flight-object{scale:var(--fall-side-scale,1)}
@keyframes landing-studio{
 0%,65%{opacity:0}74%{opacity:.30}82%{opacity:.73}89.2%,100%{opacity:1}
}
/* Keep the original empty room opaque until the occupied plate covers it
   completely, leaving no exposure/brightness dip at the image handoff. */
.flight[data-motion][data-ending] .flight-room{animation-name:landing-room-hold}
@keyframes landing-room-hold{0%,92%{opacity:1}94%,100%{opacity:0}}
@keyframes landing-setdown-shadow{
 0%,77%{opacity:0}84%{opacity:.12}90%,92%{opacity:1}94%,100%{opacity:0}
}
@media(max-width:760px){
 .flight[data-ending] .flight-desk,.flight[data-motion][data-ending] .flight-set{
  transform-origin:var(--cab-x,50%) var(--cab-y,50%);
 }
 .flight[data-ending]{--hero-leading:0px;--assembly-drop:calc(var(--drop-span,165px) * .61)}
 .flight[data-ending] .flight-desk{scale:var(--phone-scale,1.48)}
 .flight[data-motion][data-ending] .flight-set{animation-name:flight-phone-pocket,flight-phone-framing}
 .flight[data-motion][data-ending] .flight-intro{top:43%}
 .flight[data-motion][data-ending] .flight-word{display:none}
}
@keyframes flight-phone-framing{
 0%,10%{scale:var(--phone-hero-scale,1.60);animation-timing-function:cubic-bezier(.42,0,.32,1)}
 23%{scale:1.24;animation-timing-function:cubic-bezier(.36,0,.46,1)}
 34%,54%{scale:1.12;animation-timing-function:cubic-bezier(.32,0,.54,1)}
 73.6%,100%{scale:var(--phone-scale,1.48)}
}

/* On the shortest phones give the settled cabinet a clear break above the
   listening panel. Room, separate contact shadow and speaker shift together. */
@media(max-width:760px) and (max-height:640px){
 .flight[data-motion][data-ending]{--park-raise:-30px}
 .flight[data-motion][data-ending] .flight-desk{translate:0 var(--park-raise)}
}
@media(min-width:350px) and (max-width:760px){ .flight[data-ending]{--hero-pocket-extra:22px} }
@keyframes flight-phone-pocket{
 0%,8%{translate:0 clamp(128px,calc(17svh + var(--hero-pocket-extra,0px)),180px);animation-timing-function:cubic-bezier(.38,0,.55,1)}
 /* Reframe before inspection; thereafter the same object transform owns
    the whole vertical path through separation, reseating and landing. */
 28%,100%{translate:0 var(--park-raise,0px)}
}

/* The desk light's cast shadow is photographic. This tiny, fixed-size gradient
   adds only the short occlusion pulse at the foot, no per-frame tracing/filter. */
.flight-impact{display:none}
.flight[data-motion][data-ending] .flight-impact{
 display:block;position:absolute;left:var(--shadow-x);top:var(--shadow-y);z-index:0;
 width:calc(var(--cab-w,400px)*.37);height:clamp(8px,calc(var(--cab-h,220px)*.073),20px);
 background:radial-gradient(ellipse closest-side,#080b12db 9%,#080b1250 59%,transparent);
 pointer-events:none;opacity:0;
 animation:landing-foot-occlusion 1s linear both paused
}
@supports (animation-timeline:view()) and (animation-range:contain 0% contain 100%){
 .flight[data-motion=native][data-ending] .flight-impact{animation-duration:auto;animation-play-state:running;animation-timeline:--flight;animation-range:contain 0% contain 100%}
}
@keyframes landing-foot-occlusion{
 0%,89.35%{opacity:0;transform:translate(-51%,-32%) rotate(9deg) scale(1.2,1)}
 90%{opacity:.52;transform:translate(-51%,-32%) rotate(9deg) scale(.8,.8)}
 92%,100%{opacity:0;transform:translate(-51%,-32%) rotate(9deg) scale(1,.9)}
}
.flight[data-motion][data-ending][data-break-ready] .flight-assembled{animation-name:flight-solid-contact}
.flight[data-motion][data-ending]:not([data-break-ready]) .flight-assembled{animation-name:flight-intact-contact}
.flight[data-motion][data-ending] .flight-desk-baked{animation-name:landing-baked-contact}
@keyframes flight-solid-contact{
 0%,15.5%{opacity:1;animation-timing-function:cubic-bezier(.4,0,.55,1)}
 23%,70.4%{opacity:0;animation-timing-function:cubic-bezier(.36,0,.63,1)}
 75.1%,94%{opacity:1}94.01%,100%{opacity:0}
}
@keyframes flight-intact-contact{0%,94%{opacity:1}94.01%,100%{opacity:0}}
@keyframes landing-baked-contact{0%,90%{opacity:0}94%,100%{opacity:1}}
