:root{--brand:#144674;--ink:#162c3c;--muted:#647686;--line:#dce5ec;--paper:#fff;--accent:#de2340;--safe:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#e9eef1}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:12px;background:white;color:var(--brand);min-height:44px;padding:9px 13px;font-weight:600}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #4e8ed3;outline-offset:2px}.hidden{display:none!important}#map{position:fixed;inset:0}header{position:fixed;left:12px;right:12px;top:max(12px,env(safe-area-inset-top));z-index:5;background:#fff;border-radius:20px;box-shadow:0 4px 24px #001f2d22;padding:13px 14px 9px}.brand{display:flex;align-items:center;gap:10px;margin-bottom:12px}.brand img{width:32px;height:32px}.brand strong{font-size:20px;letter-spacing:-.5px}.brand strong span{font-weight:350;color:var(--muted)}.brand small{display:block;font-size:10px;letter-spacing:.06em;margin-top:2px;color:var(--muted)}.icon{margin-left:auto;width:44px;font-size:24px;border:0}.search-row{display:flex;gap:7px}.search{display:flex;align-items:center;background:#f1f5f8;border-radius:12px;padding:0 11px;flex:1;min-width:0}.search span{font-size:24px;color:var(--muted)}.search input{width:100%;min-height:44px;border:0;background:transparent;padding:8px;color:var(--ink);outline-offset:0}.chips{display:flex;gap:6px;overflow:auto;padding-top:9px;scrollbar-width:none}.chips button{font-size:11px;border-radius:20px;min-height:34px;white-space:nowrap;padding:6px 12px}.chips button.active{background:var(--brand);color:white;border-color:var(--brand)}#results{max-height:36vh;overflow:auto;border-top:1px solid var(--line);margin-top:9px}#results button{width:100%;border:0;border-bottom:1px solid #edf1f4;border-radius:0;display:flex;gap:10px;align-items:center;text-align:left;padding:12px 3px}#results .code{background:#eef4f9;border-radius:8px;padding:8px;font-size:12px;min-width:42px;text-align:center}#results strong{font-size:13px}#results small{display:block;font-weight:400;color:var(--muted);font-size:11px;margin-top:3px}.empty{padding:15px;font-size:13px;color:var(--muted)}#map-actions{position:fixed;right:14px;top:208px;z-index:3;display:flex;flex-direction:column;gap:8px}#map-actions button{box-shadow:0 3px 12px #001f2d22;width:46px;font-size:25px}#locate.active{background:var(--brand);color:white}#location-status{position:fixed;left:14px;top:208px;z-index:3;background:#fffffff0;border-radius:15px;padding:7px 11px;font-size:11px;max-width:calc(100% - 80px);box-shadow:0 2px 8px #001f2d11}#sheet{position:fixed;z-index:4;bottom:0;left:0;right:0;max-height:48dvh;overflow:auto;padding:8px 19px calc(12px + var(--safe));background:white;border-radius:23px 23px 0 0;box-shadow:0 -4px 25px #001f2d22}.grab{width:38px;height:4px;background:#d6dfe6;border-radius:3px;margin:0 auto 11px}.eyebrow{font-size:10px;letter-spacing:.1em;font-weight:750;color:var(--brand)}h1{font-size:23px;letter-spacing:-.7px;margin:5px 30px 8px 0;line-height:1.12}p{font-size:12px;color:var(--muted);line-height:1.55;margin:7px 0 12px}.actions{display:flex;gap:8px;flex-wrap:wrap}.actions button{font-size:12px;flex:1}.primary{background:var(--brand);color:white;border-color:var(--brand)}.close{position:absolute;right:12px;top:15px;border:0;min-height:36px;font-size:25px;padding:2px 10px}.footer-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;font-size:10px;color:var(--muted)}.text{border:0;padding:4px 0;min-height:30px;font-size:10px;text-decoration:underline;font-weight:500}.footer-line #network-state{margin-right:auto}#draft-notice{font-size:10px;margin:4px 0 0;color:#8b6120}#route-summary:not(:empty){background:#edf4fa;padding:12px;border-radius:10px;margin-top:12px;font-size:12px;line-height:1.5}#route-summary strong{display:block;font-size:16px;margin-bottom:4px}#route-summary ol{padding-left:18px;margin:7px 0}#start-controls{margin-top:10px;border-top:1px solid var(--line);padding-top:10px}#start-controls label{font-size:11px;font-weight:600}select{display:block;width:100%;margin-top:5px;padding:10px;background:white;border:1px solid var(--line);border-radius:8px;color:var(--ink)}#tent-plan details{margin-top:12px;font-size:12px}#tent-plan summary{padding:10px 0;cursor:pointer;font-weight:700;color:var(--brand)}.plan-image{position:relative}.plan-image img{width:100%;display:block;border-radius:8px}.plan-pin{position:absolute;background:var(--accent);color:white;padding:4px 7px;border-radius:7px;transform:translate(-50%,-50%);font-weight:700;box-shadow:0 0 0 3px white}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{bottom:240px!important}.maplibregl-ctrl-attrib{font-size:8px!important;max-width:75vw}#toast{position:fixed;z-index:20;left:20px;right:20px;top:45%;padding:14px;background:#102d43;color:white;border-radius:12px;font-size:13px;box-shadow:0 4px 20px #0003}dialog{border:0;border-radius:18px;max-width:460px;width:calc(100% - 30px);padding:24px;color:var(--ink)}dialog::backdrop{background:#001f2d66}dialog h2{font-size:22px;margin-right:20px}dialog a{color:var(--brand);font-size:13px}.gps-dot{width:17px;height:17px;border:3px solid white;border-radius:50%;background:#2786ed;box-shadow:0 0 0 3px #2786ed33,0 1px 6px #0005}.gps-dot.stale{background:#85929f}.destination-pin{background:#de2340;color:white;border:3px solid white;border-radius:20px;padding:5px 8px;font-weight:800;font-size:12px;box-shadow:0 2px 8px #0005}
@media(min-width:760px){header{width:380px;right:auto}#sheet{left:12px;bottom:12px;width:380px;border-radius:20px;max-height:calc(100dvh - 240px)}#map-actions{top:20px}#location-status{left:410px;top:20px}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{bottom:10px!important}#toast{left:410px;right:auto;max-width:400px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.destination-pin{max-width:180px;text-align:center;line-height:1.2;white-space:normal}
.route-start-pin,.entrance-pin{background:#14805e;border:2px solid white;color:white;border-radius:14px;padding:5px 9px;font-size:11px;font-weight:700;box-shadow:0 2px 8px #0004}
.entrance-pin{background:#144674}
.plan-route{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.plan-pin{max-width:150px;font-size:11px;line-height:1.2;text-align:center;transform:translate(-50%,-110%)}
.plan-expand{margin-bottom:10px;font-size:12px;width:100%}
.plan-dialog{max-width:780px;max-height:95dvh;overflow:auto}
.route-destination{font-weight:600;font-size:12px;margin:6px 0}
#route-summary .route-caution{font-size:10px;margin-bottom:0;color:#8b6120}
#destination #start-controls{margin-top:12px;padding-top:0;border:0}
