/* 전국 파크골프장 지도(/parkgolf/country_courses) — 휴대폰 우선 화면 (2026-11-01 시안 그대로 구현)
   시안·비교 캡처·결정 기록: output/parkgolf-map-mobile-20261101/ (README.md). 동작 정의는 그 README '시안' 절 14항목.
   운영 site.css 의 변수(--pg-forest, --pg-ink, --pg-muted, --pg-line, --pg-sage, --pg-header-h)를 그대로 쓴다.
   휴대폰(≤860px): 사이트 헤더 2줄을 숨기고 한 줄 머리(.mw-bar) + 지도 위 칩 + 오른쪽 둥근 단추 + 아래 시트.
   넓은 화면(≥861px): 사이트 헤더 그대로, 왼쪽 400px 패널(검색·칩·목록) + 지도. */

html, body.pg-site.pg-map-workspace { height: 100%; overflow: hidden; }
body.pg-site.pg-map-workspace { padding-top: 0 !important; }
body.pg-site.pg-map-workspace.app-mode .pg-site-header { display: none; }
body.app-mode { --pg-header-h: 0px; }

.mw { position: relative; height: calc(100dvh - var(--pg-header-h, 0px)); overflow: hidden; background: #e9eef1; display: flex; flex-direction: column; }
.mw-stage { position: relative; flex: 1; min-height: 0; }
.mw-map { position: absolute; inset: 0 0 var(--mw-peek, 56px) 0; z-index: 1; isolation: isolate; }
#map { width: 100%; height: 100%; }
.mw-spinner { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 3px solid var(--pg-line); border-top-color: var(--pg-forest); border-radius: 50%; animation: mw-spin 1s linear infinite; z-index: 5; }
@keyframes mw-spin { to { transform: rotate(360deg); } }

/* ── 한 줄 머리(휴대폰): 로고 아이콘 · 검색 · 앱 알아보기 · 전체 메뉴 ────────── */
.mw-bar { flex: none; display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 10px 0 12px; background: #fff; border-bottom: 1px solid var(--pg-line); position: relative; z-index: 40; }
.mw-brand { flex: none; display: inline-flex; width: 36px; height: 36px; }
.mw-brand img { width: 36px; height: 36px; border-radius: 9px; }
.mw-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 10px; background: #f1f4f0; border-radius: 19px; }
.mw-search svg { flex: none; width: 18px; height: 18px; color: var(--pg-forest); }
.mw-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--pg-ink); }
.mw-search input::placeholder { color: #8a948d; }
.mw-search input::-webkit-search-cancel-button, .mw-search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.mw-search input:focus { outline: none; }
.mw-search:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--pg-forest); }
.mw-clear { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #dfe5df; color: var(--pg-ink); font-size: 16px; line-height: 1; cursor: pointer; }
.mw-clear[hidden] { display: none; }
/* 사이트 공통 `.pg-site a{color:inherit}` 가 이기지 않게 `.pg-site` 를 붙인다(2026-11-01 '앱 알아보기' 글자가 안 보이던 원인). 흰 글자/#164f3c = 9.5:1 */
.pg-site .mw-bar .mw-app, .pg-site .mw-bar .mw-app:visited { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--pg-forest); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.mw-menu { flex: none; }
.mw-bar .pg-site-actions .pg-site-menu { margin-left: 0; }
.mw-bar .pg-site-menu summary { min-width: 40px; min-height: 40px; }
.mw-bar .pg-site-menu-panel { top: 52px; }
.mw-bar .pg-site-menu-panel .mw-menu-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; margin-bottom: 6px; border-bottom: 1px solid var(--pg-line); }
.mw-bar .pg-site-menu-panel .mw-menu-nav a { display: inline-flex; min-height: 36px; padding: 0 12px; border: 1px solid var(--pg-line); border-radius: 18px; font-size: 14px; font-weight: 600; }
.mw-bar .pg-site-menu-panel .mw-menu-nav a[aria-current] { background: var(--pg-forest); border-color: var(--pg-forest); color: #fff; }
.mw-bar .pg-site-menu-panel .mw-menu-tools { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; padding-top: 10px; }
.mw-bar .pg-site-menu-panel .mw-menu-tools .pg-site-font { border: 1px solid var(--pg-line); border-radius: 7px; }
body.app-mode .mw-brand, body.app-mode .mw-app, body.app-mode .mw-menu { display: none; }
@media (max-width: 860px) { body.pg-site.pg-map-workspace .pg-site-header { display: none; } }
@media (max-width: 359px) { .pg-site .mw-bar .mw-app { display: none; } }

/* ── 지도 위 칩 한 줄 ───────────────────────────────────────────────── */
.mw-top { position: absolute; top: 0; left: 0; right: 0; z-index: 20; padding: 8px 12px 0; pointer-events: none; }
.mw-top > * { pointer-events: auto; }
.mw-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mw-chips::-webkit-scrollbar { display: none; }
.mw-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 13px; border: 1px solid var(--pg-line); border-radius: 18px; background: #fff; color: var(--pg-ink); font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; box-shadow: 0 1px 4px rgba(16, 36, 26, .12); cursor: pointer; white-space: nowrap; }
.mw-chip svg { width: 15px; height: 15px; }
.mw-chip.is-on { background: var(--pg-forest); border-color: var(--pg-forest); color: #fff; }
.mw-chip.is-link { color: var(--pg-forest); }

/* ── 오른쪽 둥근 단추(위성·현재 위치): 시트 머리 위에 붙어 같이 오르내린다 ─ */
.mw-fabs { position: absolute; right: 12px; bottom: calc(var(--mw-sheet-h, 56px) + 30px); z-index: 31; display: flex; flex-direction: column; gap: 10px; transition: bottom .26s ease, opacity .2s; }
.mw.is-dragging .mw-fabs { transition: none; }
.mw[data-sheet="full"] .mw-fabs { opacity: 0; pointer-events: none; }
.mw-fab { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--pg-forest); box-shadow: 0 2px 8px rgba(16, 36, 26, .22); display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.mw-fab[aria-pressed="true"] { background: var(--pg-forest); color: #fff; }
.mw-fab svg { width: 22px; height: 22px; }
.mw-fab.is-busy svg { animation: mw-spin 1s linear infinite; }

/* ── 아래 시트(목록) ──────────────────────────────────────────────── */
.mw-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--mw-peek, 56px); background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 18px rgba(16, 36, 26, .16); display: flex; flex-direction: column; transition: height .26s ease; touch-action: none; }
.mw-sheet.is-dragging { transition: none; }
.mw-sheet[data-state="full"] { border-radius: 0; }
.mw-sheet-head { flex: none; height: var(--mw-peek, 56px); padding: 6px 16px 0; display: flex; align-items: center; gap: 10px; cursor: grab; position: relative; user-select: none; }
.mw-grip { position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #cfd6d0; }
.mw-sheet-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding-top: 6px; white-space: nowrap; overflow: hidden; }
.mw-sheet-title strong { font-size: 16px; font-weight: 700; color: var(--pg-ink); overflow: hidden; text-overflow: ellipsis; }
.mw-sheet-title span { font-size: 13px; color: var(--pg-muted); }
.mw-sheet-toggle { flex: none; margin-top: 6px; height: 32px; padding: 0 10px 0 12px; border: 1px solid var(--pg-line); border-radius: 16px; background: #fff; color: var(--pg-forest); font: inherit; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.mw-sheet-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.mw-sheet[data-state="half"] .mw-sheet-toggle svg, .mw-sheet[data-state="full"] .mw-sheet-toggle svg { transform: rotate(180deg); }
.mw-sheet-body { flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; touch-action: pan-y; padding: 0 12px 24px; }
.mw-sheet[data-state="peek"] .mw-sheet-body { overflow: hidden; }

/* 선택한 구장 카드 */
.mw-selected { margin: 2px 0 10px; padding: 12px; border: 1.5px solid var(--pg-forest); border-radius: 14px; background: #f5f9f4; }
.mw-selected .mw-row { display: flex; gap: 12px; align-items: flex-start; }
.mw-selected .mw-thumb { width: 84px; height: 84px; border-radius: 10px; }
.mw-selected h3 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 700; color: var(--pg-ink); word-break: keep-all; }
.mw-selected .mw-addr { margin-top: 3px; font-size: 13px; color: #5b685f; line-height: 1.5; }
.mw-selected .mw-meta { margin-top: 6px; }
.mw-selected .mw-actions { display: flex; gap: 8px; margin-top: 12px; }
.pg-site .mw-btn, .pg-site .mw-btn:visited { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 1px solid var(--pg-forest); background: var(--pg-forest); color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.pg-site .mw-btn.is-ghost, .pg-site .mw-btn.is-ghost:visited { background: #fff; color: var(--pg-forest); }
.mw-btn svg { width: 18px; height: 18px; }
.mw-selected-close { position: absolute; right: 0; top: 0; width: 36px; height: 36px; border: 0; background: transparent; color: #5b685f; font-size: 20px; cursor: pointer; }
.mw-selected .mw-head { position: relative; flex: 1; min-width: 0; padding-right: 32px; }

/* 광고 자리 — 예전 목록 모달 맨 위와 같은 자리(parkgolf_top, site_ad.html). 높이는 site.css 가 정한다(휴대폰 100px). */
.mw-ad { margin: 4px 0 10px; }
.pg-site .mw-ad .pg-editorial-ad > span { display: block; font-size: 11px; letter-spacing: .08em; color: var(--pg-muted); margin-bottom: 4px; }

/* 목록 카드 */
.mw-list { list-style: none; margin: 0; padding: 0; }
.mw-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--pg-line); cursor: pointer; }
.mw-item.is-sel { background: #f5f9f4; margin: 0 -12px; padding-left: 16px; padding-right: 16px; }
.mw-thumb { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--pg-sage); display: flex; align-items: center; justify-content: center; color: var(--pg-forest); }
.mw-thumb svg { width: 26px; height: 26px; opacity: .7; }
.mw-item .mw-body { flex: 1; min-width: 0; }
.mw-item h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--pg-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-item .mw-addr { margin-top: 2px; font-size: 13px; color: var(--pg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: #40504a; }
.mw-meta b { font-weight: 700; color: var(--pg-ink); }
.mw-meta .mw-star { color: var(--pg-ink); font-weight: 700; }
.mw-meta .mw-star i { font-style: normal; color: #b47a00; }
.mw-meta .mw-km { color: var(--pg-forest); font-weight: 700; }
.mw-badge { display: inline-block; padding: 1px 7px; border-radius: 9px; background: var(--pg-forest); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 2px; margin-left: 6px; }
.mw-item .mw-go { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--pg-line); color: var(--pg-forest); text-decoration: none; }
.mw-item .mw-go svg { width: 18px; height: 18px; }
.mw-more { display: block; width: 100%; margin: 12px 0 0; min-height: 44px; border: 1px solid var(--pg-line); border-radius: 10px; background: #fff; color: var(--pg-forest); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.mw-empty { padding: 28px 8px; text-align: center; color: var(--pg-muted); font-size: 15px; }

/* ── 지역 고르기 ──────────────────────────────────────────────────── */
.mw-dlg { border: 0; border-radius: 16px 16px 0 0; padding: 0; width: 100%; max-width: 100%; margin: auto 0 0; background: #fff; box-shadow: 0 -4px 18px rgba(16, 36, 26, .2); }
.mw-dlg::backdrop { background: rgba(16, 36, 26, .35); }
.mw-dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; font-size: 16px; font-weight: 700; }
.mw-dlg-head button { border: 0; background: transparent; font-size: 22px; color: var(--pg-muted); width: 40px; height: 40px; cursor: pointer; }
.mw-regions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 18px 22px; }
.mw-region { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 14px; border: 1px solid var(--pg-line); border-radius: 20px; background: #fff; color: var(--pg-ink); font: inherit; font-size: 15px; cursor: pointer; }
.mw-region small { font-size: 12px; color: var(--pg-muted); }
.mw-region.is-on { background: var(--pg-forest); border-color: var(--pg-forest); color: #fff; }
.mw-region.is-on small { color: #d7e8dc; }

/* ── 마커(네이버·구글 공통 HTML) ─────────────────────────────────── */
.mw-pin { width: 28px; height: 28px; border-radius: 50%; background: var(--pg-forest); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; color: #fff; transition: transform .15s; }
.mw-pin svg { width: 15px; height: 15px; }
.mw-pin.is-sel { width: 38px; height: 38px; background: var(--pg-ink); box-shadow: 0 0 0 4px rgba(32, 43, 37, .22), 0 3px 8px rgba(0, 0, 0, .35); }
.mw-pin.is-sel svg { width: 20px; height: 20px; }
.mw-cluster { min-width: 40px; height: 40px; padding: 0 8px; border-radius: 20px; background: var(--pg-forest); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; }
.mw-cluster.is-big { min-width: 48px; height: 48px; font-size: 15px; background: #113c2e; }
.mw-here { width: 18px; height: 18px; border-radius: 50%; background: #2f7cf6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 124, 246, .22), 0 2px 6px rgba(0, 0, 0, .3); }
/* 구글 HTML 오버레이 마커: 좌표가 마커 가운데에 오게 한다(네이버는 anchor 로 같은 일을 한다). */
.mw-gm { position: absolute; transform: translate(-50%, -50%); cursor: pointer; }

/* ── 넓은 화면: 사이트 헤더 그대로 + 왼쪽 패널(검색·칩·목록) + 지도 ──────── */
@media (min-width: 861px) {
  .mw { display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .mw-bar { grid-column: 1; grid-row: 1; height: auto; padding: 14px 16px 6px; border-bottom: 0; border-right: 1px solid var(--pg-line); }
  .mw-brand, .mw-app, .mw-menu { display: none; }
  .mw-search { height: 44px; background: #fff; border: 1px solid var(--pg-line); }
  .mw-stage { display: contents; }
  .mw-map { position: relative; inset: auto; grid-column: 2; grid-row: 1 / 4; }
  .mw-top { position: static; grid-column: 1; grid-row: 2; padding: 4px 16px 10px; border-right: 1px solid var(--pg-line); background: #fff; }
  .mw-chip { box-shadow: none; }
  .mw-sheet { position: static; grid-column: 1; grid-row: 3; height: auto !important; border-radius: 0; box-shadow: none; border-right: 1px solid var(--pg-line); touch-action: auto; }
  .mw-sheet-head { cursor: default; padding-top: 0; height: 44px; border-bottom: 1px solid var(--pg-line); }
  .mw-grip, .mw-sheet-toggle { display: none; }
  .mw-sheet-title { padding-top: 0; }
  .mw-sheet[data-state] .mw-sheet-body { overflow-y: auto; padding: 0 16px 24px; }
  .mw-fabs { position: absolute; right: 16px; bottom: 28px; }
  .mw-dlg { width: 420px; margin: auto; border-radius: 16px; }
}
