/* Loading.ini's 640 x 480 canvas. Keep the artwork square on wide displays;
   only the original backdrop expands to cover the whole game window. */
#loading{position:fixed;inset:0;z-index:40;overflow:hidden;background:#00153b url('../assets/loading/background.png') center/100% 100% no-repeat;color:white}
.loading-layout{position:absolute;inset:0;width:min(100%,133.333333dvh);height:100%;margin:auto;container-type:inline-size;font-family:"Comic Sans MS","Comic Neue",cursive;text-align:center}
.loading-logo{position:absolute;left:0;top:0;width:min(15.9375vw,21.25dvh);height:10%;object-fit:fill}
#loading-title,#loading-mode,#loading-detail{position:absolute;left:0;right:0;margin:0;padding:0;font-family:inherit;font-weight:normal;letter-spacing:normal;line-height:1.35;color:white;text-shadow:none}
#loading-title{top:0;font-size:4.6875cqw}
#loading-mode{top:12.5%;font-size:3.59375cqw}
#loading-picture{position:absolute;left:30%;top:19.583333%;width:40%;height:53.333333%;object-fit:contain}
#loading-detail{top:75%;font-size:3.59375cqw;white-space:nowrap}
.loading-progress{position:absolute;left:26.5625%;top:83.333333%;width:46.875%;height:1.041667%;overflow:hidden}
.loading-progress span{display:block;width:0;height:100%;background:#ff2600 url('../assets/loading/progress.png') center/100% 100% no-repeat}
.loading-progress.indeterminate span{width:12%;animation:loading-progress-travel 1.5s linear infinite}
@keyframes loading-progress-travel{from{transform:translateX(0)}to{transform:translateX(734%)}}
@media(prefers-reduced-motion:reduce){.loading-progress.indeterminate span{animation:none;width:100%;opacity:.6}}
/* Portrait windows need more vertical space between the title, illustration
   and message. Text remains upright and the illustration is never stretched. */
@media(max-aspect-ratio:1/1){
  .loading-logo{top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));width:22%;height:auto;aspect-ratio:102/48}
  #loading-title{top:12%;font-size:clamp(22px,6.5cqw,45px)}
  #loading-mode{top:24%;font-size:clamp(17px,4.8cqw,32px)}
  #loading-picture{left:14%;top:32%;width:72%;height:38%;object-fit:contain}
  #loading-detail{left:4%;right:4%;top:74%;white-space:normal;font-size:clamp(16px,4.8cqw,30px)}
  .loading-progress{left:14%;top:85%;width:72%;height:max(3px,.7%)}
}
