/* 지도 고르기 창(모바일): 화면 아래에서 올라오는 칸으로, 연구실 디자인(어두운 남색 · 금색 테두리)에 맞춥니다.
   "어떤 지도로 볼까요?" 창에만 적용됩니다. 데스크톱 화면은 그대로입니다. */
@media (max-width: 899px) {
  /* 버튼을 누를 때 주변에 잠깐 생기던 파란 네모 없애기 (휴대폰 공통)
     ① 브라우저가 누른 자리에 칠하는 반투명 표시  ② 그림 위 투명 버튼의 눌림 색  ③ 손가락으로 눌렀을 때 생기는 테두리
     키보드(Tab)로 이동할 때의 테두리는 그대로 남깁니다(html.kbd). */
  * { -webkit-tap-highlight-color: transparent !important; }
  .ez-scene .sc4-hit:active { background: transparent !important; }
  html:not(.kbd) :focus, html:not(.kbd) :focus-visible { outline: none !important; }
  html:not(.kbd) .sc7-wheel:focus-visible + .sc7-bar { border-color: #C9A04A; }

  /* 잠깐 떴다 사라지는 안내 글(토스트): 화면 한가운데, 흰 바탕에 짙은 글씨로 또렷하게 */
  .toast {
    top: 50% !important; bottom: auto !important; left: 50% !important; z-index: 2147483000 !important;
    width: max-content; max-width: calc(100% - 48px) !important; padding: 18px 22px !important; border-radius: 16px !important;
    background: #FFFFFF !important; color: #14284B !important; border: 2px solid #C9A04A; text-align: center;
    font-size: 1.1rem !important; font-weight: 800 !important; line-height: 1.5;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55) !important; transform: translate(-50%, -40%) !important;
  }
  .toast.show { transform: translate(-50%, -50%) !important; }
  .toast * { color: #14284B !important; }

  dialog.dialog:has(.map-pick) {
    position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 92dvh; margin: 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    border: 0; border-top: 2px solid #C9A04A; border-radius: 22px 22px 0 0; background: #0E1B36; color: #EAF2FF;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.6); overflow-y: auto; animation: map-sheet-up 0.2s ease;
  }
  dialog.dialog:has(.map-pick)::backdrop { background: rgba(3, 8, 18, 0.72); }
  @keyframes map-sheet-up { from { transform: translateY(40px); } to { transform: none; } }
  dialog.dialog:has(.map-pick) .form { padding: 0; background: none; border: 0; box-shadow: none; }
  dialog.dialog:has(.map-pick) h2 { margin: 0; font-size: 1.3rem; font-weight: 900; color: #fff; }
  dialog.dialog:has(.map-pick) .small { margin-top: 4px; font-size: 0.95rem; color: #B9CCE8; }
  dialog.dialog:has(.map-pick) .stack { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  dialog.dialog:has(.map-pick) .map-pick {
    flex-direction: column; justify-content: center; gap: 8px; min-height: 104px; padding: 12px 8px; text-align: center; border-radius: 18px;
    color: #14284B; font-size: 1.05rem; font-weight: 900;
    background: linear-gradient(180deg, #F3F6FB 0%, #E6EAF2 45%, #D6DCE8 100%); border: 1px solid #F9FBFE; border-bottom-color: #A9B4C8;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.95), inset 0 -4px 8px rgba(120, 135, 165, 0.25), 0 6px 12px rgba(0, 0, 0, 0.45);
  }
  dialog.dialog:has(.map-pick) .map-pick:active { transform: scale(0.96); }
  dialog.dialog:has(.map-pick) .map-pick:focus-visible { outline: 3px solid #5EE1F2; outline-offset: 2px; }
  dialog.dialog:has(.map-pick) .map-ico { width: 52px; height: 52px; }
  dialog.dialog:has(.map-pick) .map-ico svg { width: 52px; height: 52px; }
  dialog.dialog:has(.map-pick) .map-name { flex: 0 0 auto; }
  dialog.dialog:has(.map-pick) .map-go { display: none; }
  dialog.dialog:has(.map-pick) .btn-row { margin-top: 14px !important; }
  dialog.dialog:has(.map-pick) [data-map-close] {
    width: 100%; min-height: 54px; border-radius: 16px; font-size: 1.1rem; font-weight: 900; color: #EAF2FF; background: transparent; border: 2px solid #9CC2FF; box-shadow: none;
  }
  @media (prefers-reduced-motion: reduce) { dialog.dialog:has(.map-pick) { animation: none; } }
}
