/* ===== 메테오 런 — 캔버스 ===== */
.stage {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 16px 40px;
}
.canvas-area {
  position: relative;
  /* 뷰포트 안에 캔버스(3:4)가 들어가도록 높이 기준 폭 제한 */
  width: min(460px, 92vw, calc((100vh - 190px) * 0.75));
}
#gameCanvas {
  display: block;
  width: 100%;
  border: 3px solid var(--wall);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #17141F;
  touch-action: none;      /* 드래그 조작용 */
  cursor: crosshair;
}
/* 가장자리 비네트 — 깊이감 */
.canvas-area::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 56px rgba(0,0,0,.4);
  pointer-events: none; z-index: 3;
}
.canvas-area.danger #gameCanvas {
  border-color: var(--danger);
  animation: dangerPulse 1s ease-in-out infinite;
}
@keyframes dangerPulse { 50% { box-shadow: var(--shadow-lg), 0 0 26px rgba(255,107,94,.45); } }
.canvas-area.shake #gameCanvas { animation: shake .3s ease; }

/* 레벨업 표시 */
.level-flash {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; z-index: 4;
}
.level-flash span {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.8rem; color: var(--gold);
  text-shadow: 3px 3px 0 rgba(0,0,0,.5), 0 0 30px rgba(255,209,102,.5);
  animation: levelPop 1.1s ease forwards;
}
@keyframes levelPop {
  0% { transform: scale(.6); opacity: 0; }
  25% { transform: scale(1.15); opacity: 1; }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
html.reduce-motion .canvas-area.shake #gameCanvas,
html.reduce-motion .canvas-area.danger #gameCanvas { animation: none; }
html.reduce-motion .level-flash span { animation-duration: .01s; }

/* ----- 시작 오버레이 버튼 ----- */
.overlay-btns { display: grid; gap: 10px; justify-items: center; }
.overlay-btns-sub { display: flex; gap: 8px; }

/* ----- 팝업 모달 ----- */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(14,11,20,.7);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px 26px 24px;
  max-width: 480px; width: 100%;
  max-height: 85vh; overflow-y: auto;
}
.modal-card h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; }
.modal-card .btn-primary { margin-top: 18px; width: 100%; }
.how-list { list-style: none; display: grid; gap: 10px; }
.how-list li { font-size: .88rem; line-height: 1.6; color: var(--ink-2); }
.how-list b { color: var(--ink); }
.how-controls {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,.12);
  font-size: .78rem; color: var(--ink-2);
}


