/* 팜시크릿 — 팜맵 (네이버지도 기반, 직방 스타일)
 * 단일 풀사이즈 셸: 좌 400px 통합정보 패널 + 우 지도(나머지 전체)
 * 헤더는 56px 초슬림. 다른 페이지의 .ps-header 골격은 사용하지 않는다.
 */

/* ═════════════════════════════════════════════
   리셋 / 스코프
   ═════════════════════════════════════════════ */
html, body {
  height: 100%;
  margin: 0;
  background: #fff;
  color: #111827;
  font-family: var(--font-sans, 'Pretendard Variable', Pretendard, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}
body.pm-body { overflow: hidden; }
body.pm-body .pm-no-scroll { overflow: hidden; }

:root {
  --pm-blue: #2563eb;
  --pm-blue-2: #3b82f6;
  --pm-blue-soft: #eff6ff;
  --pm-blue-dark: #1d4ed8;
  --pm-grad: linear-gradient(135deg, #4f46e5 0%, #2563eb 60%, #06b6d4 100%);
  --pm-text: #111827;
  --pm-text-2: #4b5563;
  --pm-text-3: #6b7280;
  --pm-line: #eef0f3;
  --pm-line-2: #e5e7eb;
  --pm-bg: #f8fafc;
  --pm-radius: 14px;

  --pm-cat-pharm: #2563eb;
  --pm-cat-clinic: #16a34a;
  --pm-cat-hosp: #dc2626;
  --pm-cat-listing: #7c3aed;

  /* 지도 위 floating UI 공통 토큰 (그림자·라운드 통일) */
  --pm-float-shadow: 0 4px 16px rgba(15,23,42,0.12), 0 1px 3px rgba(15,23,42,0.06);
  --pm-float-radius: 12px;
}

/* ═════════════════════════════════════════════
   상단 헤더 (초슬림 56px) — 직방 스타일
   ═════════════════════════════════════════════ */
.pm-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--pm-line);
  z-index: 60;
  display: flex;
  align-items: center;
}
.pm-topbar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 20px;
  gap: 28px;
}
.pm-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--pm-text);
  text-decoration: none;
  flex-shrink: 0;
}
.pm-logo-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pm-blue);
}
.pm-logo-beta {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: #a855f7;
  margin-left: 2px;
  transform: translateY(-2px);
  font-weight: 700;
}
.pm-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}
.pm-nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pm-text-2);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.12s ease, color 0.12s ease;
}
.pm-nav a:hover { color: var(--pm-text); background: #f3f4f6; }
.pm-nav a.is-active { color: var(--pm-blue); background: var(--pm-blue-soft); }
.pm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.pm-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.pm-topbar-btn:hover { background: #f3f4f6; color: var(--pm-text); }
.pm-topbar-btn--primary {
  background: var(--color-brand, #FE691B);
  color: #fff;
}
.pm-topbar-btn--primary:hover { background: var(--color-brand-dark, #CC4F0E); color: #fff; }
.pm-topbar-btn--ghost {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: var(--pm-text-2);
}
.pm-topbar-btn--ghost:hover { background: #f9fafb; }
@media (max-width: 1024px) {
  .pm-topbar-actions .pm-topbar-btn:not(.pm-topbar-btn--primary):not(.pm-topbar-btn--ghost) { display: none; }
}
.pm-topbar-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--pm-text-2);
  cursor: pointer;
}
.pm-topbar-icon:hover { background: #f3f4f6; color: var(--pm-text); }
.pm-topbar-icon svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .pm-nav { display: none; }
  .pm-topbar-inner { gap: 12px; padding: 0 14px; }
}

/* ═════════════════════════════════════════════
   필터바 — 당근부동산 스타일 (헤더 아래 풀폭)
   ═════════════════════════════════════════════ */
.pm-filterbar {
  position: fixed;
  top: 56px; left: 0; right: 0;
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--pm-line);
  z-index: 55;
  display: flex;
  align-items: center;
}
.pm-filterbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 0 20px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
.pm-filterbar-inner::-webkit-scrollbar { display: none; }
.pm-filterbar-divider {
  width: 1px;
  height: 22px;
  background: var(--pm-line-2);
  flex-shrink: 0;
  margin: 0 4px;
}
.pm-filterbar-spacer { flex: 1; min-width: 8px; }

/* 검색 인풋 (필터바 내장) */
.pm-map-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  height: 38px;
  padding: 0 14px;
  background: #f4f5f7;
  border: 1px solid transparent;
  border-radius: 9999px;
  flex-shrink: 0;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pm-map-search:focus-within {
  background: #fff;
  border-color: var(--pm-blue);
}
.pm-map-search svg { color: var(--pm-text-3); flex-shrink: 0; }
.pm-map-search:focus-within svg { color: var(--pm-blue); }
.pm-map-search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  min-width: 0;
}

/* 드롭다운 필터 알약 */
.pm-fdrop { position: relative; flex-shrink: 0; }
.pm-fdrop-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--pm-line-2);
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-text);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.pm-fdrop-btn:hover { border-color: #c9cdd2; background: #f9fafb; }
.pm-fdrop-btn svg { width: 14px; height: 14px; color: var(--pm-text-3); transition: transform 0.15s ease; }
.pm-fdrop.is-open .pm-fdrop-btn { border-color: var(--pm-text); }
.pm-fdrop.is-open .pm-fdrop-btn svg { transform: rotate(180deg); }
.pm-fdrop-btn.is-on {
  background: var(--pm-blue-soft);
  border-color: var(--pm-blue);
  color: var(--pm-blue);
}
.pm-fdrop-btn.is-on svg { color: var(--pm-blue); }

.pm-fdrop-panel {
  display: none;
  /* 필터바가 가로 스크롤 컨테이너라 absolute는 잘림 — JS가 좌표 지정 */
  position: fixed;
  min-width: 300px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 14px;
  box-shadow: var(--pm-float-shadow);
  z-index: 56;
}
.pm-fdrop.is-open .pm-fdrop-panel { display: block; }
.pm-fdrop-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: -6px;
}
.pm-fdrop-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  text-align: left;
}
.pm-fdrop-opt:hover { background: #f3f4f6; }
.pm-fdrop-opt.is-active { color: var(--pm-blue); background: var(--pm-blue-soft); }
.pm-fdrop-opt em {
  font-style: normal;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #9ca3af;
}
.pm-fdrop-opt.is-active em { color: var(--pm-blue); }
.pm-fdrop-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--pm-line);
}
.pm-fdrop-apply {
  width: 100%;
  padding: 10px 14px;
  background: var(--pm-text);
  color: #fff;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.pm-fdrop-apply:hover { background: #000; }
.pm-fdrop-apply em { font-style: normal; font-family: var(--font-mono, monospace); margin-left: 4px; }

/* 초기화 */
.pm-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-3);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.pm-filter-reset:hover { color: var(--pm-text); background: #f3f4f6; }
.pm-filter-reset svg { width: 13px; height: 13px; }
.pm-filter-reset.hidden { display: none; }

/* 우측 지도 레이어 토글 */
.pm-bar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--pm-line-2);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.12s ease;
}
.pm-bar-toggle:hover { border-color: #c9cdd2; color: var(--pm-text); }
.pm-bar-toggle.is-on {
  background: var(--pm-text);
  border-color: var(--pm-text);
  color: #fff;
}
.pm-bar-toggle svg { width: 14px; height: 14px; }

/* ═════════════════════════════════════════════
   본문 셸 — 좌 패널 + 우 지도
   ═════════════════════════════════════════════ */
.pm-shell {
  position: fixed;
  top: 114px; left: 0; right: 0; bottom: 0;
  display: flex;
  background: #fff;
}

/* ─── 좌측 통합정보 패널 (400px 고정) ─── */
.pm-side {
  width: 400px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--pm-line);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
}
.pm-side-inner {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.pm-side-inner::-webkit-scrollbar { width: 8px; }
.pm-side-inner::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }
.pm-side-inner::-webkit-scrollbar-track { background: transparent; }

