/* =========================
   共通（テーマ/背景色）
   ========================= */
:root {
  --wx-border: #cfcfcf;
  --wx-muted: #6b7280;
  --wx-card-bg: #ffffff;
  --wx-panel-bg: #ffffff;
  --wx-title: #111827;
  --wx-max: #d90429;
  --wx-min: #2563eb;

  /* テーマ色（スマホ帯など） */
  --wx-accent: #ffffff;
  --wx-accent-weak: rgba(255, 255, 255, .15);

  /* PC 今日ボックス背景：未指定なら淡色にフォールバック */
  --wx-today-bg: unset;
}

.w_icon {
  vertical-align: middle;
  width: calc(5.5rem * 1.5);
  height: calc(5.5rem * 1.5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0
}

/* =========================
   PC パネル
   ========================= */
.wx-panel {
  width: 100%;
  max-width: 100%;
  /* ← 横幅いっぱいに広げる */
  margin: 0 auto;
  background: var(--wx-panel-bg);
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.9rem;
  box-sizing: border-box;
  color: var(--wx-title);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial;
  font-size: 1rem;
  line-height: 1.45;
}

.wx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  position: relative
}

.wx-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 4px;
  background: var(--wx-accent);
  border-radius: 9999px
}

.wx-title {
  font-size: 1.125rem;
  font-weight: 700
}

.wx-sub {
  font-size: 0.85rem;
  color: var(--wx-muted)
}

/* 今日（PC）— 背景色は --wx-today-bg があればそれを、無ければ --wx-accent-弱を使用 */
.pc-today {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  border: 2px solid var(--wx-border);
  border-radius: 0.625rem;
  padding: 0.9rem;
  background: var(--wx-accent);
  margin-top: 1.1rem;
  margin-bottom: 1rem;
}

.pc-date {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.pc-dayline {
  font-weight: 700
}

.pc-placeline {
  font-size: 0.85rem;
  color: var(--wx-muted)
}

.pc-tempbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ▼ PCのメイン天気アイコンを“今の1.75倍”に拡大（5.5rem → 9.625rem） */
.pc-icon {
  display: flex;
  align-items: center;
  justify-content: center
}

.pc-icon img,
.pc-icon i {
  width: calc(5.5rem * 1.75);
  height: calc(5.5rem * 1.75)
}

.pc-temp-now {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem
}

.pc-maxmin {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 1rem
}

.pc-maxmin .max {
  color: var(--wx-max);
  font-weight: 700
}

.pc-maxmin .min {
  color: var(--wx-min);
  font-weight: 700
}

/* メトリクス（PC今日・PC週間共通） */
.pc-metrics,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.9rem;
  justify-items: center;
  text-align: center;
  font-size: 1rem;
}

.pc-metrics {
  margin-top: 0.5rem
}

.metric {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem
}

.metric .ico {
  font-size: 1.15rem
}

.metric .val {
  font-weight: 700
}

/* 週間（PC） */
.pc-week {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  /* ← SPと同様レスポンシブ */
}

.pc-mini {
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  background: #fff;
  padding: 0.65rem;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  row-gap: 0.35rem;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.pc-mini:hover {
  border-color: var(--wx-accent);
  box-shadow: 0 0 0 3px var(--wx-accent-weak)
}

.pc-mini .mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600
}

.pc-mini .mini-icon {
  display: flex;
  align-items: center;
  justify-content: center
}

/* ▼ PC週間カードのアイコンを“今の1.75倍”に拡大（2.75rem → 4.8125rem） */
.pc-mini .mini-icon img,
.pc-mini .mini-icon i {
  width: calc(2.75rem * 1.75);
  height: calc(2.75rem * 1.75)
}

.pc-mini .mini-temps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.95rem
}

.pc-mini .mini-temps .max {
  color: var(--wx-max);
  font-weight: 700
}

.pc-mini .mini-temps .min {
  color: var(--wx-min);
  font-weight: 700
}

/* =========================
   スマホ
   ========================= */
.tenki-mobile {
  width: 100%;
  max-width: 26.75rem;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  padding: 0.75rem;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 1.05rem;
}

.tm-head {
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.2rem;
  font-size: 1.1rem;
  background: var(--wx-accent);
  padding: 0.25rem 0;
  border-radius: 0.4rem;
  color: #000;
  /* ← 文字色は常に黒 */
}

.tm-place {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: -0.25rem;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.tm-today {
  margin-bottom: 0.5rem
}

.tm-date {
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 1rem
}

.tm-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap
}

.tm-icon img,
.tm-icon i {
  width: 4.5rem;
  height: 4.5rem
}

.tm-temp-now {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.2rem
}

.tm-temp-mm {
  display: flex;
  gap: 0.6rem;
  font-size: 1rem
}

.tm-max {
  color: var(--wx-max)
}

.tm-min {
  color: var(--wx-min)
}

.tm-metrics {
  margin-top: 0.5rem;
  border: 2px solid var(--wx-border);
  border-radius: 0.625rem;
  padding: 0.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.6rem;
  justify-items: center;
  text-align: center;
  background: #fafafa;
  font-size: 1rem
}

.tm-metrics .metric .ico {
  font-size: 1.2rem
}

.tm-week-strip {
  margin-top: 0.6rem
}

.tm-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr));
  gap: 0.5rem
}

.tm-cell {
  border: 1px solid #ebedf0;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.55rem 0.4rem;
  text-align: center;
  box-sizing: border-box
}

.tm-cell .c-w {
  font-weight: 700;
  margin-bottom: 0.2rem
}

/* ▼ モバイルは現状のまま（変更なし） */
.tm-cell .c-ic img,
.tm-cell .c-ic i {
  width: 3.5rem;
  height: 3.5rem
}

.tm-cell .c-mm {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  line-height: 1.15
}

.tm-cell .c-sub,
.tm-cell .c-wind {
  margin-top: 0.25rem;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.15rem;
  justify-items: center;
  color: #444;
  line-height: 1.15
}

@media (max-width:380px) {
  .tenki-mobile {
    padding: 0.6rem;
    font-size: 1rem
  }

  .tm-strip {
    grid-template-columns: repeat(auto-fit, minmax(5.6rem, 1fr))
  }
}