/* Keep the existing device slot and individual feature surfaces. The 3D
   shell has its own small canvas so inactive scenes don't render. */
.feature-phone-device.feature-real-ready{
 transform:translate3d(var(--feature-entry-x,0px),var(--feature-entry-y,0px),0)!important;
 transition:none!important;
 opacity:var(--feature-device-opacity,0);
}
.feature-phone-device.feature-real-ready .feature-phone-frame{display:none!important}
.feature-real-phone-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;display:block}
.feature-phone-device.feature-real-ready>.feature-animation-surface,
.feature-phone-device.feature-real-ready>.feature-phone-status,
.feature-phone-device.feature-real-ready>.feature-phone-notifications{opacity:var(--feature-face-opacity,0)}
.feature-phone-device.feature-real-ready[data-screen=overview]>.feature-animation-surface,
.feature-phone-device.feature-real-ready[data-screen=overview]>.feature-phone-status{display:none!important}
.feature-new-control{position:absolute;left:3.75%;top:1.65%;width:92.5%;height:96.7%;border-radius:18% / 8.3%;overflow:hidden;z-index:1;display:none;pointer-events:none;opacity:var(--feature-face-opacity,0);background:#0b0d12}
.feature-phone-device[data-screen=overview]>.feature-new-control{display:block}
.feature-new-control-svg{display:block;width:100%;height:100%;max-width:none;max-height:none}
.feature-real-island{position:absolute;top:3.55%;left:50%;transform:translateX(-50%);width:29.4%;height:4.2%;border-radius:100px;background:#010204;z-index:3;pointer-events:none;opacity:var(--feature-face-opacity,0)}
.feature-real-island::after{content:"";position:absolute;right:14%;top:50%;width:12%;aspect-ratio:1;transform:translateY(-50%);border-radius:50%;background:radial-gradient(circle at 40% 40%,#273043 0,#10141e 35%,#030508 72%);opacity:.8}

@media(max-width:760px){
 .feature-flow-mobile-art:has(.feature-real-ready){width:100vw;max-width:none;margin-inline:calc((100% - 100vw)/2)}
}

@media(max-width:760px){.feature-flow-mobile-stage .feature-flow-scroll-cue.is-last-step{visibility:hidden;pointer-events:none;opacity:0}}

@media(min-width:761px){.feature-flow .feature-flow-steps{padding-bottom:8svh}}

/* Never flash the superseded wireframe while the shared 3D model loads. */
.feature-flow-art>.feature-flow-phone-outline,
.feature-phone-device:not(.feature-real-ready){visibility:hidden!important}

@media(max-width:760px){
 .feature-flow-mobile-art:has(.feature-exiting){overflow:visible;clip-path:inset(-100vh 0 -100vh 0)}
}

/* Match the rounded physical aperture for every animated SVG surface. */
.feature-phone-device.feature-real-ready>.feature-animation-surface{clip-path:inset(1.65% 3.75% round 18% / 8.3%)}

/* The screen follows the front plane through the first degrees of rotation. */
.feature-phone-device.feature-real-ready>:is(.feature-animation-surface,.feature-phone-status,.feature-phone-notifications,.feature-new-control){transform:scaleX(var(--feature-face-scale,1));transform-origin:center}
.feature-real-island{transform:translateX(-50%) scaleX(var(--feature-face-scale,1))}

@media(max-width:760px){
 .feature-phone-device.is-mobile-layer{position:fixed;z-index:4;max-width:none;margin:0;pointer-events:none;isolation:isolate}
}

/* Native viewport anchoring avoids scroll/paint compensation jitter. */
body>.feature-phone-device:is(.is-desktop-layer,.is-mobile-layer){position:fixed;z-index:4;max-width:none;margin:0;pointer-events:none;isolation:isolate}

/* Dedicated departure space before the next chapter, outside the pinned grid. */
.feature-flow{padding-bottom:calc(40px + 46svh)}
@media(max-width:760px){.feature-flow{padding-bottom:calc(40px + 38svh)}}
@media(prefers-reduced-motion:reduce){.feature-flow{padding-bottom:40px}}

/* Reversible copy fade during the mobile handset departure/return. */
@media(max-width:760px) and (prefers-reduced-motion:no-preference){
 .feature-flow-mobile-copy{opacity:var(--mobile-copy-exit-opacity,1)}
}

@media(max-width:760px){
 .feature-flow-mobile-stage.is-departing{background:transparent;pointer-events:none}
}

/* Mobile only: larger handset, stable layout, cue may extend below the stage. */
@media(max-width:760px){
 .feature-flow-mobile-stage .feature-flow-mobile-art{flex:0 0 auto;margin-top:var(--mobile-phone-gap,24px)}
}