/* ─── 우측 지도 영역 ─── */
.pm-mapwrap {
  flex: 1;
  position: relative;
  background: #eef2f7;
  min-width: 0;
}
.pm-map { position: absolute; inset: 0; }
.pm-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f1f5f9;
  pointer-events: none;
}
/* 지도가 로드되면 플레이스홀더는 JS로 숨김 */
.pm-map-placeholder-text {
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}
.pm-map-placeholder-sub {
  font-size: 13px;
  color: #94a3b8;
}

/* ═════════════════════════════════════════════
   [미선택 상태] 화면 요약 + 결과 리스트
   ═════════════════════════════════════════════ */
.pm-side-list { display: flex; flex-direction: column; }
.pm-side-list.hidden,
.pm-side-detail.hidden { display: none !important; }

.pm-list-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--pm-line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.pm-list-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pm-list-head-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pm-text);
  line-height: 1.3;
  margin: 0;
}
.pm-list-head-title strong {
  color: var(--pm-blue);
  font-variant-numeric: tabular-nums;
}
.pm-list-head-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--pm-text-3);
  margin: 3px 0 12px;
}
.pm-list-head-sub strong { color: var(--pm-text-2); font-weight: 600; }

/* 매수 등록 슬림 CTA */
.pm-list-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--pm-line);
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.12s ease, color 0.12s ease;
}
.pm-list-cta:hover { background: var(--pm-blue-soft); color: var(--pm-blue-dark); }
.pm-list-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--pm-blue-soft);
  color: var(--pm-blue);
  flex-shrink: 0;
}
.pm-list-cta-icon svg { width: 13px; height: 13px; }
.pm-list-cta-arrow { width: 14px; height: 14px; margin-left: auto; color: #c9cdd2; flex-shrink: 0; }
.pm-list-cta:hover .pm-list-cta-arrow { color: var(--pm-blue); }

.pm-list-filterbar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -24px;
  padding: 0 24px;
}
.pm-list-filterbar::-webkit-scrollbar { display: none; }
.pm-fchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--pm-line-2);
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.12s ease;
}
.pm-fchip:hover {
  border-color: #d1d5db;
  color: var(--pm-text);
  background: #f9fafb;
}
.pm-fchip.is-active {
  background: var(--pm-text);
  border-color: var(--pm-text);
  color: #fff;
}
.pm-fchip.is-active:hover { background: #1f2937; }
.pm-fchip-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}
.pm-fchip.is-active .pm-fchip-dot { box-shadow: 0 0 0 2px rgba(255,255,255,0.25); }
.pm-fchip em {
  font-style: normal;
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: #9ca3af;
  font-weight: 600;
}
.pm-fchip.is-active em { color: rgba(255,255,255,0.72); }

