:root{--g:#224a34;--ink:#1d2320;--mut:#5c6660;--bg:#fff;--line:#e3e6e4;--gold:#e8b03c}
*{box-sizing:border-box}html,body{margin:0;height:100%;font:14px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink)}
#topbar{position:fixed;top:0;left:0;right:0;height:52px;display:flex;align-items:center;gap:8px;padding:0 10px;background:var(--g);color:#fff;z-index:10}
.brand{display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}.brand img{width:30px;height:30px;border-radius:6px}.brand small{font-weight:400;opacity:.75}
#searchwrap{position:relative;flex:1;max-width:420px;margin-left:auto}#search{width:100%;padding:8px 10px;border-radius:8px;border:0;font-size:14px}
#results{position:absolute;top:40px;left:0;right:0;margin:0;padding:4px 0;list-style:none;background:#fff;color:var(--ink);border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.25);max-height:300px;overflow:auto}
#results li{padding:7px 10px;cursor:pointer}#results li:hover,#results li.active{background:#eef3ef}#results small{color:var(--mut)}
#topbar button,#topbar a{background:#fff2;color:#fff;border:1px solid #fff5;border-radius:8px;padding:7px 10px;font-size:13px;text-decoration:none;cursor:pointer;white-space:nowrap}
#listBtn{background:var(--gold)!important;color:#222!important;border-color:var(--gold)!important;font-weight:600}
#notice{position:fixed;top:52px;left:0;right:0;z-index:9;background:#f4efe3;color:#3b3326;font-size:12px;line-height:1.35;padding:6px 36px 6px 12px;border-bottom:1px solid #e0d6c4}
#notice p{margin:0}
#notice button{position:absolute;right:6px;top:4px;border:0;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:#5c564a;padding:2px 8px}
#map{position:fixed;top:52px;left:0;right:0;bottom:0}
.panel{position:fixed;z-index:8;background:var(--bg);border-radius:12px;box-shadow:0 4px 18px rgba(0,0,0,.18);overflow:auto}
#legend{top:120px;left:10px;width:250px;max-height:calc(100% - 140px);padding:10px 12px}
body.notice-off #notice{display:none}
body.notice-off #legend,body.notice-off #detail{top:64px}
body.notice-off #legend{max-height:calc(100% - 84px)}
body.notice-off #detail{max-height:calc(100% - 84px)}
#legend h3{margin:8px 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--mut)}
#legend label{display:flex;align-items:center;gap:7px;padding:2px 0;cursor:pointer;font-size:13px}
.sw{width:16px;height:12px;border-radius:3px;border:1px solid #0003;flex:none}.sw.hatch{background-image:repeating-linear-gradient(45deg,#fff8 0 2px,transparent 2px 5px)}
#legend .close{display:none}
#detail{top:120px;right:10px;width:360px;max-height:calc(100% - 160px);padding:14px 16px}
#detail h2{margin:0 0 2px;font-size:18px}#detail .sub{color:var(--mut);margin-bottom:10px}
#detail .x{position:absolute;top:8px;right:10px;border:0;background:#0000;font-size:22px;cursor:pointer;color:var(--mut)}
dl.kv{display:grid;grid-template-columns:110px 1fr;gap:4px 10px;margin:0 0 10px}dl.kv dt{color:var(--mut)}dl.kv dd{margin:0}
.tag{display:inline-block;font-size:11px;padding:1px 6px;border-radius:10px;margin-left:4px;vertical-align:1px}
.tag.real{background:#e2f2e6;color:#1d5a2c}.tag.inf{background:#fde8d4;color:#8a4a10}.tag.ex{background:#fde2e2;color:#8a1010;font-weight:600}.tag.ph{background:#eee;color:#555}
.sec{border-top:1px solid var(--line);padding-top:8px;margin-top:8px}.sec h4{margin:0 0 4px;font-size:13px}
.sec ul{margin:4px 0;padding-left:18px}.muted{color:var(--mut);font-size:12px}
.bar{display:flex;align-items:center;gap:6px;font-size:12px;margin:2px 0}.bar span.b{height:8px;background:#5b8f6b;border-radius:4px}
.biz{border:1px solid var(--line);border-radius:10px;padding:8px 10px;margin:6px 0}.biz.featured{border-color:var(--gold)}.biz.pro{border:2px solid var(--gold);background:#fffaf0}.biz.sponsor{background:#f2f7ff;border-color:#7aa2e3}
.biz b{display:block}.tier{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--mut)}
.maplibregl-popup-content{padding:6px 10px;font-size:12px}
@media (max-width:700px){
  .brand span{display:none}#listBtn{display:none}
  #legend{top:auto;bottom:0;left:0;right:0;width:auto;border-radius:14px 14px 0 0;max-height:55%;display:none}
  #legend.open{display:block}#legend .close{display:block;float:right;border:0;background:none;font-size:20px}
  #detail{top:auto;bottom:0;left:0;right:0;width:auto;border-radius:14px 14px 0 0;max-height:60%}
  #notice{font-size:11px}
}
@media (min-width:701px){#layersBtn{display:none}}
