/* ===================== 지도 프리미엄 버튼 활성 상태 ===================== */
.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;
}

/* ===================== 보물지도 서브메뉴 ===================== */
#treasureSubMenu {
  position: absolute;
  right: 100%; top: 0;
  margin-right: 6px;
  display: none; flex-direction: row; gap: 0;
  z-index: 1001; align-items: stretch;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  border-radius: 6px; overflow: hidden;
}
#treasureSubMenu.visible { display: flex; }
.treasure-sub-btn {
  height: 40px; padding: 0 13px;
  background: #fff;
  border: none;
  border-right: 1px solid #e0e0e0;
  border-radius: 0;
  font-size: 12px; font-weight: 600; color: #333;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.treasure-sub-btn:last-child { border-right: none; }
.treasure-sub-btn:hover { background: #f0f8ff; }
.treasure-sub-btn.active {
  background: #e0f2ff;
  color: #0081ff;
  font-weight: 700;
}
/* 카테고리별 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) {
  #treasureSubMenu {
    right: 50px;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 16px;
  }
  .tsb-circle {
    width: 42px; height: 42px;
  }
  .tsb-circle svg { width: 22px; height: 22px; }
  .tsb-label { font-size: 9px; }
  .treasure-sub-btn { min-width: 44px; gap: 4px; }
}

/* ===================== 개발정보 흑백 배경 ===================== */
/* 개발정보 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);
}