/* ═════════════════════════════════════════════
   필터 그룹 (필터바 드롭다운 패널 내부)
   ═════════════════════════════════════════════ */
.pm-filter-group { display: flex; flex-direction: column; gap: 10px; }
.pm-filter-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.pm-filter-group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--pm-text);
  letter-spacing: -0.01em;
}
.pm-filter-group-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pm-blue);
}
.pm-filter-group-value.is-default { color: var(--pm-text-3); font-weight: 600; }
.pm-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pm-filter-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 9999px;
  background: #f3f4f6;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  letter-spacing: -0.01em;
}
.pm-filter-chip:hover { background: #e5e7eb; }
.pm-filter-chip.is-on {
  background: var(--pm-blue-soft);
  border-color: var(--pm-blue);
  color: var(--pm-blue);
}
/* ═════════════════════════════════════════════
   이중 핸들 range 슬라이더
   ═════════════════════════════════════════════ */
.pm-range {
  position: relative;
  height: 28px;
  padding: 0 8px;
}
.pm-range-track {
  position: absolute;
  left: 8px; right: 8px;
  top: 13px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 9999px;
}
.pm-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--pm-blue);
  border-radius: 9999px;
}
.pm-range input[type="range"] {
  position: absolute;
  left: 0; right: 0;
  top: 4px;
  width: 100%;
  height: 20px;
  appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
}
.pm-range input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pm-blue);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  pointer-events: auto;
}
.pm-range input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pm-blue);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  pointer-events: auto;
}
.pm-range input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}
.pm-range-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 10.5px;
  color: var(--pm-text-3);
  margin-top: 2px;
}

/* ═════════════════════════════════════════════
   검색 자동완성 드롭다운
   ═════════════════════════════════════════════ */
