* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
#map { position: absolute; inset: 0; }

.panel {
  position: absolute;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  min-width: 190px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.panel-bottom-left { left: 12px; bottom: 28px; }
.panel-top { left: 50%; top: 12px; transform: translateX(-50%); min-width: 320px; }

.panel-toggle {
  width: 100%;
  border: none;
  background: #fafafa;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: #222;
}
.panel-toggle:hover { background: #f0f0f0; }

.panel-body { padding: 10px 14px 14px; }
.panel.collapsed .panel-body { display: none; }

#transit-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
  color: #222;
}
#transit-panel input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.age-readout {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #1f7a40;
  margin-bottom: 6px;
}
#age-slider { width: 100%; accent-color: #1f7a40; }
.age-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.popup-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: #1a1a1a; }
.popup-row { display: flex; gap: 8px; font-size: 12.5px; color: #333; padding: 1px 0; }
.popup-label { color: #888; min-width: 56px; flex-shrink: 0; }

.maplibregl-popup-content { padding: 10px 12px; border-radius: 8px; }

@media (max-width: 640px) {
  .panel-top { min-width: 260px; width: calc(100% - 24px); }
  .panel-bottom-left { bottom: 16px; }
}
