/* 앱 전용 덧칠: 포털 머리말·계정이 빠진 자리, 노치·홈 막대 여백, 길게 눌러 선택 막기 */
@font-face {
  font-family: 'Pretendard';
  src: url('fonts/pretendard.woff2') format('woff2-variations'), url('fonts/pretendard.woff2') format('woff2');
  font-weight: 45 920;
  font-display: swap;
}
html, body { overscroll-behavior: none; }
body {
  min-height: 100dvh;
  padding: calc(16px + env(safe-area-inset-top, 0px)) env(safe-area-inset-right, 0px) calc(24px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
  word-break: keep-all;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.turnfall-layout { margin-top: 24px; }
.app-links a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.app-links a:hover { color: var(--text); }
.app-links a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.save-panel p { max-width: 68ch; }
@media (pointer: coarse) { .turn-control kbd, .quick-guide kbd { display: none; } }

@media (max-width: 650px) {
  body { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  .turnfall-layout { margin-top: 0; }
  .game-intro { padding-top: 4px; }
  /* 제목 줄·점수·버튼·안내 줄을 뺀 높이만큼만 판을 키워 한 화면에 다 들어오게 */
  .game-stage { width: min(100%, calc(100dvh - 352px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))); min-width: 280px; margin-inline: auto; }
}
@media (max-height: 540px) and (min-width: 651px) and (max-width: 1000px) {
  body { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .turnfall-layout { margin-top: 0; }
}