.pm-search-wrap {
  position: relative;
  pointer-events: auto;
}
.pm-search-dropdown {
  /* 필터바가 가로 스크롤 컨테이너라 absolute는 잘림 — JS가 좌표 지정 */
  position: fixed;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--pm-float-radius);
  box-shadow: var(--pm-float-shadow);
  border: 1px solid rgba(15,23,42,0.04);
  z-index: 56;
  padding: 6px 0;
}
.pm-search-dropdown.hidden { display: none; }
.pm-search-section {
  padding: 6px 4px;
}
.pm-search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #9ca3af;
  text-transform: uppercase;
}
.pm-search-section-clear {
  background: transparent;
  border: 0;
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.pm-search-section-clear:hover { background: #f3f4f6; color: var(--pm-text-2); }
.pm-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.pm-search-item:hover, .pm-search-item.is-focus { background: #f3f4f6; }
.pm-search-item-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--pm-blue-soft);
  color: var(--pm-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-search-item-icon svg { width: 14px; height: 14px; }
.pm-search-item-icon--recent { background: #f3f4f6; color: var(--pm-text-3); }
.pm-search-item-icon--pharm { background: #dbeafe; color: #1d4ed8; }
.pm-search-item-icon--clinic { background: #dcfce7; color: #15803d; }
.pm-search-item-icon--listing { background: #ede9fe; color: #6d28d9; }
.pm-search-item-icon--dong { background: #fef3c7; color: #92400e; }
.pm-search-item-text { flex: 1; min-width: 0; }
.pm-search-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-text);
  letter-spacing: -0.01em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-search-item-name mark {
  background: #fef3c7;
  color: var(--pm-blue-dark);
  font-weight: 700;
  padding: 0;
}
.pm-search-item-sub {
  font-size: 12.5px;
  color: var(--pm-text-3);
  margin: 1px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-search-item-remove {
  width: 22px; height: 22px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pm-search-item-remove:hover { background: #e5e7eb; color: var(--pm-text-2); }
.pm-search-item-remove svg { width: 12px; height: 12px; }
.pm-search-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--pm-text-3);
}

/* "다시 검색" 카운트 강화 */
.pm-map-research em {
  font-style: normal;
  font-family: var(--font-mono);
  margin-left: 4px;
  padding: 2px 8px;
  background: var(--pm-blue-soft);
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
}
.pm-sort-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  border-radius: 6px;
}
.pm-sort-mini:hover { background: #f3f4f6; }
.pm-sort-mini svg { width: 12px; height: 12px; }

/* ─── 카드 리스트 — 당근부동산 스타일 (플랫, 썸네일 좌측) ─── */
.pm-cards {
  display: flex;
  flex-direction: column;
  padding: 0 0 32px;
}
.pm-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid #f2f3f6;
  cursor: pointer;
  transition: background 0.12s ease;
}
.pm-card:hover { background: #f8f9fa; }
.pm-card.is-active { background: var(--pm-blue-soft); }

.pm-card-thumb {
  width: 76px; height: 76px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-card-thumb-letter {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pm-card-thumb svg { width: 28px; height: 28px; }
.pm-card-thumb--pharm   { background: #eff6ff; color: #3b82f6; }
.pm-card-thumb--clinic  { background: #f0fdf4; color: #22c55e; }
.pm-card-thumb--hosp    { background: #fef2f2; color: #ef4444; }
.pm-card-thumb--listing { background: #f5f3ff; color: #8b5cf6; }

.pm-card-body { min-width: 0; flex: 1; }
.pm-card-price,
.pm-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--pm-text);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-card-price.pm-blur,
.pm-card-name.pm-blur { filter: blur(4px); user-select: none; }
.pm-card-meta {
  font-size: 13px;
  color: #868b94;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-card-meta-open { color: var(--pm-cat-clinic); font-weight: 600; }
.pm-card-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
}
.pm-card-dong {
  font-size: 12px;
  color: #adb1ba;
  margin-right: 2px;
}
.pm-card-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  background: #f2f3f6;
  color: #4d5159;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.pm-card-badge--secret { background: #212124; color: #fff; }
.pm-card-badge--new { background: var(--pm-blue-soft); color: var(--pm-blue); }
.pm-card-badge--hot { background: #fff0e8; color: #e8590c; }

/* ═════════════════════════════════════════════
   [선택 상태] 통합정보 패널 — 직방 스타일
   ═════════════════════════════════════════════ */
.pm-side-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 뒤로가기 / 액션 바 */
.pm-detail-actbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 12px 0 6px;
  border-bottom: 1px solid var(--pm-line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 4;
}
.pm-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  border-radius: 6px;
}
.pm-detail-back:hover { background: #f3f4f6; }
.pm-detail-back svg { width: 14px; height: 14px; }
.pm-detail-actbar-right { display: flex; gap: 2px; }
.pm-detail-iconbtn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--pm-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pm-detail-iconbtn:hover { background: #f3f4f6; color: var(--pm-text); }
.pm-detail-iconbtn svg { width: 16px; height: 16px; }

/* 헤드 영역 — 카테고리 / 이름 / 주소 / 메타 */
.pm-detail-head {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--pm-line);
}
.pm-detail-cat {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pm-blue);
  margin-bottom: 6px;
}
.pm-detail-cat--clinic { color: var(--pm-cat-clinic); }
.pm-detail-cat--hosp { color: var(--pm-cat-hosp); }
.pm-detail-cat--listing { color: var(--pm-cat-listing); }

.pm-detail-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--pm-text);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 6px;
}
.pm-detail-addr {
  font-size: 13px;
  color: var(--pm-text-3);
  margin: 0 0 12px;
}
.pm-detail-headmeta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--pm-text-2);
  flex-wrap: wrap;
}
.pm-detail-meta-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pm-cat-clinic);
  font-weight: 700;
}
.pm-detail-meta-open::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pm-detail-meta-rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--pm-text);
}
.pm-detail-meta-rate svg { width: 13px; height: 13px; color: #f59e0b; }
.pm-detail-meta-tel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pm-text);
  font-weight: 600;
  text-decoration: none;
}
.pm-detail-meta-tel svg { width: 13px; height: 13px; color: var(--pm-text-3); }

/* 탭 — 밑줄 형태 */
.pm-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--pm-line);
  background: #fff;
  position: sticky;
  top: 44px;
  z-index: 3;
}
.pm-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 46px;
  padding: 0 14px;
  margin-right: 4px;
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--pm-text-3);
  cursor: pointer;
  letter-spacing: -0.01em;
  position: relative;
  top: 1px;
}
.pm-tab em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
}
.pm-tab.is-active {
  color: var(--pm-blue);
  border-bottom-color: var(--pm-blue);
  font-weight: 700;
}
.pm-tab.is-active em { color: var(--pm-blue); }

