@charset "UTF-8";
/*!
 * cc Article / Blog Layer
 * 投稿ページ・アーカイブ・ブログメディア運用のための読み物デザイン。
 *
 * ・色は lp-components.css のトークンを流用し、スキン側で上書きできる。
 * ・Cocoon 本体のクラス（.article / .toc / .entry-card 等）に対して
 *   「余白のリズム」と「読みやすさ」を整えるのが主目的。
 * ・スキンCSSより先に読み込まれるので、スキン側の指定が常に勝つ。
 */

/* ============================================================
   1. 記事用トークン
   ============================================================ */
:root {
  --cc-article-width: 760px;        /* 本文の読みやすい行長 */
  --cc-article-size: 17px;
  --cc-article-leading: 1.95;
  --cc-article-gap: 1.9em;          /* 段落どうしの間隔 */
  --cc-article-h2-top: 3.2em;       /* 見出し前の間隔 */
  --cc-article-h3-top: 2.4em;
  --cc-cat-color: var(--cc-primary);/* カテゴリー別アクセント（PHPが上書き） */
}

/* ============================================================
   2. 記事ヘッダー
   ============================================================ */
.cc-blog .article-header,
.cc-blog .entry-header {
  margin-bottom: 2.2em;
}

.cc-blog .entry-title {
  font-family: var(--cc-font-heading);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: var(--cc-heading-weight);
  line-height: 1.42;
  letter-spacing: .01em;
  /* 実コンテンツで行数が増えたときに行長を均す */
  text-wrap: balance;
  word-break: auto-phrase;
  line-break: strict;
}

/* 日付・カテゴリー・読了時間の一列 */
.cc-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--cc-text-muted);
}

.cc-post-meta__cat {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-cat-color);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}

.cc-post-meta__cat:hover {
  color: #fff;
  opacity: .85;
}

.cc-blog .date-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--cc-text-muted);
}

.cc-blog .read-time {
  font-size: 13px;
  color: var(--cc-text-muted);
}

/* アイキャッチ */
.cc-blog .eye-catch {
  margin: 0 0 2em;
  border-radius: var(--cc-radius-lg);
  overflow: hidden;
}

.cc-blog .eye-catch img {
  display: block;
  width: 100%;
  height: auto;
}

/* 記事内の著者行（タイトル直下） */
.cc-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}

.cc-byline img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.cc-byline__name {
  font-size: 14px;
  font-weight: 700;
}

.cc-byline__role {
  font-size: 12px;
  color: var(--cc-text-muted);
}

/* ============================================================
   3. 本文のリズム
   ============================================================ */
.cc-blog .entry-content {
  font-size: var(--cc-article-size);
  line-height: var(--cc-article-leading);
  /* 末尾1語だけが次行に落ちるのを防ぐ */
  text-wrap: pretty;
}

.cc-blog .entry-content > p {
  margin: 0 0 var(--cc-article-gap);
}

.cc-blog .entry-content > h2 {
  margin-top: var(--cc-article-h2-top);
  text-wrap: balance;
  word-break: auto-phrase;
}

.cc-blog .entry-content > h3,
.cc-blog .entry-content > h4 {
  margin-top: var(--cc-article-h3-top);
  text-wrap: balance;
  word-break: auto-phrase;
}

.cc-blog .entry-content > h2 + p,
.cc-blog .entry-content > h3 + p,
.cc-blog .entry-content > h4 + p {
  margin-top: 1.1em;
}

/* リスト */
.cc-blog .entry-content > ul,
.cc-blog .entry-content > ol {
  margin: 0 0 var(--cc-article-gap);
  padding-left: 1.6em;
}

.cc-blog .entry-content li {
  margin-bottom: .6em;
  line-height: 1.9;
}

/* 引用 */
.cc-blog .entry-content blockquote {
  position: relative;
  margin: 2.2em 0;
  padding: 1.6em 1.8em;
  border-radius: var(--cc-radius);
  background: var(--cc-surface-2);
  font-size: .96em;
  line-height: 1.9;
}

.cc-blog .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.cc-blog .entry-content blockquote cite {
  display: block;
  margin-top: .8em;
  font-size: 12px;
  font-style: normal;
  color: var(--cc-text-muted);
}

/* 画像とキャプション */
.cc-blog .entry-content figure {
  margin: 2.4em 0;
}

.cc-blog .entry-content figure img {
  border-radius: var(--cc-radius);
}

.cc-blog .entry-content figcaption {
  margin-top: .8em;
  font-size: 13px;
  line-height: 1.75;
  color: var(--cc-text-muted);
  text-align: center;
}

