.legend {
  position: absolute;
  bottom: 48px;
  left: 16px;
  background: #fffbf0;
  border: 3px solid #333;
  border-radius: 16px;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
  box-shadow: 4px 4px 0px #333;
}

.legend__title {
  font-family: 'Fredoka One', cursive;
  font-size: 13px;
  color: #1a1a2e;
  margin-bottom: 2px;
  letter-spacing: 0.03em;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.legend__swatch {
  width: 16px;
  height: 10px;
  border-radius: 3px;
  border: 2px solid #333;
  flex-shrink: 0;
}
.legend__swatch--obs  { background: #f4a020; }
.legend__swatch--fore { background: #818cf8; }

.legend__divider {
  height: 2px;
  background: #333;
  margin: 2px 0;
  border-radius: 1px;
}

.legend__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
  outline: 2px solid #333;
  flex-shrink: 0;
}
.legend__dot--low    { background: #22c55e; }
.legend__dot--medium { background: #f59e0b; }
.legend__dot--high   { background: #ef4444; }

@media (max-width: 480px) {
  .legend { bottom: auto; top: 60px; left: 10px; }
}
