/* 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", "Yu Gothic UI", "Yu Gothic", 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: repeat(3, 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;
}

/* メニュー開閉（PCでは常時表示、スマホではドロワー） */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.nav-toggle-btn { display: none; }
@media (max-width: 600px) {
  .mode-switcher-bar { padding: 0.25rem 0.75rem; }
  .mode-switcher-inner { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
  .mode-tab { font-size: 0.72rem; padding: 0.28rem 0.2rem; }
  .header-inner { padding: 0.4rem 0.75rem; gap: 0.4rem; }
  .logo { font-size: 0.95rem; gap: 6px; }
  .header-right { display: flex; align-items: center; gap: 0.35rem; }
  .header-badge-btn { display: none; }
  .nav-toggle-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.38rem 0.7rem; border-radius: 0.4rem;
    border: 1px solid #cbd5e1; background: #f8fafc;
    font-size: 0.8rem; font-weight: 800; color: #0f172a; cursor: pointer;
  }
  .nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
    display: block; width: 16px; height: 2px; background: #0f172a; border-radius: 1px; content: "";
  }
  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before { position: absolute; top: -5px; }
  .nav-toggle-icon::after { position: absolute; top: 5px; }
  .nav-toggle:checked ~ .header-inner .nav-toggle-btn { background: #15803d; border-color: #15803d; color: #fff; }
  .nav-toggle:checked ~ .header-inner .nav-toggle-icon,
  .nav-toggle:checked ~ .header-inner .nav-toggle-icon::before,
  .nav-toggle:checked ~ .header-inner .nav-toggle-icon::after { background: #fff; }
  .nav-toggle:focus-visible ~ .header-inner .nav-toggle-btn { outline: 2px solid #0284c7; outline-offset: 2px; }
  header .pills-bar {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    padding: 0.5rem 0.75rem 0.6rem; border-bottom: 1px solid var(--border-color);
    box-shadow: 0 8px 12px -4px rgb(0 0 0 / 0.15);
  }
  .nav-toggle:checked ~ .pills-bar { display: block; }
  .pills-container {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem;
    white-space: normal; overflow-x: visible;
  }
  .pill-btn {
    font-size: 0.82rem; padding: 0.55rem 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: 820px;
  margin: 0 auto 14px;
  line-height: 1.8;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: break-word;
}

/* 4.1 本日の3秒シグナル（クイックサマリーグリッド） */
.quick-signal-container {
  margin: 14px auto 20px;
  max-width: 900px;
  text-align: left;
}
.quick-signal-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick-signal-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.quick-signal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.quick-signal-card:active {
  transform: scale(0.98);
}
.quick-signal-card.prime {
  border-color: #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}
.quick-signal-card.normal {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}
.quick-signal-card.low {
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}
.quick-signal-card.turbid {
  border-color: #f87171;
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%);
}
.signal-badge-mini {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 4px;
  width: fit-content;
}
.signal-badge-mini.prime { background: #10b981; color: white; }
.signal-badge-mini.normal { background: #0284c7; color: white; }
.signal-badge-mini.low { background: #d97706; color: white; }
.signal-badge-mini.turbid { background: #dc2626; color: white; }
.signal-river-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}
.signal-status-desc {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  line-height: 1.4;
}
.signal-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}
.signal-link-btn {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.quick-signal-card:hover .signal-link-btn {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .quick-signal-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .quick-signal-card {
    padding: 12px 14px;
  }
}

.hero-usps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 880px;
  margin: 14px auto 0;
}

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

/* 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;
  }
}

/* 5.5 統一主要河川カード（Unified River Cards） */
.unified-river-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 18px 0 28px;
}

.unified-river-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s, box-shadow 0.15s;
  scroll-margin-top: 100px;
}
.unified-river-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.unified-river-card.best-pick {
  border: 2px solid #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 50px);
}

.river-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.river-card-header-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.river-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.river-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.river-station-sub {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}
.river-species-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.species-bar-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
}

.badge-best-pick {
  background: #10b981;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.river-card-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 768px) {
  .river-card-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.card-photo-box {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #0f172a;
}
.card-snapshot-img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  display: block;
}
.photo-timestamp-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.card-camera-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 0 2px;
}
.btn-live-stream {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dc2626;
  color: #ffffff !important;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-live-stream:hover {
  background: #b91c1c;
}
.btn-live-stream:active {
  transform: scale(0.97);
}

.card-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.metric-pill {
  text-align: center;
}
.metric-pill-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: block;
}
.metric-pill-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.card-advice-snippet {
  background: #f0fdf4;
  border-left: 3px solid #10b981;
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 0.84rem;
  color: #166534;
  line-height: 1.55;
  margin-top: 8px;
}

