/* BTB Workout Log 筋肥大コラム 共通スタイル */
:root {
  --accent: #5b7cfa;
  --accent-dark: #4356c0;
  --ink: #0b1020;
  --ink-soft: #47506b;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f1f3fb;
  --border: #e2e6f2;
  --protein: #e5484d;
  --fat: #f5a524;
  --carb: #3e86f5;
  --reading-width: 760px;
  --shell-width: 1320px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 1020;
}
.site-header .inner {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand .logo { font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.brand .logo span { color: var(--accent-dark); }
.brand .tag { font-size: 12px; color: var(--muted); }
.site-header nav a {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav a:hover { text-decoration: underline; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.menu-trigger {
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.menu-trigger:hover { border-color: var(--accent); }
.menu-trigger:focus-visible {
  outline: 3px solid rgba(91, 124, 250, .3);
  outline-offset: 2px;
}
.menu-trigger-icon {
  display: flex;
  width: 16px;
  flex-direction: column;
  gap: 3px;
}
.menu-trigger-icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* レイアウト */
.column-layout {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.column-content { min-width: 0; }
.column-content-inner {
  max-width: var(--reading-width);
  margin: 0 auto;
}
.column-sidebar { min-width: 0; }
.sidebar-sticky {
  position: sticky;
  top: 24px;
}
.column-sidebar h2,
.column-mobile-menu h2:not(.offcanvas-title) {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}
.sidebar-navigation,
.sidebar-search,
.sidebar-featured,
.sidebar-tags {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.sidebar-search,
.sidebar-featured,
.sidebar-tags { margin-bottom: 16px; }
.sidebar-navigation ul,
.sidebar-tags ul,
.sidebar-featured ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-navigation li + li { margin-top: 3px; }
.sidebar-navigation a {
  display: block;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.sidebar-navigation a:hover {
  background: var(--bg-soft);
  color: var(--accent-dark);
}
.sidebar-navigation .all-articles-link {
  margin-bottom: 5px;
  background: rgba(91, 124, 250, .09);
  color: var(--accent-dark);
}
.column-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.column-search .form-control {
  min-width: 0;
  border-color: var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 9px;
}
.column-search .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 124, 250, .15);
}
.column-search-button {
  border: 0;
  border-radius: 8px;
  background: var(--accent-dark);
  color: #fff;
  padding: 7px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}
.column-search-button:hover { background: var(--accent); }
.sidebar-featured li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.sidebar-featured li + li { margin-top: 11px; }
.featured-rank {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.sidebar-featured a {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
}
.sidebar-featured a:hover { color: var(--accent-dark); }
.sidebar-tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar-tags a {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}
.sidebar-tags li a {
  display: inline-flex;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
}
.sidebar-tags li a:hover { border-color: var(--accent); }
.sidebar-tags li span { color: var(--muted); font-size: 9px; }
.sidebar-tags .all-tags-link {
  display: inline-block;
  margin-top: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.column-mobile-menu { --bs-offcanvas-width: min(88vw, 360px); }
.column-mobile-menu .offcanvas-header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.column-mobile-menu .offcanvas-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}
.column-mobile-menu .offcanvas-body { padding: 18px; }
.column-mobile-menu .column-search,
.column-mobile-menu .sidebar-navigation,
.column-mobile-menu .sidebar-featured,
.column-mobile-menu .sidebar-tags { margin-bottom: 16px; }
.column-mobile-menu .sidebar-navigation { margin-top: 16px; }
.mobile-app-link {
  display: block;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.breadcrumb {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px;
}
.breadcrumb a { color: var(--accent-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* 記事 */
article .article-hero {
  display: block;
  width: 100%;
  height: auto; /* img の height 属性(675)を打ち消す。aspect-ratio が実寸を決める */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--ink);
  margin: 0 0 24px;
}
.article-visual {
  margin: 32px 0 40px;
}
.article-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: var(--ink);
}
article h1 {
  font-size: 26px;
  line-height: 1.5;
  margin: 0 0 10px;
  letter-spacing: .01em;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.article-meta .cat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 2px 12px;
  font-weight: 600;
}
.article-meta .byline {
  color: var(--ink-soft);
  font-weight: 600;
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: -12px 0 24px;
}
.article-tags li { margin: 0; }
.article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid rgba(91, 124, 250, .25);
  border-radius: 999px;
  background: rgba(91, 124, 250, .08);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.article-tag:hover {
  border-color: var(--accent);
  background: rgba(91, 124, 250, .16);
}
.article-tag:focus-visible,
.tag-directory-chip:focus-visible,
.card-tag:focus-visible,
.card-title:focus-visible,
.card-image-link:focus-visible {
  outline: 3px solid rgba(91, 124, 250, .35);
  outline-offset: 2px;
}
article .lead {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 0 0 28px;
}
article .lead p { margin: 0 0 8px; }
article .lead p:last-child { margin-bottom: 0; }
.evidence-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcff;
  padding: 14px 18px;
  margin: 0 0 28px;
}
.evidence-title {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
}
.evidence-box ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}
.cite {
  font-size: .72em;
  line-height: 0;
  vertical-align: super;
  margin-left: 2px;
}
.cite a {
  color: var(--accent-dark);
  text-decoration: none;
}
.cite a:hover { text-decoration: underline; }
article h2 {
  font-size: 21px;
  line-height: 1.5;
  margin: 48px 0 16px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 10px;
}
article h3 {
  font-size: 17px;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}
article p { margin: 0 0 16px; }
article ul, article ol { padding-left: 24px; margin: 0 0 16px; }
article li { margin-bottom: 6px; }
article strong { color: var(--accent-dark); }
article .note {
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 16px;
}
.references {
  font-size: 13px;
  color: var(--ink-soft);
}
.references li { margin-bottom: 8px; }
.references a {
  color: var(--accent-dark);
  overflow-wrap: anywhere;
}

/* 目次 */
.toc {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 32px;
  background: var(--bg);
}
.toc .toc-title { font-weight: 700; font-size: 14px; margin: 0 0 8px; color: var(--ink-soft); }
.toc ol { margin: 0; padding-left: 22px; font-size: 14px; }
.toc a { color: var(--accent-dark); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* テーブル */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
}
th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; margin: 0 0 20px; }
.table-scroll table { margin: 0; min-width: 560px; }
.paper-facts {
  overflow-x: auto;
  margin: 0 0 28px;
}
.paper-facts table { margin: 0; }
.paper-facts th { width: 8em; }
.paper-facts a {
  color: var(--accent-dark);
  overflow-wrap: anywhere;
}

/* FAQ */
.faq dt {
  font-weight: 700;
  margin: 20px 0 6px;
  padding-left: 28px;
  position: relative;
}
.faq dt::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq dd { margin: 0 0 16px; padding-left: 28px; }

/* PFCチップ */
.pfc-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.pfc-chip.p { background: var(--protein); }
.pfc-chip.f { background: var(--fat); }
.pfc-chip.c { background: var(--carb); }

/* CTA */
.cta {
  margin: 48px 0 0;
  padding: 28px 24px;
  border-radius: 16px;
  background: #0b1020;
  color: #eef2ff;
  text-align: center;
}
.cta h2 {
  all: unset;
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}
.cta p { color: #aab4d4; font-size: 14px; margin: 0 0 18px; }
.cta a {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 32px;
}
.cta a:hover { opacity: .9; }

/* 関連記事 */
.related {
  margin: 40px 0 0;
}
.related h2 {
  all: unset;
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--ink);
}
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: 8px; }
.related a { color: var(--accent-dark); text-decoration: none; font-size: 14px; }
.related a:hover { text-decoration: underline; }

/* コラム一覧（ハブページ） */
.hub-hero { margin: 8px 0 32px; }
.hub-hero h1 { font-size: 26px; line-height: 1.5; margin: 0 0 12px; }
.hub-hero p { color: var(--ink-soft); margin: 0; }
.search-status {
  margin: -12px 0 24px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 124, 250, .25);
  border-radius: 10px;
  background: rgba(91, 124, 250, .07);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.search-status a {
  margin-left: 8px;
  color: var(--accent-dark);
  font-size: 12px;
}
.tag-directory {
  margin: 0 0 40px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  scroll-margin-top: 20px;
}
.tag-directory h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.tag-directory ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tag-directory li { margin: 0; }
.tag-directory-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.tag-directory-chip:hover {
  border-color: var(--accent);
  background: rgba(91, 124, 250, .08);
}
.tag-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}
.hub-section {
  margin: 36px 0 0;
  scroll-margin-top: 20px;
}
.hub-section h2 {
  font-size: 18px;
  margin: 0 0 4px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.hub-section .hub-desc { font-size: 13px; color: var(--muted); margin: 0 0 14px; padding-left: 16px; }
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.card-list .card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card-list .card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(91, 124, 250, .16);
  transform: translateY(-2px);
}
.card-image-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-thumb {
  display: block;
  width: 100%;
  height: auto; /* img の height 属性(675)を打ち消す。aspect-ratio が実寸を決める */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink);
}
.card-body {
  flex: 1;
  min-width: 0;
  padding: 13px 16px 15px;
}
.card-list .card-title {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
}
.card-list .card-title:hover { color: var(--accent-dark); }
.card-list .card-desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 9px;
}
.card-tag {
  display: inline-flex;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.card-tag:hover { text-decoration: underline; }

/* タグ別記事一覧 */
.tag-archive-header {
  margin: 8px 0 28px;
}
.tag-archive-header h1 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.5;
}
.tag-archive-header p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}
.tag-archive-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tag-archive-list { margin-bottom: 40px; }

