:root{
  --bg:#0b0f16;
  --card:rgba(255,255,255,.06);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.60);
  --radius:18px;
  --shadow:0 10px 35px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(1200px 900px at 20% -10%, rgba(114,160,255,.20), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(255,148,112,.14), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(130,255,192,.10), transparent 55%),
    var(--bg);
}

.wrap{max-width:1150px;margin:0 auto;padding:22px 18px 42px}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.brand{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.titleBox{display:grid;gap:2px}

.mark{
  width:36px;height:36px;border-radius:12px;
  display:grid;place-items:center;
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--shadow);
  font-weight:800;
}

.siteTitle{font-weight:850;font-size:16px;letter-spacing:.2px}
.siteSub{font-size:12px;color:var(--muted)}

.nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.link{
  text-decoration:none;
  color:var(--text);
  font-size:13px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
}

.link:hover{filter:brightness(1.06)}

.pill{
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}

.hero{
  padding:14px;
  border-radius:var(--radius);
  background:linear-gradient(180deg,var(--card),rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.10);
  margin-bottom:14px;
}

h1{margin:0;font-size:20px;letter-spacing:.2px}
.sub{margin:6px 0 0;font-size:13px;color:var(--muted);line-height:1.35}

.mapCard{
  border-radius:var(--radius);
  overflow:hidden;
  background:linear-gradient(180deg,var(--card),rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.10);
  box-shadow:var(--shadow);
}

.mapTop{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  display:grid;
  gap:10px;
}

.controlsRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.controlsRight{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.btn{
  padding:9px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
  font-size:13px;
  cursor:pointer;
  user-select:none;
}

.btn:hover{filter:brightness(1.06)}

.searchRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.searchInput,.select{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  outline:none;
}

.searchInput{width:min(420px, 92vw)}
.select{min-width:min(320px, 92vw)}

.check{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
  user-select:none;
}

.legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.legendItem{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  cursor:pointer;
  user-select:none;
}

.legendItem[aria-pressed="false"]{opacity:.55}

.swatch{
  width:12px;height:12px;border-radius:999px;
  border:2px solid rgba(255,255,255,.85);
  box-shadow:0 6px 14px rgba(0,0,0,.30);
}

.legendLabel{
  font-size:12px;
  font-weight:650;
  color:rgba(255,255,255,.78);
  letter-spacing:.1px;
}

.legendCount{
  font-size:12px;
  color:var(--muted);
}

#map{height:min(72vh,720px);width:100%}

.pinDot{
  width:18px;height:18px;border-radius:999px;
  border:2px solid rgba(255,255,255,.90);
  box-shadow:0 8px 18px rgba(0,0,0,.35);
}

.status{margin-top:12px;font-size:13px;color:var(--muted)}

.leaflet-control-zoom a{
  background:rgba(20,24,34,.90);
  color:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.12);
}

.leaflet-control-attribution{
  background:rgba(20,24,34,.75);
  color:rgba(255,255,255,.70);
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  padding:2px 8px;
  margin:0 8px 8px 0;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip{
  background:rgba(20,24,34,.95);
  color:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--shadow);
}