.river-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.btn-primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0284c7;
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary-action:hover {
  background: #0369a1;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}
.btn-primary-action:active {
  transform: scale(0.98);
}

/* 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: 10px;
  margin: 16px 0;
  background: #f1f5f9;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
}

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

.metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}

.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;
}

.btn-advice-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0284c7;
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 14px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-advice-action:hover {
  background: #0369a1;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}
.btn-advice-action:active {
  transform: scale(0.98);
}

/* 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: 48px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 4px solid #0f172a;
  padding-left: 10px;
}

.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;
}

.clickable-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: rgba(2, 132, 199, 0.08);
}
.clickable-row:hover {
  background-color: #f0fdf4;
}
.clickable-row:active {
  background-color: #e2e8f0;
}

.table-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0284c7;
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
}
.clickable-row:hover .table-detail-btn {
  background: #0369a1;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.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. 河川マップ ＆ GPS現在地ボタン ＆ カメラタブ */
.river-svg-map-wrapper {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.river-svg-map {
  width: 100%;
  height: auto;
  display: block;
}
.gps-find-btn {
  background: #15803d;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
}
.gps-find-btn:hover {
  background: #166534;
  transform: translateY(-1px);
}
.species-chip {
  font-size: 0.68rem;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
}
.cam-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
}
.cam-tab-btn {
  flex: 1;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.cam-tab-btn:hover {
  color: #0f172a;
}
.cam-tab-btn:active {
  transform: scale(0.98);
}
.cam-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  border: 1.5px solid #0284c7;
}

/* 11. フッター */
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) {
  .container {
    padding: 0 12px;
  }
  .hero {
    padding: 16px 0 12px;
  }
  .hero-title,
  .hero h1 {
    font-size: 1.35rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  .hero-benefit {
    font-size: 0.84rem !important;
    line-height: 1.55;
    padding: 0 4px;
    margin-bottom: 10px;
  }
  .hit-rate-badge {
    font-size: 0.76rem;
    padding: 3px 10px;
    margin-bottom: 10px;
  }
  .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: 14px;
  }
  .article-header h1 {
    font-size: 1.25rem;
  }

  /* 河川カードのスマホ調整 */
  .unified-river-card {
    padding: 14px 14px;
    border-radius: 12px;
  }
  .river-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 8px;
  }
  .river-card-title {
    font-size: 1.15rem;
  }
  .river-card-body {
    gap: 10px;
  }
  .card-snapshot-img {
    height: 155px;
  }
  .card-metrics-row {
    padding: 8px 10px;
    gap: 8px;
  }
  .metric-pill-val {
    font-size: 1.15rem;
  }
  .card-advice-snippet {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
  .btn-primary-action {
    font-size: 0.88rem;
    padding: 10px 14px;
  }
}