/* フッター */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.site-footer .inner {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 24px 20px 32px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer p { margin: 0 0 8px; }

@media (max-width: 991.98px) {
  .column-layout { padding: 24px 20px 56px; }
}

/* スマホ最適化 */
@media (max-width: 560px) {
  /* ヘッダー: 折返し/見切れを防ぐためタグライン省略 + 文字を詰める */
  .site-header .inner { padding: 12px 16px; gap: 10px; }
  .brand .tag { display: none; }
  .brand .logo { font-size: 15px; }
  .menu-trigger { min-height: 36px; padding: 6px 9px; }

  /* レイアウト余白を詰める */
  .column-layout { padding: 20px 16px 48px; }

  /* ハブ一覧: 大きな縦カード → コンパクトな横並び行 */
  .card-list { grid-template-columns: 1fr; gap: 10px; }
  .card-list .card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px;
  }
  .card-list .card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
  }
  .card-image-link {
    flex: 0 0 118px;
    align-self: center;
  }
  .card-thumb {
    flex: 0 0 118px;
    width: 118px;
    height: 66px;           /* 明示高さで flex の stretch を無効化（16:9） */
    align-self: center;
    object-fit: cover;
    border-radius: 8px;
  }
  .card-body {
    min-width: 0;
    padding: 0;
  }
  .card-list .card-title {
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-list .card-desc {
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-tags { margin-top: 4px; }
  .card-tag:nth-child(n+3) { display: none; }

  .tag-directory { padding: 16px; margin-bottom: 32px; }
  .tag-directory ul { gap: 6px; }
  .tag-directory-chip { min-height: 30px; padding: 3px 9px; }

  /* 記事ヒーロー: 余白と角丸を控えめに */
  article .article-hero { border-radius: 10px; margin: 0 0 18px; }
  .article-visual { margin: 24px 0 32px; }
  .article-visual img { border-radius: 8px; }
}

@media (max-width: 480px) {
  article h1, .hub-hero h1, .tag-archive-header h1 { font-size: 22px; }
  article h2 { font-size: 18px; }
}