/* 탭 콘텐츠 컨테이너 */
.pm-tabpanels { padding-bottom: 100px; }
.pm-tabpanel { display: none; padding: 18px 24px; }
.pm-tabpanel.is-active { display: block; }

/* ─── [개요 탭] 매물 안내 카드 ─── */
.pm-listing-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--pm-radius);
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pm-listing-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.10);
}
.pm-listing-banner-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pm-blue);
  flex-shrink: 0;
}
.pm-listing-banner-icon svg { width: 20px; height: 20px; }
.pm-listing-banner-text { flex: 1; min-width: 0; }
.pm-listing-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e40af;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.pm-listing-banner-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pm-blue);
}

/* ─── [개요 탭] 핵심 지표 2x2 그리드 ─── */
.pm-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.pm-stat {
  padding: 16px 14px;
  background: #f8fafc;
  border-radius: 12px;
}
.pm-stat-label {
  font-size: 13.5px;
  color: var(--pm-text-3);
  margin-bottom: 6px;
}
.pm-stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--pm-text);
  letter-spacing: -0.025em;
}
.pm-stat-value.pm-blur { filter: blur(6px); user-select: none; }
.pm-stat-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-3);
  letter-spacing: -0.01em;
}

/* ─── [개요 탭] 태그 칩 ─── */
.pm-overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
}
.pm-tag {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 11px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-blue);
  background: var(--pm-blue-soft);
}
.pm-tag--accent { background: #fef3c7; color: #92400e; }
.pm-tag--soft { background: #f3f4f6; color: var(--pm-text-2); }

/* ─── [개요 탭] 기본 정보 정의 리스트 ─── */
.pm-info-section { margin-top: 4px; }
.pm-info-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-text);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.pm-info {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
  padding-top: 4px;
}
.pm-info dt { color: var(--pm-text-3); padding: 6px 0; }
.pm-info dd {
  margin: 0;
  padding: 6px 0;
  text-align: right;
  font-weight: 600;
  color: var(--pm-text);
  word-break: keep-all;
}
.pm-info dd.pm-blur-field { filter: blur(5px); user-select: none; }
.pm-info dd + dt { border-top: 1px solid var(--pm-line); }
.pm-info dt + dd { border-top: 1px solid var(--pm-line); }
.pm-info dt:first-of-type, .pm-info dt:first-of-type + dd { border-top: 0; }

/* ═════════════════════════════════════════════
   [상권 탭]
   ═════════════════════════════════════════════ */
.pm-area-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.pm-area-cell {
  padding: 14px;
  background: #f8fafc;
  border-radius: 12px;
}
.pm-area-cell-label {
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pm-area-cell-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--pm-text);
  letter-spacing: -0.025em;
}
.pm-area-cell-unit { font-size: 12px; font-weight: 600; color: var(--pm-text-3); }
.pm-area-cell-delta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 2px;
}
.pm-area-cell-delta--up { color: #b91c1c; }
.pm-area-cell-delta--down { color: var(--pm-blue); }

.pm-area-section { margin-top: 14px; }
.pm-area-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pm-line);
}
.pm-area-row:last-child { border-bottom: 0; }
.pm-area-row-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--pm-blue-soft);
  color: var(--pm-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
}
.pm-area-row-icon--clinic { background: #dcfce7; color: var(--pm-cat-clinic); }
.pm-area-row-icon--hosp { background: #fee2e2; color: var(--pm-cat-hosp); }
.pm-area-row-text { flex: 1; min-width: 0; }
.pm-area-row-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pm-text);
  margin: 0;
  letter-spacing: -0.01em;
}
.pm-area-row-sub {
  font-size: 13px;
  color: var(--pm-text-3);
  margin: 1px 0 0;
}
.pm-area-row-dist {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pm-blue);
  flex-shrink: 0;
}

