/* ===== 플래피 — 3:4 캔버스 ===== */
.stage {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 16px 40px;
}
.canvas-area {
  position: relative;
  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: pointer;
}
.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.shake #gameCanvas { animation: shake .3s ease; }
html.reduce-motion .canvas-area.shake #gameCanvas { animation: none; }

.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-controls {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,.12);
  font-size: .78rem; color: var(--ink-2);
}
.log-table .rank-1 td:first-child { color: #FFD166; font-weight: 800; }
.log-table .rank-2 td:first-child { color: #C9C3DD; font-weight: 800; }
.log-table .rank-3 td:first-child { color: #D2936B; font-weight: 800; }
