/* 斜度の図層の凡例（v2/js/slope/legend.js が作る中身）。2D は Leaflet の左下、3D は「地図の切り替え」パネルの中 */
.slope-legend {
  max-width: min(260px, calc(100vw - 32px));
  padding: 8px 10px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--ui);
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 1px 4px rgb(17 26 34 / 0.18);
}
.slope-legend[hidden] {
  display: none;
}
.slope-title {
  margin: 0 0 4px;
  font-weight: 700;
}
.slope-bands {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.slope-bands li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--data);
}
.slope-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  /* 図層と同じ不透明度で見せる（SLOPE_OPACITY） */
  opacity: 0.6;
  outline: 1px solid rgb(17 26 34 / 0.25);
}
.slope-zoom {
  margin: 4px 0 0;
  color: var(--graphite);
}
.slope-caveat {
  margin: 6px 0 0;
  color: var(--graphite);
}

/* 2D：左下の凡例は、右下の出典の行（1 行・約 16px）の上に置く */
.leaflet-bottom.leaflet-left .slope-legend {
  margin: 0 0 22px 8px;
}
/* スマホ：段を3列にして高さを抑える */
@media (max-width: 600px) {
  .slope-legend {
    padding: 6px 8px;
    font-size: 11px;
  }
  .slope-bands {
    grid-template-columns: repeat(3, auto);
    gap: 1px 8px;
  }
}