/* ═════════════════════════════════════════════
   [한마디 탭] (약사들의 수다)
   ═════════════════════════════════════════════ */
.pm-talk-item {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-bottom: 1px solid var(--pm-line);
}
.pm-talk-item:last-child { border-bottom: 0; }
.pm-talk-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--pm-text-3);
}
.pm-talk-cat {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  background: var(--pm-blue-soft);
  color: var(--pm-blue);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.pm-talk-author { font-weight: 600; color: var(--pm-text-2); }
.pm-talk-sep { color: #d1d5db; }
.pm-talk-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-talk-excerpt {
  font-size: 13.5px;
  color: var(--pm-text-2);
  line-height: 1.6;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-talk-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--pm-text-3);
}
.pm-talk-foot-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pm-talk-foot-item svg { width: 12px; height: 12px; color: #9ca3af; }

.pm-talk-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 40px;
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-text-2);
  text-decoration: none;
  cursor: pointer;
}
.pm-talk-more:hover { background: #f3f4f6; color: var(--pm-text); }

/* ═════════════════════════════════════════════
   [구인 탭]
   ═════════════════════════════════════════════ */
.pm-job {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.pm-job:hover {
  border-color: var(--pm-blue);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}
.pm-job-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.pm-job-cat {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.pm-job-cat--manager { background: #dbeafe; color: #1d4ed8; }
.pm-job-cat--full { background: #ede9fe; color: #6d28d9; }
.pm-job-dday {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pm-cat-hosp);
}
.pm-job-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.pm-job-meta {
  font-size: 12px;
  color: var(--pm-text-3);
  margin: 0 0 8px;
}
.pm-job-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--pm-line);
}
.pm-job-salary {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--pm-text);
}
.pm-job-emp {
  font-size: 11.5px;
  color: var(--pm-text-3);
  font-weight: 600;
}

/* ═════════════════════════════════════════════
   [공통 배너 — 어느 탭에서나 노출되는 추천 배너]
   ═════════════════════════════════════════════ */
.pm-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--pm-grad);
  border-radius: var(--pm-radius);
  color: #fff;
  margin-top: 16px;
  text-decoration: none;
}
.pm-promo-illust {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.pm-promo-text { flex: 1; min-width: 0; }
.pm-promo-title {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.pm-promo-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.85);
  margin: 0;
}
.pm-promo-arrow {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-promo-arrow svg { width: 12px; height: 12px; }

/* ═════════════════════════════════════════════
   하단 fixed 액션 바 (문의하기 + 좋아요)
   ═════════════════════════════════════════════ */
.pm-detail-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid var(--pm-line);
  position: sticky;
  bottom: 0;
  z-index: 5;
}
.pm-detail-foot-cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 52px;
  background: var(--pm-grad);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.pm-detail-foot-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.pm-detail-foot-fav {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--pm-line-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pm-text-2);
  flex-shrink: 0;
}
.pm-detail-foot-fav:hover { color: var(--pm-cat-hosp); border-color: var(--pm-cat-hosp); }
.pm-detail-foot-fav.is-on { color: var(--pm-cat-hosp); border-color: var(--pm-cat-hosp); }
.pm-detail-foot-fav svg { width: 22px; height: 22px; }