/* 本文中のリンク */
.cc-blog .entry-content a:not(.cc-btn):not(.wp-block-button__link):not(.blogcard-wrap):not(.a-wrap) {
  color: var(--cc-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, var(--cc-primary) 40%, transparent);
  transition: text-decoration-color .2s;
}

.cc-blog .entry-content a:not(.cc-btn):not(.wp-block-button__link):hover {
  text-decoration-color: currentColor;
}

/* 区切り線 */
.cc-blog .entry-content hr {
  margin: 3em auto;
  width: 72px;
  border: 0;
  border-top: 3px solid var(--cc-border-strong);
  border-radius: 2px;
}

/* コード */
.cc-blog .entry-content code {
  padding: .15em .45em;
  border-radius: var(--cc-radius-xs);
  background: var(--cc-surface-2);
  font-size: .9em;
}

.cc-blog .entry-content pre {
  margin: 2em 0;
  border-radius: var(--cc-radius);
  font-size: 14px;
  line-height: 1.75;
}

/* 表 */
.cc-blog .entry-content table,
.cc-blog .entry-content .wp-block-table table {
  width: 100%;
  margin: 2.2em 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  overflow: hidden;
  font-size: 15px;
  line-height: 1.75;
}

.cc-blog .entry-content table th,
.cc-blog .entry-content table td {
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--cc-border);
  text-align: left;
  vertical-align: top;
}

.cc-blog .entry-content table tr:last-child th,
.cc-blog .entry-content table tr:last-child td {
  border-bottom: 0;
}

.cc-blog .entry-content table thead th {
  background: var(--cc-surface-2);
  font-weight: 700;
  white-space: nowrap;
}

.cc-blog .entry-content table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--cc-surface-2) 55%, transparent);
}

/* 横に広い表はスクロールさせる */
.cc-blog .entry-content .wp-block-table {
  overflow-x: auto;
  margin: 2.2em 0;
}

.cc-blog .entry-content .wp-block-table table {
  margin: 0;
  min-width: 480px;
}

/* ============================================================
   4. 目次
   ============================================================ */
.cc-blog .toc {
  margin: 2.4em 0 2.8em;
  padding: 24px 26px;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface-2);
  width: 100%;
  max-width: none;
}

.cc-blog .toc-title {
  margin-bottom: .8em;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
}

.cc-blog .toc a {
  color: var(--cc-text);
  text-decoration: none;
  line-height: 1.7;
}

.cc-blog .toc a:hover {
  color: var(--cc-primary);
}

.cc-blog .toc-list > li {
  margin-bottom: .5em;
}

.cc-blog .toc-list > li > a {
  font-weight: 700;
}

/* サイドバー追従目次 */
.cc-toc-follow {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px 20px 22px;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface);
  font-size: 13px;
}

.cc-toc-follow__title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--cc-text-muted);
  text-transform: uppercase;
}

.cc-toc-follow ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: cc-toc;
}

.cc-toc-follow li {
  list-style: none;
  margin: 0;
  line-height: 1.6;
}

.cc-toc-follow a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--cc-border);
  color: var(--cc-text-muted);
  text-decoration: none;
  transition: color .2s, border-color .2s;
}

.cc-toc-follow a:hover {
  color: var(--cc-primary);
}

.cc-toc-follow a.is-current {
  border-left-color: var(--cc-primary);
  color: var(--cc-primary);
  font-weight: 700;
}

.cc-toc-follow li.is-h3 a {
  padding-left: 26px;
  font-size: 12px;
}

/* ============================================================
   5. 記事内パーツ（ブロックパターンで挿入）
   ============================================================ */
/* まとめ／ポイント枠 */
.cc-note-box {
  position: relative;
  margin: 2.4em 0;
  padding: 28px 28px 26px;
  border: 1px solid var(--cc-border);
  border-left: 4px solid var(--cc-primary);
  border-radius: var(--cc-radius);
  background: var(--cc-surface-2);
}

.cc-note-box__title {
  margin: 0 0 .8em;
  padding: 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--cc-primary);
}

.cc-note-box__title::before,
.cc-note-box__title::after { content: none; }

.cc-note-box p:last-child,
.cc-note-box ul:last-child,
.cc-note-box ol:last-child {
  margin-bottom: 0;
}

.cc-note-box--warn {
  border-left-color: var(--cc-warn);
  background: var(--cc-tint-warn, rgba(217, 131, 36, .08));
}

.cc-note-box--warn .cc-note-box__title {
  color: var(--cc-warn);
}

/* 記事内CTA */
.cc-post-cta {
  margin: 2.8em 0;
  padding: 32px 30px;
  border-radius: var(--cc-radius-lg);
  background: var(--cc-gradient);
  color: var(--cc-text-invert);
  text-align: center;
}

