/* 모아이 악마의 함정 — 게임 스타일 */
#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)) 0 max(10px, env(safe-area-inset-left));
}
#hud { display: flex; align-items: center; gap: 12px; padding: 4px 4px 8px; }
#mascot { width: 44px; height: 44px; flex: 0 0 auto; }
.info { flex: 1; display: flex; align-items: baseline; gap: 8px; }
.info .pixel-label { font-size: 10px; }
.info strong { font-family: var(--f-pixel); font-size: 22px; color: var(--ink); }
#newgame { padding: 8px 12px; font-size: 13px; }

#stage { position: relative; flex: 1; min-height: 0; }
#cv { display: block; width: 100%; height: 100%; touch-action: none; }

#pad { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; padding: 0 max(14px, env(safe-area-inset-left)) 0 max(14px, env(safe-area-inset-right)); pointer-events: none; }
.left-pad { display: flex; gap: 12px; pointer-events: none; }
.ctrl {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--ink); background: rgba(255, 255, 255, .82); color: var(--ink);
  font-size: 26px; font-weight: 700; box-shadow: 0 6px 0 rgba(46, 37, 72, .18);
  touch-action: none; user-select: none; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
}
.ctrl:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(46, 37, 72, .18); }
.ctrl.jump { background: var(--c-primary); color: #fff; }
#left::before {
  content: '';
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 17px solid currentColor;
}
#right::before {
  content: '';
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid currentColor;
}
#jump::before {
  content: '';
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 17px solid currentColor;
}

.overlay { position: fixed; inset: 0; background: rgba(46, 37, 72, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.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.sad { animation: shakeX .5s ease; }
#over-mascot.happy { animation: pop .5s ease; }
.go-title { font-family: var(--f-display); font-size: 24px; color: var(--ink); margin-bottom: 6px; }
#restart { margin-top: 16px; width: 100%; }
[hidden] { display: none !important; }
