/* ===== 图例（浮层） ===== */
.legend {
  position: absolute;
  bottom: 32px;
  left: 324px;
  z-index: var(--z-sidebar);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px 14px;
  width: 230px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  transition: left var(--t-normal) ease, bottom var(--t-normal) ease;
}
.legend .lt { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 6px; letter-spacing: 1px; }
.legend .bar {
  height: 12px;
  border-radius: 3px;
  margin: 6px 0 4px;
  background: linear-gradient(to right, #2563eb, #ef4444);
}
.legend .ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.legend .note { margin-top: 8px; font-size: 11px; color: var(--muted); }
.legend .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #00e5ff;
  margin-right: 5px;
  vertical-align: -1px;
}
