* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#sidebar {
  width: 340px;
  min-width: 340px;
  background: #1d3557;
  color: #f1faee;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#sidebar header {
  padding: 18px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

#sidebar h1 { font-size: 20px; letter-spacing: 1px; }
#sidebar .subtitle { font-size: 12px; color: #a8dadc; margin-top: 4px; }
#sidebar .legend { font-size: 11px; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
#sidebar .legend .leg { padding: 1px 6px; border-radius: 3px; }
#sidebar .legend .taxi { background: #457b9d; }
#sidebar .legend .metered { background: #e76f51; }
#sidebar .legend .free { background: #2a9d8f; }

#spot-list .spot-type {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}
#spot-list .type-taxi-stand { background: #457b9d; color: #fff; }
#spot-list .type-metered { background: #e76f51; color: #fff; }
#spot-list .type-non-metered { background: #2a9d8f; color: #fff; }

.leaflet-popup-content .type-tag { background: #457b9d; margin-left: 4px; }

.controls {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle { font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }

#spot-list { list-style: none; flex: 1; }

#spot-list li {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .15s;
}

#spot-list li:hover, #spot-list li.active { background: rgba(255,255,255,.12); }

#spot-list .district {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
  display: inline-block;
  margin-bottom: 3px;
}

#spot-list .name { font-size: 14px; display: block; }

#sidebar footer {
  padding: 10px 16px;
  font-size: 11px;
  color: #a8dadc;
  border-top: 1px solid rgba(255,255,255,.15);
}

#map { flex: 1; }

.leaflet-popup-content { font-size: 13px; line-height: 1.55; max-height: 320px; overflow-y: auto; }
.leaflet-popup-content h3 { font-size: 15px; margin-bottom: 4px; }
.leaflet-popup-content .tag { font-size: 11px; color: #fff; padding: 1px 6px; border-radius: 3px; }
.leaflet-popup-content dt { font-weight: 700; margin-top: 6px; color: #1d3557; }
.leaflet-popup-content dd { margin-left: 0; }
.leaflet-popup-content ul.nearby { margin: 2px 0 4px; padding-left: 16px; }
.leaflet-popup-content ul.nearby li { margin-bottom: 2px; }
.leaflet-popup-content .nav-label {
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 4px;
  color: #1d3557;
  font-size: 12px;
}
.leaflet-popup-content .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.leaflet-popup-content a.nav-btn {
  display: inline-block;
  background: #1d3557;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 11px;
}
.leaflet-popup-content a.nav-btn:hover { background: #457b9d; }

@media (max-width: 720px) {
  body { flex-direction: column; }
  #sidebar { width: 100%; min-width: 0; max-height: 40vh; }
}
