:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #eef2f6;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { display: grid; grid-template-rows: auto 1fr; }
.app-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  color: #fff;
  background: #16324f;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .22);
  z-index: 1000;
}
h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.app-header p { margin: 3px 0 0; font-size: 13px; color: #dce8f4; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.feature-count { font-size: 12px; color: #dce8f4; white-space: nowrap; }
button {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 7px;
  padding: 9px 12px;
  color: #16324f;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: #eff6ff; }
main { position: relative; min-height: 0; }
#map { width: 100%; height: 100%; background: #eef2f6; }
.legend-panel {
  position: absolute;
  z-index: 800;
  right: 16px;
  bottom: 20px;
  width: 220px;
  padding: 14px 15px;
  border: 1px solid #d8e0e8;
  border-radius: 9px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 24px rgba(15, 23, 42, .16);
}
.legend-panel h2 { margin: 0 0 10px; font-size: 14px; }
.legend-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 12px; }
.legend-row img { width: 28px; height: 12px; object-fit: contain; }
.legend-note { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #e5eaf0; color: #667085; font-size: 11px; line-height: 1.4; }
.leaflet-popup-content { margin: 12px 14px; min-width: 230px; }
.popup-title { margin: 0 0 9px; font-size: 14px; color: #16324f; }
.popup-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.popup-table th, .popup-table td { padding: 5px 4px; border-bottom: 1px solid #e7edf3; text-align: left; vertical-align: top; }
.popup-table th { width: 42%; color: #536171; font-weight: 600; }
.leaflet-control-layers { font-size: 12px; }
@media (max-width: 720px) {
  .app-header { min-height: 86px; padding: 10px 12px; align-items: flex-start; }
  h1 { font-size: 17px; }
  .app-header p { font-size: 11px; }
  .header-actions { flex-direction: column; align-items: flex-end; gap: 5px; }
  .feature-count { font-size: 10px; }
  button { padding: 7px 9px; font-size: 11px; }
  .legend-panel { right: 10px; bottom: 16px; width: 190px; padding: 11px; }
}