/* ═════════════════════════════════════════════
   지도 위 floating UI
   ═════════════════════════════════════════════ */
.pm-map-controls {
  position: absolute;
  right: 16px;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--pm-float-radius);
  box-shadow: var(--pm-float-shadow);
  overflow: hidden;
  z-index: 5;
}
.pm-map-ctrl {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pm-line);
  color: var(--pm-text-2);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.pm-map-ctrl:last-child { border-bottom: 0; }
.pm-map-ctrl:hover { color: var(--pm-blue); background: var(--pm-blue-soft); }
.pm-map-ctrl svg { width: 18px; height: 18px; }

.pm-map-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(15,23,42,0.04);
  border-radius: 9999px;
  box-shadow: var(--pm-float-shadow);
  font-size: 12px;
  font-weight: 600;
  color: var(--pm-text-2);
  z-index: 5;
  max-width: calc(100% - 80px);
  overflow: hidden;
}
.pm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.pm-legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* ═════════════════════════════════════════════
   처방 트렌드 컨트롤 (히트맵 ON 시 노출)
   ═════════════════════════════════════════════ */
.pm-heatmap-ctrl {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-radius: var(--pm-float-radius);
  box-shadow: var(--pm-float-shadow);
  z-index: 5;
  min-width: 240px;
  border: 1px solid rgba(15,23,42,0.04);
}
.pm-heatmap-ctrl.hidden { display: none; }
.pm-heatmap-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--pm-text);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.pm-heatmap-title-tag {
  font-family: var(--font-label);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ef4444;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
}
.pm-heatmap-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pm-heatmap-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 9999px;
  background: #f3f4f6;
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pm-text-2);
  cursor: pointer;
  letter-spacing: -0.01em;
}
.pm-heatmap-chip:hover { background: #e5e7eb; }
.pm-heatmap-chip.is-active {
  background: var(--pm-text);
  color: #fff;
  border-color: var(--pm-text);
}
.pm-heatmap-divider {
  height: 1px;
  background: var(--pm-line);
  margin: 2px 0;
}
.pm-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--pm-text-3);
}
.pm-heatmap-gradient {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #dbeafe 0%, #93c5fd 25%, #fcd34d 55%, #fb923c 80%, #dc2626 100%);
}

/* "이 지역 다시 검색" 버튼 (지도 중앙 상단) — 흰 알약 */
.pm-map-research {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: #fff;
  color: var(--pm-blue);
  border: 0;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--pm-float-shadow);
  z-index: 4;
  letter-spacing: -0.01em;
}
.pm-map-research svg { width: 14px; height: 14px; }
.pm-map-research:hover { background: #f8fafc; }

/* ═════════════════════════════════════════════
   네이버지도 마커 (custom inline HTML)
   ═════════════════════════════════════════════ */
.pm-marker {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.18));
}
.pm-marker-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: var(--pm-text);
  border: 1px solid rgba(15,23,42,0.08);
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
}
.pm-marker-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 9px; height: 9px;
  background: inherit;
  border-right: 1px solid rgba(15,23,42,0.08);
  border-bottom: 1px solid rgba(15,23,42,0.08);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  z-index: -1;
}
/* 종별 컬러 도트 */
.pm-marker-pin::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pm-marker--pharm .pm-marker-pin::before { background: var(--pm-cat-pharm); }
.pm-marker--clinic .pm-marker-pin::before { background: var(--pm-cat-clinic); }
.pm-marker--hosp .pm-marker-pin::before { background: var(--pm-cat-hosp); }

