html, body { margin: 0; min-height: 100%; background: #07181f; }
#game-container[data-resource-locked] { visibility: hidden !important; }
body[data-resource-loading] > :not(#resource-boot):not(#game-container):not(script):not(template) {
  visibility: hidden !important; pointer-events: none;
}
#resource-boot {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
  overflow: hidden; background: #07181f; color: white; font-family: Arial, sans-serif;
}
#resource-boot[hidden] { display: none !important; }
.resource-stage {
  position: relative; width: min(100vw, calc(100dvh * 1672 / 941));
  aspect-ratio: 1672 / 941; container-type: inline-size; isolation: isolate;
}
.resource-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.resource-track {
  position: absolute; left: 29.64%; top: 83.88%; width: 40.43%; height: 3.51%;
  overflow: hidden; background: linear-gradient(#0b1325, #1a2940); border-radius: 2px;
  box-shadow: inset 0 0 5px #050c13; isolation: isolate;
}
#resource-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(#8decff, #04c9fc 35%, #008bdb 85%, #92efff);
  box-shadow: 0 0 12px #25d5ff, inset 0 0 6px #aaf7ff;
  transition: width .12s linear;
}
#resource-fill::after {
  content: ''; position: absolute; inset: 0; opacity: .7;
  background: repeating-linear-gradient(120deg, transparent 0 22px, #ceffff44 23px 25px, transparent 26px 42px);
  background-size: 160px 100%; animation: resource-flow 2.2s linear infinite;
}
#resource-percent {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(10px, 1.25cqw, 20px); font-weight: 800; text-shadow: 0 1px 3px #001e32, 0 0 3px #001e32;
}
.resource-copy {
  position: absolute; top: 90.3%; left: 23%; width: 54%; padding: .35% .6%; box-sizing: border-box;
  text-align: center; background: #081d28; border-radius: 12px; box-shadow: 0 0 12px #06151dcc;
}
#resource-status { margin: 0 0 .2em; font-size: clamp(11px, 1.2cqw, 20px); font-weight: 700; }
#resource-detail { margin: 0; font-size: clamp(10px, 1cqw, 16px); color: #d8f6ff; line-height: 1.35; }
#resource-retry {
  position: absolute; left: 50%; top: 64%; transform: translateX(-50%);
  border: 2px solid #b7edff; border-radius: 14px; padding: .7em 1.3em;
  background: linear-gradient(#4edaff, #087bbf); color: white; cursor: pointer;
  box-shadow: 0 3px 8px #001b31a6; font-size: clamp(13px, 1.35cqw, 22px); font-weight: 700;
}
#resource-boot[data-state="error"] #resource-fill::after { animation-play-state: paused; }
#resource-boot[data-state="error"] .resource-copy { width: 80%; left: 10%; }
@keyframes resource-flow { to { background-position: 160px 0; } }
@media (orientation: portrait) {
  .resource-copy { top: 99%; left: 7%; width: 86%; padding: 12px; }
  #resource-status { font-size: 15px; }
  #resource-detail { font-size: 12px; }
  #resource-retry { top: 65%; }
}
@media (prefers-reduced-motion: reduce) {
  #resource-fill { transition: none; }
  #resource-fill::after { animation: none; }
}
