* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

html {
  background: #000;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  color: #b0a8c4;
  font-family: Consolas, Menlo, "DejaVu Sans Mono", "Courier New", monospace;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #000;
}

#stars {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#screen {
  position: relative;
  z-index: 1;
  display: block;
  width: 791px;
  height: 1050px;
  background: #000;
  touch-action: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: #000;
  text-align: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  color: #ff5c86;
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 92, 134, 0.8), 0 0 34px rgba(255, 34, 64, 0.55);
  animation: beat 1.1s ease-in-out infinite;
}

.loader p {
  margin: 0;
  color: #b8b0cc;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.loader .detail {
  color: #6e687a;
  font-size: 11px;
}

.bar {
  width: min(260px, 70vw);
  height: 2px;
  overflow: hidden;
  background: #211d29;
}

.bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff2240, #ffb3c8);
  transition: width 0.2s ease;
}

.loader.error .loader-mark {
  color: #ff2240;
  animation: none;
}

.loader.error .bar {
  display: none;
}

.fallback {
  position: fixed;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  background: #000;
  color: #ff8fa6;
  font-size: 14px;
  text-align: center;
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.2);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.13);
  }
  56% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-mark {
    animation: none;
  }
}
