/* 3.12.5 시설 위치 지도 — 내장 벡터 바탕 + 알림 우선 점 + 옆 패널 */
.fm{--fm-line:var(--color-line-dfe3e8);--fm-sub:var(--color-ink-6b7686);--fm-ink:var(--color-paint-1c2533);display:flex;flex-direction:column;gap:10px}
.fm-legend{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.fm-mode{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--fm-sub)}
.fm-mode select{min-width:150px}
.fm-chips{display:flex;gap:6px;flex-wrap:wrap}
.fm-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--fm-line);background:var(--color-surface-fff);border-radius:999px;padding:5px 11px;font:inherit;font-size:12.5px;color:var(--fm-ink);cursor:pointer}
.fm-chip i,.fm-chip-note i{width:10px;height:10px;border-radius:50%;display:inline-block}
.fm-chip b{font-weight:700}
.fm-chip.off{opacity:.45;text-decoration:line-through}
.fm-chip-note{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--fm-sub)}
.fm-count{margin-left:auto;font-size:12.5px;color:var(--fm-sub)}
.fm-body{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;align-items:start}
.fm-stage{position:relative;border:1px solid var(--fm-line);border-radius:14px;overflow:hidden;background:var(--color-surface-e9ecf0);height:min(calc(72 * var(--gn-vh,1vh)),720px);min-height:420px}
.fm-svg{display:block;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;font-family:inherit}
.fm-svg:active{cursor:grabbing}
.fm-loading{font-size:14px;fill:var(--color-ink-6b7686)}
/* 바탕 */
.fm-svg{--rw:1}
.fm-svg.z16{--rw:1.3}.fm-svg.z24{--rw:1.8}.fm-svg.z36{--rw:2.6}
.fm-out{fill:var(--color-ink-e6e9ed)}
.fm-land{fill:var(--color-ink-f2efe8)}
.fm-green{fill:var(--color-ink-d7e8cc)}
.fm-water{fill:var(--color-ink-c3dcf0)}
.fm-stream{fill:none;stroke:var(--color-ink-a3c7e4);stroke-width:calc(2.2px * var(--rw));stroke-linecap:round;stroke-linejoin:round}
.fm-rc,.fm-rf{fill:none;stroke-linecap:round;stroke-linejoin:round}
.fm-rc.fm-r0{stroke:var(--color-ink-cf9434);stroke-width:calc(5.2px * var(--rw))}.fm-rf.fm-r0{stroke:var(--color-ink-f4c46a);stroke-width:calc(3.4px * var(--rw))}
.fm-rc.fm-r1{stroke:var(--color-ink-cf9f55);stroke-width:calc(4.8px * var(--rw))}.fm-rf.fm-r1{stroke:var(--color-ink-f9dca0);stroke-width:calc(3.1px * var(--rw))}
.fm-rc.fm-r2{stroke:var(--color-ink-b9c1cb);stroke-width:calc(4.6px * var(--rw))}.fm-rf.fm-r2{stroke:var(--color-ink-fff);stroke-width:calc(3px * var(--rw))}
.fm-rc.fm-r3{stroke:var(--color-ink-c6cdd6);stroke-width:calc(3.4px * var(--rw))}.fm-rf.fm-r3{stroke:var(--color-ink-fff);stroke-width:calc(2px * var(--rw))}
.fm-rc.fm-r4{stroke:var(--color-ink-d3d8df);stroke-width:calc(2.2px * var(--rw));display:none}.fm-rf.fm-r4{stroke:var(--color-ink-fff);stroke-width:calc(1.2px * var(--rw));display:none}
.fm-svg.z16 .fm-rc.fm-r4,.fm-svg.z16 .fm-rf.fm-r4{display:inline}
.fm-rail-u{display:none}
.fm-rail{fill:none;stroke:var(--color-ink-7d8794);stroke-width:1.6px}
.fm-fade{fill:var(--color-ink-67dd1ba93e);pointer-events:none}
.fm-dong{fill:none;stroke:var(--color-ink-aab4c1);stroke-width:1px;stroke-dasharray:4 3;pointer-events:none}
.fm-district{fill:none;stroke:var(--color-ink-6f7d8f);stroke-width:1.8px;pointer-events:none}
/* 글자: 크기는 확대 정도에 맞춰 스크립트가 지도 단위로 바꾼다(화면에서는 늘 같은 크기) */
.fm-lab text,.fm-st-name,.fm-tag{paint-order:stroke;stroke:var(--color-ink-fff);stroke-linejoin:round;pointer-events:none}
.fm-lab-dong text{fill:var(--color-ink-4f5d6f);font-weight:700;text-anchor:middle;letter-spacing:.02em}
.fm-lab-road text{fill:var(--color-ink-7a6a4d);font-weight:600;text-anchor:middle;display:none}
.fm-svg.z16 .fm-lab-road .fm-rl0,.fm-svg.z16 .fm-lab-road .fm-rl1,.fm-svg.z16 .fm-lab-road .fm-rl2{display:inline}
.fm-svg.z24 .fm-lab-road .fm-rl3{display:inline}
.fm-lab-road .fm-rl2,.fm-lab-road .fm-rl3{fill:var(--color-ink-6b7280)}
.fm-st{pointer-events:none;display:none}
.fm-svg.z13 .fm-st{display:inline}
.fm-st-mark{fill:var(--color-ink-fff);stroke:var(--color-ink-4a5563)}
.fm-st-name{fill:var(--color-ink-374151);font-weight:600}
.fm-st.out{opacity:.55}
/* 점 */
.fm-pt{cursor:pointer}
.fm-dot{stroke:var(--color-ink-fff)}
.fm-halo{opacity:.22;pointer-events:none}
.fm-pt.quiet .fm-dot{opacity:.9}
.fm-pt:hover .fm-dot{stroke:var(--color-ink-1c2533)}
.fm-num{fill:var(--color-ink-fff);font-weight:800;text-anchor:middle;pointer-events:none}
.fm-tag{fill:var(--color-ink-1c2533);font-weight:700;display:none}
.fm-svg.z36 .fm-tag{display:inline}
.fm-selring circle{fill:none;stroke:var(--color-ink-111827);pointer-events:none}
/* 도구·눈금·출처 */
.fm-tools{position:absolute;top:12px;right:12px;display:flex;flex-direction:column;gap:6px}
.fm-btn{width:38px;height:38px;border-radius:10px;border:1px solid var(--fm-line);background:var(--color-surface-fff);font-size:19px;line-height:1;color:var(--fm-ink);cursor:pointer;box-shadow:0 1px 2px var(--color-shadow-bae00db0cd)}
.fm-btn:hover{background:var(--color-surface-f4f6f9)}
.fm-scale{position:absolute;right:12px;bottom:30px;display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:11px;color:var(--color-ink-4b5563);pointer-events:none}
.fm-scale i{display:block;height:6px;border:2px solid var(--color-line-4b5563);border-top:0}
.fm-attr{position:absolute;left:0;right:0;bottom:0;padding:4px 10px;font-size:10.5px;color:var(--color-ink-6b7686);background:var(--color-surface-54e001f5fe);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fm-note{margin:0;font-size:12px;color:var(--fm-sub)}
/* 옆 패널 */
.fm-panel{border:1px solid var(--fm-line);border-radius:14px;background:var(--color-surface-fff);padding:14px 16px;max-height:min(calc(72 * var(--gn-vh,1vh)),720px);overflow:auto;min-height:220px}
.fm-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.fm-eyebrow{font-size:12px;font-weight:700;color:var(--fm-sub);letter-spacing:.02em}
.fm-x{border:0;background:none;font-size:22px;line-height:1;color:var(--fm-sub);cursor:pointer;padding:2px 6px}
.fm-muted{color:var(--fm-sub);font-size:12.5px;margin:4px 0;line-height:1.55}
.fm-empty{font-weight:700;margin:6px 0 2px}
.fm-tip{margin-top:12px;border-top:1px solid var(--fm-line);padding-top:10px}
.fm-card{padding:10px 0 14px;border-bottom:1px solid var(--fm-line)}
.fm-card:last-child{border-bottom:0}
.fm-card-head{display:flex;gap:10px;align-items:flex-start}
.fm-card-head h3{margin:0;font-size:15.5px;line-height:1.35}
.fm-dotmark{flex:none;width:12px;height:12px;border-radius:50%;margin-top:5px;box-shadow:0 0 0 2px var(--color-shadow-fff),0 0 0 3px var(--color-shadow-d5dbe3)}
.fm-rows{display:grid;grid-template-columns:78px 1fr;gap:4px 10px;margin:10px 0 0;font-size:13px}
.fm-rows dt{color:var(--fm-sub)}.fm-rows dd{margin:0}
.fm-sec{margin-top:10px}
.fm-sec-title{font-size:12px;font-weight:700;color:var(--fm-sub);margin-bottom:4px}
.fm-badges{display:flex;gap:6px;flex-wrap:wrap}
.fm-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:700;color:var(--color-ink-fff);background:var(--c)}
.fm-alerts{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:12.5px;line-height:1.45}
.fm-alerts li{display:flex;gap:7px;align-items:flex-start}
.fm-alerts i,.fm-list i{flex:none;width:8px;height:8px;border-radius:50%;margin-top:5px;display:inline-block}
.fm-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.fm-list{list-style:none;margin:6px 0 0;padding:0}
.fm-list button{display:flex;gap:8px;align-items:flex-start;width:100%;text-align:left;border:0;background:none;padding:8px 4px;border-bottom:1px solid var(--color-line-eef0f3);cursor:pointer;font:inherit;color:inherit}
.fm-list button:hover{background:var(--color-surface-f6f8fa)}
.fm-list span{display:flex;flex-direction:column;gap:2px}
.fm-list small{color:var(--fm-sub);font-size:12px}
@media (max-width:980px){
  .fm-body{grid-template-columns:1fr}
  .fm-stage{height:calc(62 * var(--gn-vh,1vh));min-height:360px}
  .fm-panel{max-height:none}
  .fm-count{margin-left:0;width:100%}
}
.fm-state{display:inline-flex;align-items:center;gap:6px;font-weight:700}
.fm-state::before{content:'';width:9px;height:9px;border-radius:50%;background:var(--c)}
/* 참고 지도(이미지)·좌표 확인 목록 */
details.fm-ref{margin-top:14px;padding:12px 16px}
details.fm-ref>summary{cursor:pointer;font-weight:700;font-size:14px;list-style-position:inside}
details.fm-ref[open]>summary{margin-bottom:10px}
.fm-geo-notes{margin-top:14px;padding:12px 16px;display:flex;flex-direction:column;gap:12px;font-size:13px}
.fm-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
/* 작은 지도(대시보드 등): 옆 패널 없이 지도 안 카드 */
.fm-compact .fm-body{grid-template-columns:1fr}
.fm-compact .fm-panel,.fm-compact .fm-mode,.fm-compact .fm-note{display:none}
.fm-compact .fm-stage{height:100%;min-height:360px}
.fm-mini{position:absolute;left:12px;bottom:34px;max-width:min(320px,calc(100% - 24px));background:var(--color-surface-50f2dfb0be);border:1px solid var(--fm-line);border-radius:12px;padding:10px 12px 12px;box-shadow:0 4px 14px var(--color-shadow-4bdd28d003);font-size:13px}
.fm-mini .fm-x{position:absolute;right:4px;top:2px}
.fm-mini-item+.fm-mini-item{border-top:1px solid var(--fm-line);margin-top:8px;padding-top:8px}
.fm-mini-head{display:flex;align-items:center;gap:7px;padding-right:22px}
.fm-mini-head i{width:10px;height:10px;border-radius:50%;flex:none}
.fm-mini .fm-actions{margin-top:8px}
/* 순회 초점 고리(맥박) */
.fm-focus circle{fill:none;stroke:var(--color-ink-111827);transform-box:fill-box;transform-origin:center}
.fm-focus-a{animation:fmPulse 1.6s ease-out infinite}
.fm-focus-b{animation:fmPulse 1.6s ease-out .8s infinite}
@keyframes fmPulse{0%{transform:scale(1);opacity:.9}100%{transform:scale(3.2);opacity:0}}
@media (prefers-reduced-motion:reduce){.fm-focus-a,.fm-focus-b{animation:none;opacity:.9}}
/* 3.12.43 성능 등급 자리 */
.fm-grade{display:flex;align-items:center;gap:8px;margin:2px 0 4px;font-size:12.5px;color:var(--fm-sub)}
.fm-grade b{padding:1px 8px;border-radius:999px;background:var(--color-surface-eef1f5);color:var(--color-ink-64748b);font-size:12px;font-weight:750}
.fm-grade-wait b{background:var(--color-surface-e8f0fb);color:var(--color-ink-1f5aa6)}.fm-grade-on b{background:var(--color-surface-184f95);color:var(--color-ink-fff)}
