/* =========================================
   MuuN Phase — Cocoon Child カスタマイズ
   技術ブログ × スマホ重視
   ========================================= */

/* ---------- 1. ベース：読みやすい本文 ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
               "Noto Sans JP", sans-serif;
  font-feature-settings: "palt";
  letter-spacing: 0.02em;
  color: #2c2c2a;
}

.article {
  line-height: 1.85;
  font-size: 16px;
}

/* ---------- 2. 見出し（H2/H3）を技術ブログ風に ---------- */
.article h2 {
  background: none;
  border: none;
  border-left: 5px solid #378add;
  padding: 0.4em 0 0.4em 0.8em;
  margin: 2.5em 0 1em;
  font-size: 1.5em;
  font-weight: 600;
  color: #1a1a1a;
}

.article h3 {
  border-bottom: 2px solid #e6f1fb;
  border-left: none;
  padding: 0.3em 0 0.4em;
  margin: 2em 0 0.8em;
  font-size: 1.25em;
  font-weight: 600;
  color: #1a1a1a;
}

.article h4 {
  border-left: 3px solid #b5d4f4;
  padding-left: 0.6em;
  font-size: 1.1em;
  margin: 1.8em 0 0.6em;
}

/* ---------- 3. コードブロック（最重要） ---------- */
.article pre,
.article pre[class*="language-"] {
  border-radius: 8px;
  padding: 1em 1.2em;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 1.5em 0;
}

.article code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  background: #f1efe8;
  color: #c0392b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.article pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ---------- 4. 引用ブロック ---------- */
.article blockquote {
  background: #f7f7f5;
  border-left: 4px solid #888780;
  padding: 0.8em 1em;
  margin: 1.5em 0;
  border-radius: 0 6px 6px 0;
  color: #444;
}

/* ---------- 5. リンク ---------- */
.article a {
  color: #185fa5;
  text-decoration: none;
  border-bottom: 1px solid #b5d4f4;
  transition: all 0.2s;
}
.article a:hover {
  color: #0c447c;
  border-bottom-color: #378add;
}

/* ---------- 6. アイキャッチ・記事カード ---------- */
.entry-card-wrap {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.entry-card-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ---------- 7. 目次（TOC） ---------- */
.toc {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 1em 1.2em;
}
.toc-title {
  font-weight: 600;
  font-size: 0.95em;
}

/* ---------- 8. スマホ最適化 ---------- */
@media screen and (max-width: 834px) {
  .article {
    font-size: 15.5px;
    line-height: 1.8;
    padding: 0 4px;
  }

  .article h2 {
    font-size: 1.3em;
    margin: 2em 0 0.8em;
  }

  .article h3 {
    font-size: 1.15em;
  }

  /* コードブロックの横スクロール改善 */
  .article pre {
    font-size: 12.5px;
    padding: 0.8em;
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 6px;
  }

  /* サイドバーを下に回した時の余白 */
  #sidebar {
    margin-top: 2em;
  }
}

/* ---------- 9. フッター ---------- */
.footer {
  background: #2c2c2a;
}
.footer .footer-bottom {
  font-size: 0.85em;
}

/* ========== 固定ページのみ投稿日・投稿者を非表示(SEO構造化データは保持) ========== */
.page .date-tags,
.page .author-info,
.page .post-meta,
.page .post-date,
.page .post-author,
.page .entry-meta {
  display: none !important;
}

/* ========== フッターのスリム化 & 文字色修正 ========== */

/* フッター全体の余白を縮める */
.footer {
  padding: 1.2em 0 0.8em !important;
}

/* フッター内の各要素の上下マージンを詰める */
.footer .footer-bottom {
  padding: 0.5em 0 !important;
}

/* フッターのサイト名(中央のロゴエリア) */
.footer .site-name-text,
.footer .site-name {
  color: #ffffff;
  font-size: 0.9em;
  opacity: 0.7;
  margin-bottom: 0.5em;
}

/* フッターメニューのリンク */
.footer .menu-footer a,
.footer-bottom-logo + nav a,
.footer nav a,
.menu-footer a {
  color: #ffffff !important;
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.85em;
  transition: opacity 0.2s;
}
.footer .menu-footer a:hover,
.footer nav a:hover,
.menu-footer a:hover {
  opacity: 1;
}

/* 著作権表示 */
.footer .copyright,
.copyright a {
  color: #ffffff !important;
  opacity: 0.5;
  font-size: 0.8em;
}

/* フッター内のリスト区切り */
.footer nav ul li {
  color: rgba(255,255,255,0.3);
}

/* スマホ時はさらにコンパクト */
@media screen and (max-width: 834px) {
  .footer {
    padding: 1em 0 0.6em !important;
  }
  .footer .menu-footer a,
  .footer nav a {
    font-size: 0.8em;
  }
}

/* ========== フッターのサイト名を非表示(著作権表示で重複するため) ========== */
.footer .site-name-text,
.footer .site-name,
.footer-bottom-logo {
  display: none !important;
}
