@charset "UTF-8";
/*
 * single.css
 * 投稿個別ページ専用スタイル
 * スコープ: #body_wrap.single
 * functions.php にて is_single() の条件で読み込まれる
 */

/* ========================================
   SWELL スタイルリセット（投稿用）
======================================== */

/* h2 カスタマイザー装飾（::before / ::after）を無効化 */
#body_wrap.single .post_content h2::before,
#body_wrap.single .post_content h2::after {
  content: none;
  display: none;
}

/* h3 カスタマイザーアンダーライン（::before）を無効化 */
#body_wrap.single .post_content h3::before {
  background: none;
  content: none;
  display: none;
}

/* h2 の SWELL ネガマージン（--swl-h2-margin--x）をリセット */
#body_wrap.single .post_content > h2 {
  margin-left: 0;
  margin-right: 0;
}

/* ========================================
   記事タイトル
======================================== */

/* SWELL は .c-postTitle__ttl に font-size: 24px を設定済み */
#body_wrap.single .c-postTitle__ttl {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

/* ========================================
   記事メタ情報（カテゴリー・タグ・日付・著者）
======================================== */

/* SWELL は .p-articleMetas に font-size: 12px を設定済み */
#body_wrap.single .p-articleMetas {
  color: var(--color-text-light, #888);
  font-size: 1.2rem;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

#body_wrap.single .p-articleMetas a {
  color: var(--color-blue);
  text-decoration: none;
}

#body_wrap.single .p-articleMetas a:hover {
  text-decoration: underline;
}

/* ========================================
   アイキャッチ画像
======================================== */

#body_wrap.single .p-articleThumb__img {
  border-radius: 1.2rem;
}

/* ========================================
   記事フッター（タグ一覧）
======================================== */

/* SWELL は .p-articleFoot に border-top: 1px dashed を設定済み */
#body_wrap.single .p-articleFoot {
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: 4.8rem 0 3.2rem;
  padding-top: 2.4rem;
}

/* ========================================
   前の記事・次の記事（pnLinks）
======================================== */

/* SWELL は border-left/right の太いカラーバーを使用 — 薄いカード型に変更 */
#body_wrap.single .p-pnLinks {
  gap: 1.2rem;
  margin: 4rem 0;
}

#body_wrap.single .p-pnLinks__item.-prev .p-pnLinks__link,
#body_wrap.single .p-pnLinks__item.-next .p-pnLinks__link {
  background: rgba(41, 128, 185, 0.04);
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-left: none;
  border-radius: 0.8rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#body_wrap.single .p-pnLinks .-prev .p-pnLinks__link {
  border-left: 3px solid var(--color-blue);
}

#body_wrap.single .p-pnLinks .-next .p-pnLinks__link {
  border-right: 3px solid var(--color-blue);
}

#body_wrap.single .p-pnLinks .-prev:before,
#body_wrap.single .p-pnLinks .-next:before {
  color: var(--color-blue);
}

#body_wrap.single .p-pnLinks__item.-prev .p-pnLinks__link:hover,
#body_wrap.single .p-pnLinks__item.-next .p-pnLinks__link:hover {
  background: rgba(41, 128, 185, 0.08);
  border-color: rgba(41, 128, 185, 0.35);
  box-shadow: 0 4px 16px rgba(41, 128, 185, 0.1);
}

/* ========================================
   ベース — 記事本文
======================================== */

#body_wrap.single .post_content {
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1.9;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ========================================
   見出し — h2
======================================== */

#body_wrap.single .post_content h2,
#body_wrap.single .post_content .wp-block-heading:is(h2) {
  border-left: 3px solid var(--color-blue);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 2.4rem;
  margin-top: 6.4rem;
  padding: 0.1rem 0 0.1rem 1.4rem;
  position: relative;
}

#body_wrap.single .post_content h2:first-child {
  margin-top: 0;
}

/* ========================================
   見出し — h3
======================================== */

#body_wrap.single .post_content h3,
#body_wrap.single .post_content .wp-block-heading:is(h3) {
  border-bottom: 1px solid rgba(41, 128, 185, 0.22);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 1.6rem;
  margin-top: 5.2rem;
  padding-bottom: 0.6rem;
}

#body_wrap.single .post_content h3:first-child {
  margin-top: 0;
}

/* ========================================
   見出し — h4
======================================== */

#body_wrap.single .post_content h4,
#body_wrap.single .post_content .wp-block-heading:is(h4) {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  margin-top: 3.6rem;
  padding-left: 1.2rem;
  position: relative;
}

#body_wrap.single .post_content h4::before {
  background: rgba(41, 128, 185, 0.55);
  border-radius: 2px;
  bottom: 0.2em;
  content: "";
  left: 0;
  position: absolute;
  top: 0.2em;
  width: 3px;
}

