* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
.map-container { width: 100%; height: 100vh; }

#info-banner {
  position: fixed;
  top: 10px;
  left: 10px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 36px 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: sans-serif;
  font-size: 12px;
  line-height: 1.5;
  z-index: 1000;
}
#info-banner strong { font-size: 13px; display: block; margin-bottom: 4px; }
#info-banner p { color: #444; }
#info-banner a { color: #1a73e8; text-decoration: none; }
#info-banner a:hover { text-decoration: underline; }
#info-banner-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  padding: 0;
}
#info-banner-close:hover { color: #333; }

#legend {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: sans-serif;
  font-size: 12px;
  line-height: 1.8;
  z-index: 999;
}
#legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
#legend-title { font-size: 13px; }
#legend-toggle-btn {
  font-size: 11px;
  padding: 1px 6px;
  cursor: pointer;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #f5f5f5;
  white-space: nowrap;
}
#legend-toggle-btn:hover { background: #e8e8e8; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 0;
}
.legend-item.clickable {
  cursor: pointer;
  user-select: none;
}
.legend-item.clickable:hover { opacity: 0.75; }
.legend-item.disabled .legend-dot { opacity: 0.25; }
.legend-item.disabled span { color: #aaa; text-decoration: line-through; }

.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.3);
}

#controls {
  position: fixed;
  top: 10px;
  right: 10px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: sans-serif;
  font-size: 13px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
}
#controls label { font-weight: 500; }
#controls select {
  font-size: 13px;
  padding: 2px 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
#diff-toggle-btn {
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #f5f5f5;
  white-space: nowrap;
}
#diff-toggle-btn:hover { background: #e8e8e8; }
#diff-toggle-btn.active { background: #3182bd; color: white; border-color: #2171b5; }
#diff-control { display: flex; align-items: center; gap: 6px; }

#search-control {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid #ddd;
  padding-left: 10px;
  margin-left: 2px;
}
#school-search {
  font-size: 13px;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 190px;
}
#school-search:focus { outline: none; border-color: #3182bd; }
#search-count {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}
#search-count.no-results { color: #c0392b; }

.maplibregl-popup-close-button {
  font-size: 20px;
  width: 28px;
  height: 28px;
  line-height: 28px;
}

#status {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: sans-serif;
  font-size: 13px;
  z-index: 1000;
  white-space: nowrap;
}
