:root{--navy:#12263f;--teal:#13b5a6;--line:#dbe3ea;--bg:#fff;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;color:#1c2733}
#map{position:fixed;inset:0}
#topbar{position:fixed;z-index:5;top:calc(8px + env(safe-area-inset-top));left:8px;right:8px;display:flex;gap:8px;align-items:flex-start}
#brand{background:var(--navy);color:#fff;text-decoration:none;font-weight:600;padding:11px 12px;border-radius:10px;white-space:nowrap;box-shadow:0 2px 8px #0003}#brand b{color:#38d9c8}
#searchwrap{flex:1;position:relative;min-width:0}
#q{width:100%;height:44px;border-radius:10px;border:1px solid var(--line);padding:0 12px;font-size:16px;box-shadow:0 2px 8px #0002;background:#fff}
#results{position:absolute;top:48px;left:0;right:0;background:#fff;border-radius:10px;box-shadow:0 4px 16px #0003;max-height:55vh;overflow:auto}
#results button{display:block;width:100%;text-align:left;border:0;background:none;padding:11px 12px;font-size:15px;border-bottom:1px solid #eef2f5;cursor:pointer}#results button small{display:block;color:#66788a}#results .none{padding:11px 12px;color:#66788a}
#btnlayers{height:44px;border:0;border-radius:10px;background:var(--teal);color:#06231f;font-weight:700;padding:0 14px;box-shadow:0 2px 8px #0003;font-size:15px}
#panel{position:fixed;z-index:6;background:#fff;box-shadow:0 4px 20px #0004;overflow:auto;border-radius:14px 14px 0 0;left:0;right:0;bottom:0;max-height:70vh;padding:10px 14px calc(16px + env(safe-area-inset-bottom))}
.phead{display:flex;justify-content:space-between;align-items:center;font-size:18px;margin-bottom:6px}.phead button,#closecard{border:0;background:none;font-size:28px;line-height:1;cursor:pointer;color:#445}
.grp{border-top:1px solid var(--line);padding:6px 0}.grp>summary{font-weight:600;cursor:pointer;padding:6px 0;list-style:none;display:flex;align-items:center;gap:8px}.grp>summary::before{content:"\25B8";color:#789}.grp[open]>summary::before{content:"\25BE"}
.sw{width:12px;height:12px;border-radius:50%;display:inline-block;flex:none}
.lrow{display:flex;align-items:center;gap:10px;padding:7px 0 7px 4px;font-size:15px}.lrow input{width:20px;height:20px;flex:none}.lrow label{flex:1}.age{font-size:12px;color:#8a5a00;background:#fff3d6;border-radius:6px;padding:1px 6px;white-space:nowrap}.cnt{font-size:12px;color:#789}
.fine{font-size:12.5px;color:#556;margin:10px 0 0}
#card{position:fixed;z-index:5;background:#fff;left:0;right:0;bottom:0;max-height:52vh;overflow:auto;border-radius:14px 14px 0 0;box-shadow:0 -4px 20px #0004;padding:12px 16px calc(34px + env(safe-area-inset-bottom))}
#closecard{position:absolute;right:10px;top:6px}
#card h3{margin:14px 0 4px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:#4a6a86}#card h2{margin:0 24px 4px 0;font-size:18px}
#card table{border-collapse:collapse;width:100%;font-size:14.5px}#card td,#card th{padding:4px 0;border-bottom:1px solid #eef2f5;text-align:left;vertical-align:top}#card th{font-weight:500;color:#556;width:42%;padding-right:8px}
.tag{display:inline-block;font-size:12px;border-radius:6px;padding:1px 7px;background:#e8f6f4;color:#0b5c53;margin-left:4px}.tag.old{background:#fff3d6;color:#8a5a00}
.warn{font-size:12.5px;background:#f4f7fa;border-radius:8px;padding:8px 10px;margin-top:12px;color:#44546a}
.links a{margin-right:12px}.muted{color:#789}
#btngps{position:fixed;z-index:4;right:10px;bottom:calc(46px + env(safe-area-inset-bottom));width:44px;height:44px;border-radius:50%;border:0;background:#fff;box-shadow:0 2px 8px #0004;font-size:22px;cursor:pointer}
#foot{position:fixed;z-index:3;left:8px;bottom:calc(4px + env(safe-area-inset-bottom));background:#ffffffd9;border-radius:6px;padding:3px 8px;font-size:12px}#foot a{color:#233}
body.cardopen #btngps{bottom:calc(52vh + 10px)}body.cardopen #foot{display:none}
#modal{position:fixed;inset:0;z-index:20;background:#0008;display:flex;align-items:center;justify-content:center;padding:14px}#modal[hidden]{display:none}
.mbox{background:#fff;border-radius:14px;max-width:560px;max-height:92vh;overflow:auto;padding:18px 20px}.mbox h2{margin:0 0 8px}.mbox h3{margin:12px 0 4px;font-size:15px}.credits{padding-left:18px;font-size:13.5px}.credits li{margin:5px 0}
.primary{margin-top:12px;background:var(--navy);color:#fff;border:0;border-radius:10px;padding:12px 18px;font-size:16px;font-weight:600;width:100%}
.maplibregl-ctrl-attrib{font-size:11px}
@media(min-width:800px){#panel{left:8px;right:auto;top:64px;bottom:auto;width:340px;max-height:calc(100vh - 130px);border-radius:12px}
#card{left:auto;right:8px;top:64px;bottom:auto;width:390px;max-height:calc(100vh - 200px);border-radius:12px;padding-bottom:20px}
body.cardopen #btngps,#btngps{bottom:112px;right:10px}body.cardopen #foot{display:block}#topbar{left:8px;right:auto;width:min(560px,calc(100vw - 16px))}}

@media(max-width:520px){.bb{display:none}#brand{padding:11px 10px}}
