html,body{margin:0;height:100%;font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#1d2a1f;overscroll-behavior:none}
#map{position:fixed;inset:0}
.topbar{position:fixed;top:10px;left:10px;right:10px;z-index:5;display:flex;gap:8px;align-items:flex-start;pointer-events:none}
.topbar>*{pointer-events:auto}
.brand{background:#1b5e20;color:#fff;border-radius:10px;padding:8px 12px;font-weight:700;white-space:nowrap;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.brand a{color:#c8e6c9;font-weight:500;margin-left:10px;text-decoration:none}
.searchwrap{position:relative;flex:1;max-width:420px}
#q{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:10px;border:1px solid #bbb;font-size:16px;box-shadow:0 1px 4px rgba(0,0,0,.2)}
#results{position:absolute;top:42px;left:0;right:0;background:#fff;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.25);max-height:55vh;overflow:auto;display:none}
#results div{padding:8px 12px;border-bottom:1px solid #eee;cursor:pointer}
#results div:hover,#results div.act{background:#f0f5ef}
#results small{color:#667}
.layers{background:#fff;border-radius:10px;padding:6px 8px;box-shadow:0 1px 4px rgba(0,0,0,.25);white-space:nowrap}
.layers button{border:0;background:#eee;border-radius:6px;padding:5px 8px;margin:1px;cursor:pointer;font-size:13px}
.layers button.on{background:#2e7d32;color:#fff}
.legend{position:fixed;left:10px;bottom:24px;z-index:4;background:rgba(255,255,255,.95);border-radius:10px;padding:8px 10px;font-size:12px;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.sw{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:-2px;margin-right:4px}
#panel{position:fixed;top:64px;right:10px;bottom:24px;width:360px;z-index:6;background:#fff;border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,.3);overflow:auto;display:none;padding:14px 16px;box-sizing:border-box}
#panel h2{margin:0 0 4px;font-size:19px;color:#1b5e20;padding-right:28px}
#panel .x{position:absolute;right:12px;top:10px;border:0;background:none;font-size:22px;cursor:pointer}
#panel table{width:100%;border-collapse:collapse;margin:6px 0;font-size:13px}
#panel td,#panel th{border-bottom:1px solid #eee;padding:4px 6px;text-align:left}
.kp{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.kp div{flex:1;min-width:90px;background:#f0f5ef;border-radius:8px;padding:6px 8px;font-size:12px}.kp b{display:block;font-size:18px;color:#1b5e20}
.pill{display:inline-block;padding:1px 8px;border-radius:99px;color:#fff;font-size:12px;font-weight:600}
.G{background:#2e7d32}.M{background:#f9a825}.Y{background:#616161}
.muted{color:#667;font-size:12px}a.lnk{color:#2e7d32;cursor:pointer;text-decoration:underline}
.maplibregl-popup-content{font-size:12px;max-width:260px}
#status{position:fixed;left:50%;top:60px;transform:translateX(-50%);background:#000c;color:#fff;padding:6px 12px;border-radius:8px;z-index:9;font-size:13px;display:none}
@media (max-width:700px){
 .brand span.full{display:none}.layers{font-size:12px}.topbar{flex-wrap:wrap}.searchwrap{order:3;flex-basis:100%;max-width:none}
 #panel{top:auto;left:0;right:0;bottom:0;width:auto;max-height:55vh;border-radius:14px 14px 0 0}
 .legend{bottom:auto;top:112px;font-size:11px}
}
