/* climate-chart.css: moved out of src/components/ClimateChart.astro on 2026-10-27, so a style fix is a single file upload. */

.climate {
  margin: 2em 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.climate .climate-title {
  max-width: none;
  margin: 0 0 10px;
  font: 700 1.1rem/1.25 var(--title);
}

.climate svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.climate .band rect {
  fill: var(--card);
}

.climate .band text {
  fill: var(--ink-soft);
  font: 700 10px var(--head);
  letter-spacing: 0.12em;
  text-anchor: middle;
  text-transform: uppercase;
}

.climate .grid line {
  stroke: var(--line);
}

.climate .grid text,
.climate .unit {
  fill: var(--ink-soft);
  font: 400 11px var(--body);
}

.climate .grid .left {
  text-anchor: end;
}

.climate .bar rect {
  fill: rgb(111 207 151 / 0.6);
}

.climate .bar text {
  fill: var(--ink-soft);
  font: 400 11px var(--body);
  text-anchor: middle;
}

.climate .m-narrow {
  display: none;
}

.climate .high,
.climate .low {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.climate .low {
  stroke-dasharray: 5 4;
}

.climate .high-dot {
  fill: var(--ink);
}

.climate .low-dot {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.6;
}

.climate .keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 700 0.84rem/1.3 var(--head);
}

.climate .keys li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.climate .keys span {
  flex: 0 0 auto;
}

.climate .k-rain {
  width: 12px;
  height: 14px;
  border-radius: 2px;
  background: rgb(111 207 151 / 0.6);
}

.climate .k-high,
.climate .k-low {
  width: 26px;
  border-top: 2px solid var(--ink);
}

.climate .k-low {
  border-top-style: dashed;
}

.climate figcaption {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* On a phone the drawing shrinks to about half, so its text is drawn twice as large
   and the months drop to one letter (or the number, in Japanese). */
@media (max-width: 700px) {
  .climate .grid text,
  .climate .unit {
    font-size: 21px;
  }
  .climate .band text {
    font-size: 17px;
  }
  /* `.bar` again so these outrank the desktop `.bar text` size. */
  .climate .bar .m-short {
    display: none;
  }
  .climate .bar .m-narrow {
    display: inline;
    font-size: 21px;
  }
  .climate .high,
  .climate .low {
    stroke-width: 3.5;
  }
  .climate .high-dot,
  .climate .low-dot {
    r: 5px;
  }
}
