body {
  margin: 0;
  font-family: sans-serif;
}

#map {
  height: 100vh;
  width: 100%;
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}

.muted {
  color: rgba(255,255,255,0.85);
  font-size: 0.9em;
}

.pill {
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.9em;
  background: rgba(255,255,255,0.10);
  color: white;
}

.ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  font-size: 0.9em;
  color: white;
}

.ctrl button {
  cursor: pointer;
}

.ctrl select {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.95);
  color: #111;
  padding: 4px 10px;
  max-width: 180px;
}

.ctrl-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-link {
  color: white;
  text-decoration: none;
}

.station-icon {
  width: 8px;
  height: 8px;
  background: #ff0000;
  border: 1px solid #000;
  box-sizing: border-box;
}

.train-icon-wrap {
  width: 40px;
  height: 26px;
  transform-origin: 50% 50%;
  will-change: transform;
}

.leaflet-interactive {
  cursor: pointer;
}

.leaflet-popup-content a {
  text-decoration: underline;
}

#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  color: white;
  z-index: 1000;
}

#topbar-content {
  padding-right: 32px;
}

#topbar.collapsed #topbar-content {
  display: none;
}

#topbar-toggle {
  position: absolute;
  right: 12px;
  top: 6px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 768px) {
  .station-icon {
    width: 10px;
    height: 10px;
  }

  .train-icon-wrap {
    width: 52px;
    height: 34px;
  }

  .bar {
    gap: 8px;
    padding: 8px 10px;
  }

  .ctrl {
    flex: 1 1 auto;
  }

  .ctrl select {
    max-width: none;
    width: 100%;
  }

  #status {
    flex-basis: 100%;
  }
}


.ctrl-mapstack {
  border-radius: 16px;
  flex-wrap: wrap;
}

.ctrl-mapstack select {
  min-width: 150px;
}

#baseBlendRange {
  width: 140px;
  cursor: pointer;
}

#baseBlendLabel {
  min-width: 92px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ctrl-slider-label {
  margin-left: 4px;
}
