/* 정비사업 전용 지도 페이지(/reconstruction/, /redevelopment/) -- 재개발 갭 분석 페이지(gap/index.html)와 같은 모양 */
:root {
  --bg: #ffffff; --panel: #ffffff; --ink: #1c2330; --sub: #5b6678; --line: #d5dae3; --accent: #2f6fed;
  --good: #1f9d55; --mid: #d98a0b; --cand: #7c3aed; --shadow: 0 2px 10px rgba(20,30,50,.18);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151c; --panel: #1b212b; --ink: #e8ecf3; --sub: #9aa6ba; --line: #2f3846; --accent: #6b9bff; --shadow: 0 2px 10px rgba(0,0,0,.5); }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
#app { position: relative; height: 100%; }
#map { position: absolute; inset: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bar { position: absolute; z-index: 5; top: 10px; left: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.filters { display: flex; flex-direction: column; gap: 6px; }
.filters.closed { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 10px; font-size: 13px; }
.title { font-weight: 700; font-size: 14px; }
.title small { font-weight: 500; color: var(--sub); margin-left: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-family: inherit; }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid rgba(51,65,85,.6); }
.chip.off { opacity: .45; }
/* 재건축 후보 켜고 끄는 버튼: 꺼져 있어도 흐려지지 않게 점선 보라 테두리로 "누를 수 있는 메뉴"임을 드러내고, 켜지면 보라로 채운다 */
.chip.cand-toggle { border: 2px dashed var(--cand); font-weight: 600; padding: 3px 11px; }
.chip.cand-toggle::before { content: '+'; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--cand); color: #fff; font-size: 14px; line-height: 1; font-weight: 800; }
.chip.cand-toggle.on { background: var(--cand); border-style: solid; color: #fff; }
.chip.cand-toggle.on::before { content: '\2713'; background: #fff; color: var(--cand); font-size: 11px; }
.group-label { font-size: 11.5px; color: var(--sub); margin-right: 2px; }
select, input[type=search], input[type=text] { font: inherit; font-size: 12.5px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.notice { font-size: 12px; color: var(--sub); line-height: 1.45; max-width: 760px; }

.panel { position: absolute; z-index: 6; right: 10px; top: 118px; width: 330px; max-height: calc(100% - 140px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; display: none; }
.panel h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.35; padding-right: 18px; }
.panel .x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 20px; color: var(--sub); cursor: pointer; }
.panel .sub { color: var(--sub); font-size: 12.5px; margin-bottom: 8px; }
.panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.panel td { padding: 5px 0; border-top: 1px solid var(--line); vertical-align: top; }
.panel td:first-child { color: var(--sub); width: 38%; }
.panel td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.panel .pill { display: inline-block; color: #fff; font-weight: 700; font-size: 12px; padding: 1px 8px; border-radius: 5px; }
.panel .links { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.warn { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--sub); background: color-mix(in srgb, var(--mid) 12%, transparent); border-radius: 8px; padding: 8px 10px; }

div:has(> .zlabel) { pointer-events: none; }
.zlabel { text-align: center; pointer-events: none; }
.zlabel.above { margin-bottom: 40px; }
.zlabel b { display: inline-block; width: max-content; background: #fff; color: #111827; border-radius: 6px; padding: 3px 8px; font-size: 13px; font-weight: 800; box-shadow: 0 1px 4px rgba(0,0,0,.3); max-width: 190px; white-space: normal; line-height: 1.3; }
.zlabel span { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 5px; width: fit-content; margin-inline: auto; }
.legend { font-size: 12px; display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; max-width: min(560px, 92vw); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #334155; }
.legend .zs { width: 16px; height: 9px; border-radius: 2px; border: 2px solid var(--sub); background: color-mix(in srgb, var(--sub) 25%, transparent); }
.legend .zd { border-style: dashed; background: transparent; }
#err { position: absolute; z-index: 9; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; text-align: center; background: var(--bg); color: var(--ink); line-height: 1.6; }
#loading { position: absolute; z-index: 8; left: 50%; top: 45%; transform: translateX(-50%); font-size: 13px; color: var(--sub); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; box-shadow: var(--shadow); }
@media (max-width: 720px) {
  .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 52%; border-radius: 14px 14px 0 0; }
  .notice { display: none; }
  .legend { font-size: 11px; }
}
