:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#152e2a;background:#f1f5f3;font-size:14px}*{box-sizing:border-box}body{margin:0;height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);background:#f1f5f3}header{background:#153b35;color:white;padding:10px 14px;display:flex;align-items:center;justify-content:space-between}header b{letter-spacing:1.4px;font-size:17px}small{display:block;font-size:11px;color:#64756f}header small{color:#b7d4ca;max-width:60vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button,input,select,textarea{font:inherit}button{border:1px solid #cdd9d3;border-radius:9px;background:white;color:#183e34;min-height:40px;padding:8px 10px;font-weight:600;cursor:pointer}button:disabled{opacity:.5}header button{background:#27584d;color:white;border-color:#427064}nav{display:flex;gap:5px;padding:6px;background:#e6eeea;overflow-x:auto}nav button{flex:1;white-space:nowrap;font-size:12px;min-height:33px;padding:4px 7px}.active,.primary{background:#17634c!important;color:white!important;border-color:#17634c!important}#map{flex:1;min-height:140px;position:relative;overflow:hidden;background:#aabbb0;touch-action:none;isolation:isolate}#tiles,#overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#tiles img{position:absolute;width:256px;height:256px;user-select:none;-webkit-user-drag:none}#overlay text{paint-order:stroke;stroke:#17322d;stroke-width:3px;stroke-linejoin:round;fill:white;font-size:12px;font-weight:700}#gpsBadge,#scale,#attribution{position:absolute;background:#16352de8;color:white;padding:5px 8px;border-radius:5px;font-size:11px;pointer-events:none}#gpsBadge{top:10px;left:10px}#scale{bottom:24px;left:9px}#attribution{bottom:0;right:0;font-size:9px;max-width:95%;text-align:right;border-radius:4px 0 0 0;background:#fffD;color:#23372e;pointer-events:auto}#attribution a{color:inherit}.cross{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:31px;color:#fff;text-shadow:0 0 3px black;pointer-events:none}.tools{position:absolute;right:10px;top:12px;display:flex;flex-direction:column;gap:5px}.tools button{width:42px;height:42px;font-size:22px;box-shadow:0 1px 4px #0003;padding:0}#stats{display:flex;padding:10px 12px;background:white;border-bottom:1px solid #dae4de;gap:5px}#stats div{flex:1;min-width:0}#stats b{display:block;font-size:19px;color:#154f3c;margin-top:2px}.actions,footer{display:flex;gap:7px;padding:7px 9px}.actions button{flex:1;min-height:47px}footer{padding-top:0}footer button{flex:1;font-size:12px;padding:5px 3px;white-space:nowrap}#status{position:fixed;bottom:calc(109px + env(safe-area-inset-bottom));left:12px;right:12px;padding:10px;border-radius:9px;background:#153b35ed;color:white;z-index:4;display:none;pointer-events:none}dialog{width:min(96vw,560px);max-height:85dvh;border:0;border-radius:16px;padding:15px;box-shadow:0 6px 40px #0005;overflow:auto;color:#183e34}dialog::backdrop{background:#132b2680}.modalhead{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-15px;background:white;z-index:1;padding:5px 0}h2{font-size:19px;margin:0}h3{font-size:14px;margin:12px 0 4px}label{display:block;margin:10px 0 4px;font-size:12px;font-weight:600}input:not([type=checkbox]),select,textarea{width:100%;border:1px solid #bccdc4;border-radius:8px;padding:10px;min-height:42px;background:white;color:#17352e;font-size:16px}textarea{min-height:65px}.line{display:flex;gap:7px;align-items:center;margin:8px 0}.line>*{flex:1;min-width:0}.muted{font-size:12px;color:#64756f;line-height:1.5}.item{border-bottom:1px solid #e1e9e4;padding:10px 0;display:flex;gap:6px;align-items:center}.item>div{flex:1;min-width:0;overflow-wrap:anywhere}.item button{min-height:35px;font-size:12px}.danger{color:#a62c31}.check{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:400}#modalBody>button{width:100%;margin:5px 0}a{color:#17634c}progress{width:100%}

#modalStatus{display:none;background:#e8f0e9;color:#254e3e;padding:8px;margin:5px 0;border-radius:7px;position:sticky;top:42px;z-index:2;font-size:12px}

