/* =========================================================
   공통 스타일 (런처 + 모든 게임 페이지)
   - 아이 오조작 방지: 확대/당겨서 새로고침/길게누르기 메뉴/글자선택 차단
   ========================================================= */
html, body {
  margin: 0;
  height: 100%;
  background: #bfe9ff;
  overflow: hidden;
  touch-action: none;              /* 핀치 확대·스크롤 제스처 차단 */
  overscroll-behavior: none;       /* 당겨서 새로고침 차단 */
  -webkit-user-select: none;
  user-select: none;               /* 글자 선택 차단 */
  -webkit-touch-callout: none;     /* 길게 누르기 메뉴 차단 */
  -webkit-tap-highlight-color: transparent;
  font-family: "Jua", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
img { -webkit-user-drag: none; pointer-events: none; }

/* 게임 캔버스 영역 */
#game { position: fixed; inset: 0; }

/* ---------- 시작 화면 (소리 재생 허용을 위한 첫 터치) ---------- */
.kp-start {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #fff8d6 0%, #bfe9ff 70%);
}
.kp-start button {
  width: 34vmin; height: 34vmin; border-radius: 50%;
  border: 1.4vmin solid #fff; background: #ff8a3d; color: #fff;
  box-shadow: 0 2vmin 0 #d9661c, 0 3vmin 6vmin rgba(0,0,0,.2);
  font-size: 16vmin; line-height: 1; cursor: pointer;
  animation: kp-pulse 1.2s ease-in-out infinite;
}
.kp-start button:active { transform: translateY(1.5vmin); box-shadow: 0 .5vmin 0 #d9661c; }
@keyframes kp-pulse { 0%,100% { scale: 1; } 50% { scale: 1.08; } }

/* ---------- 집 버튼 (누르면 런처로) ---------- */
.kp-home {
  position: fixed; left: 1.6vmin; top: 1.6vmin; z-index: 40;
  width: 9vmin; height: 9vmin; border-radius: 50%;
  background: rgba(255,255,255,.75); border: .6vmin solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 5vmin; cursor: pointer;
}
.kp-home:active { transform: scale(.9); }

/* ---------- 뒤로가기 버튼 (집 버튼 오른쪽, 한 번 누르면 바로 이전 화면) ---------- */
.kp-back {
  position: fixed; left: 12.6vmin; top: 1.6vmin; z-index: 40;
  width: 9vmin; height: 9vmin; border-radius: 50%;
  background: rgba(255,255,255,.75); border: .6vmin solid #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.kp-back svg { width: 60%; height: 60%; }
.kp-back:active { transform: scale(.9); }
.kp-back-first { left: 1.6vmin; }   /* 미리보기(집 버튼 없음)에서는 맨 왼쪽 */
