:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#243b38;background:#f5f6f2;font-size:14px}*{box-sizing:border-box}body{margin:0}header{height:76px;border-bottom:1px solid #dce3dc;background:#fff;display:flex;align-items:center;gap:14px;padding:0 28px}.brand{display:flex;align-items:center;gap:12px;white-space:nowrap}.brand b{font-size:24px}.logo{font-size:34px;color:#226b5c}.sub{border-left:1px solid #ddd;padding-left:12px;color:#6c7d76}.tag{flex:1;text-align:right;margin-right:20px;color:#83928a;font-size:12px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #d6dfd8;background:#fff;border-radius:7px;padding:9px 13px;color:inherit}button:hover{background:#edf3ed}button:disabled{opacity:.5;cursor:wait}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e5b655}main{display:grid;grid-template-columns:400px 1fr;height:calc(100vh - 76px)}aside{overflow:auto;padding:30px 26px;background:#fbfcf9;border-right:1px solid #dce3dc}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;color:#7a8e82}h1{font-size:31px;line-height:1.5;letter-spacing:-1px;margin:15px 0 12px}.intro{color:#7b8981;font-size:13px;line-height:1.9;margin-bottom:28px}.section-title{display:flex;justify-content:space-between;margin-bottom:13px}#count{color:#8a988e;font-size:12px}.row{background:white;border:1px solid #dde5de;border-radius:10px;padding:13px;margin-bottom:10px;box-shadow:0 3px 9px #223f2c04}.row-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.row-head b{font-size:12px}.remove{border:0;padding:1px 6px;color:#87968d}.inputs{display:flex;gap:6px;margin-top:7px}.inputs input{min-width:0;width:100%}input{padding:9px;border:1px solid #dbe2dc;border-radius:5px;color:#29463b;background:#fcfdfa}.radius{display:flex;align-items:center;gap:8px;margin-top:8px}.radius input{width:95px}.radius label{font-size:12px}.coords{font-size:11px;color:#7c8b81;margin:9px 0}.pick{font-size:11px;padding:5px 8px}.search-results button{display:block;width:100%;text-align:left;font-size:11px;margin-top:5px}.add{width:100%;border-style:dashed;background:transparent;color:#41745a}.settings{margin:23px 0 17px}.settings>label{display:flex;align-items:center;justify-content:space-between;font-weight:600}.settings input{width:66px;text-align:center;padding:6px}.settings p,details p{font-size:11px;color:#7a8a80;line-height:1.8}.primary{width:100%;background:#226653;color:#fff;border:0;padding:14px;font-weight:600}.primary:hover{background:#184d3e}#notice{font-size:12px;line-height:1.8;color:#a05f30;margin:12px 0}details{border-top:1px solid #e1e7df;padding-top:16px;font-size:12px}summary{cursor:pointer;color:#718278}.workspace{position:relative;overflow:hidden;background:#e5ecdf}#map{position:absolute;inset:0}.map-top{position:absolute;top:20px;left:20px;right:20px;z-index:500;display:flex;justify-content:space-between;pointer-events:none}.map-top>*{pointer-events:auto;background:#fffffff2;padding:10px 13px;border-radius:6px;font-size:11px;box-shadow:0 2px 10px #2342}.map-top i{display:inline-block;background:#4d926a;width:6px;height:6px;border-radius:50%;margin-right:6px}.legend{position:absolute;top:76px;left:20px;z-index:500;background:#fffffff0;border-radius:5px;padding:9px;display:flex;align-items:center;gap:9px;font-size:10px}.line{width:20px;border-top:2px solid #b78a43}.dot{height:9px;width:9px;border-radius:50%;background:#256653}.shade{height:10px;width:16px;background:#a3bcb4}.result{position:absolute;bottom:28px;left:24px;right:24px;background:#fffffff5;padding:23px 25px;border:1px solid #e2e8dd;border-radius:12px;box-shadow:0 10px 40px #253c3214;z-index:500;max-height:43%;overflow:auto}.result h2{font-size:20px;margin:10px 0}.result p{font-size:12px;color:#74877a;line-height:1.7}.metrics{display:flex;gap:32px;margin:15px 0}.metric b{display:block;font-size:23px}.metric span{font-size:10px;color:#778a7d}.result table{border-collapse:collapse;width:100%;font-size:11px}.result td,.result th{text-align:left;padding:6px;border-bottom:1px solid #e9ede8}.bad{color:#b56837}.target{background:#216551;color:white;border:3px solid white;border-radius:50%;box-shadow:0 0 0 8px #21655122}#map-error{padding:110px 30px;color:#8f5d3d}.leaflet-control-zoom{margin-top:120px!important}.leaflet-container{font-family:inherit}a{color:#2f7760}@media(max-width:850px){.tag,.sub{display:none}header{padding:0 14px;height:65px}main{height:auto;display:flex;flex-direction:column}aside{padding:22px;width:100%;order:2}.workspace{height:650px;order:1}.result{bottom:22px;left:12px;right:12px;padding:16px}.metrics{gap:15px}.metric b{font-size:19px}h1 br{display:none}}
:root .local-settings{margin:0 0 22px;padding:14px;background:#eef2e9;border-radius:8px}.local-settings select{width:100%;margin:8px 0 12px;padding:9px;border:1px solid #ccd7c9;border-radius:5px;background:#fff}.check{font-size:11px;color:#6b7e6e}.check input,.legend input{accent-color:#226653;vertical-align:middle}.import{margin-top:10px;font-size:11px}.import select{max-width:100%;padding:7px;margin-bottom:8px}.import input{max-width:100%;padding:5px;font-size:10px}.candidate+.candidate{border-top:2px solid #dce5d8;margin-top:18px;padding-top:18px}.candidate-title{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#65816b}.candidate-title button{font-size:10px;padding:5px 9px}.candidate h2{font-size:23px;color:#245d44}.candidate-marker{font-size:12px;text-align:center;line-height:18px}.result{max-height:48%}#data-status{font-weight:700;color:#2d6c4a}.search-results{max-height:225px;overflow:auto}.leaflet-container{background:#e8eee0}header .tag{font-size:11px}

.search-results button.selected{background:#d9eada;border-color:#417a52;color:#174e2d}.keyboard-hint{font-size:11px;color:#627d62;line-height:1.8}.offline-city-label{white-space:nowrap;text-align:center;color:#3d5844;font-size:11px;font-weight:600;text-shadow:0 1px 2px white,0 -1px 2px white,1px 0 2px white;pointer-events:none}.leaflet-container{background:#dcebef}.legend{flex-wrap:wrap;max-width:calc(100% - 40px)}.row:focus-within{border-color:#588e65;box-shadow:0 0 0 2px #dceadb}.row:last-child .row-head b{color:#6c8d6e!important}

.offline-region-tooltip{font-size:13px;font-weight:600;border:1px solid #becdb7;color:#28533a;background:#fffffff5;box-shadow:0 3px 10px #2342;pointer-events:none}
.leaflet-control-zoom{margin-top:180px!important}

.mode-settings{margin-bottom:15px;padding:14px;background:#e9efe1;border-radius:8px}.mode-settings select{width:100%;margin-top:8px;padding:9px;border:1px solid #c2d3bb;border-radius:6px;background:white}.mode-settings p,.compare-hint{font-size:11px;line-height:1.8;color:#72876d}.radius select.relation{min-width:0;flex:1;padding:8px;border:1px solid #cfdbca;border-radius:5px;background:#fff}.possible-places{display:flex;gap:6px;flex-wrap:wrap;padding:10px 0}.possible-place{font-size:11px;padding:6px 9px}#result details{margin-top:12px}[hidden]{display:none!important}

.next-advice{padding:13px;background:#edf4e7;border:1px solid #d7e6ca;border-radius:8px;margin:12px 0 16px}.next-advice h3{font-size:14px;margin:0 0 8px}.advice-card{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid #dbe5d3}.advice-card b{font-size:12px}.advice-card small{display:block;font-size:10px;color:#788b70;margin-top:5px}.advice-card button{font-size:10px;padding:7px;white-space:nowrap}.next-advice p{font-size:10px!important;line-height:1.7}

.search-help{font-size:11px;line-height:1.7;color:#6e8268;margin:0 0 10px}

.advisor-policy-label{font-size:11px;color:#577447;margin-right:8px}.advisor-policy{max-width:100%;padding:7px;border:1px solid #cadbbc;border-radius:5px;background:white;margin-bottom:8px;font-size:11px}.advice-stalled{color:#77603e!important}

.feedback-buttons{display:flex;gap:6px;flex:1}.feedback-buttons .relation{flex:1;min-width:38px;padding:7px 10px;border:1px solid #cbd8ce;font-size:14px;font-weight:700}.feedback-buttons .relation[aria-checked=true]{color:#fff;background:#226653;border-color:#226653;box-shadow:0 0 0 2px #d8e8df}.radius:has(.feedback-buttons){flex-wrap:wrap}.radius:has(.feedback-buttons)>label{white-space:nowrap}.search-results button{white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.inputs .search{white-space:nowrap;flex-shrink:0}.inputs .place{flex:1}.advice-resolved{padding:12px;background:#e4efdf;border-radius:7px;line-height:1.8;color:#2b603e!important}
.workspace.has-advice .result{left:16px;right:calc(50% + 7px);bottom:26px;max-height:43%;padding:18px}.advice-window{position:absolute;right:16px;left:calc(50% + 7px);bottom:26px;max-height:43%;overflow:auto;z-index:500;border:1px solid #d3dfcc;border-radius:12px;box-shadow:0 8px 30px #253c3218;background:#fbfff9f5;padding:18px}.advice-window .next-advice{margin:0;padding:0;background:none;border:0}.advice-window .next-advice h3{font-size:18px;margin-bottom:14px}.advice-window .advice-card{align-items:flex-start;flex-wrap:wrap}.advice-window .advice-card b{font-size:13px}.advice-window .advice-card small{line-height:1.8}.advice-window .next-advice p{color:#72816b}.constraint-window{position:absolute;z-index:500;top:140px;left:70px;right:16px;border:1px solid #d8e1df;border-radius:10px;background:#fffffff2;padding:12px 15px;box-shadow:0 4px 16px #253c3210;max-height:26%;overflow:auto}.replay-title{display:flex;gap:14px;justify-content:space-between;flex-wrap:wrap;font-size:12px}.replay-title span{font-size:10px;color:#687d73}.constraint-steps{display:flex;gap:5px;overflow:auto;margin-top:9px}.constraint-steps button{white-space:nowrap;padding:5px 9px;font-size:11px}.constraint-steps .selected{background:#226653;color:white;border-color:#226653}.constraint-window p{font-size:11px;line-height:1.75;margin:8px 0 0;color:#476056}.workspace.has-advice .result h2{font-size:17px}.advice-window::-webkit-scrollbar,.result::-webkit-scrollbar{width:6px}.advice-window::-webkit-scrollbar-thumb,.result::-webkit-scrollbar-thumb{background:#c1cfc4;border-radius:6px}
@media(max-width:1100px){.workspace.has-advice .result,.advice-window{padding:12px}.constraint-window{left:55px;top:155px}.replay-title span{display:none}.advice-card button{padding:5px}.radius{gap:5px}}@media(max-width:600px){.workspace{height:900px}.workspace.has-advice .result{left:10px;right:10px;bottom:252px;max-height:24%}.advice-window{left:10px;right:10px;bottom:20px;max-height:24%}.constraint-window{max-height:22%;left:55px}}

.map-top .map-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:0;background:none;box-shadow:none}.map-actions button{background:#fffffff2;padding:10px 13px;font-size:11px;box-shadow:0 2px 10px #2342}.map-actions #toggle-replay[aria-expanded=true]{background:#e8f1e6;border-color:#84a68c}.legend{max-width:calc(100% - 190px)}

.map-drawer{position:absolute;bottom:26px;z-index:500;height:43%;max-height:43%;display:grid;grid-template-rows:44px minmax(0,1fr);overflow:hidden;background:#fffffff5;border:1px solid #dce5da;border-radius:12px;box-shadow:0 8px 28px #253c3218;transition:height .22s ease}.result-drawer{left:16px;right:16px}.has-advice .result-drawer{right:calc(50% + 7px)}.advice-drawer{left:calc(50% + 7px);right:16px;background:#fbfff9f5}.drawer-handle{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid #e0e8dc;border-radius:0;padding:0 16px;background:#f4f8f1;text-align:left;touch-action:manipulation}.drawer-title{font-size:15px;font-weight:700}.drawer-state{font-size:11px;color:#687f6e}.drawer-handle:hover{background:#eaf2e5}.map-drawer.is-collapsed{height:44px}.map-drawer.is-collapsed .drawer-handle{border-bottom-color:transparent}.map-drawer.is-collapsed .drawer-body{visibility:hidden;pointer-events:none}.map-drawer #result,.map-drawer #advice-window{position:static;inset:auto;min-height:0;height:100%;max-height:none;margin:0;padding:14px 16px;border:0;border-radius:0;background:none;box-shadow:none;overflow:auto;overscroll-behavior:contain}.map-drawer .empty-state{margin:12px 0;color:#819080}.phase-pill{display:inline-block;font-size:11px;padding:4px 8px;border-radius:20px;background:#e7efdf;color:#557343;margin:0 0 9px}.map-data{margin-top:20px}.map-data p{font-size:11px}h1{font-size:29px;margin-bottom:24px}.result-drawer .eyebrow{letter-spacing:1px}.map-drawer #result h2{font-size:18px}.map-drawer #result details{padding-top:10px}.map-drawer #result p{margin:9px 0}.map-drawer .next-advice{padding:0;margin:0;border:0;background:none}.map-drawer .next-advice .advisor-policy{max-width:100%}
.drawer-note{margin-left:auto;margin-right:12px;font-size:10px;color:#9b713c;pointer-events:none}.drawer-note:empty{display:none}.advice-card button:disabled{cursor:default;opacity:.5}
.map-drawer #result .empty-state,.map-drawer #advice-window .empty-state{font-size:12px;font-weight:400;line-height:1.7;margin:12px 0;color:#819080}.leaflet-control-zoom-in,.leaflet-control-zoom-out{display:flex!important;align-items:center;justify-content:center}.zoom-glyph{display:block;position:relative;width:14px;height:14px;color:#29443a}.zoom-glyph::before,.zoom-plus::after{content:"";position:absolute;background:currentColor;border-radius:0}.zoom-glyph::before{left:0;top:6px;width:14px;height:2px}.zoom-plus::after{left:6px;top:0;width:2px;height:14px}
.map-top{justify-content:flex-end}.legend{top:20px}.leaflet-control-zoom{margin-top:100px!important}
@media(max-width:1100px){.map-drawer #result,.map-drawer #advice-window{padding:12px}.drawer-handle{padding:0 12px}.drawer-title{font-size:14px}}@media(max-width:600px){.map-drawer{left:10px;right:10px;height:24%;max-height:24%;bottom:20px}.has-advice .result-drawer{left:10px;right:10px;bottom:252px}.advice-drawer{left:10px;right:10px}.map-drawer.is-collapsed{height:44px}}@media(prefers-reduced-motion:reduce){.map-drawer{transition:none}}
.mobile-nav{display:none}
/* Mobile: keep the map clear and put results in the page's normal flow. */
@media(max-width:850px){
 :root{font-size:14px;--mobile-map-height:clamp(360px,65svh,560px)}
 body{padding-bottom:env(safe-area-inset-bottom);overflow-x:clip}
 header{height:58px;padding:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));gap:8px}
 .brand{gap:8px}.brand b{font-size:22px}.logo{font-size:28px}header #clear{margin-left:auto;min-height:40px}
 .mobile-nav{position:sticky;top:0;z-index:800;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;background:#fbfcf9f5;border-bottom:1px solid #dce3dc;padding:6px max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));backdrop-filter:blur(12px)}
 .mobile-nav a{display:flex;align-items:center;justify-content:center;min-height:40px;border-radius:7px;color:#275f4e;text-decoration:none;font-size:14px;font-weight:600;background:#edf3e9}
 main{display:flex;height:auto;min-height:0;flex-direction:column}
 aside{order:0;width:100%;padding:18px 14px 22px;border-right:0;overflow:visible;min-width:0}
 aside>.eyebrow{display:none}h1{font-size:23px;line-height:1.3;margin:0 0 16px;letter-spacing:0}
 .mode-settings,.local-settings{padding:12px;margin-bottom:12px!important}
 .mode-settings p{margin-bottom:0}.keyboard-hint{display:none}
 input:not([type=checkbox]),select{font-size:16px;min-height:44px}
 button{min-height:44px;touch-action:manipulation}
 .row{padding:12px}.row-head{margin-bottom:5px}.row-head b{font-size:13px}
 .remove{min-width:44px;min-height:44px;font-size:22px;margin:-6px -6px -6px 0}
 .inputs .place{width:0;min-width:0}.inputs .search{font-size:14px}
 .coords{font-size:12px;line-height:1.65;overflow-wrap:anywhere}
 .radius{flex-wrap:wrap;gap:7px}.radius label{font-size:13px}.radius input{width:100px;flex:1;max-width:180px}
 .pick{font-size:12px;padding:8px}.feedback-buttons .relation{min-height:44px;font-size:16px}
 .radius:has(.feedback-buttons)>label{flex-basis:100%}.radius .feedback-buttons{flex:1}
 .search-results{max-height:240px;overscroll-behavior:contain}.search-results button{font-size:14px;padding:10px;min-height:44px}
 .compare-hint,.search-help,.check,.mode-settings p{font-size:12px}
 .check{display:inline-flex;align-items:center;min-height:36px;gap:5px}.check input,.legend input{width:18px;height:18px}
 .primary{margin-top:12px}.map-data{margin-top:16px}
 .workspace{order:1;display:flex;flex-direction:column;height:auto;min-width:0;overflow:visible;padding:calc(var(--mobile-map-height) + 12px) 12px 16px;gap:12px}
 .workspace #map{inset:0 0 auto;height:var(--mobile-map-height);width:100%;position:absolute}
 #clues,#map,.map-drawer{scroll-margin-top:62px}
 .map-top{top:64px;left:auto;right:12px;max-width:calc(100% - 70px)}
 .map-actions button{font-size:12px;min-height:40px;padding:8px 10px}
 .legend{top:12px;left:12px;right:12px;max-width:none;gap:10px;padding:7px 10px;font-size:12px;min-height:40px}
 .legend label{display:inline-flex;align-items:center;gap:4px;min-height:26px}
 .workspace .leaflet-control-zoom{margin-top:72px!important;margin-left:12px}
 .workspace .leaflet-control-zoom a{width:38px;height:38px}
 .leaflet-control-attribution{max-width:100%;font-size:10px!important;white-space:normal}
 .constraint-window{top:160px;left:58px;right:12px;max-height:calc(var(--mobile-map-height) - 200px);padding:12px}
 .constraint-steps button{min-height:38px}.constraint-window p{font-size:12px}
 .workspace .map-drawer,.workspace.has-advice .map-drawer{position:relative;inset:auto;width:100%;height:auto;max-height:none;min-width:0;display:block;flex:none;transition:none}
 .workspace .advice-drawer{order:0}.workspace .result-drawer{order:1}
 .drawer-handle{min-height:48px;padding:0 14px}.drawer-title{font-size:15px}.drawer-state{font-size:12px;white-space:nowrap}
 .workspace .map-drawer #result,.workspace .map-drawer #advice-window{height:auto;max-height:420px;max-height:65svh;overflow:auto;padding:14px}
 .workspace .map-drawer.is-collapsed{height:auto}.workspace .map-drawer.is-collapsed .drawer-body{display:none}
 .advice-card{gap:10px}.advice-window .advice-card b{font-size:14px}.advice-window .advice-card small{font-size:12px;overflow-wrap:anywhere}
 .advice-card button{font-size:12px;padding:9px 12px}.map-drawer #result p,.possible-place{font-size:13px}
 .metrics{flex-wrap:wrap;gap:14px}.result table{font-size:12px}.result td,.result th{overflow-wrap:anywhere;padding:6px 3px}
}