/* Each map layer owns its stacking context: tile children cannot hide survey UI. */
#tiles{z-index:0;isolation:isolate}#overlay{z-index:1;overflow:hidden}.cross{z-index:2;width:48px;height:48px;display:grid;place-items:center;filter:drop-shadow(0 1px 2px #000);text-shadow:none}.cross svg{width:48px;height:48px;overflow:visible;fill:none;stroke:#ffdc50;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 1px #000)}.cross .dot{fill:#fff;stroke:#111;stroke-width:.8}#centerHint{position:absolute;top:calc(50% + 30px);left:50%;transform:translateX(-50%);z-index:2;pointer-events:none;background:#152e2ae8;color:white;font-size:10px;padding:3px 7px;border-radius:5px;white-space:nowrap}#gpsBadge,#scale,#attribution,.tools{z-index:3}.tools button{background:#fff;touch-action:manipulation}.tools #locate{height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:#1168cc}.tools #locate svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}.tools #locate .locdot{fill:currentColor;stroke:none}.tools #locate small{color:inherit;font-size:9px;line-height:1}.tools #locate.gps-ready{background:#e5f1ff;border-color:#83b5f2}.tools #locate:disabled{opacity:.75}#gpsBadge{max-width:calc(100% - 72px);font-variant-numeric:tabular-nums}#gpsBadge.gps-good{background:#0d4b86ed}#gpsBadge.gps-warn{background:#805419ed}

/* Compact, one-handed pole form */
#modalBody .point-summary{padding:9px 10px;background:#edf4f0;border-radius:8px;font-size:12px;overflow-wrap:anywhere} .point-summary small{margin-top:4px}.point-fields{align-items:start;margin:0}.point-fields label{white-space:normal}#pnote{min-height:90px}#photoNum{font-weight:400;color:#64756f}.photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.photo-grid>div{min-width:0;border:1px solid #d4e0d8;border-radius:8px;overflow:hidden;background:#fff}.photo-grid img{width:100%;height:95px;object-fit:cover;display:block}.photo-grid button{width:100%;font-size:11px;padding:4px;min-height:32px;border:0;color:#a62c31}details{margin-top:10px;border-top:1px solid #dce5df;padding-top:9px}summary{cursor:pointer;font-size:13px;font-weight:600}.point-save{position:sticky;bottom:-15px;background:white;padding:9px 0;z-index:1;margin-bottom:0}.point-save .primary{flex:2;min-height:46px}input[hidden]{display:none!important}

.map-tile{position:absolute;overflow:hidden;pointer-events:none}.map-tile img{position:absolute;max-width:none;max-height:none;user-select:none;-webkit-user-drag:none}

