/* ===== 30代チビ男最強伝説 共通CSS ===== */
/* build.py により自動生成 — 直接編集しないこと */


    /* ===== 著者カード ===== */
    .author-card {
      background: var(--white, #fff); border: 1px solid var(--border, #b8dff0);
      border-radius: 12px; padding: 20px; margin-top: 32px;
      display: flex; gap: 16px; align-items: flex-start;
    }
    .author-card .author-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--accent, #3a9dc4); }
    .author-card .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .author-card h4 { font-size: .9rem; font-weight: 900; color: var(--ink, #1e3a4a); margin-bottom: 4px; }
    .author-card .role { font-size: .72rem; color: var(--accent, #3a9dc4); font-weight: 700; margin-bottom: 8px; }
    .author-card p { font-size: .8rem; color: var(--ink, #1e3a4a); line-height: 1.75; margin: 0 0 8px; }
    @media (max-width: 560px) { .author-card { flex-direction: column; } }

    /* ===== パンくずリスト ===== */
    .breadcrumb { background: var(--bg, #fff); border-bottom: 1px solid var(--border, #b8dff0); padding: 8px 20px; }
    .breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 0; font-size: .75rem; }
    .breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--muted, #6a9ab0); }
    .breadcrumb a { color: var(--accent, #3a9dc4); text-decoration: none; }
    .breadcrumb a:hover { text-decoration: underline; }
    .breadcrumb [aria-current="page"] { color: var(--muted, #6a9ab0); }

    /* ===== 著者SNSリンク ===== */
    .author-sns { margin-top: 10px; }
    .sns-x-link {
      display: inline-flex; align-items: center; gap: 6px;
      color: #fff; background: #000; border-radius: 999px;
      padding: 5px 14px; font-size: .8rem; font-weight: 700;
      text-decoration: none; transition: opacity .2s;
    }
    .sns-x-link:hover { opacity: .75; }

    /* ===== 統一サイドバー レイアウト ===== */
    .article-layout {
      max-width: 1080px; margin: 0 auto; padding: 0 24px 48px;
      display: grid; grid-template-columns: 1fr 284px; gap: 32px;
      align-items: start;
    }
    .article-layout .article-wrap { max-width: none; }
    .article-layout .article-main { min-width: 0; }
    @media (max-width: 860px) {
      .article-layout { grid-template-columns: 1fr; padding: 0 16px 40px; }
      .article-layout > aside.sidebar { display: none; }
    }
    .page-wrap { grid-template-columns: 1fr 284px !important; gap: 32px !important; }
    @media (max-width: 860px) {
      .page-wrap { grid-template-columns: 1fr !important; }
      .page-wrap > aside.sidebar { display: none !important; }
    }
    /* ===== サイドバー共通スタイル ===== */
    .sidebar { display: flex; flex-direction: column; gap: 20px; }
    .widget {
      background: var(--white, #fff); border-radius: 12px;
      border: 1px solid var(--border, #b8dff0); overflow: hidden;
      box-shadow: 0 1px 4px rgba(0,0,0,.06);
    }
    .widget-head {
      padding: 11px 16px; font-size: .72rem; font-weight: 800;
      color: var(--muted, #6a9ab0); letter-spacing: .12em; text-transform: uppercase;
      border-bottom: 1px solid var(--border, #b8dff0); background: var(--bg, #f8f9fa);
    }
    /* profile */
    .widget-profile { text-align: center; padding: 24px 18px 20px; }
    .profile-avatar {
      width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px;
      overflow: hidden; border: 2px solid var(--border, #b8dff0);
      box-shadow: 0 2px 10px rgba(0,0,0,.08);
    }
    .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .widget-profile h3 { font-size: .97rem; font-weight: 800; margin-bottom: 4px; color: var(--ink, #1e3a4a); }
    .profile-role {
      font-size: .68rem; font-weight: 700; color: var(--accent, #3a9dc4);
      background: var(--accent-bg, #e8f6fc); padding: 3px 10px; border-radius: 999px;
      display: inline-block; margin-bottom: 10px; border: 1px solid rgba(58,157,196,.2);
    }
    .widget-profile p { font-size: .78rem; color: var(--ink2, #3a5a70); line-height: 1.78; text-align: left; margin: 0; }
    .profile-sns { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
    .profile-x-invite { font-size: .72rem; color: var(--muted, #6a9ab0); text-align: center; margin-top: 10px; }
    .profile-x-invite a { color: var(--accent, #3a9dc4); font-weight: 700; text-decoration: none; }
    .profile-x-invite a:hover { text-decoration: underline; }
    .profile-sns-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 40px; height: 40px; border-radius: 50%;
      background: #000; color: #fff; transition: opacity .2s; text-decoration: none;
    }
    .profile-sns-btn:hover { opacity: .7; }
    .profile-sns-btn svg { width: 18px; height: 18px; fill: #fff; }
    /* categories */
    .cat-list { list-style: none; padding: 0; margin: 0; }
    .cat-list li { border-bottom: 1px solid var(--border, #b8dff0); }
    .cat-list li:last-child { border-bottom: none; }
    .cat-list li a {
      display: flex; align-items: center; justify-content: space-between;
      padding: 11px 16px; font-size: .83rem; color: var(--ink2, #3a5a70);
      text-decoration: none; transition: color .15s, background .15s;
    }
    .cat-list li a:hover { color: var(--accent, #3a9dc4); background: var(--accent-bg, #e8f6fc); }
    .cat-count {
      font-size: .68rem; color: var(--muted, #6a9ab0); background: var(--bg, #f8f9fa);
      padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border, #b8dff0);
    }
    /* archive */
    .archive-list { list-style: none; padding: 0; margin: 0; }
    .archive-list li { border-bottom: 1px solid var(--border, #b8dff0); }
    .archive-list li:last-child { border-bottom: none; }
    .archive-list li a {
      display: flex; align-items: center; justify-content: space-between;
      padding: 11px 16px; font-size: .82rem; color: var(--ink2, #3a5a70);
      text-decoration: none; transition: background .15s, color .15s;
    }
    .archive-list li a::before { content: "›"; margin-right: 8px; color: var(--accent, #3a9dc4); font-size: 1.1rem; font-weight: 700; }
    .archive-list li a:hover { background: var(--accent-bg, #e8f6fc); color: var(--accent, #3a9dc4); }
    .archive-count { font-size: .75rem; color: var(--muted, #4a7a96); }
    /* new posts */
    .new-posts { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 0; }
    .new-post { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border, #b8dff0); }
    .new-post:last-child { border-bottom: none; }
    .new-post-thumb { flex-shrink: 0; width: 80px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--accent-bg, #e8f6fc); }
    .new-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .new-post-info { flex: 1; min-width: 0; }
    .new-post-title { font-size: .78rem; font-weight: 700; line-height: 1.55; color: var(--ink, #1e3a4a); margin-bottom: 4px; }
    .new-post-title a { color: var(--ink, #1e3a4a); text-decoration: none; }
    .new-post-title a:hover { color: var(--accent, #3a9dc4); }
    .new-post-cat { font-size: .66rem; color: var(--muted, #6a9ab0); display: flex; align-items: center; gap: 3px; }
    /* search */
    .widget-search { padding: 14px; }
    .search-form { display: flex; gap: 6px; }
    .search-input {
      flex: 1; padding: 9px 12px; border: 1px solid var(--border, #b8dff0);
      border-radius: 8px; font-size: .83rem; outline: none;
      color: var(--ink, #1e3a4a); background: var(--white, #fff); transition: border-color .15s;
    }
    .search-input:focus { border-color: var(--accent, #3a9dc4); }
    .search-btn {
      padding: 9px 14px; background: var(--ink, #1e3a4a); color: #fff;
      border: none; border-radius: 8px; cursor: pointer; font-size: .82rem;
      font-weight: 700; transition: background .15s;
    }
    .search-btn:hover { background: var(--accent, #3a9dc4); }

    /* ===== 色統一オーバーライド（水色基調） ===== */
    :root {
      --bg:         #ffffff;
      --white:      #ffffff;
      --card-bg:    #ffffff;
      --dark:       #1e3a4a;
      --dark2:      #2a5a70;
      --dark3:      #3a7a90;
      --gold:       #3a9dc4;
      --gold-light: #7dd3ee;
      --gold-bg:    #e8f6fc;
      --text:       #1e3a4a;
      --ink:        #1e3a4a;
      --ink2:       #3a5a70;
      --muted:      #4a7a96;
      --border:     #b8dff0;
      --accent:     #3a9dc4;
      --accent-d:   #2a7a9b;
      --accent-l:   #7dd3ee;
      --accent-bg:  #e8f6fc;
    }
    /* ヘッダー：白（トップ画面と統一） */
    header {
      background: #ffffff !important;
      border-bottom: 1px solid #b8dff0 !important;
      box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
    }
    .logo { color: #1e3a4a !important; }
    .logo em, .logo strong { color: #3a9dc4 !important; }
    .logo span { color: #1e3a4a !important; }
    .back-link, .nav-back { color: #4a7a96 !important; }
    .back-link:hover, .nav-back:hover { color: #3a9dc4 !important; }
    body { background: #ffffff !important; }
    /* ヒーローセクション（.hero は記事01-02、.article-hero は記事03-08）*/
    .hero, .article-hero {
      background: linear-gradient(160deg, #1e3a4a 0%, #2a5a70 100%) !important;
      border-bottom: 1px solid #b8dff0 !important;
    }
    .hero .hero-title, .hero .article-title,
    .article-hero .article-title { color: #ffffff !important; }
    .hero .hero-title .hl, .hero .article-title .hl,
    .article-hero .article-title .hl,
    .article-hero .article-title em { color: #7dd3ee !important; }
    .hero .hero-meta, .hero .hero-meta *,
    .article-hero .article-meta,
    .article-hero .article-meta * { color: rgba(255,255,255,0.75) !important; }
    /* カテゴリバッジ：水色に統一 */
    .article-category, .hero-badge, .category-badge {
      background: #3a9dc4 !important;
      color: #ffffff !important;
    }
    /* ===== 目次（TOC） ===== */
    .toc {
      background: var(--accent-bg, #e8f6fc);
      border: 1px solid var(--border, #b8dff0);
      border-radius: 12px; padding: 20px 24px; margin: 32px 0;
    }
    .toc-head {
      font-size: .88rem; font-weight: 800; color: var(--ink, #1e3a4a);
      margin-bottom: 12px; padding-bottom: 10px;
      border-bottom: 1px solid var(--border, #b8dff0);
    }
    .toc-list { margin: 0; padding-left: 20px; }
    .toc-list li { margin: 6px 0; font-size: .85rem; line-height: 1.6; }
    .toc-list a { color: var(--accent, #3a9dc4); text-decoration: none; }
    .toc-list a:hover { text-decoration: underline; }

    /* 関連記事セクション */
    .related-articles {
      margin: 48px 0 0; padding-top: 32px; border-top: 2px solid var(--border);
    }
    .related-articles h3 {
      font-size: 1rem; font-weight: 800; color: var(--ink);
      margin-bottom: 20px; padding-left: 12px;
      border-left: 4px solid var(--accent);
    }
    .related-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    }
    @media (max-width: 600px) {
      .related-grid { grid-template-columns: 1fr; }
    }
    .related-card {
      display: block; border-radius: 10px; overflow: hidden;
      border: 1px solid var(--border); text-decoration: none; color: var(--ink);
      transition: box-shadow .2s, transform .2s;
    }
    .related-card:hover { box-shadow: 0 4px 16px rgba(58,157,196,.22); transform: translateY(-2px); }
    .related-thumb { aspect-ratio: 16/9; overflow: hidden; }
    .related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .related-title {
      padding: 10px 12px 14px; font-size: .82rem; font-weight: 600;
      line-height: 1.55; color: var(--ink);
    }

/* ===== スマホ用フローティング戻るボタン ===== */
.mobile-back-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 16px;
  z-index: 9999;
  background: #1e3a4a;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: background .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-back-btn:hover { background: #3a9dc4; transform: translateY(-2px); }
@media (max-width: 768px) {
  .mobile-back-btn { display: flex; }
}

/* ===== X フォロー誘導 CTA ===== */
.x-follow-cta {
  background: #f5f7f9;
  border: 1px solid var(--border, #b8dff0);
  border-left: 4px solid #000;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 36px 0;
}
.x-follow-text { font-size: .82rem; color: var(--ink2, #3a5a70); margin: 0 0 10px; font-weight: 600; }
.x-follow-btn {
  display: inline-block;
  background: #000; color: #fff !important; border-radius: 999px;
  padding: 8px 18px; font-size: .82rem; font-weight: 700;
  text-decoration: none !important; transition: opacity .2s;
}
.x-follow-btn:hover { opacity: .75; }