.cc-post-cta__title {
  margin: 0 0 .6em;
  padding: 0;
  border: 0;
  background: none;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: var(--cc-heading-weight);
  line-height: 1.5;
  color: inherit;
}

.cc-post-cta__title::before,
.cc-post-cta__title::after { content: none; }

.cc-post-cta__text {
  margin: 0 0 1.4em;
  font-size: 14px;
  line-height: 1.85;
  color: var(--cc-text-invert-muted);
}

.cc-post-cta .cc-btn,
.cc-post-cta .wp-block-button__link {
  background: var(--cc-text-invert);
  color: var(--cc-primary);
}

/* 関連リンク（記事内） */
.cc-linklist {
  margin: 2.2em 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--cc-border);
}

.cc-linklist li {
  list-style: none;
  margin: 0;
  border-bottom: 1px solid var(--cc-border);
}

.cc-linklist a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
  color: inherit;
}

.cc-linklist a::before {
  content: "›";
  color: var(--cc-primary);
  font-size: 18px;
  line-height: 1;
}

.cc-linklist a:hover {
  color: var(--cc-primary);
}

/* 本文リンクの下線ルールより優先させるため :not() の数を合わせる */
.cc-blog .entry-content .cc-linklist a:not(.cc-btn):not(.wp-block-button__link):not(.blogcard-wrap):not(.a-wrap),
.cc-blog .entry-content .cc-postcard:not(.cc-btn):not(.wp-block-button__link):not(.blogcard-wrap):not(.a-wrap),
.cc-blog .entry-content .cc-rank a:not(.cc-btn):not(.wp-block-button__link):not(.blogcard-wrap):not(.a-wrap) {
  text-decoration: none;
}

/* 著者プロフィール（記事下） */
.cc-blog .author-box {
  margin: 3em 0;
  padding: 28px 26px;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface-2);
}

.cc-blog .author-box .author-name {
  font-size: 16px;
  font-weight: 700;
}

.cc-blog .author-box .author-description {
  font-size: 14px;
  line-height: 1.9;
  color: var(--cc-text-muted);
}

/* ============================================================
   6. 記事フッター（シェア・関連・ページャー）
   ============================================================ */
.cc-blog .sns-share,
.cc-blog .sns-follow {
  margin: 2.4em 0;
}

.cc-blog .related-entries {
  margin-top: 3.4em;
  padding-top: 2.4em;
  border-top: 1px solid var(--cc-border);
}

.cc-blog .related-entry-heading,
.cc-blog .comment-title {
  margin-bottom: 1.4em;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--cc-font-heading);
  font-size: 20px;
  font-weight: var(--cc-heading-weight);
}

.cc-blog .related-entry-main-heading::before,
.cc-blog .related-entry-main-heading::after { content: none; }

.cc-blog .pager-post-navi {
  margin: 2.6em 0;
  border-radius: var(--cc-radius-lg);
  overflow: hidden;
}

/* ============================================================
   7. 記事一覧カード（アーカイブ／トップ）
   ============================================================ */
.cc-blog .entry-card-wrap {
  padding: 0;
  border: 0;
  border-radius: var(--cc-radius-lg);
  background: transparent;
  transition: transform .4s var(--cc-ease), box-shadow .4s var(--cc-ease);
}

.cc-blog .entry-card-thumb {
  border-radius: var(--cc-radius);
  overflow: hidden;
}

.cc-blog .entry-card-thumb img {
  transition: transform .7s var(--cc-ease);
}

.cc-blog .entry-card-wrap:hover .entry-card-thumb img {
  transform: scale(1.05);
}

.cc-blog .entry-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  text-wrap: pretty;
  word-break: auto-phrase;
}

.cc-blog .entry-card-snippet {
  font-size: 14px;
  line-height: 1.85;
  color: var(--cc-text-muted);
}

.cc-blog .entry-card-meta,
.cc-blog .entry-card-info {
  font-size: 12px;
  color: var(--cc-text-muted);
}

.cc-blog .cat-label {
  border: 0;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-cat-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
}

/* ページネーション */
.cc-blog .pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  line-height: 40px;
  border-radius: var(--cc-radius);
  border-color: var(--cc-border);
}

.cc-blog .pagination .current {
  background: var(--cc-primary);
  border-color: var(--cc-primary);
  color: #fff;
}

/* ============================================================
   8. アーカイブのヘッダー
   ============================================================ */
.cc-archive-head {
  padding: clamp(36px, 5vw, 64px) 24px;
  margin-bottom: 32px;
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface-2);
  text-align: center;
}

.cc-archive-head__en {
  display: block;
  font-family: var(--cc-font-en);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cc-cat-color);
}

