/* 휴대폰 화면 맞춤(Claude, 2026-10-17). 사용자: "모바일 세로·가로 전부, 최소한으로 UI 배치를 맞춰 원활히 돌아가게".
   css/style.css(코덱스)는 이미 820px 아래에서 명단을 가로 띠(손가락으로 밀기)로 바꾸고 미니맵을 줄인다. 여기서는 그 위에 더한다:
   - 손가락 화면(pointer: coarse): 단추 안의 키보드 안내(Esc·화살표 등)를 감추고, 작은 닫기 단추·출처 링크를 손가락 크기로
   - 높이가 낮은 가로 화면(500px 이하): 미니맵·명단을 높이에 맞게 줄이고, 일시 정지 메뉴를 한 화면에 들어가게
   tools/mobile-survey.mjs 가 세로 390×844·가로 844×390 에서 가로 스크롤·화면 밖·겹침·작은 단추를 잰다. */

@media (pointer: coarse) {
  /* 키보드가 없으니 키 안내는 감춘다(설명 글 속 kbd 는 그대로) */
  button kbd, .controls kbd, #arrowHint { display: none !important; }
  /* 손가락으로 누르기 쉽게(최소 44px) */
  #guideClose, .guide > .x, .hofbox .x, .sandbox-dialog .x { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
  .guide a, .hofbox a { display: inline-block; padding: 7px 0; }
  .controls .btn { min-height: 40px; }
  /* 명단 띠는 손가락으로 옆으로 민다 */
  :root:not([data-ui-desktop-fit="true"]) .roster { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root:not([data-ui-desktop-fit="true"]) #minimap { width: auto; height: 36vh; bottom: 60px; right: 10px; }
  :root:not([data-ui-desktop-fit="true"]) #minimap.square { width: auto; height: 30vh; }
  :root:not([data-ui-desktop-fit="true"]) .roster { top: 52px; bottom: 60px; width: 104px; gap: 3px; }
  :root:not([data-ui-desktop-fit="true"]) .hud-top { top: 6px; }
  /* 일시 정지 메뉴: 한 화면에 들어가게 촘촘하게(그래도 넘치면 메뉴 안에서 밀린다) */
  .pause { padding: 6px; }
  .pz { padding: 10px 16px 10px; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); overflow-y: auto; }
  .pz .kicker { display: none; }
  .pz h2 { font-size: 20px; margin: 0 0 4px; }
  .prow { margin: 2px 0; gap: 8px; }
  .prow > span { font-size: 13px; }
  .pz .pbtn { margin-top: 6px; }
  .pz .pbtn .btn { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
}
