* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: #04040a;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  /* 가로 모드 노치는 좌우에 온다. 안전 영역을 비켜야 화면 가장자리의 HUD
     (특히 상단 경험치 바)가 잘리지 않는다. */
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

/* 논리 해상도 1280x720 을 유지한 채 레터박스 스케일 */
#game {
  display: block;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  image-rendering: auto;
  cursor: crosshair;
  background: #070711;

  /* touch-action 은 상속되지 않는다. body 에만 걸면 캔버스는 기본값(auto)이라
     탭이 스크롤/줌 제스처로 해석되어 포인터 이벤트가 취소될 수 있다. */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