/* 매물 — 다크 가격 버블 (당근 스타일) */
.pm-marker--listing .pm-marker-pin {
  background: #1f2937;
  color: #fff;
  border-color: transparent;
  padding: 0 12px;
}
.pm-marker--listing .pm-marker-pin::after { border-color: transparent; }
.pm-marker--listing .pm-marker-pin::before {
  width: 11px; height: 11px;
  border-radius: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3 9.5 12 3l9 6.5'/><path d='M5 8.5V21h14V8.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.pm-marker--listing.is-secret .pm-marker-pin::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
}
.pm-marker--listing.is-self .pm-marker-pin { background: var(--pm-blue); }

/* 매물 마커 펄스 */
.pm-marker--listing::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #1f2937;
  transform: translate(-50%, -50%);
  opacity: 0.4;
  z-index: -2;
  animation: pm-pulse 2.4s ease-out infinite;
}
.pm-marker--listing.is-self::after { background: var(--pm-blue); }
@keyframes pm-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
}

/* NEW 도트 (오른쪽 상단) */
.pm-marker-new {
  position: absolute;
  top: -4px; right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  min-width: 14px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #f59e0b;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 2px #fff;
}

.pm-marker.is-active .pm-marker-pin {
  height: 36px;
  font-size: 13px;
  padding: 0 14px;
  background: var(--pm-blue);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.pm-marker.is-active .pm-marker-pin::before { background: #fff; }
.pm-marker.is-active .pm-marker-pin::after { border-color: transparent; }
.pm-marker--listing.is-active .pm-marker-pin {
  background: var(--pm-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22);
}
.pm-marker.is-dimmed { opacity: 0.4; }

/* 클러스터 칩 (줌아웃 시) — 흰 알약 + 동 이름 + 카운트 */
.pm-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.pm-cluster-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: var(--pm-float-shadow);
  white-space: nowrap;
  transition: transform 0.12s ease;
}
.pm-cluster:hover .pm-cluster-pill { transform: scale(1.05); }
.pm-cluster-pill b {
  font-size: 13px;
  font-weight: 700;
  color: var(--pm-text);
  letter-spacing: -0.01em;
}
.pm-cluster-pill em {
  font-style: normal;
  font-family: var(--font-mono, monospace);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--pm-blue);
}

/* ═════════════════════════════════════════════
   지도 fallback (NCP 키 미설정 시)
   ═════════════════════════════════════════════ */
.pm-map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: repeating-linear-gradient(45deg, #f8fafc 0 12px, #eef2f7 12px 24px);
  color: var(--pm-text-2);
  text-align: center;
  padding: 20px;
  z-index: 3;
}
.pm-map-fallback.hidden { display: none; }
.pm-map-fallback-pin {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: var(--pm-blue);
  margin-bottom: 4px;
}
.pm-map-fallback-title { font-size: 15px; font-weight: 700; color: #334155; }
.pm-map-fallback-desc { font-size: 12.5px; color: #64748b; max-width: 360px; line-height: 1.55; }
.pm-map-fallback-desc code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  color: #b91c1c;
}

/* ═════════════════════════════════════════════
   반응형 — 좁은 화면 대응
   ═════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .pm-side { width: 360px; }
}
@media (max-width: 768px) {
  .pm-shell { flex-direction: column; }
  .pm-side {
    width: 100%;
    height: 50%;
    border-right: 0;
    border-bottom: 1px solid var(--pm-line);
    order: 2;
  }
  .pm-mapwrap { height: 50%; order: 1; }
  .pm-filterbar-inner { padding: 0 14px; }
  .pm-map-search { width: 220px; }
  .pm-map-research { top: 14px; }
  .pm-heatmap-ctrl { right: 12px; top: 12px; min-width: 200px; }
}

/* 빈 상태 */
.pm-empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 20px; text-align: center;
}
.pm-empty-icon { width: 40px; height: 40px; stroke: #cbd5e1; }
.pm-empty-title { font-size: 14px; font-weight: 600; color: #475569; margin: 0; }
.pm-empty-sub { font-size: 13px; color: #94a3b8; margin: 0; }
.pm-empty-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 9px 18px;
  font-size: 13px; font-weight: 600; color: var(--color-brand);
  border: 1.5px solid var(--color-brand); border-radius: 8px;
  text-decoration: none; transition: background 0.15s;
}
.pm-empty-cta:hover { background: #fff7f3; }

/* 글로벌 유틸 */
.pm-blur { filter: blur(4px); user-select: none; pointer-events: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
