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

html,
body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
}

#sidebar {
  width: 340px;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px;
}

#notice {
  background: #fbbf24;
  color: #1e293b;
  font-size: 12px;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  line-height: 1.5;
}

#notice code {
  background: rgba(0, 0, 0, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

#sidebar h1 {
  font-size: 20px;
}

#sidebar .subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

#sidebar h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 20px 0 8px;
}

#schedule {
  list-style: none;
}

#schedule li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

#schedule li:hover {
  background: #334155;
}

#schedule li.active {
  background: #0f172a;
}

#schedule .num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

#schedule .wp-name {
  font-size: 13px;
  font-weight: 600;
}

#schedule .wp-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.guardrails {
  list-style: none;
  font-size: 12px;
  color: #fbbf24;
  display: grid;
  gap: 8px;
}

.guardrails li {
  background: rgba(251, 191, 36, 0.08);
  border-left: 3px solid #fbbf24;
  padding: 8px;
  border-radius: 0 6px 6px 0;
}

#map {
  flex: 1;
  height: 100%;
}

/* Waypoint markers */
.wp-marker {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* km-based schedule markers */
.km-marker {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-content {
  font-size: 13px;
}

.leaflet-popup-content h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.leaflet-popup-content dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
}

.leaflet-popup-content dt {
  font-weight: 600;
  color: #475569;
}

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