*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #05070f;
  color: #e6edf7;
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* subtle vignette around the letterboxed canvas */
  background:
    radial-gradient(ellipse at 50% 35%, #131c33 0%, #080c18 55%, #04060d 100%);
}

#game {
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(120, 170, 255, 0.12);
  image-rendering: auto;
}

/* In fullscreen the framing chrome just wastes pixels — go edge to edge. */
:fullscreen #stage,
:-webkit-full-screen #stage {
  background: #000;
}

:fullscreen #game,
:-webkit-full-screen #game {
  border-radius: 0;
  box-shadow: none;
}

/* Shown only on small portrait screens; the game is designed for landscape. */
#rotate-hint {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #05070f;
  z-index: 10;
}

@media (orientation: portrait) and (max-width: 900px) {
  #rotate-hint { display: flex; }
}

noscript {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
