﻿.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-sea);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 邱ｨ髮・ｸｭ繧よ悽逡ｪ縺ｨ蜷後§縺剰・蜿ｰ縺ｧ繧ｯ繝ｪ繝・・縺励√・縺ｿ蜃ｺ縺励ｒ隕矩・＆縺ｪ縺・*/
html.is-edit .map-fit,
html.is-edit .map-cards {
  overflow: visible;
}

.map-fit {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.map-fit.is-dragging-map {
  cursor: grabbing;
}

.map-resize {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  border-right: 3px solid #3d7eff;
  border-bottom: 3px solid #3d7eff;
  cursor: nwse-resize;
  pointer-events: auto;
  z-index: 7;
}

.led-screen[data-region="national"] .map-fit {
  aspect-ratio: 1 / 1;
  height: 100%;
  width: auto;
  max-width: 100%;
}

.led-screen[data-region="national"] .map-geo,
.led-screen[data-region="national"] .map-leaders {
  top: calc(50% - 50% * var(--map-scale, 1) * var(--map-fit, 1) + var(--map-y, 0%));
}

.led-screen[data-region="national"] .map-cards {
  top: 0;
}

.map-geo {
  position: absolute;
  width: calc(100% * var(--map-scale, 1) * var(--map-fit, 1));
  height: calc(100% * var(--map-scale, 1) * var(--map-fit, 1));
  left: calc(50% - 50% * var(--map-scale, 1) * var(--map-fit, 1) + var(--map-x, 0%));
  top: calc(50% - 50% * var(--map-scale, 1) * var(--map-fit, 1) + var(--map-y, 0%));
  transform: none;
  transform-origin: 50% 50%;
  overflow: visible;
}

/* 蜈ｱ騾・japan.svg + 蟇ｾ雎｡蝨ｰ譁ｹ縺ｸ縺ｮ蟇・ｊ・医き繝ｼ繝牙・縺ｮ菴咏區縺ｯ contain 蛛ｴ縺ｧ遒ｺ菫晢ｼ・*/
.led-screen[data-region="national"] {
  --map-fit: 0.96;
}

.led-screen[data-region="kyushu"] {
  --map-fit: 1.08;
}

.led-screen[data-region="kinki"] {
  --map-fit: 0.96;
}

/* 東北は縦長で右端が切れやすいので縮小して全体を収める */
.led-screen[data-region="tohoku"] {
  --map-fit: 0.82;
}

.led-screen[data-region="kanto"],
.led-screen[data-region="chugoku"],
.led-screen[data-region="shikoku"] {
  --map-fit: 0.98;
}

/* 中部は縦長でフッターに掛かりやすいので少し縮小して全体を収める */
.led-screen[data-region="chubu"] {
  --map-fit: 0.84;
}

.led-screen[data-region="hokkaido"] {
  --map-fit: 1.14;
}

.led-screen[data-region="okinawa"] {
  --map-fit: 0.94;
}

.led-screen.is-map-rotated .map-geo {
  transform: rotate(var(--map-rotate, 0deg));
}

.map-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.map-square {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  overflow: visible;
}

.map-square .map-svg,
.map-square .map-pins {
  position: absolute;
  inset: 0;
}

.map-svg,
.map-svg svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.map-svg path {
  fill-rule: nonzero;
  stroke: none !important;
}

.map-svg .map-fills-top path,
.map-svg .map-fills-top polygon,
.map-svg .map-fills-top rect,
.map-svg .map-fills-top circle,
.map-svg .map-island {
  fill: var(--map-land) !important;
  fill-rule: nonzero !important;
  stroke: none !important;
}

.map-svg .map-land-tris {
  display: none;
}

.map-svg .map-fills,
.map-svg .map-fills-cover {
  fill: var(--map-land);
}

.led-screen:not([data-region="national"]) .map-svg .map-fills.map-focus > path:not(.map-as-dim),
.led-screen:not([data-region="national"]) .map-svg .map-fills-cover.map-focus:not(.map-dim) path,
.led-screen:not([data-region="national"]) .map-svg .map-fills .map-as-focus {
  fill: var(--map-land, #76c85a) !important;
  fill-rule: nonzero !important;
  /* 逵悟｢・・蝪励ｊ繝代せ縺ｮ逋ｽ譫・医ぜ繝ｼ繝縺ｫ霑ｽ蠕難ｼ・*/
  stroke: #ffffff !important;
  stroke-width: 0.07 !important;
  stroke-linejoin: round !important;
  stroke-linecap: round !important;
  paint-order: fill stroke;
  vector-effect: none;
}

.led-screen:not([data-region="national"]) .map-svg .map-fills.map-dim > path,
.led-screen:not([data-region="national"]) .map-svg .map-fills-cover.map-dim path,
.led-screen:not([data-region="national"]) .map-svg .map-fills .map-as-dim {
  fill: var(--map-neighbor, #d0d5db) !important;
  fill-rule: nonzero !important;
  stroke: none !important;
}

.map-svg .map-lakes {
  fill: var(--bg-sea);
}

.map-svg .map-lakes path {
  fill-rule: evenodd;
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="HOKKAIDO"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="HOKKAIDO"] {
  fill: var(--map-hokkaido);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="TOHOKU"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="TOHOKU"] {
  fill: var(--map-tohoku);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="KANTO"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="KANTO"] {
  fill: var(--map-kanto);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="CHUBU"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="CHUBU"] {
  fill: var(--map-chubu);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="KINKI"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="KINKI"] {
  fill: var(--map-kinki);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="CHUGOKU"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="CHUGOKU"] {
  fill: var(--map-chugoku);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="SHIKOKU"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="SHIKOKU"] {
  fill: var(--map-shikoku);
}

.led-screen[data-region="national"] .map-svg .map-fills [data-region="KYUSHU"],
.led-screen[data-region="national"] .map-svg .map-fills-cover [data-region="KYUSHU"] {
  fill: var(--map-kyushu);
}

.map-svg .map-fills.map-dim {
  fill: var(--map-neighbor, #d0d5db);
}

.map-svg .map-borders,
.map-svg .map-borders-coast,
.map-svg .map-fills-cover {
  display: none !important;
}

.map-svg .map-borders-inner path {
  fill: none !important;
  stroke: #ffffff !important;
  stroke-width: 4.8px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* 蝨ｰ譁ｹ縺ｯ蝪励ｊ繝代せ蛛ｴ縺ｧ逵悟｢・ｒ謠上￥縺溘ａ縲∝挨繝ｬ繧､繝､縺ｮ逵悟｢・・蜃ｺ縺輔↑縺・*/
.led-screen:not([data-region="national"]) .map-svg .map-borders-inner {
  display: none !important;
}

.map-svg .map-borders-inner.map-dim {
  display: none !important;
}

.map-svg .map-fills.map-focus {
  fill: var(--map-land);
}

.map-svg .map-okinawa-inset,
.map-okinawa-overlay .map-okinawa-inset {
  fill: var(--map-okinawa);
}

.map-okinawa-overlay .map-okinawa-inset > rect {
  fill: var(--bg-sea);
  stroke: var(--bg-footer);
  stroke-width: 1.15px;
  vector-effect: non-scaling-stroke;
}

.map-okinawa-dock {
  position: absolute;
  left: var(--oki-x, 22%);
  top: var(--oki-y, 28%);
  width: calc(22% * var(--oki-scale, 1));
  aspect-ratio: 20 / 22;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: auto;
  cursor: grab;
  overflow: visible;
  background: var(--bg-sea);
}

.map-okinawa-overlay text {
  display: none;
}

.map-okinawa-dock.is-dragging {
  cursor: grabbing;
}

.map-okinawa-overlay {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.map-svg text {
  font-family: var(--font-main);
  font-weight: 800;
}

.map-pins,
.map-leaders,
.map-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-cards {
  z-index: 5;
}

html.is-edit .map-cards {
  z-index: 10;
}

html.is-edit .city-card {
  cursor: grab;
}

html.is-edit .city-card.is-dragging {
  cursor: grabbing;
  z-index: 20;
}

.map-pins {
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-leaders {
  z-index: 2;
}

.map-pin {
  fill: #e31b23;
  stroke: #fff;
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
}

.map-okinawa-overlay .map-pin {
  fill: #e31b23;
  stroke: #fff;
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
}

.leader-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.leader-line line,
.leader-line polyline {
  fill: none;
  stroke: #073b68;
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

html.is-edit .city-card {
  outline: 1px dashed #3d7eff;
  outline-offset: 2px;
  cursor: grab;
}

html.is-edit .city-card.is-dragging {
  outline: 2px solid #3d7eff;
  z-index: 9;
}

.city-card {
  position: absolute;
  width: var(--card-box-w);
  height: var(--card-box-h);
  min-width: var(--card-box-w);
  max-width: var(--card-box-w);
  min-height: var(--card-box-h);
  max-height: var(--card-box-h);
  box-sizing: border-box;
  transform: translate(-50%, -50%) scale(var(--card-scale, 1));
  transform-origin: center center;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  border: none;
  border-radius: var(--box-radius);
  padding: clamp(3px, 3.5%, 8px) clamp(4px, 5%, 10px) clamp(5px, 4.5%, 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(2px, 2%, 5px);
  line-height: 1.05;
  box-shadow: 0 1px 2px rgba(8, 28, 64, 0.12);
  white-space: nowrap;
  overflow: hidden;
  container-type: size;
  container-name: city-card;
}

.city-card.is-dragging {
  cursor: grabbing;
  z-index: 8;
}

.city-card.is-locked {
  box-shadow: 0 1px 2px rgba(8, 28, 64, 0.12);
}

.city-card-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1px, 2cqh, 6px);
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.city-card-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  gap: 0.15em;
  overflow: visible;
  padding-bottom: 0.08em;
}

.city-card-name {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(9px, min(40cqw, 16cqh), var(--font-city));
  font-weight: 900;
  color: var(--text-primary);
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  text-align: center;
  line-height: 1.15;
}

.city-card-temps {
  font-family: var(--font-main);
  font-size: clamp(10px, min(40cqw, 16.5cqh), calc(var(--font-temp) * 0.95));
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  gap: 0.05em;
  overflow: visible;
  line-height: 1.15;
}

.temp-max { color: var(--temp-max); }
.temp-min { color: var(--temp-min); }
.temp-slash { color: #7aa0b8; font-size: 0.78em; }

.city-card-temps b,
.forecast-temps b {
  font-weight: inherit;
}

.city-card-pop {
  font-family: var(--font-number);
  font-size: clamp(10px, min(28cqw, 14cqh), var(--font-pop));
  font-weight: 800;
  color: var(--pop-color);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

.city-card-temps small {
  font-size: 0.55em;
  margin-left: 0.02em;
}

/* 繧｢繧､繧ｳ繝ｳ縺ｨ蜷後§菴咲ｽｮ縺ｮ繝懊ャ繧ｯ繧ｹ縲ゅΞ繧､繝､繝ｼ縺ｯ繧｢繧､繧ｳ繝ｳ縺御ｸ翫ゆｸ九・蝨ｰ蜷阪・豌玲ｸｩ繧呈ｽｰ縺輔↑縺・*/
.city-card-icon-stack {
  position: relative;
  width: min(100%, 80cqh);
  height: auto;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 56%;
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.city-card-icon-box {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  background: var(--bg-card, #ffffff);
  opacity: 1;
  border: none;
  border-radius: var(--box-radius);
  box-shadow: none;
  z-index: 0;
  pointer-events: none;
}

.city-card .city-card-icon-stack .wx-icon {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.city-card.is-pop .city-card-icon-stack {
  display: none;
}

.wx-icon {
  width: calc(var(--icon-card) * 1.5);
  height: var(--icon-card);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.wx-icon svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  overflow: hidden;
}

.city-card.is-pop {
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: clamp(1px, 2cqh, 5px);
  padding: clamp(2px, 4%, 7px) clamp(2px, 5%, 7px);
}

.city-card-pops {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  gap: 0;
  font-family: var(--font-number);
  line-height: 1;
  overflow: hidden;
  border-radius: calc(var(--box-radius) * 0.85);
}

.pop-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  min-width: 0;
  overflow: hidden;
  padding: clamp(3px, 2.2cqh, 8px) clamp(4px, 4cqw, 10px);
}

.pop-slot i {
  display: none;
}

.pop-slot b {
  font-size: clamp(14px, min(36cqw, 22cqh), var(--font-pop-lg));
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
}

.pop-slot.is-morning {
  background: #5aa6e8;
}

.pop-slot.is-noon {
  background: #3d7ec4;
}

.pop-slot.is-night {
  background: #255a9a;
}

/* 髯肴ｰｴ遒ｺ邇・さ繝ｳ繝・Φ繝・ｰら畑・壽悃繝ｻ譏ｼ繝ｻ螟懊・蜃｡萓九・繝・け繧ｹ・亥慍蜷阪き繝ｼ繝峨〒縺ｯ縺ｪ縺・ｼ・*/
.precip-tod-legend {
  position: absolute;
  left: 86%;
  top: 68%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--precip-legend-gap, 6px);
  pointer-events: none;
  line-height: 1;
}

html.is-edit .precip-tod-legend.is-editable {
  pointer-events: auto;
  cursor: grab;
  outline: 1px dashed #3d7eff;
  outline-offset: 2px;
}

html.is-edit .precip-tod-legend.is-dragging {
  cursor: grabbing;
  outline: 2px solid #3d7eff;
  z-index: 9;
}

.precip-tod-legend-title {
  font-family: var(--font-main);
  font-size: var(--precip-legend-title, 12px);
  font-weight: 800;
  color: #1a3350;
  text-align: center;
}

.precip-tod-legend-row {
  display: flex;
  align-items: center;
  gap: var(--precip-legend-gap, 6px);
}

.precip-tod-legend-box {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--precip-legend-radius, 4px);
  min-width: var(--precip-legend-min-w, 40px);
  box-shadow: 0 1px 2px rgba(8, 28, 64, 0.18);
}

.precip-tod-legend-box > span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--precip-legend-pad-y, 3px) var(--precip-legend-pad-x, 6px);
  font-family: var(--font-main);
  font-size: var(--precip-legend-label, 11px);
  font-weight: 700;
  color: #fff;
}

.precip-tod-legend-box > .is-morning {
  background: #5aa6e8;
}

.precip-tod-legend-box > .is-noon {
  background: #3d7ec4;
}

.precip-tod-legend-box > .is-night {
  background: #255a9a;
}

.pop-unit {
  font-size: 0.55em;
  margin-left: 0.04em;
  color: #ffffff;
}

.city-card.is-pop .pop-slot.is-pop-low b,
.city-card.is-pop .pop-slot.is-pop-mid b,
.city-card.is-pop .pop-slot.is-pop-high b,
.city-card.is-pop .pop-slot b {
  color: #ffffff;
}

.led-screen[data-content="weekly_weather"],
.led-screen[data-content="weekly_precip"] {
  background: var(--bg-sea) url("../img/weekly-frame.svg?v=pref353") no-repeat center / 100% 100%;
}

.led-screen[data-content="weekly_weather"] .map-stage,
.led-screen[data-content="weekly_precip"] .map-stage {
  background: transparent;
}

.forecast-table {
  --forecast-line: #8eb8d6;
  --forecast-gap: 2px;
  --forecast-head: #fff3b2;
  --forecast-city-bg: #cfe6f5;
  --forecast-cell-bg: rgba(255, 255, 255, 0.94);
  --forecast-radius: 12px;
  position: absolute;
  left: var(--footer-gap);
  right: var(--footer-gap);
  top: calc(var(--header-title-height) + var(--header-height) + var(--footer-gap) + 8px);
  bottom: calc(var(--footer-height) + 14px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  z-index: 3;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

/* 罫線は gap＋背景色（サイネージでも消えにくい）。見た目は参照の細い水色ラインに合わせる */
.forecast-grid {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(3.8em, 15%) repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(var(--forecast-rows, 5), minmax(0, 1fr));
  gap: var(--forecast-gap);
  padding: var(--forecast-gap);
  background: var(--forecast-line);
  border-radius: var(--forecast-radius);
  box-sizing: border-box;
  overflow: hidden;
}

.forecast-day-h,
.forecast-city,
.forecast-city-h,
.forecast-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  font-size: var(--font-week);
  font-weight: 900;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

.forecast-city-h {
  padding: 0;
  background: var(--bg-sea);
  overflow: visible;
  white-space: normal;
  border-radius: calc(var(--forecast-radius) - var(--forecast-gap)) 0 0 0;
}

.forecast-day-h {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  padding: 0.18em 0.12em;
  background: var(--forecast-head);
  line-height: 1;
  font-weight: 900;
}

/* 表の四隅を丸くする */
.forecast-grid > .forecast-day-h:nth-child(8) {
  border-radius: 0 calc(var(--forecast-radius) - var(--forecast-gap)) 0 0;
}

.forecast-grid > .forecast-city:nth-last-child(8) {
  border-radius: 0 0 0 calc(var(--forecast-radius) - var(--forecast-gap));
}

.forecast-grid > .forecast-cell:last-child {
  border-radius: 0 0 calc(var(--forecast-radius) - var(--forecast-gap)) 0;
}

.forecast-day-num {
  font-family: var(--font-number);
  font-size: 1.35em;
  font-weight: 800;
  line-height: 1;
}

.forecast-day-w {
  font-size: 0.92em;
  line-height: 1;
}

.forecast-city {
  font-size: var(--font-city);
  padding: 0.12em 0.16em;
  background: var(--forecast-city-bg);
  color: var(--text-primary);
  font-weight: 900;
}

.forecast-day-h.is-sunday {
  color: #e62919;
}

.forecast-day-h.is-saturday {
  color: #0b6fbf;
}

.forecast-day-h.is-today {
  box-shadow: none;
}

.forecast-cell.is-today {
  background: rgba(238, 246, 255, 0.96);
}

.forecast-cell {
  flex-direction: column;
  padding: 0.06em 0.04em 0.1em;
  background: var(--forecast-cell-bg);
}

.forecast-cell.is-weather {
  container-type: size;
  justify-content: space-between;
  gap: 0.04em;
  padding: 0.08em 0.04em 0.1em;
}

.forecast-cell.is-weather .wx-icon {
  width: min(94%, 88cqw);
  height: auto;
  aspect-ratio: 1.12 / 1;
  max-height: 68cqh;
  flex: 1 1 62%;
  min-width: 0;
  min-height: 0;
}

.forecast-cell.is-weather .wx-icon svg {
  width: 100%;
  height: 100%;
}

.forecast-temps {
  font-family: var(--font-main);
  font-size: calc(var(--font-temp) * 0.68);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0.02em;
}

.forecast-cell.is-weather .forecast-temps {
  font-size: calc(var(--font-temp) * 0.58);
  line-height: 1;
  flex: 0 0 auto;
}

.forecast-temps .temp-max {
  color: var(--temp-max);
}

.forecast-temps .temp-min {
  color: var(--temp-min);
}

.forecast-temps .temp-slash {
  color: #7aa0b8;
  font-weight: 700;
}

.forecast-cell.is-pop {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.04em;
  font-family: var(--font-number);
  color: var(--pop-color);
}

.forecast-cell.is-pop-metrics {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0.12em 0.18em;
  container-type: size;
  color: var(--text-primary);
}

.forecast-cell.is-pop-metrics .pop-metric {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2em;
  padding: 0.08em 0;
  line-height: 1;
}

.forecast-cell.is-pop-metrics .pop-metric.is-pop-chance {
  border-bottom: 1px dotted #9bb8cc;
}

.forecast-cell.is-pop-metrics .pop-metric-label {
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--font-main);
  font-size: clamp(7px, 18cqh, calc(var(--font-week) * 0.55));
  font-weight: 800;
  color: #0b6fbf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.forecast-cell.is-pop-metrics .pop-metric-label.is-two-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.06em;
  white-space: normal;
  line-height: 1.05;
  font-size: clamp(6px, 14cqh, calc(var(--font-week) * 0.48));
}

.forecast-cell.is-pop-metrics .pop-metric-label.is-two-line > span {
  display: block;
}

.forecast-cell.is-pop-metrics .pop-metric.is-humidity .pop-metric-label {
  color: #1a7a6a;
}

.forecast-cell.is-pop-metrics .pop-metric-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.04em;
  flex: 0 0 auto;
  color: #123b5c;
}

.forecast-cell.is-pop-metrics .pop-metric-value b {
  font-size: clamp(11px, 34cqh, calc(var(--font-pop-lg) * 0.72));
  font-weight: 900;
  line-height: 1;
  color: #123b5c;
}

.forecast-cell.is-pop-metrics .pop-metric-value small {
  font-size: 0.48em;
  font-weight: 800;
  line-height: 1;
  align-self: flex-end;
  margin-bottom: 0.08em;
  color: #3d6b8c;
}

.forecast-cell.is-pop b {
  font-size: var(--font-pop-lg);
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.forecast-cell.is-pop small {
  font-size: 0.55em;
  line-height: 1;
  align-self: flex-end;
  margin-bottom: 0.12em;
}

.forecast-cell.is-pop-split {
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.forecast-cell.is-pop-split .pop-half {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  line-height: 1;
}

.forecast-cell.is-pop-split .pop-half.is-am {
  background: color-mix(in srgb, #5aa0d8 22%, #ffffff);
  border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 28%, var(--line));
}

.forecast-cell.is-pop-split .pop-half.is-pm {
  background: color-mix(in srgb, #2f6fad 18%, #ffffff);
}

.forecast-cell.is-pop-split b {
  font-size: calc(var(--font-pop-lg) * 0.92);
}

.forecast-cell.is-pop-low,
.pop-half.is-pop-low { color: #3d6b8c; }
.forecast-cell.is-pop-mid,
.pop-half.is-pop-mid { color: #0b6fbf; }
.forecast-cell.is-pop-high,
.pop-half.is-pop-high { color: #0a4ea8; }

.led-screen[data-density="minimal"] .forecast-temps,
.led-screen[data-size="tiny"] .forecast-temps {
  display: none;
}

.led-screen[data-density="minimal"] .city-card-pop,
.led-screen[data-density="compact"] .city-card-pop {
  display: none;
}

.led-screen[data-size="tiny"] .map-attribution {
  display: none;
}

.week-points {
  position: absolute;
  top: var(--footer-gap);
  right: var(--footer-gap);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 0.55em;
  width: max-content;
  max-width: calc(100% - 9em);
  min-height: var(--header-title-height);
  margin: 0;
  padding: 0.22em 0.85em 0.22em 0.22em;
  background: #ffffff;
  border-radius: calc(var(--box-radius) * 1.6);
  box-shadow: 0 4px 14px rgba(10, 47, 122, 0.18), 0 1px 4px rgba(10, 47, 122, 0.1);
  color: var(--text-primary);
  box-sizing: border-box;
  pointer-events: none;
}

.week-points-badge {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.55em 0.8em;
  background: #0a2f7a;
  color: #ffffff;
  border-radius: calc(var(--box-radius) * 1.2);
  font-size: calc(var(--font-week) * 0.9);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.week-points-list {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.week-points-item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.45em;
  padding: 0 0.95em;
  border-left: 1px solid color-mix(in srgb, #0a2f7a 18%, transparent);
}

.week-points-item:first-child {
  border-left: none;
  padding-left: 0.3em;
}

.week-points-icon {
  width: clamp(48px, calc(var(--header-title-height) * 0.7), 76px);
  height: clamp(48px, calc(var(--header-title-height) * 0.7), 76px);
  flex: 0 0 auto;
  display: block;
}

.week-points-icon img,
.week-points-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.week-points-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08em;
  min-width: 0;
  font-size: calc(var(--font-week) * 0.88);
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.week-points-copy b {
  font-weight: 900;
}

.led-screen[data-size="tiny"] .week-points,
.led-screen[data-density="minimal"] .week-points {
  display: none;
}

.led-screen[data-content="today_precip"] .led-title-mark,
.led-screen[data-content="tomorrow_precip"] .led-title-mark,
.led-screen[data-content="weekly_precip"] .led-title-mark {
  color: #0b6fbf;
}