#body_wrap.single .post_content h4:first-child {
  margin-top: 0;
}

/* ========================================
   見出し — h5 / h6
======================================== */

#body_wrap.single .post_content h5,
#body_wrap.single .post_content .wp-block-heading:is(h5) {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 1rem;
  margin-top: 3.2rem;
}

#body_wrap.single .post_content h6,
#body_wrap.single .post_content .wp-block-heading:is(h6) {
  color: var(--color-text-light, #666);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 0.8rem;
  margin-top: 2.4rem;
}

/* ========================================
   段落
======================================== */

#body_wrap.single .post_content p {
  line-height: 1.9;
  margin-bottom: 1.8rem;
}

#body_wrap.single .post_content p:last-child {
  margin-bottom: 0;
}

/* ========================================
   リンク
======================================== */

#body_wrap.single .post_content a {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: opacity 0.2s ease;
}

#body_wrap.single .post_content a:hover {
  opacity: 0.72;
  text-decoration: none;
}

/* ========================================
   インライン装飾
======================================== */

#body_wrap.single .post_content strong,
#body_wrap.single .post_content b {
  color: var(--color-text);
  font-weight: 700;
}

#body_wrap.single .post_content mark {
  background: rgba(41, 128, 185, 0.15);
  border-radius: 0.2rem;
  color: var(--color-text);
  padding: 0.1em 0.35em;
}

#body_wrap.single .post_content small {
  font-size: 1.2rem;
}

/* ========================================
   hr（区切り線）
======================================== */

#body_wrap.single .post_content hr {
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: 5.6rem auto;
  width: 100%;
}

/* ========================================
   リスト — ul / ol
======================================== */

#body_wrap.single .post_content ul,
#body_wrap.single .post_content ol,
#body_wrap.single .post_content .wp-block-list {
  margin-bottom: 2.4rem;
  padding-left: 2.2rem;
}

#body_wrap.single .post_content li {
  line-height: 1.75;
  margin-bottom: 0.6rem;
}

#body_wrap.single .post_content li:last-child {
  margin-bottom: 0;
}

#body_wrap.single .post_content ul > li::marker {
  color: var(--color-blue);
}

#body_wrap.single .post_content ol > li::marker {
  color: var(--color-blue);
  font-weight: 700;
}

#body_wrap.single .post_content li > ul,
#body_wrap.single .post_content li > ol {
  margin-bottom: 0;
  margin-top: 0.4rem;
}

/* ========================================
   テーブル
======================================== */

#body_wrap.single .post_content .wp-block-table {
  margin-bottom: 3.2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#body_wrap.single .post_content table {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 1.4rem;
  line-height: 1.7;
  min-width: 400px;
  text-align: left;
  width: 100%;
}

#body_wrap.single .post_content th,
#body_wrap.single .post_content td,
#body_wrap.single .post_content .wp-block-table th,
#body_wrap.single .post_content .wp-block-table td {
  border: 1px solid rgba(26, 26, 26, 0.1);
  padding: 1rem 1.4rem;
  vertical-align: top;
}

#body_wrap.single .post_content thead th,
#body_wrap.single .post_content .wp-block-table thead th {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
  font-weight: 700;
}

#body_wrap.single .post_content tbody th,
#body_wrap.single .post_content .wp-block-table tbody th {
  background: rgba(41, 128, 185, 0.04);
  font-weight: 700;
  white-space: nowrap;
}

/* ゼブラストライプ */
#body_wrap.single .post_content tbody tr:nth-child(even) td,
#body_wrap.single .post_content tbody tr:nth-child(even) th:not(thead th) {
  background: rgba(41, 128, 185, 0.025);
}

/* ========================================
   画像 / figure / figcaption
======================================== */

#body_wrap.single .post_content img {
  border-radius: 0.8rem;
  height: auto;
  max-width: 100%;
}

#body_wrap.single .post_content figure {
  margin-bottom: 2.8rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}

#body_wrap.single .post_content figcaption {
  color: var(--color-text-light, #888);
  font-size: 1.2rem;
  line-height: 1.6;
  margin-top: 0.8rem;
  text-align: center;
}

/* ========================================
   引用 — blockquote
======================================== */

#body_wrap.single .post_content blockquote,
#body_wrap.single .post_content .wp-block-quote {
  background: rgba(41, 128, 185, 0.04);
  border-left: 3px solid rgba(41, 128, 185, 0.45);
  border-radius: 0 0.6rem 0.6rem 0;
  margin-bottom: 2.8rem;
  margin-left: 0;
  margin-right: 0;
  padding: 2rem 2.4rem;
}

#body_wrap.single .post_content blockquote p,
#body_wrap.single .post_content .wp-block-quote p {
  font-style: italic;
  margin-bottom: 0;
}

