@font-face {
  font-family: 'Metal Mania';
  src: url('./loading/metal-mania.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root { color-scheme: dark; background: #050407; color: #e2d7e8; font-family: 'Metal Mania', serif; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { display: grid; place-items: center; }
#stage { position: relative; width: min(100vw, 177.777778vh); height: min(100vh, 56.25vw); }
canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
#loading { position: absolute; inset: 0; isolation: isolate; overflow: hidden; background: #100b16; }
#loading[hidden] { display: none; }
.loading-gallery, .loading-gallery img, .loading-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.loading-gallery { z-index: -2; }
.loading-gallery img { object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.loading-gallery img.is-current { opacity: 1; }
.loading-shade {
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 5, 13, .42), rgba(8, 5, 13, .02) 38%, rgba(8, 5, 13, .55) 66%, #0b0811);
}
#loading h1 {
  position: absolute;
  top: 6.5%;
  left: 6%;
  margin: 0;
  color: #eee5f2;
  font-size: clamp(24px, 4.1vw, 58px);
  font-weight: 400;
  letter-spacing: .025em;
  text-shadow: 0 2px 15px #09060e;
}
.loading-copy { position: absolute; left: 6%; right: 6%; bottom: 7%; max-width: 1050px; }
#loading-tip {
  max-width: 960px;
  min-height: 2.7em;
  margin: 0 0 clamp(10px, 2.3vw, 28px);
  font-size: clamp(13px, 1.7vw, 25px);
  line-height: 1.35;
  color: #eadfeb;
  text-shadow: 0 2px 7px #08050d;
}
.loading-status { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 10px; color: #c8b8d4; font-size: clamp(11px, 1.3vw, 18px); }
#loading-text { margin: 0; }
#loading-percent { font-variant-numeric: tabular-nums; }
#loading-progress { display: block; appearance: none; width: 100%; height: 4px; border: 0; background: #3a2b46; }
#loading-progress::-webkit-progress-bar { background: #3a2b46; }
#loading-progress::-webkit-progress-value { background: #ccb3df; box-shadow: 0 0 9px #ad87ce60; }
#loading-progress::-moz-progress-bar { background: #ccb3df; }
#retry { margin-top: 22px; padding: 10px 25px; color: #eee6f0; background: #30243c; border: 1px solid #8d75a5; font: inherit; cursor: pointer; }
#retry:focus-visible { outline: 2px solid #e5c9fa; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .loading-gallery img { transition: none; } }
