/* Stable scene planes. Safari toolbars resize the visible window, not the film. */
:root{--tbg-scene-height:100vh;--tbg-chain-total:20.25;--tbg-gesture-travel:4.6}
@supports(height:100lvh){:root{--tbg-scene-height:100lvh}}
.roadster-home .film-stage,.roadster-home .scene-stage{height:var(--tbg-scene-height)}
.roadster-home .film-ready{height:calc(var(--tbg-scroll-height)*3.4 + var(--tbg-scene-height));overflow-anchor:none}
.roadster-home .film-canvas{backface-visibility:hidden}
.roadster-home .film-stage .scene-copy{bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height))}
.roadster-home .film-stage .scene-invitation{bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height) + max(28px,var(--tbg-safe-bottom)))}
.roadster-home .story-chain:not([data-static=true]){height:calc((var(--tbg-scroll-height) - var(--scene-head))*var(--tbg-chain-total) + var(--tbg-scene-height) - var(--scene-head));overflow-anchor:none}
.roadster-home .story-chain:not([data-static=true]) .chain-stage{height:calc(var(--tbg-scene-height) - var(--scene-head))}
.roadster-home .gesture-story{height:calc(var(--tbg-scroll-height)*var(--tbg-gesture-travel) + var(--tbg-scene-height));overflow-anchor:none}
.roadster-home .gesture-stage{height:calc(var(--tbg-scene-height) - var(--scene-head))}
.roadster-home .gesture-caption{bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height) + max(26px,var(--tbg-safe-bottom)))}
.roadster-home .gesture-command{bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height) + 105px)}
.roadster-home #kickdown-story .kd-top{top:26px}
.roadster-home #kickdown-story .kd-statement{max-width:30ch}
.roadster-home #kickdown-story #kd-caption{font-size:18px;line-height:1.45;max-width:28ch}
.roadster-home #kickdown-story .kd-pedal-window{left:0;right:auto;bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height));width:58%;height:clamp(235px,39svh,370px)}
.roadster-home #kickdown-story .kd-mode-overlay{bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height) + max(30px,var(--tbg-safe-bottom)));left:58%;right:18px;width:auto}
.roadster-home #kickdown-story .kd-mode{font-size:clamp(25px,7vw,34px)}
.roadster-home #kickdown-story .kd-mode-detail{font-size:14px;line-height:1.4}
.roadster-home #kickdown-story .kd-press-readout strong{font-size:42px}
.roadster-home #kickdown-story .kd-pedal-shade{height:44%;background:linear-gradient(0deg,#090c10e8,transparent)}
.roadster-home .gesture-section .gesture-clarification{font-size:18px!important;line-height:1.55;color:var(--rd-copy)!important;max-width:39ch}
.roadster-home .swipe-teach{position:absolute;z-index:5;left:24px;right:24px;bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height) + max(28px,var(--tbg-safe-bottom)));display:flex;align-items:center;gap:14px;color:var(--rd-white);pointer-events:none;opacity:0;transition:opacity .35s;max-width:300px}
.roadster-home .swipe-teach.is-visible{opacity:1}
.roadster-home .swipe-teach svg{width:26px;height:54px;flex:0 0 26px;fill:none;stroke:currentColor;stroke-width:1.2}
.roadster-home .swipe-teach .swipe-contact{animation:swipe-up 2.4s cubic-bezier(.22,1,.36,1) infinite}
.roadster-home .swipe-teach strong{display:block;font:400 15px/1.45 var(--rd-font);letter-spacing:.015em}
.roadster-home .swipe-teach small{display:block;font:350 13px/1.5 var(--rd-font);color:var(--rd-copy)}
.roadster-home .film-stage .scene-invitation.is-guided{opacity:0!important;pointer-events:none}
@keyframes swipe-up{0%,15%{transform:translateY(14px);opacity:0}30%{opacity:1}70%{transform:translateY(-13px);opacity:1}90%,100%{transform:translateY(-13px);opacity:0}}
@media(min-width:760px){
 .roadster-home #kickdown-story .kd-pedal-window{left:auto;right:4vw;width:30%;height:48svh;bottom:40px}
 .roadster-home #kickdown-story .kd-mode-overlay{left:6vw;right:auto;bottom:64px;width:30%}
 .roadster-home .swipe-teach{left:6vw}
}
@media(max-height:700px) and (max-width:759px){
 .roadster-home #kickdown-story .kd-statement h3{font-size:32px!important}
 .roadster-home #kickdown-story .kd-top{top:20px}
 .roadster-home #kickdown-story .kd-toolbar{margin-bottom:14px}
 .roadster-home #kickdown-story .kd-statement p{margin-top:10px}
 .roadster-home #kickdown-story .kd-pedal-window{height:220px;width:54%}
 .roadster-home #kickdown-story .kd-mode-overlay{left:54%}
 .roadster-home .gesture-command{bottom:98px}
 .roadster-home .gesture-copy h3{font-size:32px!important}
}
@media(prefers-reduced-motion:reduce){
 .roadster-home .swipe-teach{display:none}
 .roadster-home .film-stage .scene-invitation.is-guided{opacity:1!important;pointer-events:auto}
 .roadster-home .gesture-story{height:auto}
 .roadster-home .gesture-stage{min-height:600px}
 .roadster-home .story-chain:not([data-static=true]){height:auto}
}
.roadster-home .film-stage .scene-invitation.is-guided:focus-visible{opacity:1!important;pointer-events:auto;background:var(--rd-black)}
.roadster-home .swipe-teach.is-reminder{bottom:calc(var(--tbg-scene-height) - var(--tbg-view-height) + 120px)}
.roadster-home #kickdown-story .kd-stage::before{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(180deg,#080b0fdc 0%,#080b0f85 25%,transparent 52%)}
@media(min-width:760px){
 .roadster-home #kickdown-story .kd-pedal-window{left:4vw;right:auto;width:24vw;height:44svh;bottom:32px}
 .roadster-home #kickdown-story .kd-mode-overlay{left:30vw;right:auto;width:24vw;bottom:64px}
}