#body_wrap.single .post_content blockquote cite,
#body_wrap.single .post_content .wp-block-quote cite {
  color: var(--color-text-light, #888);
  display: block;
  font-size: 1.2rem;
  font-style: normal;
  margin-top: 1rem;
}

/* ========================================
   コード — code / pre
======================================== */

#body_wrap.single .post_content code {
  background: rgba(41, 128, 185, 0.07);
  border: 1px solid rgba(41, 128, 185, 0.12);
  border-radius: 0.4rem;
  color: #1a4a6e;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  padding: 0.15em 0.5em;
}

#body_wrap.single .post_content pre,
#body_wrap.single .post_content .wp-block-code,
#body_wrap.single .post_content .wp-block-preformatted {
  background: #1e2b37;
  border-radius: 0.8rem;
  color: #e8edf3;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 1.3rem;
  line-height: 1.65;
  margin-bottom: 2.8rem;
  overflow-x: auto;
  padding: 2rem 2.4rem;
  -webkit-overflow-scrolling: touch;
}

#body_wrap.single .post_content pre code,
#body_wrap.single .post_content .wp-block-code code {
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

/* ========================================
   Gutenberg Block — wp-block-image
======================================== */

#body_wrap.single .post_content .wp-block-image {
  margin-bottom: 2.8rem;
}

#body_wrap.single .post_content .wp-block-image img {
  border-radius: 0.8rem;
  height: auto;
  max-width: 100%;
}

#body_wrap.single .post_content .wp-block-image figcaption {
  color: var(--color-text-light, #888);
  font-size: 1.2rem;
  margin-top: 0.8rem;
  text-align: center;
}

/* ========================================
   Gutenberg Block — wp-block-buttons
======================================== */

#body_wrap.single .post_content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2.8rem;
}

#body_wrap.single .post_content .wp-block-button__link {
  align-items: center;
  background: var(--color-blue);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(41, 128, 185, 0.22);
  color: #fff;
  display: inline-flex;
  font-size: 1.5rem;
  font-weight: 700;
  justify-content: center;
  min-height: 5.6rem;
  min-width: 18rem;
  padding: 1.2rem 2.8rem;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

#body_wrap.single .post_content .wp-block-button__link:hover {
  box-shadow: 0 6px 24px rgba(41, 128, 185, 0.32);
  opacity: 0.9;
  text-decoration: none;
  transform: translateY(-0.2rem);
}

#body_wrap.single .post_content .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 2px solid var(--color-blue);
  box-shadow: none;
  color: var(--color-blue);
}

/* ========================================
   Gutenberg Block — wp-block-columns
======================================== */

#body_wrap.single .post_content .wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  margin-bottom: 2.8rem;
}

#body_wrap.single .post_content .wp-block-column {
  flex: 1;
  min-width: min(100%, 220px);
}

/* ========================================
   Gutenberg Block — wp-block-separator
======================================== */

#body_wrap.single .post_content .wp-block-separator {
  background: none;
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  height: auto;
  margin: 5.6rem auto;
  max-width: 100%;
}

/* ========================================
   レスポンシブ — 600px 以上
======================================== */

@media (min-width: 600px) {
  #body_wrap.single .c-postTitle__ttl {
    font-size: 2.8rem;
  }

  #body_wrap.single .post_content table {
    min-width: 0;
  }
}

/* ========================================
   レスポンシブ — 768px 以上
======================================== */

@media (min-width: 768px) {
  #body_wrap.single .c-postTitle__ttl {
    font-size: 3.2rem;
  }

  #body_wrap.single .post_content {
    line-height: 1.95;
  }

  #body_wrap.single .post_content h2 {
    font-size: 2.2rem;
    margin-top: 8rem;
  }

  #body_wrap.single .post_content h3 {
    font-size: 2rem;
    margin-top: 6.4rem;
  }

  #body_wrap.single .post_content h4 {
    font-size: 1.8rem;
    margin-top: 4.8rem;
  }

  #body_wrap.single .post_content th,
  #body_wrap.single .post_content td,
  #body_wrap.single .post_content .wp-block-table th,
  #body_wrap.single .post_content .wp-block-table td {
    padding: 1.2rem 1.6rem;
  }

  #body_wrap.single .post_content table {
    font-size: 1.5rem;
  }

  #body_wrap.single .post_content blockquote,
  #body_wrap.single .post_content .wp-block-quote {
    padding: 2.4rem 3.2rem;
  }
}

/* ========================================
   レスポンシブ — 1024px 以上
======================================== */

@media (min-width: 1024px) {
  #body_wrap.single .post_content h2 {
    font-size: 2.4rem;
    margin-top: 9.6rem;
  }

  #body_wrap.single .post_content h3 {
    font-size: 2.2rem;
  }

  #body_wrap.single .post_content h4 {
    font-size: 1.9rem;
  }
}
