/* pocs/06-river/public/styles.css - 清流アウトドア・エメラルドライトテーマ v3.0 */
:root {
  --primary: #15803d;        /* 清流フォレストグリーン */
  --primary-dark: #166534;
  --primary-light: #f0fdf4;
  --accent: #0284c7;         /* 清水スカイブルー */
  --bg: #f8fafc;             /* 清潔なライト背景 */
  --card-bg: #ffffff;        /* 白カード */
  --border-color: #e2e8f0;   /* 軽やかなボーダー */
  --text-main: #0f172a;      /* くっきりした主文字 */
  --text-muted: #475569;     /* 補助テキスト（高コントラスト） */
  --accent-prime: #059669;   /* 笹濁り（ベスト）エメラルドグリーン */
  --accent-normal: #0284c7;  /* 平水スカイブルー */
  --accent-turbid: #d97706;  /* 白濁りアンバー */
  --accent-danger: #dc2626;  /* 泥濁りレッド */
  --accent-low: #6366f1;     /* 渇水インディゴ */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  padding-bottom: 60px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 1. 最上部: 海/川 セグメント切り替えバー（共通UI） */
.mode-switcher-bar {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  padding: 0.35rem 1rem;
}
.mode-switcher-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  background: #1e293b;
  border: 1px solid #334155;
  transition: all 0.2s;
  white-space: nowrap;
}
.mode-tab:hover {
  background: #334155;
  color: #f8fafc;
}
.mode-tab.active-ocean {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 1px 6px rgba(2, 132, 199, 0.4);
}
.mode-tab.active-river {
  background: #15803d;
  color: #ffffff;
  border-color: #4ade80;
  box-shadow: 0 1px 6px rgba(21, 128, 61, 0.4);
}
.mode-subtag {
  font-size: 0.68rem;
  opacity: 0.85;
  font-weight: 500;
}
@media (max-width: 600px) {
  .mode-tab { font-size: 0.78rem; padding: 0.35rem 0.4rem; }
  .mode-subtag { display: none; }
}

/* 2. 共通ヘッダー（鳥サイト方式） */
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.55rem 1rem 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.05rem;
  font-weight: 800;
  color: #15803d;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.beta-tag {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
}

.header-badge-btn {
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  transition: all 0.15s;
}
.header-badge-btn:hover {
  background: #d1fae5;
  border-color: #10b981;
}

/* 3. 上部ピル型ナビゲーションバー（スマホ2段グリッド） */
.pills-bar {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 0.35rem 1rem 0.45rem;
}
.pills-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pills-container::-webkit-scrollbar { display: none; }
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  flex-shrink: 0;
}
.pill-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.pill-btn.pill-river.active,
.pill-btn.active {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

@media (max-width: 600px) {
  .pills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    white-space: normal;
    overflow-x: visible;
  }
  .pill-btn {
    font-size: 0.76rem;
    padding: 0.4rem 0.5rem;
    justify-content: center;
    text-align: center;
    border-radius: 0.4rem;
  }
}

/* 4. ヒーローセクション */
.hero {
  padding: 24px 0 20px;
  text-align: center;
}

.hit-rate-badge {
  display: inline-flex;
  align-items: center;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 14px;
  text-decoration: none;
  transition: background 0.15s;
}
.hit-rate-badge:hover {
  background: #d1fae5;
}

.hero h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.hero-benefit {
  font-size: 1.02rem !important;
  color: #1e293b !important;
  max-width: 740px;
  margin: 0 auto 14px;
  line-height: 1.75;
}

.hero-usps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 14px;
}

.hero-usp-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  color: #1e293b;
  box-shadow: var(--shadow-sm);
}

/* 5. 現場写真＆公認カメラ・目視クラリティ判定カード */
.visual-clarity-card {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}

.clarity-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 14px;
}

.clarity-img-box {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.river-feature-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.clarity-img-caption {
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.55;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.camera-links-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.cam-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  text-decoration: none;
  transition: all 0.15s;
}
.cam-link-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.featured-img-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.featured-river-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.photo-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .clarity-image-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .river-feature-img {
    height: 180px;
  }
  .featured-river-photo {
    height: 160px;
  }
}

/* 6. 今週のベスト河川カード（Featured Card） */
.featured-card {
  background: #ffffff;
  border: 2px solid #10b981;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
  position: relative;
}

.card-tag {
  display: inline-block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

.river-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.status-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.badge-prime { background: #ecfdf5; color: #047857; border: 1.5px solid #10b981; }
.badge-normal { background: #f0f9ff; color: #0284c7; border: 1.5px solid #38bdf8; }
.badge-turbid { background: #fefce8; color: #b45309; border: 1.5px solid #f59e0b; }
.badge-danger { background: #fef2f2; color: #b91c1c; border: 1.5px solid #ef4444; }
.badge-low { background: #eef2ff; color: #4338ca; border: 1.5px solid #818cf8; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.metric-item {
  text-align: center;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.advice-box {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-left: 4px solid #10b981;
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
  margin-top: 16px;
  font-size: 0.92rem;
  color: #166534;
  line-height: 1.65;
}

.advice-title {
  font-weight: 800;
  color: #15803d;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* 6. リストカード・河川一覧 */
.river-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.river-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.river-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-responsive {
  overflow-x: auto;
  margin: 16px 0;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

td {
  color: #1e293b;
}

.danger-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin: 24px 0;
  line-height: 1.6;
}

/* 7. SVG 時系列水位チャート */
.chart-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* 8. ギア＆コラムグリッド */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.affiliate-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.affiliate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.affiliate-badge {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 8px;
}
.affiliate-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 6px;
}
.affiliate-desc {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.6;
}
.affiliate-price {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 6px;
}
.btn-affiliate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: #15803d;
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
  box-sizing: border-box;
}
.btn-affiliate:hover {
  background: #166534;
  text-decoration: none;
}

/* 9. コラム・記事レイアウト */
.article-header {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.article-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin-top: 8px;
}
.article-meta {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 8px;
}
.toc-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
}
.toc-box strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 8px;
}
.toc-box ol {
  padding-left: 20px;
  margin: 0;
}
.toc-box li {
  font-size: 0.88rem;
  margin: 6px 0;
  color: #334155;
}
.toc-box a {
  color: #0284c7;
  text-decoration: none;
}
.toc-box a:hover {
  text-decoration: underline;
}
.article-body {
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.8;
}
.article-body h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 24px 0 10px;
}
.article-body p {
  margin-bottom: 16px;
}
.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
.article-body li {
  margin-bottom: 6px;
}
.math-box {
  background: #f0fdf4;
  border: 1.5px solid #10b981;
  border-radius: 10px;
  text-align: center;
  padding: 16px;
  margin: 20px 0;
}
.math-formula {
  font-size: 1.2rem;
  color: #047857;
  font-weight: 700;
  margin-bottom: 6px;
}

/* 10. フッター */
footer {
  margin-top: 48px;
  border-top: 1px solid var(--border-color);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  background: #ffffff;
}

footer a {
  color: #15803d;
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.35rem; }
  .metrics-grid { grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px; }
  .metric-val { font-size: 1.05rem; }
  .river-title { font-size: 1.25rem; }
  .featured-card { padding: 16px; }
  .article-header h1 { font-size: 1.3rem; }
}
