*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#1d2a30;background:#f5f3ee}
a{color:#1f5f7a}
.top{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:10px 14px;background:#1f4e5f;color:#fff}
.brand{display:flex;gap:10px;align-items:center}.logo{font-size:28px;color:#f4c95d;line-height:1}
h1{font-size:20px;margin:0}.sub{font-size:12px;opacity:.85}
.search{position:relative;display:flex;gap:6px;flex:1 1 320px;max-width:520px}
.search input{flex:1;min-width:0;padding:8px 10px;border-radius:8px;border:1px solid #9fb6bf;font:inherit}
.results{position:absolute;top:100%;left:0;right:0;z-index:2000;list-style:none;margin:4px 0 0;padding:0;background:#fff;color:#1d2a30;border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.25);max-height:260px;overflow:auto}
.results li{padding:8px 10px;cursor:pointer;border-bottom:1px solid #eee}.results li:hover,.results li:focus{background:#eef5f7}
.btn{font:inherit;padding:8px 12px;border-radius:8px;border:1px solid #c9d6da;background:#fff;color:#1d2a30;cursor:pointer;white-space:nowrap}
.btn:hover{background:#eef5f7}.btn.primary{background:#e8a33d;border-color:#d48f27;color:#1d2a30;font-weight:600}.btn.primary:hover{background:#f0b350}
.btn.ghost{background:transparent;color:inherit;border-color:rgba(255,255,255,.5)}.top .btn.ghost:hover{background:rgba(255,255,255,.12)}
.form .btn.ghost,.sheet .btn.ghost{border-color:#c9d6da}
.locline{padding:6px 14px;font-size:13px;background:#e4ecee;color:#30474f}
.bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 14px}.spacer{flex:1}
.seg{display:inline-flex;border:1px solid #c9d6da;border-radius:9px;overflow:hidden;background:#fff}
.seg button{font:inherit;border:0;background:#fff;padding:7px 12px;cursor:pointer;border-right:1px solid #c9d6da}.seg button:last-child{border-right:0}
.seg button.on{background:#1f4e5f;color:#fff}
.seg.small{display:flex;flex-wrap:wrap;gap:6px;border:0;background:none}.seg.small label{display:flex;gap:6px;align-items:center;border:1px solid #c9d6da;border-radius:8px;padding:6px 10px;background:#fff}
main{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:12px;padding:0 14px 14px}
.mapwrap{position:relative}
#map{height:calc(100vh - 190px);min-height:420px;border-radius:10px;border:1px solid #c9d6da;background:#dfe7e9}
.loading{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:1000;background:#fff;padding:6px 12px;border-radius:20px;box-shadow:0 2px 8px rgba(0,0,0,.2);font-size:13px}
.crowd{position:absolute;bottom:10px;left:10px;right:10px;z-index:1000;background:rgba(255,255,255,.95);padding:6px 10px;border-radius:8px;font-size:13px;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.legend{background:#fff;padding:8px 10px;border-radius:9px;box-shadow:0 2px 10px rgba(0,0,0,.2);font-size:13px;max-width:230px}
.legend h3{margin:0 0 6px;font-size:13px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.legend .tg{display:flex;align-items:center;gap:8px;padding:4px 0;cursor:pointer;user-select:none}
.legend .tg input{width:18px;height:18px;margin:0;accent-color:#1f4e5f}
.legend .dot{width:12px;height:12px;border-radius:50%;flex:0 0 12px;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.3)}
.legend .n{margin-left:auto;color:#6b7b80;font-variant-numeric:tabular-nums}
.legend .lt{font:inherit;font-size:12px;border:0;background:none;color:#1f5f7a;cursor:pointer;padding:0;text-decoration:underline}
.legend .collapse{display:none}
.pin{display:flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;font-weight:700;font-size:12px;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.pin.org{outline:2px dashed #e8a33d;outline-offset:1px}
.pin.hl{transform:scale(1.35);z-index:999}
.you{background:#1f4e5f;border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 2px #1f4e5f}
.lists{min-width:0}
.lh{font-weight:600;margin:4px 0 6px}.lh2{font-size:16px;margin:18px 0 2px}
.muted{color:#6b7b80}.small{font-size:13px}
.elist{list-style:none;margin:0;padding:0}
.ev{display:flex;gap:10px;padding:9px 10px;background:#fff;border:1px solid #e0e6e8;border-radius:9px;margin-bottom:6px;cursor:pointer}
.ev:hover,.ev.hl{border-color:#1f4e5f;box-shadow:0 0 0 1px #1f4e5f inset}
.ev .cdot{width:10px;border-radius:5px;flex:0 0 10px}
.ev .t{font-weight:600}.ev .m{font-size:13px;color:#4a5b60}
.badge{display:inline-block;font-size:11px;padding:1px 7px;border-radius:10px;background:#e4ecee;color:#30474f;margin-left:4px;vertical-align:1px;white-space:nowrap}
.badge.org{background:#fbe7c6;color:#7a4b06}.badge.cl{background:#d9f0e4;color:#155a36}.badge.ap{background:#f3e0e0;color:#7a2020}
.grp h3{font-size:14px;margin:12px 0 6px;color:#30474f}
.empty{background:#fff;border:1px dashed #9fb6bf;border-radius:10px;padding:16px;text-align:center}
.srcbox{margin-top:16px;background:#fff;border:1px solid #e0e6e8;border-radius:9px;padding:8px 12px}
.srcbox summary{cursor:pointer;font-weight:600}
.srcbox table{width:100%;border-collapse:collapse;font-size:13px;margin-top:6px}.srcbox td{padding:4px 4px;border-top:1px solid #eee;vertical-align:top}
.ok{color:#17703d}.bad{color:#9b2c2c}
.foot{padding:12px 16px 24px;font-size:12px;color:#4a5b60;border-top:1px solid #dde3e5}
.modal{position:fixed;inset:0;z-index:3000;background:rgba(10,25,30,.45);display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:24px 10px}
.modal[hidden]{display:none}
.sheet{position:relative;background:#fff;border-radius:12px;max-width:560px;width:100%;padding:18px 18px 16px;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.sheet h2{margin:0 30px 6px 0;font-size:19px}
.x{position:absolute;top:8px;right:10px;font-size:26px;border:0;background:none;cursor:pointer;line-height:1;color:#4a5b60}
.form label{display:block;margin:8px 0;font-size:14px}
.form input:not([type=radio]):not([type=checkbox]),.form select,.form textarea{display:block;width:100%;margin-top:3px;padding:8px;border:1px solid #c9d6da;border-radius:7px;font:inherit;background:#fff}
.form .row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}.form .row>label{flex:1 1 140px}
.form .days{display:flex;flex-wrap:wrap;gap:4px}.form .days label{display:flex;gap:4px;align-items:center;margin:4px 6px 4px 0}
.form .lbl{font-size:14px;margin-right:6px}
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.actions{margin-top:12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.msg.err{color:#9b2c2c}.msg.ok{color:#17703d}
.dl{display:grid;grid-template-columns:max-content 1fr;gap:4px 12px;font-size:14px;margin:10px 0}.dl dt{color:#6b7b80}.dl dd{margin:0}
.picking #map{cursor:crosshair;outline:3px solid #e8a33d}
.pickbar{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:1001;background:#e8a33d;padding:6px 12px;border-radius:20px;font-weight:600;font-size:13px}
.leaflet-popup-content{margin:10px 12px;font:13px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.pp a{cursor:pointer}.pp ul{margin:4px 0 0;padding-left:16px}
@media (max-width:860px){
  main{grid-template-columns:1fr}
  #map{height:58vh;min-height:340px}
  .hide-sm{display:none}
  .legend{max-width:190px;font-size:12px}
  .legend.min .tgs{display:none}
  .legend .collapse{display:inline}
}
