/* ===================== 지도 프리미엄 버튼 활성 상태 ===================== */
.treasure_btn.active,
.devinfo_btn.active,
.commercial_btn.active,
.foottraffic_btn.active { color: #0081ff; }

/* ===================== 개발정보 레이어 패널 ===================== */
#devLayerPanel {
  position: absolute; top: 10px; right: 55px;
  background: rgba(255,255,255,.96); border-radius: 6px;
  padding: 8px 12px; z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  font-size: 12px; min-width: 172px; max-height: 74vh; overflow-y: auto;
  display: none;
}
#devLayerPanel.show { display: block; }
.dev-group-label {
  font-size: 10px; font-weight: 800; color: #8a8a8a; letter-spacing: -0.2px;
  margin: 8px 0 3px; padding-top: 5px; border-top: 1px dashed #e6e6e6;
}
.dev-group-label:first-of-type { border-top: none; padding-top: 0; }
/* 접이식 분류(아코디언) */
.dev-group-hd {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 800; color: #555; letter-spacing: -0.2px;
  margin: 7px 0 0; padding: 5px 2px; border-top: 1px dashed #e6e6e6;
  cursor: pointer; user-select: none;
}
.dev-group-hd:hover { color: #0081ff; }
.dev-arrow { font-size: 9px; color: #999; transition: transform .15s; }
.dev-group.open .dev-arrow { transform: rotate(180deg); }
.dev-group-body { display: none; padding: 2px 0 4px; }
.dev-group.open .dev-group-body { display: block; }
.dev-layer-item {
  display: flex; align-items: center; gap: 6px;
  margin: 4px 0; cursor: pointer; user-select: none;
}
.dev-layer-item input[type=checkbox] { cursor: pointer; accent-color: #0081ff; width: 13px; height: 13px; }
.dev-layer-item label { cursor: pointer; font-size: 12px; color: #333; }
.dev-layer-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* VWorld 줌 안내 */
#devZoomNotice, #cadastralZoomNotice {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.7); color: #fff; padding: 8px 16px;
  border-radius: 20px; font-size: 12px; z-index: 1000;
  display: none; white-space: nowrap;
}

/* ===================== 보물지도 서브메뉴 ===================== */
/* '지도' 펼침(.map-type-panel)과 같은 모양으로 맞춘다 (2026-09-29 사용자: "너무 커. 붙여. 글씨는 보물지도 크기로").
   전에는 가로로 길게 네 칸을 띄운 알약이라 휴대폰에서 화면 폭을 거의 다 먹었다(315px).
   → 보물지도 버튼 바로 왼쪽에 세로로 붙이고, 칸 높이·여백·글씨를 지도 펼침과 같게. */
#treasureSubMenu {
  position: absolute;
  right: calc(100% + 6px); top: 0;
  display: none; flex-direction: column;
  background: #fff;
  border-radius: 5px; overflow: hidden;
  box-shadow: 0 3px 14px rgba(0,0,0,.18);
  z-index: 1001;
  width: max-content;          /* 글자 폭에 맞춘다 — 100% 를 주면 계산이 꼬여 잘린다(지도 펼침과 같은 이유) */
}
#treasureSubMenu.visible { display: flex; }
.treasure-sub-btn {
  height: 36px; padding: 0 10px;
  background: #fff;
  border: none;
  border-top: 1px solid #eef1f5;
  border-radius: 0;
  font-size: 10px; font-weight: 600; color: #333;   /* .map-toggle-button 과 같다 */
  cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.treasure-sub-btn:first-child { border-top: none; }
.treasure-sub-btn:hover { background: #f0f8ff; }
.treasure-sub-btn.active {
  background: #e0f2ff;
  color: #0081ff;
  font-weight: 700;
}
/* 휴대폰·태블릿은 지도 버튼 글씨가 11px 이다 (user_main_responsive.css 와 같은 기준) */
@media screen and (max-width: 1032px) {
  .treasure-sub-btn { font-size: 11px; }
}
/* 카테고리별 active 배경색 (핀 색상과 동일) */
.treasure-sub-btn[data-cat="camping"].active  { background: #5a8a5a; color: #fff; }
.treasure-sub-btn[data-cat="factory"].active  { background: #566270; color: #fff; }
.treasure-sub-btn[data-cat="nongmak"].active  { background: #b89844; color: #fff; }
.treasure-sub-btn[data-cat="building"].active { background: #1e3f6e; color: #fff; }

/* ===================== 상가매출 라벨 ===================== */
.cm-label-wrapper { background: none !important; border: none !important; }
.cm-label {
  display: flex; flex-direction: column; align-items: center;
  padding: 3px 7px 2px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.6);
  font-family: 'Pretendard', sans-serif;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  cursor: pointer; white-space: nowrap;
}
.cm-label:hover { filter: brightness(1.2); z-index: 9999 !important; }
.cm-label-sales {
  color: #fff; font-size: 11px; font-weight: 900;
  line-height: 1.25; letter-spacing: -0.3px;
}
.cm-label-stores {
  color: rgba(255,255,255,.9); font-size: 9px; font-weight: 600;
  line-height: 1.15;
}

/* 유동인구 모드 활성 시: 좌측 토지정보 패널 강제 숨김 */
body.foottraffic-active #landInfoPanel,
body.foottraffic-active .mypage-land-info {
  display: none !important;
}

/* ===================== 유동인구 범례 (4단계 색상 가이드) ===================== */
.ft-legend {
  position: absolute;
  bottom: 30px; left: 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  font-family: 'Pretendard', sans-serif;
  min-width: 170px;
}

/* ===================== 반응형 ===================== */
@media (max-width: 768px) {
  .tsb-circle {
    width: 42px; height: 42px;
  }
  .tsb-circle svg { width: 22px; height: 22px; }
  .tsb-label { font-size: 9px; }
}

/* ===================== 개발정보 흑백 배경 ===================== */
/* 개발정보 ON일 때 기본 지도 타일만 흑백 처리 →  개발구역 폴리곤(SVG)·라벨(HTML)은 컬러로 부각.
   폴리곤/라벨은 img/canvas가 아니라 SVG/HTML이라 이 필터의 영향을 받지 않는다. */
#map.dev-gray img,
#map.dev-gray canvas:not(.transport-canvas) {   /* 교통 캔버스(도로·철도)는 컬러 유지 — 흑백 제외(2026-08-18) */
  -webkit-filter: grayscale(1) brightness(1.05) contrast(0.92);
  filter: grayscale(1) brightness(1.05) contrast(0.92);
}
