#home-loader{position:fixed;inset:0;z-index:9999;display:grid;place-content:center;justify-items:center;gap:16px;padding:24px;background:radial-gradient(ellipse at 50% 45%,#294954,#101b24 70%);color:#ecf0e2;text-align:center;touch-action:manipulation}
html:not([data-hq-boot]) #home-loader:not([data-revealing]){display:none}
#home-loader-actor{position:relative;width:min(62vw,260px);aspect-ratio:510/523;animation:home-loader-breathe 3.2s ease-in-out infinite;filter:drop-shadow(0 15px 16px #07131b90)}
#home-loader-actor[data-live]{animation:none}
#home-loader-actor .checkpoint-intro-portrait{position:absolute;inset:0;width:100%;height:100%;animation:none;filter:none}
#home-loader-actor .checkpoint-intro-mascot{display:block}
#home-loader-actor .checkpoint-intro-face{display:block;inset:-9%;width:118%;height:118%}
#home-loader-actor .checkpoint-intro-face[hidden]{display:none}
#home-loader-actor:has(canvas:not([hidden])) img{visibility:hidden}
#home-loader [data-loader-title]{font:800 clamp(17px,5vw,23px)/1.2 system-ui;letter-spacing:.08em;margin:0}
#home-loader [data-loader-status]{font:400 12px/1.5 system-ui;color:#acc1c7;margin:0}
.home-loader-track{width:min(62vw,220px);height:6px;overflow:hidden;border-radius:3px;background:#70949630}
.home-loader-track i{display:block;width:0%;height:100%;background:linear-gradient(90deg,transparent,#f1cb74,#b3ebdc);transition:width .18s linear}
@keyframes home-loader-breathe{50%{transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){#home-loader-actor,.home-loader-track i{animation:none}.home-loader-track i{transition:none;background:#d9c387}}

#home-loader [data-loader-percent]{font:700 18px/1 system-ui;font-variant-numeric:tabular-nums;color:#f1cb74;min-width:4ch}
#home-loader{overflow:hidden;isolation:isolate;gap:12px;padding:24px 18px;background:radial-gradient(ellipse at 65% 8%,#416473 0%,#203944 35%,#101b24 85%)}
#home-loader>*{position:relative;z-index:1}
#home-loader-actor{width:min(57vw,230px);filter:drop-shadow(0 18px 12px #06131c80)}
#home-loader .home-loader-helicopter{display:block;width:min(90vw,430px);height:clamp(115px,22vh,190px);object-fit:contain;opacity:0;z-index:0;filter:drop-shadow(0 12px 15px #06131c60);will-change:transform;pointer-events:none}
#home-loader [data-loader-story]{margin:0;max-width:30ch;min-height:2.8em;font:700 clamp(17px,4.8vw,21px)/1.4 system-ui;color:#f1d99e;text-wrap:balance}
#home-loader [data-loader-status]{min-height:1.5em}
#home-loader[data-leaving]{opacity:0;transition:opacity .72s cubic-bezier(.4,0,.2,1);pointer-events:none}
@media(max-height:700px){#home-loader{gap:8px;padding:12px}#home-loader-actor{width:min(49vw,185px)}#home-loader .home-loader-helicopter{height:115px}#home-loader [data-loader-story]{font-size:16px;min-height:2.4em}}
@media(prefers-reduced-motion:reduce){#home-loader[data-leaving]{transition:none}.home-loader-helicopter{will-change:auto}}
/* The hospital street supplies the same perspective and architecture as play. */
#home-loader{background:#0e1d24}
#home-loader .home-loader-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 35%;opacity:.66;z-index:-3;pointer-events:none}
#home-loader::before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(#0c202ee6 0%,#10233040 30%,#0d1c2870 56%,#0c1824ed 83%);pointer-events:none}
#home-loader .home-loader-wall{position:absolute;left:max(10px,calc(50% - 270px));top:36%;width:clamp(80px,23vw,145px);height:clamp(100px,28vw,175px);z-index:-1;background:repeating-linear-gradient(0deg,#71766c 0 18px,#4b554d 19px 21px);border:2px solid #7e8475;box-shadow:4px 6px 12px #07121990;transform:perspective(500px) rotateY(18deg) rotate(-3deg);opacity:.65;pointer-events:none}
.home-loader-wall img{width:100%;height:100%;object-fit:contain;mix-blend-mode:hard-light}
#home-loader [data-loader-title],#home-loader [data-loader-story]{text-shadow:0 2px 8px #06131c,0 0 20px #06131c}
#home-loader [data-loader-audio]{font:500 12px/1.4 system-ui;color:#d8dacf;margin:0;min-height:1.4em}
#home-loader [data-loader-audio][hidden]{display:flex!important;visibility:hidden}
@media(min-width:800px){#home-loader .home-loader-backdrop{object-fit:contain;opacity:.62}}
/* Paint the graffiti onto the building face, without a floating sign panel. */
#home-loader .home-loader-wall{left:max(4px,calc(50% - 292px));top:27%;width:clamp(70px,21vw,110px);height:clamp(90px,26vw,140px);background:none;border:0;box-shadow:none;transform:perspective(500px) rotateY(28deg) rotate(-4deg);opacity:.68}

/* JS interpolates confirmed progress once, without a second CSS lag. */
.home-loader-track i{transition:none}
#home-loader[data-settling] .home-loader-track i{box-shadow:0 0 12px #b3ebdc99}
#home-loader[data-settling] [data-loader-story]{color:#fff0bc}

/* Keep the uncomposited poster hidden until the clean cached airframe is ready. */
#home-loader .home-loader-helicopter{background:none}
#home-loader .home-loader-helicopter[data-model]{background:none}

/* Keep a fully painted HQ under the fade, then remove the completed cover. */
#home-loader[hidden]{display:none}

/* Fade in the cover as a whole, without moving its layout. */
@keyframes loader-cover-enter{from{opacity:0}to{opacity:1}}
#home-loader{animation:loader-cover-enter .28s ease-out both}
#home-loader[data-leaving]{animation:none}
@media(prefers-reduced-motion:reduce){#home-loader{animation:none}}

/* First paint already contains a small street preview from the HTML. */
#home-loader{animation:none;background:linear-gradient(#0c202e66,#0c1824b3),var(--loader-preview) center 35%/cover no-repeat}
#home-loader .home-loader-backdrop{opacity:0;transition:opacity .65s ease}
#home-loader[data-backdrop-ready] .home-loader-backdrop{opacity:.66}
#home-loader .home-loader-wall{top:35%}
@media(prefers-reduced-motion:reduce){#home-loader .home-loader-backdrop{transition:none}}

/* The poster and padded facial canvas share one stable box at cold start. */
#home-loader-actor{animation:none;transform:none}
#home-loader-actor .checkpoint-intro-mascot{visibility:visible!important;opacity:calc(1 - var(--loader-face-opacity,0))}
#home-loader-actor .checkpoint-intro-face{opacity:var(--loader-face-opacity,0)}
@media(prefers-reduced-motion:reduce){#home-loader-actor .checkpoint-intro-mascot{opacity:1}#home-loader-actor .checkpoint-intro-face{opacity:0}}

/* Reserve both message rows even while audio is hidden or translations wrap.
   The global [hidden] rule must never collapse a row of this centered cover. */
#home-loader [data-loader-audio],#home-loader [data-loader-status]{display:flex;align-items:center;justify-content:center;width:100%;height:2.8em;min-height:2.8em;margin:0}
#home-loader [data-loader-status]{height:3em;min-height:3em}