.cc-archive-head__title {
  margin: 8px 0 0;
  font-family: var(--cc-font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: var(--cc-heading-weight);
}

.cc-archive-head__desc {
  margin: 12px auto 0;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--cc-text-muted);
}

/* ============================================================
   9. コメント
   ============================================================ */
.cc-blog .comment-area {
  margin-top: 3.4em;
  padding-top: 2.4em;
  border-top: 1px solid var(--cc-border);
}

.cc-blog .comment-list .comment-body {
  padding: 20px;
  border-radius: var(--cc-radius);
  background: var(--cc-surface-2);
}

/* ============================================================
   10. サイドバー（メディア運用）
   ============================================================ */
.cc-blog .widget-sidebar {
  margin-bottom: 32px;
}

.cc-profile-box {
  padding: 26px 22px;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface);
  text-align: center;
}

.cc-profile-box img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
}

.cc-profile-box__name {
  font-size: 16px;
  font-weight: 700;
}

.cc-profile-box__text {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--cc-text-muted);
  text-align: left;
}

/* ランキング付き記事リスト */
.cc-rank {
  counter-reset: cc-rank;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cc-rank li {
  list-style: none;
  margin: 0;
  border-bottom: 1px solid var(--cc-border);
}

.cc-rank a {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  color: inherit;
  text-decoration: none;
}

.cc-rank a::before {
  counter-increment: cc-rank;
  content: counter(cc-rank);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cc-primary);
  color: #fff;
  font-family: var(--cc-font-en);
  font-size: 12px;
  font-weight: 700;
}

.cc-rank li:nth-child(1) a::before { background: #c9a227; }
.cc-rank li:nth-child(2) a::before { background: #9aa3ad; }
.cc-rank li:nth-child(3) a::before { background: #b07d4a; }

.cc-rank__thumb {
  flex: none;
  width: 64px;
  height: 48px;
  border-radius: var(--cc-radius-sm);
  object-fit: cover;
}

.cc-rank__title {
  font-size: 13px;
  line-height: 1.6;
}

.cc-rank a:hover .cc-rank__title {
  color: var(--cc-primary);
}

/* ============================================================
   11. レスポンシブ
   ============================================================ */
@media screen and (max-width: 834px) {
  :root {
    --cc-article-size: 16px;
    --cc-article-h2-top: 2.6em;
  }

  .cc-toc-follow {
    position: static;
    max-height: none;
  }

  .cc-blog .toc {
    padding: 20px 18px;
  }

  .cc-post-cta {
    padding: 26px 20px;
  }
}

/* ============================================================
   12. [cc_posts] の記事カード
   ============================================================ */
.cc-postcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface);
  color: inherit;
  text-decoration: none;
  transition: transform .4s var(--cc-ease), box-shadow .4s var(--cc-ease), border-color .25s;
}

.cc-postcard:hover {
  transform: translateY(-4px);
  border-color: var(--cc-cat-color);
  box-shadow: var(--cc-shadow-lg);
  color: inherit;
}

.cc-postcard__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cc-surface-2);
}

.cc-postcard__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--cc-ease);
}

.cc-postcard:hover .cc-postcard__thumb img {
  transform: scale(1.06);
}

.cc-postcard__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 22px;
  flex: 1;
}

.cc-postcard__cat {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-cat-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.cc-postcard__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-wrap: pretty;
  word-break: auto-phrase;
}

.cc-postcard__date {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--cc-font-en);
  font-size: 12px;
  color: var(--cc-text-muted);
}

/* ============================================================
   13. アーカイブヘッダーの外側コンテナ
   （メインカラム手前に出力されるため上下の余白を持たせる）
   ============================================================ */
.cc-archive-head-outer {
  box-sizing: border-box;
  padding: 24px 16px 0;
}

/* ============================================================
   14. 記事下CTAスロット
   ============================================================ */
.cc-post-cta-slot {
  margin-top: 2.6em;
}

.cc-post-cta-slot > *:first-child {
  margin-top: 0;
}

/* ============================================================
   15. 執筆者プロフィールカード（パターン用）
   ============================================================ */
.cc-authorcard {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 3em 0;
  padding: 26px 26px 24px;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-surface-2);
}

.cc-authorcard__img {
  margin: 0;
}

.cc-authorcard__img img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.cc-authorcard__role {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cc-text-muted);
}

.cc-authorcard__name {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 18px;
  font-weight: 700;
  color: inherit;
}

.cc-authorcard__name::before,
.cc-authorcard__name::after { content: none; }

.cc-authorcard__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--cc-text-muted);
}

@media screen and (max-width: 600px) {
  .cc-authorcard {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 22px 18px;
  }
  .cc-authorcard__img img {
    width: 64px;
    height: 64px;
  }
}
