/* Synchronous first-paint cover; keep the underlying layout measurable for 3D. */
body.boot-pending{width:100%;max-width:100%;overflow:hidden}
.boot-pending > .selection-main,.boot-pending > .sel-bg,.boot-pending > .match-layout{visibility:hidden}
.boot-loading{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;z-index:900;display:grid;place-items:center;overflow:hidden;padding:20px;background:#111214;color:#ecebe6;font-family:system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif}
.boot-loading[hidden]{display:none!important}
.boot-loading::before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 30% 75%,rgba(134,211,184,.07),transparent 55%),radial-gradient(ellipse at 75% 25%,rgba(224,106,92,.07),transparent 55%)}
.boot-card{position:relative;width:min(580px,86vw);text-align:center}
.boot-kicker{margin:0 0 8px;color:#9a9ba3;font-size:10px;font-weight:700;letter-spacing:.28em}
.boot-title{margin:0;font-family:'Smiley','PingFang SC','Microsoft YaHei',sans-serif;font-size:clamp(32px,5.7vw,48px);font-weight:400;line-height:1.15;letter-spacing:.04em}
.boot-copy{margin:12px 0 0;color:#b8b8b9;font-size:14px;line-height:1.5}
.boot-parade{position:relative;display:flex;justify-content:center;gap:36px;height:144px;margin:12px auto 14px;isolation:isolate}
.boot-parade::before{content:'';position:absolute;inset:auto 8% 18px;height:1px;background:linear-gradient(90deg,transparent,#4a4b4e 20%,#4a4b4e 80%,transparent);z-index:-1}
.boot-parade::after{content:'校门前见  →';position:absolute;right:4%;top:24px;color:#777980;font-size:10px;font-weight:600;letter-spacing:.1em}
.boot-walker{display:grid;grid-template-rows:128px 16px;justify-items:center;width:128px}
.boot-walker small{font-size:10px;font-weight:600;color:#9a9ba3;line-height:16px;letter-spacing:.08em}
.boot-sprite{display:block;width:128px;height:128px;background-repeat:no-repeat;background-size:1024px 128px;image-rendering:pixelated;animation:boot-walk .88s steps(8,end) infinite}
.boot-hazel{background-image:url(assets/loading/hazel-walk.png)}
.boot-viridis{background-image:url(assets/loading/viridis-walk.png);animation-duration:.8s}
.boot-hazel{animation-duration:.8s}
.boot-loading[data-theme=viridis]{background:#141c14}
.boot-loading[data-theme=viridis]::before{background:radial-gradient(ellipse at 30% 75%,#99b96b18,transparent 55%),radial-gradient(ellipse at 75% 25%,#e5c77912,transparent 55%)}
.boot-loading[data-theme=viridis] .boot-progress-fill{background:linear-gradient(90deg,#99b96b,#d6dea6 58%,#d6b76d)}
.boot-walker[data-character=viridis] small{color:#c7dba6}
.boot-komichi{background-image:url(assets/loading/komichi-walk.png)}
.boot-hinome{background-image:url(assets/loading/hinome-walk.png)}
.boot-kanon{background-image:url(assets/loading/kanon-walk.png)}
.boot-nana7mi{background-image:url(assets/loading/nana7mi-walk.png)}
.boot-shiori{background-image:url(assets/loading/shiori-walk.png)}
.boot-hinome,.boot-kanon,.boot-nana7mi,.boot-shiori{animation-duration:.8s}
.boot-walker:nth-child(2) .boot-sprite{animation-delay:-.33s}
/* Do not flash the HTML defaults before the lightweight identity module runs. */
.boot-parade:not([data-ready]) .boot-walker{visibility:hidden}
@keyframes boot-walk{to{background-position:-1024px 0}}
.boot-meter{display:grid;gap:9px;margin:0 auto;width:min(440px,100%)}
.boot-progress{height:4px;overflow:hidden;background:#2d2f33}
.boot-progress-fill{display:block;height:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,#86d3b8,#e9b949 58%,#e06a5c);transition:transform .3s linear}
.boot-progress-label{display:flex;justify-content:space-between;align-items:center;color:#9a9ba3;font-size:10px;font-weight:600;letter-spacing:.08em}
.boot-progress-number{font-variant-numeric:tabular-nums;color:#ecebe6}
.boot-message{min-height:18px;margin:13px 0 0;color:#b8b8b9;font-size:12px;line-height:1.5}
.boot-retry{display:block;min-height:38px;margin:14px auto 0;padding:0 20px;border:1px solid #86d3b8;background:#17251f;color:#ecebe6;font:600 13px/1.3 system-ui,'Microsoft YaHei',sans-serif;cursor:pointer}
.boot-retry:focus-visible{outline:2px solid #ecebe6;outline-offset:3px}
.boot-loading[data-state=error] .boot-message{color:#f0b49b}
.boot-loading[data-state=error] .boot-sprite{animation-play-state:paused}
.boot-loading[data-state=ready] .boot-progress-fill{transition:none}
@media(max-height:430px){.boot-loading{padding:12px}.boot-kicker{margin-bottom:5px}.boot-title{font-size:34px}.boot-copy{margin-top:6px;font-size:12px}.boot-parade{height:144px;margin:0 auto 8px}.boot-message{margin-top:9px}.boot-retry{min-height:32px;margin-top:8px}}
@media(max-width:460px){.boot-card{width:90vw}.boot-parade{gap:12px}.boot-parade::after{right:1%;top:14px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.boot-sprite{animation:none;background-position:0 0}.boot-progress-fill{transition:none}}

.boot-michiya{background-image:url(assets/loading/michiya-walk.png);animation-duration:.8s}
.boot-loading:has([data-character=michiya]) .boot-progress-fill{background:linear-gradient(90deg,#83baff,#e5e7ee 58%,#cfb77a)}
.boot-loading:has([data-character=michiya])::before{background:radial-gradient(ellipse at 30% 75%,#83baff20,transparent 55%),radial-gradient(ellipse at 75% 25%,#cfb77a18,transparent 55%)}
.boot-azuma{background-image:url(assets/loading/azuma-walk.png)}
.boot-loading[data-theme=azuma]{background:#1b1828}
.boot-loading[data-theme=azuma]::before{background:radial-gradient(ellipse at 30% 75%,#b9b1df20,transparent 55%),radial-gradient(ellipse at 75% 25%,#ddd0a712,transparent 55%)}
.boot-loading[data-theme=azuma] .boot-progress-fill{background:linear-gradient(90deg,#8b80ba,#dcd6ef 65%,#ddd0a7)}
.boot-walker[data-character=azuma] small{color:#dcd6ef}

.boot-taffy{background-image:url(assets/loading/taffy-walk.png);animation-duration:.8s}

/* R19: actual adopted chu2u model, eight native 128px transparent frames. */
.boot-chu2u{background-image:url(assets/loading/chu2u-walk.png);animation-duration:.8s}
.boot-loading[data-theme=chu2u]{background:#343d38;color:#f1f4f1}
.boot-loading[data-theme=chu2u] .boot-progress-fill{background:linear-gradient(90deg,#dce4df,#b9de69)}
.boot-walker[data-character=chu2u] small{color:#e4e9e5}