/* v1.6: compact native-style UI; no new font or framework downloads. */
:root{color:#18352e;background:#f4f7f5}body{background:#f4f7f5}header{background:#133e37;padding:10px 12px;gap:8px;min-height:60px}.brand{display:flex;align-items:center;gap:9px;min-width:0}.brand img{border-radius:10px;border:1px solid #ffffff35;flex:none}.brand>div{min-width:0}header b{font-size:19px;letter-spacing:.1px;line-height:1.1}.ver{font-size:10px;letter-spacing:.3px;color:#b9e4d4;background:#ffffff17;padding:3px 5px;border-radius:6px;vertical-align:middle}header small{margin-top:4px;max-width:52vw;font-size:11px}header button{border-radius:11px;font-size:12px;flex:none;padding:7px 9px}nav{gap:3px;padding:5px 8px;background:#e7eeea;box-shadow:0 1px 4px #102c2520;z-index:1}nav button{border:0;background:transparent;color:#33584b;border-radius:8px;font-size:12px;min-height:36px}nav button.active{box-shadow:0 1px 3px #163d3530}#map{background:#273c31}.map-tile img{image-rendering:auto}.map-tile.satellite img{filter:none}.map-vivid .map-tile.satellite img{filter:contrast(1.09) saturate(1.15) brightness(1.035)}.map-tile.labels{opacity:.90}.tools{gap:6px;right:9px;top:10px}.tools button{border:1px solid #ffffff65;border-radius:13px;box-shadow:0 2px 8px #0004;width:43px;height:43px}.tools #mapStyle{font-size:23px;color:#1b5949}#gpsBadge,#scale{border:1px solid #ffffff30;border-radius:9px;box-shadow:0 2px 8px #0002}#centerHint{border-radius:12px;font-size:10px;background:#172c27d9}#stats{padding:9px 12px;gap:6px;box-shadow:0 -2px 8px #182d2614;z-index:1}#stats div+div{border-left:1px solid #e6ece8;padding-left:9px}#stats b{font-size:19px;font-variant-numeric:tabular-nums}.actions{padding:8px 9px 6px}.actions button{border-radius:12px;font-size:13px;min-height:49px}.actions .primary{background:#17634c!important;box-shadow:0 2px 5px #17634c28}footer{gap:4px;padding:0 8px 6px}footer button{border:0;background:transparent;border-radius:9px;font-size:11px;padding:5px 1px;min-height:39px}footer button:active{background:#dbe9e2}dialog{border-radius:20px;padding:16px}dialog::backdrop{background:#122d27a3}.refrow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px;align-items:center;padding:10px 0;border-bottom:1px solid #dce7e1}.refrow b{overflow-wrap:anywhere}.refrow button{min-height:35px;padding:5px 8px;font-size:12px}.refrow .ref-toggle{display:flex;gap:5px;align-items:center;margin:0;font-size:12px}.refrow small{margin-top:4px}.refbadge{color:#285b79;background:#e8f3fa;padding:2px 6px;border-radius:5px;font-size:10px}.map-note{padding:10px;border-radius:10px;background:#edf5f0;color:#38594a;font-size:12px;line-height:1.5}.stylechoice{display:flex;gap:8px}.stylechoice button{flex:1;min-height:48px}.refrow .danger{font-size:11px}@media(max-width:350px){footer button{font-size:10px}header b{font-size:16px}nav button{font-size:11px}.actions button{font-size:12px}}

.export-report{white-space:pre-wrap;background:#eaf3ee;color:#163d33;padding:12px;border-radius:12px;font-size:13px;line-height:1.55;overflow-wrap:anywhere} #ready:empty{display:none} #ready button{margin-bottom:12px}

/* v1.9: independent survey routes and live span preview. */
.routebar{display:flex;align-items:center;gap:6px;padding:5px 8px;background:#f3f7f4;border-bottom:1px solid #d8e4dc}.routebar span{flex:1;min-width:0;font-size:11px;font-weight:700;color:#17634c}.routebar span.finished{color:#9b443a}.routebar button{min-height:34px;padding:5px 8px;font-size:11px;border-radius:8px;white-space:nowrap}#endRoute:not(:disabled){color:#a13d32;border-color:#dfb9b2}#liveMeasure{position:absolute;top:44px;left:10px;max-width:calc(100% - 75px);z-index:3;padding:7px 9px;border:1px solid #6deaff80;background:#102f35eb;color:white;border-radius:10px;box-shadow:0 2px 8px #0004;font-variant-numeric:tabular-nums}#liveMeasure[hidden]{display:none}#liveMeasure small{color:#c5e7eb;font-size:10px;overflow-wrap:anywhere}#liveMeasure b{display:block;color:#8bf3ff;font-size:22px;line-height:1.2;margin:3px 0 5px}.measure-switch{display:flex;gap:4px}.measure-switch button{min-height:30px;padding:3px 10px;font-size:11px;background:#294953;color:#e4f5f7;border-color:#53727a}.measure-switch button.selected{background:#baf5fc;color:#123c45;border-color:#baf5fc}


/* v1.10: hide injected host badges and improve bottom navigation readability */
footer{padding:2px 8px calc(10px + env(safe-area-inset-bottom)); position:relative; z-index:6; background:#f4f7f5}
footer button{font-size:13px;padding:7px 2px;min-height:42px;font-weight:700}
@media(max-width:350px){footer button{font-size:12px}}
body{padding-bottom:max(env(safe-area-inset-bottom),10px)}
iframe[src*='netlify'], a[href*='netlify'], .netlify-badge, [data-netlify-badge], #netlify-badge{display:none !important; visibility:hidden !important; pointer-events:none !important;}
#status{bottom:calc(120px + env(safe-area-inset-bottom));}
