html,
body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  margin: 0;
  overscroll-behavior: none;
  background: #000;
}

html {
  min-height: calc(100% + constant(safe-area-inset-top));
  min-height: calc(100% + env(safe-area-inset-top, 0px));
}

body {
  display: grid;
  grid-template-areas: "stage";
  grid-template-columns: 100vw;
  grid-template-rows: 100vh;
  grid-template-columns: 100dvw;
  grid-template-rows: 100dvh;
}

body > #GameDiv,
body > #splash-overlay {
  grid-area: stage;
  min-width: 0;
  min-height: 0;
}

#splash-overlay {
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  box-sizing: border-box;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.9s ease;
}
#splash-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.splash-content {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}
.splash-title {
  font-size: 52px;
  font-weight: 700;
  font-family: 'Arial Black', Arial, sans-serif;
  letter-spacing: 10px;
  text-transform: uppercase;
  user-select: none;
  color: #888;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0) 60%
  ) -100% / 50% no-repeat currentColor;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rg-txt-sweep 2.4s linear infinite;
}
@media (max-width: 768px) and (orientation: portrait) {
  .splash-content {
    width: 100dvh;
    max-width: 100dvh;
    padding: 0 16px;
    text-align: center;
    transform: rotate(90deg);
    transform-origin: center;
  }
  .splash-title {
    font-size: clamp(36px, 11vw, 52px);
    letter-spacing: clamp(4px, 1.8vw, 10px);
    white-space: nowrap;
  }
}
@keyframes rg-txt-sweep {
  from { background-position: -100%; }
  to   { background-position: 200%; }
}
