/* 海LAB（lab.bluehub.jp） スタイル
   配色はbluehub.jpトップページ共通のブランドカラーを継承（_docs/09_デザイン.md 参照） */

:root {
  --bh-ink: #102b3f;
  --bh-muted: #5d7180;
  --bh-blue: #0b72b9;
  --bh-cyan: #18aeca;
  --bh-sea: #78d9b3;
  --bh-coral: #ff8c66;
  --bh-paper: #f5fbfd;
  --bh-line: rgba(16, 43, 63, 0.12);
  --bh-card-radius: 16px;
  --bh-shadow: 0 6px 24px rgba(16, 43, 63, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(circle at 78% 8%, rgba(120, 217, 179, 0.14), transparent 32rem),
    linear-gradient(180deg, #eef9fc 0%, #f8fbfb 48%, #ffffff 100%);
  color: var(--bh-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

.site-header-inner, .site-footer-inner, .container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== ヘッダー ===== */
.site-header {
  background: rgba(245, 251, 253, 0.92);
  border-bottom: 1px solid var(--bh-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header-inner {
  display: flex;
  flex-direction: column;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bh-blue);
  font-weight: 800;
  font-size: 1.3rem;
}
.logo-mark { color: var(--bh-blue); display: inline-flex; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
  font-size: 0.85rem;
  height: 42px;
  border-top: 1px solid var(--bh-line);
}
.site-nav a { color: var(--bh-ink); transition: color .15s; }
.site-nav a:hover { color: var(--bh-blue); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--bh-ink); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== ヒーロー ===== */
.hero {
  padding-top: 48px;
  padding-bottom: 32px;
}
.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--bh-ink);
}
.hero-lead {
  color: var(--bh-muted);
  max-width: 880px;
  margin: 0 0 28px;
}
/* ===== メインビジュアル（新着記事スライダー：左サムネイル＋右タイトル） ===== */
.mv { padding-bottom: 8px; }
.mv-slider { position: relative; }
.mv-viewport {
  overflow: hidden;
  border-radius: var(--bh-card-radius);
  background: #fff;
  box-shadow: var(--bh-shadow);
}
.mv-track {
  display: flex;
  transition: transform .6s cubic-bezier(.22, .8, .3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .mv-track { transition: none; }
}
.mv-slide { flex: 0 0 100%; min-width: 0; }
.mv-card {
  display: grid;
  grid-template-columns: 44% 56%;
  color: inherit;
}
.mv-media { position: relative; aspect-ratio: 16/10; background: var(--bh-paper); overflow: hidden; }
.mv-media img { width: 100%; height: 100%; object-fit: cover; }
.mv-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 28px 32px;
}
/* 「画像みたいに読ませる」ための太い見出し用フォント。実テキストなので検索性・可読性は保ったまま */
.mv-title {
  margin: 0;
  font-family: 'Zen Kaku Gothic New', var(--bh-font, system-ui), sans-serif;
  font-weight: 900;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  line-height: 1.5;
  color: var(--bh-ink);
}
.mv-desc {
  margin: 0;
  color: var(--bh-muted);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mv-cta {
  margin-top: 2px;
  font-size: .85rem;
  font-weight: 800;
  color: var(--bh-blue);
}
.mv-cta::after { content: " ›"; }
.mv-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid var(--bh-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--bh-shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.mv-arrow:hover { background: #fff; }
.mv-arrow::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-top: 3px solid var(--bh-blue);
  border-right: 3px solid var(--bh-blue);
}
.mv-prev { left: -10px; }
.mv-prev::before { transform: rotate(-135deg) translate(-1px, 1px); }
.mv-next { right: -10px; }
.mv-next::before { transform: rotate(45deg) translate(-1px, 1px); }
.mv-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 4px;
}
/* ドットの並び自体もflexにしないと、各.mv-dotの display:grid（外側表示はblock）で縦に積まれてしまう */
#mvDots {
  display: flex;
  align-items: center;
}
.mv-dot {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.mv-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(16, 43, 63, .2);
  transition: transform .15s, background .15s;
}
.mv-dot[aria-current="true"]::before { background: var(--bh-blue); transform: scale(1.3); }
.mv-pause {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid var(--bh-line);
  border-radius: 50%;
  background: #fff;
  color: var(--bh-blue);
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ===== カテゴリータグ ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.02em;
}
.tag-research { background: var(--bh-cyan); }
.tag-case { background: var(--bh-sea); color: var(--bh-ink); }
.tag-product { background: var(--bh-coral); }
/* 海洋研究 */
.tag-ocean-bio { background: #0b72b9; }
.tag-ocean-env { background: #1587a8; }
.tag-coral { background: #e8607d; }
/* 環境テーマ（ecojin準拠。色はecojinの雰囲気に寄せる） */
.tag-decarbon { background: #2f8f6b; }
.tag-climate { background: #6f9a3a; }
.tag-recycle { background: #e8683c; }
.tag-foodloss { background: #b5473f; }
.tag-nature { background: #2f7fb5; color: #fff; }
.tag-biodiv { background: #8a6d3b; }
.tag-recovery { background: #6a5aa8; }
.tag-other { background: #6b7f8c; }

/* ===== カードグリッド ===== */
.section {
  padding-top: 40px;
  padding-bottom: 40px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  border-left: 6px solid var(--bh-blue);
  padding-left: 12px;
}
.section-more { font-size: 0.85rem; font-weight: 700; color: var(--bh-blue); }

/* kabumado.jp風の色帯バナー見出し */
.section-banner {
  background: var(--bh-blue);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 10px 18px;
  margin: 0 0 20px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border-radius: var(--bh-card-radius);
  box-shadow: var(--bh-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(16,43,63,.14); }
.card-media { aspect-ratio: 16/10; overflow: hidden; background: var(--bh-paper); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 0.92rem; font-weight: 700; line-height: 1.45; margin: 0; color: var(--bh-ink); flex: 1; }
.card-meta { font-size: 0.74rem; color: var(--bh-muted); display: flex; align-items: center; gap: 10px; }

/* ===== 2カラムレイアウト（メイン＋サイドバー） ===== */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 48px;
}
.page-main { min-width: 0; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-widget {
  background: #fff;
  border-radius: var(--bh-card-radius);
  box-shadow: var(--bh-shadow);
  padding: 18px;
}
.sidebar-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bh-line);
}
.sidebar-search { display: flex; gap: 8px; }
.sidebar-search input {
  flex: 1;
  border: 1px solid var(--bh-line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
}
.sidebar-search button {
  border: none;
  background: var(--bh-blue);
  color: #fff;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.9rem;
}
.sidebar-search button:hover { background: var(--bh-cyan); }

.sidebar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sidebar-list a { display: flex; align-items: center; gap: 10px; }
.sidebar-thumb {
  width: 56px; height: 42px;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bh-paper);
}
.sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-item-title {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--bh-ink);
  font-weight: 600;
}
.sidebar-list a:hover .sidebar-item-title { color: var(--bh-blue); }

.sidebar-catlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sidebar-catlist a {
  display: flex;
  justify-content: space-between;
  padding: 7px 4px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--bh-line);
}
.sidebar-catlist a:last-child { border-bottom: none; }
.sidebar-catlist a:hover { color: var(--bh-blue); }
.sidebar-catlist a span { color: var(--bh-muted); font-size: 0.78rem; }

/* ===== カテゴリー別セクション ===== */
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.category-chip {
  background: #fff;
  border: 1px solid var(--bh-line);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bh-ink);
}
.category-chip:hover { border-color: var(--bh-blue); color: var(--bh-blue); }
/* スマホの横スクロール専用ヒント。デスクトップでは折り返し表示のため不要＝常に非表示にしておき、640px以下でのみ表示する */
.category-strip-hint { display: none; }

/* ===== パンくずリスト ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--bh-muted);
}
.breadcrumb a { color: var(--bh-muted); }
.breadcrumb a:hover { color: var(--bh-blue); }
.breadcrumb-sep { color: var(--bh-line); }
.breadcrumb-current {
  color: var(--bh-ink);
  font-weight: 600;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 記事詳細 ===== */
.article-header { padding-top: 24px; padding-bottom: 24px; }
.article-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.5;
  margin: 14px 0;
}
.article-meta {
  color: var(--bh-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.article-meta .article-date-updated {
  color: var(--bh-blue);
  font-weight: 600;
}
.article-eyecatch {
  border-radius: var(--bh-card-radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--bh-shadow);
}
.article-body {
  font-size: 1rem;
}
.article-body p.lead {
  font-size: 1.1rem;
  color: var(--bh-ink);
  font-weight: 500;
}
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 2.4em;
  padding-left: 12px;
  border-left: 6px solid var(--bh-blue);
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.8em;
  color: var(--bh-blue);
}
.article-body img {
  border-radius: 12px;
  margin: 1.2em auto;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5em 0;
}
.article-body th, .article-body td {
  border: 1px solid var(--bh-line);
  padding: 8px 12px;
  text-align: left;
}
.article-body th { background: var(--bh-paper); }
.article-body blockquote {
  border-left: 4px solid var(--bh-sea);
  background: var(--bh-paper);
  margin: 1.5em 0;
  padding: 12px 20px;
  border-radius: 0 12px 12px 0;
}
.article-body .toc {
  background: var(--bh-paper);
  border: 1px solid var(--bh-line);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 2em 0;
}
.article-body .toc-title { font-weight: 800; cursor: pointer; }
.article-body .toc a { color: var(--bh-blue); }
.article-body .toc ol { padding-left: 1.2em; }

/* ===== ページネーション ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  padding-top: 24px;
}
.page-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bh-blue);
  padding: 8px 16px;
  border: 1px solid var(--bh-line);
  border-radius: 999px;
  background: #fff;
}
.page-link:hover { border-color: var(--bh-blue); background: var(--bh-paper); }
.page-link.is-disabled { color: var(--bh-line); pointer-events: none; }
.page-current { font-size: 0.85rem; color: var(--bh-muted); font-weight: 700; }

.related {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--bh-line);
}

/* ===== フッター ===== */
.site-footer {
  margin-top: 60px;
  background: var(--bh-ink);
  color: #dce8ef;
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 20px;
  flex-wrap: wrap;
}
.footer-brand .logo-text { font-size: 1.2rem; font-weight: 800; color: #fff; }
.footer-brand p { color: #9db2c0; max-width: 320px; font-size: 0.88rem; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links-group h3 { font-size: 0.85rem; color: #9db2c0; margin-bottom: 10px; }
.footer-links-group a { display: block; padding: 4px 0; font-size: 0.9rem; color: #dce8ef; }
.footer-links-group a:hover { color: var(--bh-coral); }
.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: #8298a7;
}

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .mv-card { grid-template-columns: 1fr; }
  .mv-media { aspect-ratio: 16/9; }
  .mv-body { padding: 20px 22px; }
  .mv-arrow { display: none; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: flex-start; } /* 短いウィジェットを隣の高さに引き伸ばさない */
  .sidebar-widget { flex: 1 1 260px; }
}

@media (max-width: 640px) {
  .site-nav {
    position: fixed;
    inset: 60px 0 0 0;
    height: auto;
    border-top: none;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 18px;
    transform: translateX(100%);
    transition: transform .2s ease;
  }
  .site-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .mv-body { padding: 18px; }
  .mv-title { font-size: 1.1rem; }
  /* カテゴリーチップが12種あり縦方向を圧迫するため、スマホでは横スクロールの1行に変更
     （全カテゴリーへの導線はヘッダーナビ・フッターにもあるため、トップは一覧性優先で十分） */
  .category-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 横に続きがあることが伝わるよう、右端を透過させて「まだ続きがある」感を出す */
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
  }
  .category-strip::-webkit-scrollbar { display: none; }
  .category-chip { flex: 0 0 auto; white-space: nowrap; }
  /* 右端の透過だけでは気づきにくいとのフィードバックのため、明示的な文言でもスクロール可能であることを伝える */
  .category-strip-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--bh-muted);
    margin: -4px 0 20px;
  }
  .category-strip-hint::before {
    content: "";
    width: 14px;
    height: 14px;
    background: var(--bh-blue);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat;
    animation: category-hint-slide 1.4s ease-in-out infinite;
  }
  @keyframes category-hint-slide {
    0%, 100% { transform: translateX(0); opacity: .6; }
    50% { transform: translateX(4px); opacity: 1; }
  }
  .site-footer-inner { flex-direction: column; }
  /* align-itemsは900px以下の横並び用に flex-start へ変更済みなので、縦積みでは stretch に戻す
     （戻さないと各ウィジェットが内容幅のまま縮み、横幅がバラバラになる） */
  .sidebar { flex-direction: column; align-items: stretch; }
  /* 縦並びではflex-basis:260pxが「高さ」に化けて検索ウィジェットが空白で伸びるため自然な高さに戻す */
  .sidebar-widget { flex: 0 0 auto; }
}

/* ============================================================
   記事コンポーネント（2026-07 新設。新規AI記事で使用する装飾部品）
   ブランド変数（--bh-*）を使い、既存の .article-body スタイルと調和させる
   ============================================================ */

/* パンくずリスト */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--bh-muted);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb a { color: var(--bh-blue); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--bh-line); }
.breadcrumb-current {
  color: var(--bh-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60vw;
}

/* リード文（導入の強調段落） */
.article-body .lead-text {
  font-size: 1.12rem;
  line-height: 1.9;
  font-weight: 500;
  color: var(--bh-ink);
  background: linear-gradient(0deg, var(--bh-paper), var(--bh-paper));
  border-left: 5px solid var(--bh-cyan);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 0 0 1.6em;
}

/* 統計ハイライト（導入直後の数値3枚） */
.article-body .stats-highlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 1.8em 0;
}
.article-body .stat-item {
  background: #fff;
  border: 1px solid var(--bh-line);
  border-top: 4px solid var(--bh-blue);
  border-radius: 14px;
  padding: 20px 12px;
  text-align: center;
  box-shadow: var(--bh-shadow);
}
.article-body .stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--bh-blue);
  line-height: 1.1;
}
.article-body .stat-label {
  font-size: 0.8rem;
  color: var(--bh-muted);
  margin-top: 6px;
}

/* 「この記事で学べること」など汎用ボックス */
.article-body .info-box,
.article-body .point-box,
.article-body .warning-box,
.article-body .action-box {
  border-radius: 14px;
  padding: 20px 24px;
  margin: 1.8em 0;
  border: 1px solid var(--bh-line);
}
.article-body .info-box {
  background: var(--bh-paper);
  border-left: 5px solid var(--bh-blue);
}
.article-body .point-box {
  background: rgba(24, 174, 202, 0.07);
  border-left: 5px solid var(--bh-cyan);
}
.article-body .warning-box {
  background: rgba(255, 140, 102, 0.09);
  border-left: 5px solid var(--bh-coral);
}
.article-body .action-box {
  background: rgba(120, 217, 179, 0.12);
  border-left: 5px solid var(--bh-sea);
}
.article-body .box-title {
  font-weight: 800;
  font-size: 1.02rem;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-body .info-box .box-title { color: var(--bh-blue); }
.article-body .point-box .box-title { color: #0f8ba3; }
.article-body .warning-box .box-title { color: #d9663f; }
.article-body .action-box .box-title { color: #2fa07a; }
.article-body .info-box ul,
.article-body .point-box ul,
.article-body .action-box ul { margin: 0; padding-left: 1.2em; }
.article-body .info-box li,
.article-body .point-box li,
.article-body .action-box li { margin: 6px 0; }

/* 目次 */
.article-body .lab-toc {
  background: var(--bh-paper);
  border: 1px solid var(--bh-line);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 2em 0;
}
.article-body .lab-toc-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--bh-ink);
}
.article-body .lab-toc ol { margin: 0; padding-left: 1.3em; }
.article-body .lab-toc > ol { counter-reset: toc; list-style: none; padding-left: 0; }
.article-body .lab-toc > ol > li {
  counter-increment: toc;
  margin: 7px 0;
  padding-left: 2em;
  position: relative;
}
.article-body .lab-toc > ol > li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 1px;
  width: 1.5em;
  height: 1.5em;
  background: var(--bh-blue);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-body .lab-toc a { color: var(--bh-ink); }
.article-body .lab-toc a:hover { color: var(--bh-blue); text-decoration: underline; }
.article-body .lab-toc .toc-sub { list-style: disc; padding-left: 1.3em; margin: 4px 0; }
.article-body .lab-toc .toc-sub a { color: var(--bh-muted); font-size: 0.92em; }

/* 図版（画像＋キャプション） */
.article-body figure { margin: 1.6em 0; }
.article-body figure img { display: block; width: 100%; height: auto; }
.article-body figcaption {
  font-size: 0.82rem;
  color: var(--bh-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.6;
}

/* 見出し内のアンカー番号 */
.article-body h2 { scroll-margin-top: 80px; }
.article-body h3 { scroll-margin-top: 80px; }

/* 参考文献 */
.article-body .reference-list {
  background: var(--bh-paper);
  border: 1px solid var(--bh-line);
  border-radius: 14px;
  padding: 18px 24px;
  margin: 1.5em 0;
}
.article-body .reference-list ol { margin: 0; padding-left: 1.3em; }
.article-body .reference-list li { margin: 8px 0; font-size: 0.9rem; }
.article-body .reference-note { font-size: 0.78rem; color: var(--bh-muted); margin-top: 12px; }

/* FAQ（アコーディオン） */
.article-faq { margin-top: 48px; }
.faq-item {
  border: 1px solid var(--bh-line);
  border-radius: 12px;
  margin: 10px 0;
  padding: 4px 18px;
  background: #fff;
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  padding: 12px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 10px;
  font-size: 1.3rem;
  color: var(--bh-blue);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 14px; color: var(--bh-muted); line-height: 1.8; }

/* まとめボックス（記事末尾の要点整理） */
.article-body .summary-box {
  background: linear-gradient(135deg, rgba(11,114,185,0.06), rgba(24,174,202,0.06));
  border: 1px solid var(--bh-line);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 2em 0;
}
.article-body .summary-box .box-title { font-size: 1.15rem; color: var(--bh-blue); }

@media (max-width: 640px) {
  .article-body .stats-highlight { grid-template-columns: 1fr; gap: 10px; }
  .article-body .stat-item { display: flex; align-items: baseline; gap: 12px; justify-content: center; }
  .article-body .stat-number { font-size: 1.5rem; }
}

/* ============================================================
   外部リンクカード（紹介リンク用テンプレート）
   企業・ブランド・商品・出典を本文で紹介するときに使う共通部品。
   サムネイル（OGP画像）＋タイトル＋説明＋ドメインをボーダー枠で囲い、
   別タブ（target="_blank"）で開く。サムネ画像が無い出典は
   .link-card--compact（サムネ無し）でコンパクト表示する。
   ・HTMLテンプレは _tools/lab_build_article.py の link_card() が生成
   ・記事執筆手順は _docs/subdomains/lab/記事執筆手順.md を参照
   ============================================================ */
.article-body .link-card,
.article-body .link-card:visited {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 22px 0;
  border: 1px solid var(--bh-line);
  border-radius: var(--bh-card-radius);
  overflow: hidden;
  background: var(--bh-paper);
  box-shadow: var(--bh-shadow);
  text-decoration: none;
  color: var(--bh-ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.article-body .link-card:hover {
  transform: translateY(-2px);
  border-color: var(--bh-blue);
  box-shadow: 0 8px 22px rgba(11, 114, 185, 0.18);
}
.article-body .link-card-thumb {
  flex: 0 0 34%;
  max-width: 200px;
  min-height: 116px;
  background-color: #e8eef3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.article-body .link-card-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.article-body .link-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--bh-blue);
}
.article-body .link-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--bh-blue);
  text-decoration: underline;
  text-decoration-color: rgba(11, 114, 185, 0.35);
  text-underline-offset: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-body .link-card:hover .link-card-title {
  text-decoration-color: var(--bh-blue);
}
/* 右端の「開く」矢印＝クリックできることを一目で示す */
.article-body .link-card-arrow {
  flex: 0 0 40px;
  align-self: center;
  position: relative;
  margin-right: 6px;
}
.article-body .link-card-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-top: 2.5px solid var(--bh-blue);
  border-right: 2.5px solid var(--bh-blue);
  transform: translate(-60%, -50%) rotate(45deg);
  transition: transform .15s ease;
}
.article-body .link-card:hover .link-card-arrow::before {
  transform: translate(-30%, -50%) rotate(45deg);
}
.article-body .link-card-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--bh-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-body .link-card-domain {
  font-size: 0.78rem;
  color: var(--bh-blue);
  font-weight: 600;
  margin-top: 2px;
}
/* サムネ無し（出典・官公庁ページなどOGP画像が無いリンク用） */
.article-body .link-card--compact .link-card-thumb { display: none; }
.article-body .link-card--compact .link-card-body { padding: 12px 16px; }

/* 複数カードを並べる一覧（参考文献など） */
.article-body .link-card-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.article-body .link-card-list .link-card { margin: 0; }

@media (max-width: 640px) {
  .article-body .link-card-thumb { flex-basis: 38%; min-height: 96px; }
  .article-body .link-card-title { font-size: 0.95rem; }
  .article-body .link-card-desc { -webkit-line-clamp: 3; }
}

/* ============================================================
   追従サイドバー（記事ページ限定・PCのみ）
   通常ウィジェットの後ろに置いた .sidebar-sticky が、スクロールに
   合わせて追従する。関連イベント（未来）＋関連記事をサムネ付きで表示。
   スマホ（1カラム）では追従せず通常フロー表示。
   ============================================================ */
.sidebar-sticky {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 900px) {
  /* サイドバー列を行の高さいっぱいに伸ばし、その中で下部ブロックをstickyに */
  .page-layout > .sidebar { align-self: stretch; }
  .sidebar-sticky {
    position: sticky;
    top: 112px; /* stickyなヘッダー（約102px）の下に収める */
  }
}

/* 関連イベントカード（サムネイル付き） */
.sticky-events .sticky-loading,
.sticky-events .sticky-empty {
  color: var(--bh-muted);
  font-size: 0.85rem;
  margin: 6px 0 0;
}
.sticky-events .ev-card {
  display: flex;
  gap: 10px;
  align-items: stretch;
  text-decoration: none;
  color: var(--bh-ink);
  background: #fff;
  border: 1px solid var(--bh-line);
  border-radius: 12px;
  padding: 8px;
  margin-top: 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sticky-events .ev-card:hover {
  transform: translateY(-2px);
  border-color: var(--bh-blue);
  box-shadow: 0 6px 16px rgba(11, 114, 185, 0.15);
}
.sticky-events .ev-thumb {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  background-color: #e8eef3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.sticky-events .ev-thumb--none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  background-image: linear-gradient(135deg, var(--bh-blue), var(--bh-cyan));
}
.sticky-events .ev-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.sticky-events .ev-date {
  align-self: flex-start;
  background: var(--bh-blue);
  color: #fff;
  border-radius: 6px;
  padding: 1px 9px;
  font-size: 0.7rem;
  font-weight: 700;
}
.sticky-events .ev-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--bh-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sticky-events .ev-place {
  font-size: 0.72rem;
  color: var(--bh-muted);
}
.sticky-events .sticky-more,
.sidebar-sticky .sticky-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--bh-blue);
  font-weight: 700;
  font-size: 0.82rem;
}
.sticky-events .sticky-more:hover { text-decoration: underline; }

/* ============================================================
   アースセッション（記事AIチャット導線）フローティングボタン＋会員登録ゲート
   Phase-1: 無料会員登録（LINEログイン）へ誘導するゲートUI。
   ============================================================ */
.es-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bh-blue), var(--bh-cyan));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 114, 185, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.es-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(11, 114, 185, 0.45); }
.es-fab-ic { font-size: 1.15rem; }

.es-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.es-modal[hidden] { display: none; }
.es-modal-bg { position: absolute; inset: 0; background: rgba(16, 43, 63, 0.55); backdrop-filter: blur(2px); }
.es-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 60px rgba(16, 43, 63, 0.3);
  animation: esPop .18s ease;
}
@keyframes esPop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.es-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: var(--bh-paper); color: var(--bh-muted);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.es-close:hover { background: #e8eef3; color: var(--bh-ink); }
.es-badge {
  display: inline-block;
  background: rgba(11, 114, 185, 0.1);
  color: var(--bh-blue);
  font-weight: 800; font-size: 0.75rem;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.es-head h3 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 800; color: var(--bh-ink); line-height: 1.45; }
.es-sub { margin: 0 0 6px; font-size: 0.86rem; color: var(--bh-blue); font-weight: 700; }
.es-lead { margin: 0 0 16px; font-size: 0.9rem; color: var(--bh-muted); line-height: 1.7; }
.es-benefits { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.es-benefits li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; color: var(--bh-ink); }
.es-benefits li span { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--bh-paper); border-radius: 8px; }
.es-cta {
  display: block; text-align: center;
  background: #06c755; /* LINEグリーン */
  color: #fff; font-weight: 800; font-size: 1rem;
  padding: 14px; border-radius: 12px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(6, 199, 85, 0.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.es-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(6, 199, 85, 0.4); }
.es-note { margin: 12px 0 0; font-size: 0.75rem; color: var(--bh-muted); text-align: center; }

@media (max-width: 640px) {
  .es-fab .es-fab-tx { display: none; } /* スマホはアイコンのみの丸ボタン */
  .es-fab { padding: 14px; }
  .es-fab-ic { font-size: 1.35rem; }
}
