/* 起動専用UI。既存のロードイラストを使用し、タイトル操作欄と重ねない。 */
#startupLoading {
  position:absolute; z-index:4; left:50%; bottom:max(12px,env(safe-area-inset-bottom));
  transform:translateX(-50%); width:min(78vw,480px); box-sizing:border-box;
  color:#fff5df; padding:9px 13px; text-shadow:0 1px 3px #142c37;
  background:linear-gradient(90deg,#122a35e8,#122a35d9);
  border:1px solid #b89a61; border-radius:5px; box-shadow:0 3px 12px #10232b55;
  display:grid; gap:5px;
}
#startupLoading[hidden], #startupRecovery[hidden], #startupReplayClose[hidden]{display:none!important}
#entry.intro .entry-scene{background:#172f3a}
#entry.intro[data-intro-variant=characters] .entry-art{object-fit:contain!important}
#entry.intro .entry-controls{visibility:hidden!important;pointer-events:none!important}
#startupLoading .startup-caption,#startupLoading .startup-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;line-height:1.25}
#startupLoading .startup-caption{font-size:clamp(12px,2.4vmin,17px);font-weight:800;letter-spacing:.07em}
#startupLoading .startup-meta{font-size:clamp(10px,1.8vmin,13px);letter-spacing:0}
#startupCount,#startupPercent{font-variant-numeric:tabular-nums;white-space:nowrap}
#startupProgress{display:block;appearance:none;width:100%;height:7px;margin:0;border:0;border-radius:4px;background:#101f2a;overflow:hidden;accent-color:#e8c16c}
#startupProgress::-webkit-progress-bar{background:#101f2a}
#startupProgress::-webkit-progress-value{background:linear-gradient(90deg,#ad833d,#f6dc93)}
#startupProgress::-moz-progress-bar{background:#e8c16c}
#startupRecovery{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
#startupLoading button.secondary{background:transparent!important;border:solid transparent!important;border-width:7px 13px!important;border-image:var(--reg-secondary) 70 108 70 108 fill stretch!important;border-radius:0!important;box-shadow:none!important;color:#fff5df;font-size:12px;min-height:36px;padding:2px 5px!important;white-space:nowrap;justify-self:center}
#startupLoading button.secondary:focus-visible{outline:2px solid #ffe6a8;outline-offset:2px}
#startupLoading .startup-dots{display:inline-block;animation:startupPulse 1s ease-in-out infinite alternate}
@keyframes startupPulse{from{opacity:.35}to{opacity:1}}
#entry[data-loading-mode=error] #startupLoading .startup-dots,
#entry[data-loading-mode=replay] #startupLoading .startup-dots{animation:none}
@media(max-height:400px){#startupLoading{bottom:7px;width:min(85vw,390px);padding:6px 10px;gap:4px}}
@media(prefers-reduced-motion:reduce){#startupLoading .startup-dots{animation:none}}
#entry.reduce-motion #startupLoading .startup-dots{animation:none}

#startupProgress[hidden]{display:none!important}

/* 読込完了直後に背景だけ遅れてフェードする現象を防ぐ。 */
#entry:not(.intro) .entry-town{transition:none!important}
