html, body, #map {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#controls {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(20, 24, 30, 0.85);
  color: #eee;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  max-width: 220px;
}

#focal-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#tilt-hint {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
  border-top: 1px solid #334155;
  padding-top: 6px;
}

#controls button {
  background: #1e293b;
  color: #eee;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

#controls button:hover {
  background: #334155;
}

#controls button.active {
  background: #2563eb;
  border-color: #3b82f6;
}

#aircraft-list-wrap {
  border-top: 1px solid #334155;
  padding-top: 6px;
}

#aircraft-list-heading {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

#aircraft-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.aircraft-row {
  background: #0f172a;
  color: #eee;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.aircraft-row:hover {
  background: #1e293b;
}

.aircraft-row.selected {
  background: #166534;
  border-color: #22c55e;
}

#status {
  font-size: 11px;
  color: #9ca3af;
  border-top: 1px solid #334155;
  padding-top: 6px;
}

.maplibregl-popup-content {
  font-size: 13px;
  line-height: 1.5;
}

#legend {
  border-top: 1px solid #334155;
  padding-top: 6px;
  font-size: 11px;
  color: #cbd5e1;
}

.legend-heading {
  color: #9ca3af;
  margin-bottom: 4px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 0;
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  border: 1px solid #0f172a;
  flex: none;
}

#aircraft-details {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  width: 260px;
  background: rgba(20, 24, 30, 0.92);
  color: #eee;
  border: 1px solid #22c55e;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-size: 12px;
}

#aircraft-details.hidden {
  display: none;
}

#details-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

#details-close:hover {
  color: #eee;
}

.detail-title {
  font-size: 15px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 6px;
  padding-right: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.detail-row span:first-child {
  color: #9ca3af;
}

.detail-row span:last-child {
  text-align: right;
}

.osm-id {
  font-size: 11px;
  color: #6b7280;
}

.osm-id code {
  user-select: all;
}

#status.warn {
  color: #fbbf24;
}

.detail-row .muted {
  color: #6b7280;
  font-size: 11px;
}
