/* サイドバー内 地方トグル */
.weather-region-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: var(--font-size-base);
  font-weight: bold;
  padding: 4px 0;
  user-select: none;
}

.weather-region-toggle:hover { color: #555; }

.weather-arrow {
  font-size: 1.0rem;
  color: #8aafc8;
  transition: transform 0.2s;
  display: inline-block;
  transform: rotate(90deg);
}

.weather-arrow.open { transform: rotate(-90deg); }

.weather-pref-list { margin-left: 8px; }

.weather-pref-label {
  display: block;
  padding: 3px 6px;
  margin: 1px 0;
  font-size: var(--font-size-sm);
  cursor: pointer;
  border-radius: 4px;
  border-left: 3px solid transparent;
}

.weather-pref-label:hover {
  background: #f0f4f8;
  color: #333;
}

.weather-pref-label.active {
  font-weight: bold;
  color: #2a5f8f;
  background: #e6f0fa;
  border-left-color: #2a5f8f;
}

/* メインエリア */
.weather-result-area { padding: 10px 0; }

.weather-placeholder,
.weather-loading,
.weather-error {
  color: #999;
  font-size: var(--font-size-sm);
}

.weather-pref-title {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
}


/* 週間天気テーブル */
.weather-table-wrap {
  overflow-x: auto;
}

.weather-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: var(--font-size-sm);
  table-layout: fixed;
}

.weather-table th,
.weather-table td {
  border: 1px solid #ddd;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
}

.weather-table thead th {
  background: #f5f7fa;
  font-weight: bold;
}

.weather-table thead th:first-child,
.weather-table tbody th {
  width: 5em;
  background: #f5f7fa;
  font-weight: bold;
  text-align: left;
  padding-left: 8px;
}

.weather-table thead th.sun { color: #e53935; }
.weather-table thead th.sat { color: #1976d2; }

.weather-tbl-icon {
  width: 40px;
  height: 40px;
}

.weather-tbl-pop { color: #1976d2; }

.temp-max { color: #e53935; font-weight: bold; }
.temp-min { color: #1976d2; font-weight: bold; }

/* 年間気候グラフ */
.weather-climate {
  margin-top: 32px;
}

.climate-title {
  font-size: 1rem;
  margin: 0 0 12px 0;
}

.climate-note {
  font-size: 0.75rem;
  color: #999;
  font-weight: normal;
}

.climate-chart-wrap {
  position: relative;
  width: 100%;
}

@media (max-width: 768px) {
  .climate-chart-wrap { width: 100%; }

  .weather-region-toggle {
    padding: 12px 4px;
    font-size: 1rem;
  }

  .weather-pref-label {
    padding: 10px 12px;
    margin: 3px 0;
    font-size: 1rem;
  }

  /* 天気ページのみ：展開時ダーク背景（.sidebar-toggle--weather で識別） */
  .sidebar:has(.sidebar-toggle--weather).expanded { background-color: #1a1a1a; }
  .sidebar:has(.sidebar-toggle--weather).expanded .sidebar-toggle--weather { background-color: #111; border-top: 1px solid #333; }

  .sidebar.expanded .weather-region-toggle {
    color: #fff;
    background: linear-gradient(135deg, #4a4a4a, #2d2d2d);
    border-radius: 4px;
    padding: 12px 10px;
    margin-bottom: 2px;
  }
  .sidebar.expanded .weather-region-toggle:hover { color: #ccc; }
  .sidebar.expanded .weather-arrow { color: #8aafc8; }

  .sidebar.expanded .weather-pref-list { margin-left: 4px; }
  .sidebar.expanded .weather-pref-label {
    color: #ccc;
  }
  .sidebar.expanded .weather-pref-label:hover {
    background: #3a3a3a;
    color: #fff;
  }
  .sidebar.expanded .weather-pref-label.active {
    color: #8aafc8;
    background: #1e3448;
    border-left-color: #8aafc8;
  }
}
