:root {
  color-scheme: dark;
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: #29233f;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 50% 15%, rgba(150, 127, 190, 0.38), transparent 37%),
    linear-gradient(145deg, #211d35, #393052 56%, #1c192b);
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-shell {
  position: relative;
  width: min(100vw, calc(100dvh * 0.6), 480px);
  aspect-ratio: 3 / 5;
  max-height: 100dvh;
  overflow: hidden;
  background: #f8efd9;
  box-shadow: 0 24px 80px rgba(9, 6, 18, 0.55);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: default;
  touch-action: none;
}

#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #4d415d;
  background: linear-gradient(160deg, #fff6df, #eadff2);
  transition: opacity 260ms ease;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-star {
  font-size: 52px;
  color: #8f79b6;
  animation: twinkle 1.15s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from {
    transform: translateY(2px) scale(0.82) rotate(-8deg);
    opacity: 0.55;
  }
  to {
    transform: translateY(-3px) scale(1.08) rotate(8deg);
    opacity: 1;
  }
}

@media (min-width: 700px) and (min-height: 900px) {
  .game-shell {
    border-radius: 28px;
    border: 7px solid rgba(255, 247, 225, 0.16);
  }
}
