:root {
  --primary: #FF6B4A;
  --primary-dark: #E8562F;
  --link-blue: #2563EB;
  --bg: #FFFBF6;
  --card: #FFFFFF;
  --text: #2B2620;
  --text-muted: #8A8078;
  --border: #F2E9DE;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans JP", -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: baseline; gap: 10px; }

.brand .logo-text {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand .logo-text span { color: var(--text); }

.brand .tagline { font-size: 12px; color: var(--text-muted); font-weight: 500; display: none; }

@media (min-width: 640px) { .brand .tagline { display: inline; } }

.header-actions { display: flex; align-items: center; gap: 14px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); cursor: pointer;
}

.icon-btn svg { width: 18px; height: 18px; stroke: var(--text); }

/* ---------- Tabs ---------- */

.tabs-wrap { max-width: 1120px; margin: 0 auto; padding: 14px 20px 0; }

.scroll-row { position: relative; }

.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }

.scroll-arrow {
  display: none;
  position: absolute;
  top: 0;
  bottom: 12px;
  margin: auto 0;
  z-index: 5;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 2px 8px rgba(43, 38, 32, .15);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.scroll-arrow-left { left: -4px; }
.scroll-arrow-right { right: -4px; }

/* タッチ操作の端末ではスワイプで移動できるため、マウス操作の端末だけ矢印を出す */
@media (hover: hover) and (pointer: fine) {
  .scroll-arrow.visible { display: flex; }
}

.tab {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tab:hover { border-color: var(--primary); color: var(--text); }

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 107, 74, 0.35);
}

.region-filter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 18px; scrollbar-width: none; }
.region-filter::-webkit-scrollbar { display: none; }

.region-chip {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.region-chip.active {
  background: #FFF1EC;
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

.region-subfilter {
  margin-top: -10px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
}

.region-chip-sm { font-size: 11.5px; padding: 5px 10px; }

/* ---------- Hero ---------- */

main { max-width: 1120px; margin: 0 auto; padding: 8px 20px 60px; }

.hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 380px;
  margin-bottom: 28px;
  isolation: isolate;
  box-shadow: 0 12px 30px rgba(43, 38, 32, 0.12);
  display: block;
}

.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }

.hero-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,15,10,.88) 0%, rgba(20,15,10,.35) 45%, rgba(20,15,10,0) 70%);
  z-index: -1;
}

.hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 30px 26px; color: #fff; }

.hero-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.cat-badge { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; color: #fff; }

.region-badge {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px;
}

.trend-date { font-size: 12px; color: rgba(255,255,255,.75); font-weight: 500; }

.hero-content h2 { font-size: 28px; font-weight: 900; line-height: 1.45; max-width: 640px; margin-bottom: 10px; }

.hero-content p {
  font-size: 14px; color: rgba(255,255,255,.82); max-width: 560px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Grid ---------- */

.section-label {
  font-size: 13px; font-weight: 700; color: var(--text-muted); letter-spacing: .04em;
  margin: 6px 0 14px; display: flex; align-items: center; gap: 8px;
}

.section-label::before { content: ""; width: 4px; height: 14px; background: var(--primary); border-radius: 2px; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(43, 38, 32, 0.1); }

.card-img { position: relative; height: 150px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .cat-badge { position: absolute; top: 10px; left: 10px; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card-meta { font-size: 11.5px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }

.card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.5; }

.card p.summary {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-sources {
  margin-top: auto; display: flex; align-items: center; gap: 6px;
  padding-top: 10px; border-top: 1px dashed var(--border);
}

.card-sources img { width: 16px; height: 16px; border-radius: 50%; background: #eee; }
.card-sources span { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.heartful-note {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #FFF1EC 0%, #FFE9E4 100%);
  border: 1.5px dashed #F43F5E;
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 13px;
  color: #9F1239;
  display: flex;
  align-items: center;
  gap: 10px;
}

footer {
  max-width: 1120px; margin: 40px auto 0; padding: 26px 20px 40px;
  border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 12.5px;
}

footer .brand-mini {
  font-family: "Poppins", sans-serif; font-weight: 800; color: var(--primary); font-size: 16px; margin-bottom: 6px;
}

/* ---------- Article detail page ---------- */

.article-detail { max-width: 720px; margin: 0 auto; padding: 30px 20px 60px; }

.share-buttons {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.share-label { font-size: 12px; color: var(--text-muted); font-weight: 700; margin-right: 2px; }

.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: none; cursor: pointer;
  color: #fff;
}

.share-btn svg { width: 18px; height: 18px; }

.share-x { background: #000; }
.share-instagram {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.share-toast {
  position: absolute;
  left: 0;
  bottom: -30px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.share-toast.visible { opacity: 1; }

.article-sources-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }

.article-sources-label { font-size: 12px; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }

.article-sources { display: flex; gap: 8px; flex-wrap: wrap; }

.source-badge {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
}

.source-badge img { width: 16px; height: 16px; border-radius: 50%; }

.article-detail .article-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }

.article-detail h1 { font-size: 26px; line-height: 1.5; margin-bottom: 16px; }

.hero-img { width: 100%; border-radius: 16px; margin-bottom: 20px; }

.article-body { font-size: 16px; line-height: 1.95; white-space: pre-wrap; }

.tag { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; }

.related-section { max-width: 720px; margin: 0 auto; padding: 0 20px 60px; }
.related-section .section-label { margin-bottom: 14px; }
.related-section .article-grid { gap: 16px; }

/* ---------- タグライン・キャッチコピー ---------- */

.site-catchcopy {
  padding: 4px 20px 12px;
  max-width: 1120px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
}

/* ---------- モバイル: スワイプ遷移アニメーション（SmartNews風） ---------- */

.swipe-transition {
  transition: transform 100ms ease, opacity 100ms ease;
}

.swipe-out-left {
  transform: translateX(-40px);
  opacity: 0;
}

.swipe-out-right {
  transform: translateX(40px);
  opacity: 0;
}
