/* 모아이 두더지잡기 — 게임 스타일 */
#app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100svh; overflow: hidden;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
#hud { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; }
#mascot { width: 40px; height: 40px; flex: 0 0 auto; }
.score-wrap { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.score-wrap .pixel-label { font-size: 10px; }
.score-wrap strong { font-family: var(--f-pixel); font-size: 22px; color: var(--ink); }
.time-wrap { display: flex; flex-direction: column; align-items: center; line-height: 1; flex: 0 0 auto; }
.time-wrap .pixel-label { font-size: 9px; }
.time-wrap strong { font-family: var(--f-pixel); font-size: 18px; color: var(--c-purple); }
.time-wrap.low strong { color: var(--ng); }
#newgame { padding: 8px 12px; font-size: 13px; flex: 0 0 auto; }

#stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; touch-action: none; }
#board {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: min(4vw, 22px);
  width: min(94vw, 64svh); height: min(94vw, 64svh);
}
/* 히트패드 오버레이: board와 동일한 3x3 그리드를 위에 겹쳐 탭만 받는다(투명). */
.hit-pads {
  position: absolute; inset: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: min(4vw, 22px);
}
.hole {
  position: relative; border-radius: 50% 50% 44% 44%; overflow: hidden;
  background: radial-gradient(ellipse at 50% 32%, #B89A6E 0%, #8C6E47 70%, #6E5436 100%);
  border: 2px solid #6E5436; box-shadow: inset 0 -6px 10px rgba(0,0,0,.25);
  display: flex; align-items: flex-end; justify-content: center; touch-action: none;
}
/* 조작성: 투명 히트패드(그리드 셀을 음수 margin으로 1.25배 확대). 탭 적중 영역만 넓힌다. */
.hit-pad { background: transparent; touch-action: none; border-radius: 50% 50% 44% 44%; }
.hole::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 6%; height: 26%; background: rgba(46,37,72,.30); border-radius: 50%; }
.mole {
  position: relative; z-index: 1; width: 78%; height: 78%;
  transform: translateY(120%); transition: transform .12s ease; pointer-events: none;
}
.mole.up { transform: translateY(8%); }
.mole.whacked { animation: pop .22s ease; }
.mole .pixel { width: 100%; height: 100%; }
.mole .pixel svg { width: 100%; height: 100%; display: block; }
.hole.bomb-flash { animation: shakeX .4s ease; }

#hint {
  font-family: var(--f-pixel); font-size: 11px; color: var(--ink);
  background: var(--card); padding: 6px 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--b-soft); white-space: nowrap; pointer-events: none; transition: opacity .3s; box-shadow: var(--sh-soft);
}

.overlay { position: fixed; inset: 0; background: rgba(46, 37, 72, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; touch-action: none; }
.go-card { text-align: center; max-width: 320px; width: 100%; animation: fadeInUp .35s ease; }
#over-mascot { width: 84px; height: 84px; margin: 0 auto 10px; }
#over-mascot.happy { animation: pop .5s ease; }
#over-mascot.sad { animation: shakeX .5s ease; }
.go-title { font-family: var(--f-display); font-size: 24px; color: var(--ink); }
.go-score { font-size: 15px; color: var(--ink2); margin-top: 4px; }
.go-score strong { font-family: var(--f-pixel); font-size: 20px; color: var(--c-primary); margin-left: 6px; }
.go-best { font-size: 13px; color: var(--soft); margin-top: 2px; }
.go-best strong { font-family: var(--f-pixel); font-size: 15px; color: var(--c-purple); margin-left: 6px; }
#restart { margin-top: 16px; width: 100%; }
[hidden] { display: none !important; }
