/* Runtime shell for the Cocos Creator build (design resolution 640x1136, portrait). */

:root {
  --bar: 57px;
  --ratio: 0.5634; /* 640 / 1136 */
  --room: calc(100vh - var(--bar));
}

@supports (height: 100dvh) {
  :root {
    --room: calc(100dvh - var(--bar));
  }
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #151515;
  font-family: var(--gh-font-body);
  overscroll-behavior: none;
}

.stage {
  display: grid;
  place-items: center;
  height: var(--room);
  background:
    radial-gradient(ellipse at 50% 40%, #262626, #111 75%);
}

#GameDiv {
  position: relative;
  width: min(100vw, var(--room) * var(--ratio));
  aspect-ratio: 640 / 1136;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px rgba(0, 0, 0, 0.6);
}

#Cocos3dGameContainer,
#GameCanvas {
  width: 100%;
  height: 100%;
}

#GameCanvas {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  color: #e9e4d6;
  background: #1c1c1c;
  text-align: center;
  transition: opacity 360ms ease;
}

.loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.loader[hidden] {
  display: none;
}

.loader-bar {
  position: relative;
  width: 160px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(233, 228, 214, 0.15);
}

.loader-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: #d6b86a;
  animation: sweep 1.3s ease-in-out infinite;
}

@keyframes sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-bar span {
    width: 100%;
    animation: none;
    opacity: 0.6;
  }
}

.loader-text {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.loader-hint {
  color: rgba(233, 228, 214, 0.55);
  font-size: 0.8125rem;
}

.noscript {
  color: #e9e4d6;
}

/* Phones: a slimmer bar leaves the game as tall as possible. */
@media (max-width: 520px) {
  :root {
    --bar: 45px;
  }

  .gh-bar-inner {
    min-height: 44px;
  }

  .gh-mark {
    width: 24px;
    height: 24px;
  }
}
