*{box-sizing:border-box}[hidden]{display:none!important}
html,body{height:100%;margin:0;overflow:hidden}body{font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:#233d34;background:#e9ede7;display:flex;flex-direction:column}
button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #cca550;outline-offset:3px}
.topbar{height:58px;flex-shrink:0;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;box-shadow:0 1px 8px #152a2420;z-index:1000;position:relative}h1{font-size:19px;letter-spacing:.025em;margin:0;position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;font-weight:650}.brand{font-size:11px;color:#7b8b82;letter-spacing:.05em}.text-button{padding:8px 0;border:0;background:transparent;color:#34594b;font-size:13px}
.map-frame{flex:1;min-height:0;position:relative}#map{position:absolute;top:0;right:0;bottom:0;left:0;background:#d5dfd2}.leaflet-container{font:inherit}.leaflet-control-attribution{font-size:9px!important;max-width:75%;opacity:.8}.leaflet-control-scale-line{border-color:#fff;color:#fff;background:#21362991;text-shadow:none;font-size:10px}.leaflet-bottom.leaflet-left{bottom:16px;left:5px}
.map-actions{position:absolute;z-index:800;right:16px;bottom:33px;display:flex;flex-direction:column;gap:10px}.map-button{width:46px;height:46px;border:1px solid #ffffff80;background:#fff;border-radius:14px;box-shadow:0 3px 16px #10281e30;display:flex;align-items:center;justify-content:center;color:#254f40}.map-button+.map-button{margin-top:8px}.map-button svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.map-button:disabled{color:#aab5ae;background:#f6f7f4}.locate-entry{position:absolute;left:50%;top:16px;transform:translateX(-50%);z-index:700;border:0;border-radius:22px;background:#fff;color:#28533f;padding:9px 20px;font-weight:600;box-shadow:0 3px 14px #1b352c33;white-space:nowrap}.map-notice{position:absolute;z-index:800;left:50%;top:76px;transform:translateX(-50%);max-width:85%;background:#fff5e3;color:#725626;border:0;border-radius:9px;padding:9px 14px;font-size:12px;white-space:nowrap}.preview-label{position:absolute;z-index:800;left:12px;top:12px;padding:5px 10px;border-radius:6px;background:#fff0c9;color:#785315;font-size:11px}.preview-label a{color:inherit;margin-left:8px}.preview-label:not([hidden])~.locate-entry{top:49px}
.layers-panel{position:absolute;z-index:850;right:73px;bottom:34px;width:230px;background:#fff;padding:17px;border-radius:16px;box-shadow:0 5px 28px #162c3438}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:15px;font-weight:600}.toggle-row{min-height:44px}.toggle-row+.toggle-row{margin-top:8px;border-top:1px solid #e7ece8;padding-top:8px}.toggle-row input{appearance:none;-webkit-appearance:none;position:relative;width:44px;height:26px;border:0;border-radius:20px;background:#9da7a0;cursor:pointer;flex-shrink:0}.toggle-row input:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:transform .15s}.toggle-row input:checked{background:#305641}.toggle-row input:checked:before{transform:translateX(18px)}.toggle-row input:focus-visible{outline:3px solid #dfb83b;outline-offset:3px}
.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;background:#10231c3d}.sheet{position:fixed;z-index:2100;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;max-height:86vh;overflow:auto;background:#fff;border-radius:24px 24px 0 0;padding:22px 25px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -12px 50px #14282028}.sheet h2{font-size:22px;margin:0 0 12px;line-height:1.35}.sheet p{margin:12px 0;line-height:1.85}.sheet-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.sheet-top h2{margin:0}.close-sheet{border:0;width:34px;height:34px;border-radius:50%;background:#f0f3ef;font-size:25px;line-height:1;color:#66776b;flex-shrink:0}.eyebrow{font-size:11px;letter-spacing:.1em;color:#88978b;margin:0 0 8px!important}.muted{color:#768477;font-size:14px}.sheet-grip{width:34px;height:4px;border-radius:4px;background:#d9dfd7;margin:-9px auto 22px}.primary-button,.secondary-button{display:block;width:100%;border-radius:12px;padding:12px 15px;text-align:center;font-weight:600;margin-top:11px}.primary-button{background:#28543e;color:#fff;border:1px solid #28543e}.secondary-button{background:#f5f7f3;color:#34573f;border:1px solid #e2e7dc}.plain-button{display:block;width:100%;padding:13px 10px 0;background:transparent;border:0;color:#829082;font-size:13px}.inline-message{color:#896423;font-size:13px}.inline-message:empty{display:none}.distance{color:#2b6349;font-weight:600}.description{white-space:pre-wrap;font-size:14px;color:#637166}.legend-position{display:inline-block;width:14px;height:14px;border:2px solid #fff;border-radius:50%;background:#238bd6;box-shadow:0 0 0 1px #cddfe9;vertical-align:middle;margin-right:5px}.legend-heading{display:inline-block;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:16px solid #238bd6;vertical-align:middle;margin-right:5px}.wechat-button{display:inline;background:none;border:0;padding:0;color:#255b3d}.wechat-button span{font-size:10px;color:#899689;margin-left:5px}#help-sheet p{font-size:14px}.toast{position:fixed;z-index:4000;left:50%;bottom:100px;transform:translateX(-50%);padding:10px 18px;background:#19382deb;color:#fff;border-radius:12px;font-size:13px;max-width:85%;text-align:center}.cluster-item{display:block;text-align:left;width:100%;padding:14px 2px;border:0;border-bottom:1px solid #e9eee6;background:#fff;color:#32513d}.cluster-item span{display:block;font-size:12px;color:#859182;margin-top:2px}
.poi-marker{background:none!important;border:0!important}.poi-pin{display:block;width:30px;height:30px;border:2px solid #fff;border-radius:50% 50% 50% 7px;transform:rotate(-45deg);background:#d76e49;box-shadow:0 2px 6px #16292370}.poi-pin span{display:block;transform:rotate(45deg);text-align:center;font-size:13px;font-weight:700;color:#fff;line-height:26px}.poi-label{position:absolute;left:50%;top:-25px;transform:translateX(-50%);background:#fffef4eb;border-radius:5px;padding:1px 6px;font-size:11px;color:#324a34;white-space:nowrap;max-width:130px;overflow:hidden;text-overflow:ellipsis;box-shadow:0 1px 4px #17241930;pointer-events:none}.poi-cluster{background:none!important;border:0!important}.cluster-bubble{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:#fff8e9;border:3px solid #dfa569;border-radius:50%;box-shadow:0 2px 9px #152e2955;color:#92552b;font-weight:700;font-size:14px}.cluster-label{position:absolute;left:50%;top:-25px;transform:translateX(-50%);font-size:11px;white-space:nowrap;padding:1px 6px;border-radius:5px;background:#fffef4ec;color:#324a34;max-width:130px;overflow:hidden;text-overflow:ellipsis}
@media(min-width:700px){.topbar{height:66px;padding:0 28px}.sheet{bottom:24px;border-radius:22px}.map-actions{right:26px;bottom:38px}footer{font-size:12px;padding:10px}.map-button{width:48px;height:48px}}

/* Outdoor readability and compact header. */
.topbar{height:62px;padding:0 12px;gap:8px;justify-content:flex-start;padding-top:env(safe-area-inset-top);box-sizing:content-box}
.topbar h1{position:static;transform:none;flex:1;text-align:center;font-size:18px;letter-spacing:0;font-weight:750}
.brand-icon{width:34px;height:34px;object-fit:contain;border-radius:9px;flex-shrink:0}
.help-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;background:#fff;border:1px solid #dbe3dc;border-radius:12px;color:#173d33;flex-shrink:0}
.help-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.locate-entry{top:74px;background:#164c34;color:white;border:2px solid white;padding:9px 19px;box-shadow:0 2px 9px #001b3170;z-index:900}
.locate-entry.attention{animation:location-attention 2.2s ease-in-out infinite}
@keyframes location-attention{0%,100%{box-shadow:0 0 0 0 #14583755}50%{box-shadow:0 0 0 9px #14583700}}
@media(prefers-reduced-motion:reduce){.locate-entry.attention{animation:none;border-color:#ffca45}}
.poi-pin{width:34px;height:34px;border:2px solid #fff;border-radius:10px;transform:none;box-shadow:0 0 0 1px #172c35,0 3px 6px #0007;background:#475569}
.poi-pin span{transform:none;line-height:30px;font-size:14px;font-weight:850;color:white;text-shadow:0 1px 1px #0006}
.poi-start{background:#166534}.poi-junction{background:#7c3aed}.poi-danger{background:#b91c1c;border-radius:5px}.poi-cliff{background:#991b1b}.poi-cave{background:#6b5678}.poi-checkpoint{background:#334155}.poi-water{background:#0e7490;border-radius:50%}
.poi-level1{background:#737373}.poi-level2{background:#64748b}.poi-level3{background:#2563eb}.poi-level4{background:#c2410c}.poi-level5{background:#db2777}
.cluster-count{position:absolute;top:-9px;right:-11px;min-width:21px;height:21px;border-radius:11px;padding:0 4px;background:#fff;color:#142b22;border:2px solid #18382b;box-shadow:0 1px 3px #0007;font-size:11px;font-weight:800;line-height:17px;text-align:center}
.poi-label,.cluster-label{top:-29px;font-weight:650;color:#13251b;background:#fff;border:1px solid #c2cbbf;text-shadow:none}
.guide-intro{font-size:13px}.guide-card{border:1px solid #dbe4db;border-radius:14px;padding:12px;margin-top:12px;background:#f6f8f5}.guide-card h3{font-size:15px;margin:0 0 10px}.settings-diagram{list-style:none;counter-reset:step;padding:8px;margin:0;background:white;border:2px solid #b8c6bd;border-radius:12px}.settings-diagram li{counter-increment:step;padding:10px 4px;display:flex;align-items:center;gap:9px;font-size:13px;border-bottom:1px solid #e0e8df;line-height:1.6}.settings-diagram li:last-child{border:0;background:#e6f2e7}.settings-diagram li:before{content:counter(step);border-radius:50%;background:#275b3b;color:white;min-width:22px;height:22px;text-align:center;line-height:22px;font-weight:700}.sheet .guide-caption{font-size:11px;color:#506356;line-height:1.6;margin:9px 0 0}.device-selector{font-size:12px;border-bottom:1px solid #d6e0d7;padding:8px 0}.device-selector summary{cursor:pointer;color:#255c41}.device-selector label{display:flex;align-items:center;justify-content:space-between;margin-top:9px;gap:8px}.device-selector select,.device-selector input{width:65%;min-width:0;border:1px solid #adbcae;border-radius:6px;padding:6px;background:white;color:#183324;font-size:16px}
@media(max-width:360px){.topbar{gap:4px;padding-left:8px;padding-right:8px}.topbar h1{font-size:16px}.brand-icon{width:30px;height:30px}.sheet{padding-left:18px;padding-right:18px}}
/* Pins use an exact geographic tip at (18,44), regardless of category. */
.poi-pin{position:relative;width:36px;height:46px;border:0;border-radius:0;transform:none;background:none;box-shadow:none;color:#475569;filter:drop-shadow(0 2px 2px #0009)}
.poi-pin svg{width:36px;height:46px;fill:currentColor;stroke:#fff;stroke-width:2;stroke-linejoin:round}
.poi-pin span{position:absolute;left:0;top:2px;width:36px;line-height:32px;transform:none;text-align:center}
.poi-start{color:#166534}.poi-junction{color:#7c3aed}.poi-danger{color:#b91c1c}.poi-cliff{color:#991b1b}.poi-cave{color:#6b5678}.poi-checkpoint{color:#334155}.poi-water{color:#0e7490}.poi-level1{color:#737373}.poi-level2{color:#64748b}.poi-level3{color:#2563eb}.poi-level4{color:#c2410c}.poi-level5{color:#db2777}
.cluster-count{top:-6px;right:-9px}.poi-label,.cluster-label{top:-27px}
.topbar h1{text-align:left;margin-left:5px}
.map-actions{bottom:calc(24px + env(safe-area-inset-bottom));gap:10px}.map-button+.map-button{margin-top:0}.map-button[aria-pressed=true]{background:#fff1f0;color:#b91c1c;border:2px solid #b91c1c}
.position-icon{background:none;border:0;pointer-events:none!important}
.position-ring{position:absolute;inset:1px;border-radius:50%;border:1.5px solid #aa1717;background:transparent;box-shadow:none;pointer-events:none}

.position-north{position:absolute;top:-11px;left:26px;width:20px;text-align:center;font-size:13px;line-height:20px;font-weight:900;background:white;color:#b91c1c;border-radius:5px;box-shadow:0 1px 4px #0005}
.position-dot{position:absolute;left:27px;top:27px;width:18px;height:18px;background:#0066ff;border:3px solid white;box-shadow:0 0 0 2px #10233f;border-radius:50%;z-index:2}
.position-arrow{position:absolute;inset:0;width:72px;height:72px;transform-origin:36px 36px;z-index:1}.position-arrow:before{display:none}.position-arrow svg{width:72px;height:72px}
.position-bearing{position:absolute;top:73px;left:50%;transform:translateX(-50%);background:white;border:1px solid #19334b;border-radius:7px;padding:0 5px;color:#10233f;font-size:11px;font-weight:800;white-space:nowrap}
.position-icon.stale .position-dot{background:#777}
.measure-crosshair{position:absolute;top:50%;left:50%;width:30px;height:30px;transform:translate(-50%,-50%);z-index:900;pointer-events:none;filter:drop-shadow(0 0 1px white)}
.measure-crosshair:before,.measure-crosshair:after{content:'';position:absolute;background:#dc2626;box-shadow:0 0 0 1px white}.measure-crosshair:before{left:14px;top:0;width:2px;height:30px}.measure-crosshair:after{top:14px;left:0;height:2px;width:30px}
.measure-panel{position:absolute;z-index:950;bottom:calc(18px + env(safe-area-inset-bottom));left:12px;right:78px;background:white;border:1px solid #e6d6d4;border-radius:16px;padding:13px;box-shadow:0 3px 18px #0004;display:flex;align-items:center;gap:5px}.measure-panel strong{font-size:14px;color:#9d2424}.measure-panel small{display:block;font-size:11px;color:#67736b}.measure-panel button{margin-left:auto;flex-shrink:0;width:32px;height:38px;background:#f3f5f2;border:0;border-radius:9px;font-size:24px}
.photo-gallery{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:14px 0 6px;-webkit-overflow-scrolling:touch}
.photo-card{flex:0 0 88%;scroll-snap-align:start;border:0;border-radius:14px;padding:0;overflow:hidden;background:#e7eee8;position:relative;color:#183324}.photo-card:only-child{flex-basis:100%}.photo-card .photo-crop{height:220px;aspect-ratio:auto!important}
.photo-crop{display:block;position:relative;overflow:hidden;width:100%;aspect-ratio:4/3;background:#e7eee8}
.photo-crop img{position:absolute;width:100%;height:100%;left:0;top:0;object-fit:cover}
.photo-label{display:block;padding:6px;font-size:12px}.photo-error{display:flex;align-items:center;justify-content:center;min-height:100px;color:#234a39}
.photo-viewer{position:fixed;inset:0;z-index:3000;background:#07111af5;color:white;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom)}
.photo-toolbar,.photo-navigation{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:12px 0;gap:16px}.photo-viewer button{background:#263946;color:white;border:1px solid #80929c;border-radius:12px;min-height:44px;padding:6px 17px}.photo-toolbar button{font-size:26px}
.photo-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}.photo-stage .photo-crop{max-width:720px;max-height:100%;width:auto;height:100%;flex-shrink:0}.photo-stage img{object-fit:fill;user-select:none;-webkit-user-drag:none}.photo-stage .photo-crop{transform-origin:center center}.photo-navigation{justify-content:center}
.measuring .leaflet-bottom.leaflet-left{bottom:110px}

/* Transparent location marker: narrow outline and arrow leave terrain visible. */
.position-north{top:-12px;left:18px;width:12px;line-height:16px;font-size:11px;background:none;box-shadow:none;color:#aa1717;text-shadow:-1px -1px 0 white,1px -1px 0 white,-1px 1px 0 white,1px 1px 0 white}
.position-dot{left:17px;top:17px;width:14px;height:14px;border-width:2px;box-shadow:0 0 0 1px #10233f}
.position-arrow{inset:0;width:48px;height:48px;transform-origin:24px 24px}.position-arrow svg{width:48px;height:48px}
.authorization-sheet[data-step=orientation] .inline-message{color:#233d34;font-size:16px;line-height:1.8;margin:20px 0}
.topbar h1{font-size:17px}@media(max-width:360px){.topbar h1{font-size:15px}}

/* Search stays above the keyboard; only results scroll. */
.search-sheet{top:calc(env(safe-area-inset-top) + 12px);bottom:auto;max-height:calc(100% - 24px);border-radius:20px;padding:18px;display:flex;flex-direction:column;overflow:hidden}
.search-sheet .sheet-top{flex-shrink:0}.search-sheet h2{font-size:19px}
.search-field{display:flex;align-items:center;background:#f3f6f3;border:1px solid #bccbbe;border-radius:12px;margin-top:14px}
.search-field:focus-within{border-color:#28543e;box-shadow:0 0 0 2px #28543e22}
.search-field input{width:100%;min-width:0;border:0;background:none;padding:12px;font-size:16px;color:#183b2b;outline:none}
.search-field input::-webkit-search-cancel-button{-webkit-appearance:none}
.search-field button{flex-shrink:0;width:44px;height:44px;background:none;border:0;font-size:24px;color:#4d6355}
.sheet .search-status{font-size:12px;color:#506356;margin:10px 0;line-height:1.5;flex-shrink:0}
.search-results{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0}
.search-result{display:flex;align-items:center;width:100%;min-height:72px;gap:12px;padding:12px 2px;border:0;border-bottom:1px solid #e4ebe4;background:white;text-align:left;color:#1d392b}
.search-result:active{background:#edf4ed}.search-result-icon{position:relative;display:block;width:36px;height:46px;flex-shrink:0}.search-result-icon .poi-label{display:none}
.search-result-copy{flex:1;min-width:0}.search-result-copy strong{display:block;font-size:16px;overflow-wrap:anywhere}.search-result-copy small{display:block;font-size:12px;color:#506356;margin-top:3px}
.search-result-arrow{font-size:25px;color:#506356}.search-sheet>.secondary-button{flex-shrink:0;padding:9px}
@supports(height:100dvh){.search-sheet{max-height:calc(100dvh - env(safe-area-inset-top) - 24px)}}

/* One-row search controls preserve result space above mobile browser chrome. */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.search-sheet{padding:10px 12px;border-radius:16px}
.search-toolbar{display:flex;align-items:center;gap:6px;flex-shrink:0}
#search-form{display:flex;align-items:center;gap:6px;flex:1;min-width:0}
.search-field{flex:1;min-width:0;margin:0;border-radius:10px}
.search-field input{padding:10px 8px;line-height:24px}
.search-field button{width:36px}
#search-submit{height:44px;min-width:48px;padding:0 6px;color:white;background:#28543e;border:0;border-radius:10px;font-size:15px;font-weight:650}
.search-toolbar .close-sheet{width:36px;height:44px;border-radius:10px}
.sheet .search-status{margin:6px 0;line-height:18px}
.search-results{flex:1}
.search-result{min-height:64px;padding:8px 2px;gap:10px}
.search-result-copy small{margin-top:1px}

/* Permission recovery: plain instructions, no diagnostic controls. */
.authorization-sheet .sheet-top{position:sticky;top:0;background:#fff;z-index:2;padding-bottom:10px}
.authorization-sheet .inline-message:empty{display:none}
.authorization-sheet .guide-card{background:none;border:0;border-top:1px solid #dce4df;border-radius:0;padding:16px 0;margin:0}
.authorization-sheet .settings-diagram{border:0;background:none;padding:0 0 0 24px;list-style:decimal}
.authorization-sheet .settings-diagram li{display:list-item;border:0;padding:4px 0;background:none;line-height:1.65}
.authorization-sheet .settings-diagram li:before{display:none}
.guide-image{display:block;width:100%;height:auto;max-width:360px;margin:10px auto;border-radius:8px}
.guide-return{padding:12px 0;color:#243d33;font-size:18px;font-weight:700;line-height:1.6}

.authorization-sheet .settings-diagram li{font-size:15px;padding:6px 0}.authorization-sheet .guide-intro{font-size:15px}.authorization-sheet .guide-card h3{font-size:17px}

.guide-step-image{position:relative;overflow:hidden;width:100%;height:0;margin:8px 0 12px;border-radius:8px;background:#f4f5f3}
.guide-step-image .guide-image{position:absolute;top:0;left:0;width:100%;max-width:none;height:auto;margin-bottom:0;border-radius:0}
#bearing-button{position:relative}#bearing-button[aria-pressed=true]{background:#e9f3ff;color:#1d4b88;border:2px solid #4d80c6}.bearing-mode{position:absolute;right:3px;bottom:0;font-size:9px;line-height:13px;font-weight:700;background:inherit;border-radius:4px;padding:0 2px}.leaflet-rotate-pane{will-change:transform}
@media(max-height:520px){.map-actions{gap:5px;bottom:10px}.map-actions .map-button{height:36px;width:36px;border-radius:10px}}
#center-button[data-following=true]:not(:disabled){color:#1769c2;border-color:#9bc3eb;background:#f1f7ff}
.position-arrow.held-heading{opacity:.6}.position-icon.sensor-retrying .position-ring{border-style:dashed}
.photo-viewer{background:#07111a}.photo-load-status{position:absolute;top:50%;bottom:auto;left:50%;transform:translate(-50%,-50%);font-size:12px;white-space:nowrap;z-index:1}.photo-load-status:disabled{opacity:1;color:#d4dde4}


/* Labels fit inside the existing touch targets; do not enlarge the toolbar. */
.map-actions .map-button{flex-direction:column;gap:1px;padding:3px 0}
.map-actions .map-button svg{flex-shrink:0;width:22px;height:22px}
.map-button-label{font-size:10px;line-height:12px;font-weight:600;white-space:nowrap}
.bearing-mode{top:1px;right:2px;bottom:auto;line-height:11px;font-size:9px}
@media(max-height:520px){.map-actions .map-button{padding:1px 0;gap:0}.map-actions .map-button svg{width:18px;height:18px}.map-button-label{font-size:9px;line-height:11px}.bearing-mode{top:0;right:0;font-size:8px;line-height:10px}}

/* The existing help sheet: large text, in-place legend, always reachable close. */
#help-sheet{padding:0 22px calc(22px + env(safe-area-inset-bottom));scroll-padding-top:76px}
#help-sheet>.sheet-top{position:sticky;top:0;z-index:2;background:#fff;padding:18px 0 12px;align-items:center;border-bottom:1px solid #e5ebe7}
#help-sheet .close-sheet{width:44px;height:44px}
#help-sheet p{font-size:17px;line-height:1.65;margin:10px 0;color:#263e34}
#help-sheet .help-intro{margin:16px 0 20px}
.help-block{padding:16px 0;border-top:1px solid #e5ebe7}.help-block h3{font-size:18px;line-height:1.4;margin:0 0 10px;color:#173d33}
.help-icon-row{display:flex;align-items:center;gap:14px;min-height:48px;font-size:17px;color:#263e34}
.help-location,.help-heading{position:relative;display:inline-block;width:44px;height:44px;flex:none}.help-location .position-dot{left:13px;top:13px}
.help-tool{display:inline-flex;vertical-align:middle;width:27px;height:27px;margin:0 4px;color:#254f40}.help-tool svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.help-function{display:flex;align-items:flex-start;gap:14px;padding:14px 0;border-bottom:1px solid #e4ebe5}.help-function:last-child{border-bottom:0}.help-function>img{width:52px;height:auto;flex:none;border-radius:12px}.help-function>div{min-width:0}.help-function h4{margin:0;font-size:18px;color:#263e34}#help-sheet .help-function p{margin:6px 0 0}
.help-heat-example{display:block;width:100%;height:auto;margin:8px 0}
#help-sheet .help-heat-note{margin-top:8px}.help-legend-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;background:#f1f5f2;border:1px solid #d4dfd8;border-radius:10px;color:#254f40;font-size:17px;font-weight:600;padding:10px 14px}
#help-legend-items{display:grid;grid-template-columns:1fr 1fr;gap:10px 8px;padding-top:14px}.help-legend-item{display:flex;align-items:center;gap:8px;font-size:16px;min-height:48px;color:#263e34}.help-poi-icon{display:block;position:relative;width:36px;height:46px;flex:none}.help-poi-icon .poi-label{display:none}
#help-sheet .help-secondary{font-size:15px;color:#4f6258}#help-sheet .wechat-button{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:17px}#help-sheet .wechat-button span{font-size:15px;color:#426550;text-decoration:underline}
@media(max-width:340px){#help-sheet{padding-left:16px;padding-right:16px}.help-legend-item{font-size:15px;gap:5px}}

#help-sheet .help-network-warning{margin:16px 0;padding:16px;border:1px solid #e5cf93;border-radius:12px;background:#fff5dc}
#help-sheet .help-network-warning h3{display:flex;align-items:center;gap:8px;color:#614615}
#help-sheet .help-network-warning p{font-family:inherit;font-size:17px;line-height:1.65;color:#513d1c}
.help-network-warning h3 svg{width:23px;height:23px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Bottom controls: frequent map actions on the right, information on the left. */
.map-actions{gap:6px;bottom:calc(18px + env(safe-area-inset-bottom))}
.map-actions-info{left:max(12px,env(safe-area-inset-left));right:auto}
.map-actions-navigation{right:max(12px,env(safe-area-inset-right))}
.map-actions .map-button{width:48px;height:48px}

.measure-panel{left:72px;right:72px}
#donate-sheet{padding:0 22px calc(22px + env(safe-area-inset-bottom));font-size:17px}
#donate-sheet>.sheet-top{position:sticky;top:0;background:white;z-index:2;padding:18px 0 12px;align-items:center}
#donate-sheet .close-sheet{width:44px;height:44px}
#donate-sheet p{line-height:1.6;margin:10px 0}
#donate-payment{text-align:center}
#donate-qr{display:block;width:180px;max-width:100%;height:auto;object-fit:contain;margin:12px auto;background:white;-webkit-touch-callout:default;user-select:auto}
#donate-payment a{text-decoration:none;box-sizing:border-box}
@media(max-height:520px){.map-actions{gap:3px;bottom:calc(8px + env(safe-area-inset-bottom))}.map-actions .map-button{width:44px;height:44px}.layers-panel{padding:10px}.measure-panel{padding:8px}}

.leaflet-bottom.leaflet-left{left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%)}
.leaflet-control-scale{margin-left:0!important;margin-bottom:0!important}
#map.measuring .leaflet-bottom.leaflet-left{bottom:calc(110px + env(safe-area-inset-bottom))}

#donate-unavailable{position:relative;width:180px;max-width:100%;margin:12px auto;text-align:center}.donate-placeholder{display:block;width:100%;height:auto;margin:0}.donate-placeholder-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#657469;font-size:14px}
#donate-title{font-size:20px}#donate-sheet>.sheet-top{gap:8px;padding:14px 0 8px}#donate-sheet{max-height:calc(100% - 24px)}
#donate-payment h3{font-size:16px;margin:8px 0}#donate-payment p{font-size:15px}

.range-label{position:absolute;z-index:450;transform:translate(-50%,-100%);pointer-events:none;white-space:nowrap;color:#fff;font-size:15px;font-weight:600;line-height:24px;text-shadow:0 1px 3px #142820,0 0 4px #142820;padding:2px 6px}

.donate-emphasis{text-align:center}.donate-thanks-emoji{display:block;text-align:center;font-size:26px;line-height:32px;margin-top:4px}

/* Keep all layer categories reachable on short phone screens. */
.layers-panel{position:fixed;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:280px;max-width:calc(100vw - 32px);max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}.poi-filters{border:0;border-top:1px solid #e7ece8;margin:10px 0 0;padding:8px 0 0;min-width:0}.poi-filters legend{font-size:13px;color:#526158}.poi-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}.poi-filter-grid label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:15px;cursor:pointer}.poi-filter-grid input{width:20px;height:20px;accent-color:#305641;margin:0}.poi-filters p{font-size:12px;line-height:1.5;color:#526158;margin:5px 0 0}.poi-filters:disabled{opacity:.5}

/* Larger, warm-toned POI labels remain distinct from white toolbar buttons. */
.poi-label,.cluster-label{font-size:16px;line-height:24px;font-weight:700;color:#243746;background:#fff4da;border:1px solid #a69775;padding:2px 8px;top:-36px;max-width:180px;box-shadow:0 1px 3px #0005}
.safety-sheet{top:50%;bottom:auto;transform:translate(-50%,-50%);width:calc(100% - 32px);max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);border-radius:18px;padding:22px;background:#fffcf5}
.safety-copy ol{padding-left:1.5em;margin:12px 0}.safety-copy li{font-size:17px;line-height:1.65;margin:10px 0;color:#333b3a}.safety-sheet h2,.help-safety h3{color:#80551e}.safety-sheet .primary-button{position:sticky;bottom:0;min-height:48px;font-size:18px}.safety-sheet .primary-button:disabled{background:#d8dacf;color:#555c54;border-color:#d8dacf;cursor:wait}.help-safety{background:#fff4da;border:1px solid #dfc99a;border-radius:12px;margin-top:16px;padding:12px 16px}

.contact-sheet p{font-size:18px;line-height:1.7}.contact-sheet .wechat-button{display:inline-flex;align-items:center;gap:12px;min-height:48px;font-size:18px;flex-wrap:wrap}.contact-sheet .wechat-button span{font-size:16px;text-decoration:underline;color:#426550}

.search-direction{pointer-events:none;animation:search-direction-hint 3s linear both}@keyframes search-direction-hint{0%{opacity:0}7%,88%{opacity:1}100%{opacity:0}}@media(prefers-reduced-motion:reduce){.search-direction{animation:none}}

.search-direction-target{background:none!important;border:0!important;pointer-events:none!important}


.map-frame .locate-entry{top:auto;bottom:calc(62px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 144px);padding:10px 14px;font-size:16px;white-space:normal;line-height:1.4;text-align:center}

.locate-entry-group{position:absolute;z-index:900;bottom:calc(62px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 144px);max-width:320px;display:flex;flex-direction:column;align-items:center;gap:8px}
#locate-privacy{margin:0;padding:6px 10px;border-radius:9px;background:#fff8e9f5;color:#344a40;font-size:14px;line-height:1.5;text-align:center;box-shadow:0 1px 5px #0003;pointer-events:none}
.map-frame .locate-entry-group .locate-entry{position:static;transform:none;max-width:100%;margin:0}
.locate-entry-group .locate-entry.attention{animation:locate-group-attention 2.2s ease-in-out infinite}@keyframes locate-group-attention{0%,100%{box-shadow:0 2px 9px #001b3170}50%{box-shadow:0 0 0 5px #dfb83b66,0 2px 9px #001b3170}}
@media(prefers-reduced-motion:reduce){.locate-entry-group .locate-entry.attention{animation:none}}

/* Unified outdoor UI: shared type scale and component surfaces. */
:root{--ui-ink:#243d33;--ui-muted:#506356;--ui-brand:#28543e;--ui-control-radius:14px;--ui-panel-radius:20px;--ui-shadow:0 3px 12px #10281e26}
.map-actions .map-button{border-radius:var(--ui-control-radius);box-shadow:var(--ui-shadow)}
.map-actions .map-button-label{font-size:12px;line-height:15px;font-weight:600}
.map-actions .map-button svg{width:22px;height:22px}
#center-button:not(:disabled),#center-button[data-following=true]:not(:disabled){background:#fff;color:#254f40;border-color:#ffffff80}
.sheet{padding:16px 16px calc(16px + env(safe-area-inset-bottom));border-radius:var(--ui-panel-radius) var(--ui-panel-radius) 0 0;color:var(--ui-ink)}
.sheet .sheet-top{align-items:center;gap:8px}
.sheet .sheet-top h2,#donate-title{font-size:18px;font-weight:700;line-height:1.4}
.sheet .close-sheet,#help-sheet .close-sheet,#donate-sheet .close-sheet,.search-close,#layers-close{width:44px;height:44px;min-width:44px;min-height:44px;font-size:24px;border:0;border-radius:50%;background:#f0f3ef;color:var(--ui-muted);line-height:1}
#help-sheet,#donate-sheet{padding:0 16px calc(16px + env(safe-area-inset-bottom))}
#help-sheet>.sheet-top,#donate-sheet>.sheet-top{padding:12px 0;gap:8px}
.description{font-size:16px;line-height:1.6;color:var(--ui-ink)}
.eyebrow{font-size:13px;letter-spacing:0;color:var(--ui-muted)}
.muted,.search-result-copy small,.search-distance-note{font-size:14px;color:var(--ui-muted)}
.layers-panel{border-radius:var(--ui-panel-radius);padding:16px;box-shadow:var(--ui-shadow)}
.layers-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.layers-heading h2{margin:0;font-size:18px;color:var(--ui-ink)}
.poi-label,.cluster-label{pointer-events:auto;cursor:pointer}
.poi-label.label-suppressed,.cluster-label.label-suppressed{visibility:hidden;pointer-events:none}
.position-ring{border-width:2px}
.position-north{font-size:12px;font-weight:800}
.locate-entry-group{gap:6px}
#locate-privacy{padding:0;background:none;border:0;box-shadow:none;border-radius:0;font-size:13px;line-height:1.5;color:#243d33;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}
.search-result-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:2px;align-items:start}
.search-result-copy strong{font-size:16px;font-weight:700;min-width:0}
.search-result-copy small{grid-column:1/-1;margin:0;font-size:14px}
.search-result-distance{font-size:14px;font-weight:600;color:var(--ui-brand);white-space:nowrap;line-height:1.65}
.search-distance-note{margin:0 0 6px!important;flex-shrink:0;font-size:14px;line-height:1.5}
.contact-lead{white-space:nowrap}
.contact-sheet .wechat-button{display:flex;text-align:left;gap:10px;max-width:100%;align-items:center}
.contact-sheet .wechat-button strong{overflow-wrap:anywhere}
.contact-sheet .wechat-button span{flex-shrink:0}
.help-safety{padding:12px}
.help-safety .safety-copy ol{margin:8px 0;padding-left:1.5em}
.help-safety .safety-copy li{font-size:16px;line-height:1.5;margin:8px 0}
.help-safety .safety-copy li p{margin:0!important;font-size:16px!important;line-height:1.5!important}
.photo-crop.photo-pending:before,.photo-stage[aria-busy=true]:empty:before{content:'';position:absolute;width:42px;height:34px;left:50%;top:50%;transform:translate(-50%,-50%);background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='34' viewBox='0 0 42 34'%3E%3Cg fill='none' stroke='%2383938a' stroke-width='2'%3E%3Crect x='2' y='2' width='38' height='30' rx='4'/%3E%3Ccircle cx='13' cy='11' r='3'/%3E%3Cpath d='m3 27 10-10 7 6 7-10 12 14'/%3E%3C/g%3E%3C/svg%3E");pointer-events:none}
@media(min-width:700px){.sheet{border-radius:var(--ui-panel-radius)}}
@media(orientation:landscape) and (max-height:500px){
 .topbar{height:44px}.brand-icon{width:30px;height:30px}
 .map-actions{gap:4px}.map-actions .map-button{width:44px;height:44px;padding:2px 0;gap:0}
 .map-actions .map-button-label{font-size:12px;line-height:15px}
 .locate-entry-group{flex-direction:row;justify-content:center;gap:10px;max-width:470px;bottom:calc(46px + env(safe-area-inset-bottom))}
 #locate-privacy{flex:1;text-align:left}.locate-entry-group .locate-entry{flex:none;max-width:180px!important}
}

.sheet .search-status{font-size:14px;line-height:1.5}

/* Follow-up: panels above authorization, compact results, consistent measurement. */
.layers-panel{z-index:1200}
.search-result{min-height:54px;padding:4px 2px;gap:8px}
.search-result-copy{align-items:center;row-gap:0}
.search-result-copy strong{line-height:1.4}
.measure-panel{border:1px solid #e5ebe7;border-radius:var(--ui-panel-radius);box-shadow:var(--ui-shadow);padding:12px;gap:8px;color:var(--ui-ink)}
.measure-panel>div{flex:1;min-width:0}
.measure-panel strong{display:block;font-size:17px;line-height:1.5;font-weight:600;color:var(--ui-ink)}
.measure-panel small{font-size:14px;line-height:1.5;color:var(--ui-muted);margin-top:4px}
.measure-panel button{width:44px;height:44px;min-width:44px;border:0;border-radius:50%;background:#f0f3ef;color:var(--ui-muted);font-size:24px;line-height:1}

.measure-panel strong>span{display:block}
#map.measuring .leaflet-control-scale{visibility:hidden}

/* Measurement at the top, readable above satellite imagery. */
.measure-panel{top:12px;bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 24px);max-width:420px;align-items:flex-start}
.measure-panel strong>.measure-value{font-size:30px;line-height:1.25;font-weight:800;font-variant-numeric:tabular-nums;color:#243d33;margin-top:2px}
.measure-panel strong>.measure-status{font-size:13px;font-weight:400;color:#506356}
#map.measuring .leaflet-control-scale{visibility:visible}
#map.measuring .leaflet-bottom.leaflet-left{bottom:calc(18px + env(safe-area-inset-bottom))}
#locate-privacy{padding:7px 10px;border:1px solid #d4ddd6;border-radius:10px;background:rgba(255,253,245,.92);color:#243d33;font-size:14px;font-weight:500;line-height:1.5;text-shadow:none;box-shadow:0 2px 8px #10281e26}

.cache-tile{overflow:hidden;background:transparent}.cache-tile>img{position:absolute;left:0;top:0;width:256px;height:256px;max-width:none!important;max-height:none!important;pointer-events:none}

#help-network{scroll-margin-top:80px}

.cache-reminder-sheet p{font-size:18px;line-height:1.65;color:var(--ui-ink)}
.cache-reminder-option{display:flex;align-items:center;gap:10px;min-height:48px;margin:12px 0;font-size:17px}.cache-reminder-option input{width:22px;height:22px;accent-color:var(--ui-brand)}
