/* Gate chase transition, adapted from dist/gate-transition.css for the sticker hero. */
.gate-transition{position:fixed;inset:0;box-sizing:border-box;width:100%;height:100vh;height:100dvh;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:transparent;color:var(--red);outline:none}
.gate-transition[open]{display:block}
.gate-transition::backdrop{background:transparent;backdrop-filter:none}
.gate-veil{position:absolute;inset:0;background:var(--paper);opacity:0;animation:gate-veil 1.15s ease both;pointer-events:none}
.gate-veil::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 46%,transparent 40%,rgb(154 29 35 / .08) 100%)}
.hero.is-entering>*:not(.hero-snow){animation:gate-quiet .3s ease both}
.hero.is-entering .gate-stage,.hero.is-entering .gate-stage *{animation:none}
.hero.is-entering{transform-origin:var(--gate-x) var(--gate-y);animation:gate-camera 1.3s cubic-bezier(.45,0,.35,1) both}
.hero.is-entering .gate-stage{opacity:1}
body:has(.hero.is-entering) .music-dock{opacity:0;pointer-events:none;transition:opacity .3s}
.gate-arrival{position:absolute;left:calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right))/2);top:calc(50% + (env(safe-area-inset-top) - env(safe-area-inset-bottom))/2);translate:-50% -50%;width:min(760px,calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));min-width:0;margin:0;padding:0;text-align:center;animation:gate-ink .5s ease both}
/* Bound the artwork by viewport height as well as width, so landscape phones keep the full scene. */
.chase-scene{position:relative;isolation:isolate;width:min(720px,100%,calc((100dvh - 170px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*2.117647));aspect-ratio:720/340;margin:0 auto 10px;pointer-events:none}
.chase-ground{position:absolute;z-index:0;left:0;top:72.353%;width:100%;height:auto;mask-image:radial-gradient(ellipse farthest-side at 50% 0%,#000 70%,transparent 100%)}
.chase-treads{position:absolute;z-index:1;left:10%;top:80.5%;width:80%;height:3px;background:repeating-linear-gradient(90deg,#B5AD9D50 0 12px,transparent 12px 56px);mask-image:linear-gradient(90deg,transparent,#000 15%,#000 85%,transparent);animation:chase-ground-flow .128s linear infinite}
.chase-wheel-shadow,.chase-run-shadow{position:absolute;z-index:1;top:79.1%;height:1.5%;border-radius:50%;background:#9F8B6D25;filter:blur(2px);translate:-50% 0}
.chase-wheel-shadow{left:37.5%;width:16%}.chase-run-shadow{left:70%;width:14%;animation:chase-shadow .32s ease-in-out infinite alternate}
.chase-wheel{position:absolute;z-index:2;left:25%;top:26.967%;width:25%;aspect-ratio:1;animation:chase-roll 1.28s linear infinite,chase-gap 1.92s ease-in-out infinite;transform-origin:center}
.chase-badge{position:absolute;z-index:0;left:50%;top:50%;translate:-50% -50%;width:78%;height:78%;object-fit:contain}
.chase-nang{position:absolute;z-index:1;inset:0;width:100%;height:100%}
.chase-runner{position:absolute;z-index:3;left:47%;top:1.5294%;width:37.5%;aspect-ratio:1}
.lulu-run-sprite{width:100%;height:100%;background-image:url('assets/lulu-run-cycle.png');background-repeat:no-repeat;background-size:400% 200%;background-position:0 0;animation:lulu-run-cycle .64s steps(1,end) infinite}
.chase-snow{position:absolute;z-index:2;left:79%;top:74.412%;width:8%;height:5%}
.chase-snow i{position:absolute;left:0;bottom:0;width:5px;height:5px;border-radius:50%;background:#DDD6C8;opacity:0;animation:chase-snow-kick .64s ease-out infinite}.chase-snow i:nth-child(2){left:9%;width:3px;height:3px;animation-delay:.16s}.chase-snow i:nth-child(3){left:18%;width:4px;height:4px;animation-delay:.32s}
.gate-status{margin:0 0 8px;font:400 22px/1.3 var(--hand);color:var(--chili)}
.gate-arrival h2{max-width:100%;margin:0;font:400 clamp(28px,4vw,52px)/1.25 var(--display);letter-spacing:.06em;color:var(--red);overflow-wrap:anywhere}
.gate-destination{font-size:13px;color:var(--muted);letter-spacing:.08em;margin:14px 0 0}
.gate-cancel{position:absolute;z-index:5;right:calc(22px + env(safe-area-inset-right));top:calc(20px + env(safe-area-inset-top));width:48px;height:48px;padding:10px;color:var(--red);opacity:.75}.gate-cancel:hover{opacity:1}.gate-cancel:disabled{opacity:.15;cursor:default}
.gate-cancel svg{display:block;width:100%;height:100%}
.gate-fallback{position:absolute;z-index:5;bottom:calc(26px + env(safe-area-inset-bottom));left:50%;translate:-50% 0;max-width:calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));font-size:14px;line-height:1.6;text-align:center;color:var(--red);text-underline-offset:5px}
.gate-transition[data-reduced=true] .gate-veil,.gate-transition[data-reduced=true] .gate-arrival{animation:none;opacity:1}
.hero.is-entering.is-entry-reduced{animation:none}
.gate-transition[data-reduced=true] .chase-wheel,.gate-transition[data-reduced=true] .lulu-run-sprite,.gate-transition[data-reduced=true] .chase-treads,.gate-transition[data-reduced=true] .chase-run-shadow{animation:none}
.gate-transition[data-reduced=true] .chase-snow{display:none}
@keyframes gate-camera{from{transform:none}to{transform:translate(var(--gate-dx),var(--gate-dy)) scale(6)}}
@keyframes gate-veil{0%,30%{opacity:0}78%,100%{opacity:1}}
@keyframes gate-quiet{to{opacity:0}}
@keyframes gate-ink{from{opacity:0;filter:blur(3px)}to{opacity:1;filter:none}}
@keyframes chase-roll{to{transform:rotate(-360deg)}}
@keyframes chase-gap{0%,100%{translate:0 0}50%{translate:-8% 0}}
@keyframes chase-ground-flow{to{background-position:56px 0}}
@keyframes chase-shadow{from{opacity:.9;scale:1 1}to{opacity:.45;scale:.72 .85}}
@keyframes chase-snow-kick{0%{opacity:0;transform:translate(0,0) scale(.6)}15%{opacity:.7}100%{opacity:0;transform:translate(18px,-12px) scale(1.3)}}
@keyframes lulu-run-cycle{0%{background-position:0 0}12.5%{background-position:33.333333% 0}25%{background-position:66.666667% 0}37.5%{background-position:100% 0}50%{background-position:0 100%}62.5%{background-position:33.333333% 100%}75%{background-position:66.666667% 100%}87.5%{background-position:100% 100%}100%{background-position:0 0}}
@media (max-aspect-ratio:4/5){.chase-scene{width:min(540px,100%,calc((100dvh - 160px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*1.5));aspect-ratio:540/360;margin-bottom:12px}.chase-ground{top:70%}.chase-treads{top:76.2%;animation-duration:.175s}.chase-wheel{left:12.963%;top:19.9653%;width:37.037%}.chase-runner{left:45.185%;top:-1.3%;width:51.852%}.chase-wheel-shadow{left:31.4815%;top:74.8%;width:23%}.chase-run-shadow{left:78.3%;top:74.8%;width:19%}.chase-snow{left:89%;top:70.3%;height:5%;width:8%}.gate-status{font-size:19px}.gate-arrival h2{font-size:clamp(24px,7.2vw,34px);letter-spacing:.04em}.gate-cancel{right:calc(10px + env(safe-area-inset-right));top:calc(10px + env(safe-area-inset-top))}}
@media (max-height:500px) and (min-aspect-ratio:4/5){.chase-scene{margin-bottom:4px}.gate-arrival h2{font-size:clamp(24px,7dvh,32px);letter-spacing:.04em}.gate-cancel{right:calc(10px + env(safe-area-inset-right));top:calc(10px + env(safe-area-inset-top));width:44px;height:44px}.gate-fallback{bottom:calc(12px + env(safe-area-inset-bottom))}}
