* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, sans-serif; }
#map { position: absolute; inset: 0; }

#titlebar {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px);
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
#titlebar h1 { margin: 0; font-size: 16px; }
#titlebar p { margin: 2px 0 0; font-size: 12px; color: #555; }
#titlebar a { color: #1a4fa0; }

#box-btn {
  position: absolute; top: 92px; left: 12px; z-index: 5;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px);
  border: 0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
  padding: 8px 12px; font-size: 13px; font-weight: 600; color: #1a2f52;
  cursor: pointer;
}
#box-btn:hover { background: #fff; }
#box-btn.active { background: #1a2f52; color: #fff; }
#box-btn:disabled { opacity: .55; cursor: default; }
#box-btn:disabled:hover { background: rgba(255,255,255,.92); }

#sidebar {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 10;
  width: min(420px, 100vw); background: #fff;
  box-shadow: -2px 0 12px rgba(0,0,0,.2);
  display: flex; flex-direction: column; padding: 16px;
}
#sidebar[hidden] { display: none; }
#sidebar-close {
  position: absolute; top: 8px; right: 10px; border: 0; background: none;
  font-size: 24px; color: #888; cursor: pointer; line-height: 1;
}
#sidebar-close:hover { color: #000; }
#addr-title { margin: 0 24px 2px 0; font-size: 16px; }
#addr-sub { margin: 0 0 10px; font-size: 13px; color: #666; }
#filter {
  padding: 8px 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 6px;
  margin-bottom: 8px;
}
#company-list { flex: 1; overflow-y: auto; border-top: 1px solid #eee; }
#list-status { padding-top: 8px; font-size: 12px; color: #888; }

.company {
  padding: 8px 4px; border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
.company a { color: #1a4fa0; text-decoration: none; font-weight: 600; }
.company a:hover { text-decoration: underline; }
.company .meta { color: #777; font-size: 12px; margin-top: 2px; }
.status-active { color: #1a7f37; }
.status-other { color: #b35900; }

.maplibregl-popup-content { font-size: 12.5px; padding: 8px 12px; }
.maplibregl-popup-content b { font-size: 13px; }
