* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: system-ui, -apple-system, "Noto Sans KR", sans-serif; color: #1b1f24; background: #f5f6f8; }
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 14px; background: #fff; border-bottom: 1px solid #d5d9de; }
.app-title { font-size: 16px; margin: 0 8px 0 0; }
.topbar input[type=search] { flex: 1 1 260px; max-width: 420px; padding: 6px 10px; font: inherit; border: 1px solid #98a2ac; border-radius: 6px; }
.topbar select { padding: 6px 8px; font: inherit; border: 1px solid #98a2ac; border-radius: 6px; background: #fff; }
.rec-toggle { font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 10; padding: 8px 14px; background: #fff; border: 2px solid #0b57b0; border-radius: 6px; color: #0b57b0; font-weight: 700; }
.skip-link:focus { top: 8px; }
.body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 460px; grid-template-areas: "map panel" "results panel"; grid-template-rows: auto 1fr; gap: 12px; padding: 12px 14px; align-items: start; }
.map-col { grid-area: map; min-width: 0; background: #fff; border: 1px solid #d5d9de; border-radius: 6px; overflow: hidden; }
.map-wrap { position: relative; height: calc(100vh - 150px); min-height: 420px; }
.map-wrap:focus { outline: none; }
.map-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
.fit-btn { position: absolute; right: 22px; bottom: 22px; font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid #98a2ac; border-radius: 6px; background: rgba(255, 255, 255, 0.92); cursor: pointer; }
.fit-btn:hover { background: #e5e7eb; }
.results { grid-area: results; min-width: 0; background: #fff; border: 1px solid #d5d9de; border-radius: 6px; padding: 8px 12px; max-height: 260px; overflow: auto; }
.results[hidden], .notice[hidden], .print-btn[hidden] { display: none; }
.results-count { margin: 0 0 6px; font-size: 13px; color: #4a5560; }
.results-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.result-btn { width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 4px 6px; background: none; border: 0; border-radius: 4px; cursor: pointer; }
.result-btn:hover { background: #eef2f7; }
.result-btn[aria-current="true"] { background: #e3edfb; font-weight: 600; }
.result-btn:focus-visible { outline: 2px solid #0b57b0; }
.result-code { font-weight: 700; margin-right: 6px; }
.panel { grid-area: panel; background: #fff; border: 1px solid #d5d9de; border-radius: 6px; padding: 14px 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.panel-bar { display: flex; justify-content: flex-end; }
.print-btn { font: inherit; padding: 4px 14px; border: 1px solid #98a2ac; border-radius: 6px; background: #f3f4f6; cursor: pointer; }
.print-btn:hover { background: #e5e7eb; }
.notice { margin: 6px 0; padding: 8px 10px; background: #fff7e6; border: 1px solid #f0c36d; border-radius: 6px; font-size: 14px; }
.panel-hint { color: #5b6670; margin: 8px 0; }
.site-foot { padding: 10px 14px 16px; font-size: 12px; color: #5b6670; }
.site-foot p { margin: 0; max-width: 1100px; }
.site-foot a { color: #0b57b0; margin-left: 6px; }
@media (max-width: 1100px) {
  .body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "results" "panel"; grid-template-rows: auto; }
  .panel { position: static; max-height: none; }
}
