/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #222222;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* === HEADER === */
.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-logo {
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #333333;
  letter-spacing: -0.02em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.header-logo .red {
  color: #dc2626;
}
.header-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #222222;
  letter-spacing: 0.02em;
}

/* === WEATHER WIDGET === */
.weather {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
}
.weather-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 12px;
  min-width: 40px;
}
.weather-day-label {
  font-size: 11px;
  font-weight: 400;
  color: #666666;
  line-height: 1.3;
}
.weather-day-number {
  font-size: 26px;
  font-weight: 700;
  color: #333333;
  line-height: 1.1;
}
.weather-info { flex: 1; }
.weather-temp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.weather-temp {
  font-size: 14px;
  font-weight: 500;
  color: #333333;
}
.weather-location {
  font-size: 12px;
  color: #666666;
}
.weather-desc {
  font-size: 12px;
  color: #666666;
  line-height: 1.3;
}

/* === NEWS LIST === */
.news-list { background: #ffffff; }
.news-item {
  padding: 10px 12px;
  border-bottom: 1px solid #eeeeee;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
  cursor: pointer;
}
.news-item:active { background: #f8f8f8; }
.news-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.news-content {
  flex: 1;
  min-width: 0;
}
.news-title {
  font-size: 14px;
  font-weight: 700;
  color: #222222;
  line-height: 1.35;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  line-height: 1.2;
}
.news-source {
  font-size: 11px;
  font-weight: 400;
  color: #999999;
}
.news-time {
  font-size: 11px;
  font-weight: 400;
  color: #bbbbbb;
}
.news-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 62px;
  border-radius: 4px;
  object-fit: cover;
  background: #e0e0e0;
}
.news-thumb-placeholder {
  flex-shrink: 0;
  width: 76px;
  height: 62px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
/* グラデーションフォールバック（画像なし記事用） */
.grad-1 { background: linear-gradient(135deg, #dc2626, #ea580c); }
.grad-2 { background: linear-gradient(135deg, #2563eb, #0891b2); }
.grad-3 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.grad-4 { background: linear-gradient(135deg, #059669, #0d9488); }
.grad-5 { background: linear-gradient(135deg, #d97706, #dc2626); }

/* === EXPAND PANEL === */
.news-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.news-item.expanded .news-expand {
  max-height: 400px;
}
.news-item.expanded .news-title {
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.expand-inner {
  padding: 8px 0 4px;
}
.expand-desc {
  font-size: 13px;
  font-weight: 400;
  color: #444444;
  line-height: 1.55;
  margin-bottom: 10px;
}
.read-original {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #dc2626;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #dc2626;
  border-radius: 9999px;
  -webkit-tap-highlight-color: rgba(220,38,38,0.1);
}
.read-original:active {
  background: rgba(220,38,38,0.06);
}

/* === EXPANDED DARK PANEL === */
.news-item.expanded {
  background: #1C2B59;
}
.news-item.expanded.color-bordeaux {
  background: #6C2735;
}
.news-item.expanded.color-forest {
  background: #2B5F4E;
}
.news-item.expanded .news-title {
  color: #ffffff;
}
.news-item.expanded .news-source {
  color: rgba(255,255,255,0.6);
}
.news-item.expanded .news-time {
  color: rgba(255,255,255,0.4);
}
.news-item.expanded .expand-desc {
  color: rgba(255,255,255,0.85);
}
.news-item.expanded .read-original {
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}
.news-item.expanded .read-original:active {
  background: rgba(255,255,255,0.1);
}
.follow-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #dc2626;
  background: none;
  border: 1px solid #dc2626;
  border-radius: 9999px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: rgba(220,38,38,0.1);
  transition: all 0.2s;
}
.follow-source-btn:active { background: rgba(220,38,38,0.06); }
.follow-source-btn.followed {
  color: #999999;
  border-color: #cccccc;
  cursor: default;
}
.news-item.expanded .follow-source-btn {
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}
.news-item.expanded .follow-source-btn:active {
  background: rgba(255,255,255,0.1);
}
.news-item.expanded .follow-source-btn.followed {
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.2);
}
.expand-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
