:root {
  color-scheme: light;
  --ink: #193634;
  --muted: #596c68;
  --pine: #115b55;
  --pine-dark: #113f42;
  --accent: #b75224;
  --border: #dce3df;
  --sidebar: clamp(310px, 27vw, 388px);
  --shadow: 0 2px 7px #203d3820, 0 8px 24px #203d3810;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: #f9faf7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ba7125; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .4; }
.symbols { width: 0; height: 0; position: absolute; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { display: inline-block; width: 1.18em; height: 1.18em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
.topbar { height: 70px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 27px; background: var(--pine-dark); color: #fffdf6; border-bottom: 1px solid #063233; }
.brand, .about-btn, .overview, .primary-action, .secondary-action, .district-filter { display: inline-flex; align-items: center; }
.brand { gap: 13px; }
.brand img { width: 39px; height: 39px; }
.brand h1 { font-size: 1.42rem; font-weight: 650; letter-spacing: .045em; line-height: 1.3; }
.about-btn { border: 1px solid #678482; border-radius: 7px; padding: 7px 13px; gap: 8px; min-height: 36px; background: transparent; color: #fafbf5; font-size: .89rem; }
.about-btn:hover { background: #ffffff12; border-color: #aac1ba; }
.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); position: relative; }
.directory { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; border-right: 1px solid #cbd5d0; z-index: 2; }
.directory-head { padding: 27px 22px 15px; border-bottom: 1px solid var(--border); }
.directory h2, dialog h2 { font-size: 1.52rem; line-height: 1.35; letter-spacing: .025em; font-weight: 650; }
.summary { margin: 7px 0 19px; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.summary b { color: var(--ink); font-weight: 640; font-variant-numeric: tabular-nums; }
.summary .separator { display: inline-block; padding: 0 8px; color: #9ca8a2; }
.search-field { display: flex; gap: 9px; align-items: center; padding: 0 11px; min-height: 45px; border: 1px solid #cbd8d1; border-radius: 8px; color: #57726a; background: #fafbf8; }
.search-field:focus-within { border-color: var(--pine); outline: 2px solid #b7d7ca; }
.search-field input { width: 100%; min-width: 0; border: 0; padding: 9px 0; outline: none; color: var(--ink); background: transparent; font-size: .98rem; }
.search-field input::placeholder { color: #667570; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.clear-search, .close { border: 0; display: grid; place-items: center; background: transparent; color: var(--muted); }
.clear-search { flex: none; height: 30px; width: 27px; border-radius: 4px; }
.clear-search:hover, .close:hover { background: #e5eeea; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 12px; }
.district-filter { position: relative; width: max-content; }
.district-filter > .icon { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; color: #47665e; }
.district-filter > .caret { left: auto; right: 9px; width: 13px; height: 13px; }
.district-filter select { appearance: none; color: #28473f; background: white; border: 1px solid #d5dfda; border-radius: 6px; min-height: 35px; padding: 5px 29px 5px 32px; font-size: .9rem; }
.district-filter select:hover { border-color: #8fa79c; }
.result-count { font-size: .84rem; color: #62746b; font-variant-numeric: tabular-nums; }
.result-scroll { overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #b8c9c1 transparent; overscroll-behavior: contain; }
.result-list { margin: 0; padding: 0; list-style: none; }
.place { position: relative; display: block; text-align: left; width: 100%; padding: 17px 22px 16px; border: 0; border-bottom: 1px solid #e7ece7; background: #fff; }
.place:hover { background: #f3f7f3; }
.place[aria-pressed="true"] { background: #eaf3ed; box-shadow: inset 4px 0 #1e6a5c; }
.place:focus-visible { outline-offset: -3px; }
.place-heading { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.place-name { font-size: 1.015rem; font-weight: 650; line-height: 1.5; color: var(--ink); }
.district-tag { white-space: nowrap; display: inline-block; font-size: .76rem; padding: 1px 6px; border-radius: 4px; color: #48645a; background: #eef3ed; border: 1px solid #e1e9e1; line-height: 1.55; }
.place-address, .detail-address { display: flex; align-items: flex-start; }
.place-address { margin-top: 6px; gap: 5px; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.place-address .icon { width: 14px; height: 14px; margin-top: .23em; color: #6e8478; }
.place-service { display: block; margin: 4px 0 0 19px; color: #45675d; font-size: .82rem; line-height: 1.55; }
.empty { padding: 33px 21px; text-align: center; }
.empty > .icon { font-size: 1.55rem; color: #6c8379; }
.empty h3 { margin: 11px 0 7px; font-size: 1rem; }
.empty p { color: var(--muted); font-size: .9rem; line-height: 1.65; }
.text-btn { border: 0; padding: 9px; margin-top: 5px; background: transparent; color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.map-shell { position: relative; min-height: 0; min-width: 0; isolation: isolate; background: #e8eee6; }
#map { position: absolute; inset: 0; background: #eceee4; font-family: inherit; }
.map-float { background: #fffef9; border: 1px solid #b7c5bcbf; border-radius: 8px; box-shadow: var(--shadow); }
.overview, .legend, .zoom, .north { position: absolute; z-index: 550; }
.overview { gap: 8px; left: 18px; top: 18px; padding: 0 13px; height: 38px; color: #264c45; font-size: .88rem; font-weight: 600; }
.overview:hover, .zoom button:hover:enabled, .secondary-action:hover { background: #eef4ec; }
.map-loading { position: absolute; z-index: 550; left: 133px; top: 22px; padding: 5px 10px; color: #466456; font-size: .82rem; pointer-events: none; }
.north { top: 14px; right: 21px; display: grid; justify-items: center; pointer-events: none; color: #365650; text-shadow: 0 1px 2px white; }
.north span { font-size: .77rem; font-weight: 650; }
.north svg { width: 18px; height: 30px; filter: drop-shadow(0 1px 1px #ffffffd9); }
.zoom { right: 18px; bottom: 38px; display: grid; overflow: hidden; }
.zoom button { display: grid; place-items: center; width: 39px; height: 39px; background: none; border: 0; color: #264b43; }
.zoom button + button { border-top: 1px solid var(--border); }
.zoom button:focus-visible { outline-offset: -3px; }
.legend { left: 18px; bottom: 38px; display: flex; gap: 14px; align-items: center; padding: 8px 11px; font-size: .8rem; color: #36544b; pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; height: 10px; width: 10px; border-radius: 50%; background: #217369; box-shadow: 0 0 0 2px #c4dcd3; }
.legend-cluster { display: inline-grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; border: 2px solid #9ebeb0; background: #20594e; color: white; font: 600 .67rem/1 Inter, sans-serif; }
.leaflet-bottom.leaflet-left { margin: 0 0 9px 14px; }
.leaflet-control-scale-line { background: #fffff4b8; color: #3e5149; border-color: #556b60; font-size: 11px; }
.leaflet-control-attribution { background: #fffef4e8 !important; color: #445950; font: 11px/1.6 Inter, sans-serif; }
.leaflet-control-attribution a { color: #365d53; }
.location-pin, .location-cluster { background: none; border: 0; }
.pin-shape { width: 29px; height: 36px; overflow: visible; filter: drop-shadow(0 2px 2px #223c3045); display: block; }
.pin-shape path { fill: #14685e; stroke: #fffdf2; stroke-width: 1.7; }
.pin-shape circle { fill: #fffdf2; }
.selected-pin .pin-shape path { fill: #b95027; }
.location-cluster { display: grid; place-items: center; color: #fff; }
.cluster-count { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #f9fff4; outline: 5px solid #2a715842; border-radius: 50%; background: #235d50; box-shadow: 0 2px 5px #153c393b; font: 650 .91rem/1 Inter, "Segoe UI", sans-serif; }
.leaflet-tooltip {
  font: 600 .85rem/1.4 Inter, "Microsoft YaHei", sans-serif; color: #23473d; padding: 6px 9px;
  border: 1px solid #cad8cd; border-radius: 5px; box-shadow: 0 2px 7px #1b382529;
}
.detail, dialog { background: #fffefa; border: 1px solid #ccd8cf; border-radius: 12px; box-shadow: 0 4px 14px #16332d21, 0 18px 48px #19392f26; }
.detail { position: absolute; z-index: 600; left: calc(var(--sidebar) + 18px); bottom: 38px; width: min(346px, calc(100% - var(--sidebar) - 90px)); max-height: calc(100% - 104px); overflow-y: auto; padding: 20px; }
.close { position: absolute; top: 12px; right: 12px; width: 31px; height: 31px; border-radius: 50%; }
.detail-tags { margin: 0 33px 11px 0; display: flex; gap: 8px; align-items: center; color: #64766a; font-size: .78rem; }
.detail-tags .district-tag { background: #e8f2e9; color: #275b4b; }
.detail h2 { font-size: 1.22rem; line-height: 1.5; font-weight: 650; }
.detail-address { margin-top: 7px; gap: 6px; font-size: .95rem; color: #445e53; line-height: 1.65; }
.detail-address .icon { width: 16px; height: 16px; margin-top: 4px; }
.services { margin: 12px 0 0; padding: 8px 11px; list-style: none; border-left: 2px solid #9bb8a7; background: #f0f4eb; font-size: .88rem; color: #3f5b4e; line-height: 1.7; }
.services strong { font-weight: 600; }
.location-note { color: #775025; font-size: .83rem; line-height: 1.65; margin-top: 10px; }
.record-source { font-size: .81rem; color: #52695e; margin-top: 12px; }
.record-source summary { cursor: pointer; width: fit-content; padding: 3px 0; }
.record-source p { line-height: 1.65; margin-top: 6px; overflow-wrap: anywhere; }
.record-source a, dialog a { color: #205f51; text-underline-offset: 3px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.primary-action, .secondary-action { gap: 6px; justify-content: center; padding: 8px 12px; min-height: 38px; border-radius: 6px; font-size: .88rem; font-weight: 540; text-decoration: none; }
.primary-action { background: var(--pine); border: 1px solid var(--pine); color: white; }
.primary-action:hover { background: #164b40; }
.secondary-action { background: transparent; color: #36584b; border: 1px solid #c7d4ca; }
dialog { max-width: min(450px, calc(100% - 28px)); max-height: calc(100dvh - 38px); padding: 25px 28px 23px; color: var(--ink); }
dialog::backdrop { background: #0c25245c; }
.dialog-icon { display: grid; place-items: center; width: 37px; height: 37px; background: #e4efe6; color: var(--pine); border-radius: 8px; margin-bottom: 13px; }
dialog h3 { font-size: .98rem; margin: 19px 0 5px; }
dialog p { font-size: .93rem; line-height: 1.78; color: #4c6056; }
dialog p + p { margin-top: 7px; }
dialog .credits { font-size: .84rem; }
.noscript { position: fixed; z-index: 1000; inset: auto 0 0; padding: 12px; text-align: center; background: white; }
@media (max-width: 740px) {
  :root { --mobile-map: 47%; }
  .topbar { height: 55px; padding: 0 15px; }
  .brand { gap: 9px; }
  .brand img { width: 32px; height: 32px; }
  .brand h1 { font-size: 1.13rem; }
  .about-btn { gap: 5px; min-height: 33px; padding: 5px 8px; font-size: .82rem; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--mobile-map) minmax(0, 1fr); }
  .map-shell { grid-row: 1; grid-column: 1; }
  .directory { grid-row: 2; grid-column: 1; border-right: 0; border-top: 1px solid #baccc1; }
  .directory-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 10px; align-items: center; padding: 13px 16px 10px; }
  .directory h2 { font-size: 1.18rem; }
  .summary { margin: 0; font-size: .82rem; text-align: right; white-space: nowrap; }
  .summary .separator { padding: 0 4px; }
  .search-field { min-height: 39px; }
  .search-field input { padding: 6px 0; font-size: 1rem; }
  .filter-row { margin: 0; justify-self: end; }
  .district-filter select { min-height: 39px; }
  .result-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .place { padding: 12px 17px; }
  .place-address { margin-top: 3px; }
  .overview { top: 10px; left: 11px; height: 33px; padding: 0 10px; }
  .map-loading { left: 116px; top: 12px; }
  .north { top: 8px; right: 15px; }
  .north svg { height: 24px; }
  .zoom { right: 10px; bottom: 27px; }
  .zoom button { width: 35px; height: 34px; }
  .legend { bottom: 25px; left: 10px; padding: 5px 8px; gap: 10px; font-size: .75rem; }
  .legend-cluster { width: 17px; height: 17px; }
  .leaflet-bottom.leaflet-left { margin: 0 0 3px 5px; }
  .detail { left: 0; right: 0; top: var(--mobile-map); bottom: 0; width: auto; max-height: none; padding: 18px 20px max(16px, env(safe-area-inset-bottom)); border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -3px 14px #153a2912; }
  .detail h2 { font-size: 1.22rem; }
}
@media (max-height: 540px) and (min-width: 600px) {
  .topbar { height: 47px; }
  .brand img { width: 30px; height: 30px; }
  .layout { grid-template-columns: minmax(245px, 32%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .directory { grid-column: 1; grid-row: 1; }
  .map-shell { grid-column: 2; grid-row: 1; }
  .directory-head { display: block; padding: 10px 15px; }
  .summary { text-align: left; margin: 2px 0 7px; }
  .filter-row { margin-top: 7px; }
  .detail { left: auto; right: 0; top: auto; bottom: 0; width: min(300px, 55%); max-height: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .leaflet-zoom-anim .leaflet-zoom-animated, .leaflet-fade-anim .leaflet-tile, .leaflet-cluster-anim .leaflet-marker-icon { transition: none !important; }
}
