#legend {
  position: absolute;
  left: 40px;
  top: 20px;
  background: rgba(8, 12, 24, 0.8);
  border: 1px solid #27345e;
  border-radius: 10px;
  padding: 8px 10px;
  backdrop-filter: blur(3px);
  min-width: 10px;
  min-height: 10px;
}
#legend-content div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}
#legend-toggle {
  cursor: pointer;
  font-weight: bold;
  color: var(--muted);
  user-select: none;
  position: fixed;
  right: 11px;
  top: 4px;
}
.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}