/* 12. 釣行前チェックリスト（Prep Checklist 2列グリッド） */
.prep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 28px;
}
@media (max-width: 768px) {
  .prep-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.prep-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
@media (max-width: 600px) {
  .prep-card {
    padding: 14px;
  }
}

.prep-card-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.prep-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prep-card-body {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.55;
  flex: 1;
}
.prep-card-desc {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.prep-fishery-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prep-fishery-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed #e2e8f0;
  gap: 8px;
}
.prep-fishery-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.prep-fishery-info {
  flex: 1;
  min-width: 0;
}
.prep-fishery-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.prep-fishery-sub {
  font-size: 0.78rem;
  color: #047857;
  font-weight: 700;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.prep-app-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.prep-safety-list {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.6;
}
.prep-safety-list li {
  margin-bottom: 4px;
}

.prep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.prep-btn-ticket {
  background: #f0fdf4;
  color: #166534;
  border: 1.2px solid #86efac;
}
.prep-btn-ticket:hover {
  background: #166534;
  color: #ffffff;
  border-color: #166534;
}
.prep-btn-safety {
  background: #0284c7;
  color: #ffffff;
  border: 1.5px solid #0284c7;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
}
.prep-btn-safety:hover {
  background: #0369a1;
  border-color: #0369a1;
}

/* 13. 海への退避バナー（クロスレコメンド） */
.cross-recommend-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #0284c7;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 32px 0 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px -1px rgba(2, 132, 199, 0.1);
}
.cross-recommend-info {
  flex: 1;
  min-width: 240px;
}
.cross-recommend-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.cross-recommend-badge {
  background: #0284c7;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}
.cross-recommend-sub {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0369a1;
}
.cross-recommend-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  line-height: 1.4;
}
.cross-recommend-desc {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}
.cross-recommend-btn {
  background: #0284c7;
  color: white !important;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cross-recommend-btn:hover {
  background: #0369a1;
}

@media (max-width: 600px) {
  .cross-recommend-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .cross-recommend-btn {
    width: 100%;
  }
}

/* --- 2026-11-10 実測水位ナビ化: 欠測・観測時刻・公式情報 --- */
.badge-missing { background: #f1f5f9; color: #334155; border: 1.5px solid #94a3b8; }
.obs-source-line { font-size: 0.78rem; font-weight: 700; color: #334155; margin: 6px 0 4px; line-height: 1.5; }
.chart-empty { font-size: 0.8rem; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 8px; padding: 10px 12px; }
.official-note { background: #ffffff; border: 1px solid #cbd5e1; border-left: 4px solid #0284c7; border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; color: #1e293b; line-height: 1.7; margin: 8px 0 16px; }
.official-note.high-water { border-left-color: #ef4444; }
.official-note a, .official-hint a { color: #0369a1; font-weight: 700; }
.official-hint { font-size: 0.8rem; color: #1e293b; margin-top: 6px; line-height: 1.6; }
.event-note { font-size: 0.74rem; color: #475569; font-weight: 700; }
.event-def { font-size: 0.85rem; color: #334155; margin: 4px 0 10px; line-height: 1.6; }

/* 河川カードの折りたたみ（要約は常時表示、詳細はタップで展開） */
.river-card-header { margin-bottom: 8px; padding-bottom: 0; border-bottom: none; }
.card-more { margin-top: 8px; border-top: 1px solid #f1f5f9; }
.card-more > summary {
  list-style: none; cursor: pointer; padding: 10px 2px;
  font-size: 0.85rem; font-weight: 800; color: #0369a1;
  display: flex; align-items: center; justify-content: space-between;
}
.card-more > summary::-webkit-details-marker { display: none; }
.card-more > summary::after { content: "▼"; font-size: 0.7rem; color: #475569; }
.card-more[open] > summary::after { content: "▲"; }
.card-more[open] > summary { margin-bottom: 6px; }
.river-card-footer { margin-top: 8px; padding-top: 10px; }
.river-pending-list { margin: -14px 0 24px; display: flex; flex-direction: column; gap: 8px; }
.river-pending-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #ffffff; border: 1px dashed #cbd5e1; border-left: 4px solid #94a3b8;
  border-radius: 8px; padding: 10px 12px; font-size: 0.88rem; color: #1e293b;
}
.river-pending-row strong { font-size: 0.95rem; margin-right: 8px; }
.river-pending-sub { font-size: 0.78rem; color: #475569; font-weight: 600; }
.river-pending-row a { color: #0369a1; font-weight: 800; text-decoration: none; white-space: nowrap; font-size: 0.85rem; }
@media (max-width: 600px) {
  .unified-river-list { gap: 12px; margin: 12px 0 18px; }
  .river-pending-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .river-pending-sub { display: block; }
}

@media (max-width: 600px) {
  .hero { padding: 14px 0 10px; }
  .hit-rate-badge { margin-bottom: 8px; font-size: 0.75rem; padding: 3px 10px; }
  .hero h1 { font-size: 1.4rem; margin-bottom: 4px; }
  .hero-benefit { font-size: 0.9rem !important; line-height: 1.55; }
  .river-cards-wrap .section-title { margin-bottom: 8px !important; }
  .river-cards-wrap .official-note { font-size: 0.78rem; line-height: 1.55; padding: 8px 10px; margin-bottom: 8px; }
}

/* チェックリスト・コラムの圧縮表示 */
.prep-fold-summary {
  list-style: none; cursor: pointer; font-size: 0.95rem; font-weight: 800; color: #0f172a;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.prep-fold-summary::-webkit-details-marker { display: none; }
.prep-fold-summary::after { content: "▼"; font-size: 0.7rem; color: #475569; }
.prep-fold[open] > .prep-fold-summary::after { content: "▲"; }
.prep-fold[open] > .prep-fold-summary { margin-bottom: 8px; }
.column-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 20px; }
.column-row {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px;
}
.column-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.column-tag {
  flex-shrink: 0; font-size: 0.7rem; font-weight: 800; color: #1e40af; background: #eff6ff;
  border: 1px solid #bfdbfe; border-radius: 4px; padding: 2px 6px;
}
.column-tag-safety { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.column-title { flex: 1; font-size: 0.88rem; font-weight: 700; color: #0f172a; line-height: 1.45; }
.column-arrow { color: #0369a1; font-weight: 800; }
@media (max-width: 600px) {
  .prep-grid { gap: 8px; margin: 8px 0 16px; }
  .prep-card { padding: 12px 14px; }
}

/* 解禁日・遊漁券の一覧 */
.seasons-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.seasons-filter {
  font-size: 0.82rem; font-weight: 800; padding: 6px 12px; border-radius: 9999px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #ffffff; color: #1e293b;
}
.seasons-filter.active { background: #15803d; border-color: #15803d; color: #ffffff; }
.season-table th, .season-table td { text-align: center; padding: 6px 4px; }
.season-table th[scope="row"] { text-align: left; white-space: normal; min-width: 84px; font-size: 0.78rem; }
.season-table thead th { font-size: 0.7rem; padding: 6px 1px; }
.mcell { min-width: 15px; background: #f8fafc; }
.mcell-on { background: #15803d; }
.mcell-part { background: #86efac; }
.mcell-na { color: #475569; font-weight: 700; }

.chart-title { font-size: 0.82rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
