@charset "UTF-8";

/* =========================================================
   記事ページ固有（WordPress では single.php）
   記事ヘッダー / アイキャッチ / 目次 / 本文
   サイドバー：components/sidebar.css
   ========================================================= */
.post {
  --lower-pt: 187px;
  --lower-pb: 148px;
  --lower-pt-tab: 120px;
  --lower-pt-sp: 56px;
}

.post__layout {
  --sidebar-pt: 60px;
  display: grid;
  grid-template-columns: minmax(0, 788px) 140px;
  justify-content: space-between;
  column-gap: 56px;
  padding: 0 29px 0 8px;
}

/* ---------- タイトル・日付・アイキャッチ ---------- */
.post__title {
  font-family: var(--f-maru);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.45;
  letter-spacing: 0.1em;
  color: var(--c-brown-dark);
}

.post__date {
  display: block;
  margin-top: 10px;
  font-family: var(--f-noto);
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 0.1em;
  color: var(--c-brown-dark);
}

.post__thumb {
  overflow: hidden;
  width: 330px;
  max-width: 100%;
  margin-top: 23px;
  aspect-ratio: 330 / 227;
  background: var(--c-gray);
}

.post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 目次（assets/js/pages/toc.js が中身を生成） ---------- */
.toc {
  width: 330px;
  max-width: 100%;
  margin-top: 38px;
  padding: 18px 28px 24px;
  border: 1px solid var(--c-brown-dark);
  border-radius: 18px;
  font-family: var(--f-maru);
  color: var(--c-brown-dark);
}

.toc__title {
  font-size: 20px;
  line-height: 20px;
  letter-spacing: 0.1em;
  text-align: center;
}

.toc__list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.toc__list > li + li {
  margin-top: 11px;
}

.toc__sub {
  margin: 3px 0 0;
  padding-left: 24px;
  list-style: none;
}

.toc a {
  display: inline-block;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.toc a:hover {
  color: var(--c-blue);
}

/* ---------- 本文（WordPress の the_content() の出力） ---------- */
.post__body {
  font-family: var(--f-maru);
  color: var(--c-brown);
}

.post__body h2 {
  margin-top: 72px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-brown);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.post__body > h2:first-child {
  margin-top: 38px;
}

.post__body h3 {
  margin-top: 48px; /* 本文の後に続く場合 */
  padding: 0 19px;
  background: var(--c-blue-mist);
  font-weight: 400;
  font-size: 20px;
  line-height: 43px;
  letter-spacing: 0.1em;
  color: var(--c-brown-dark);
}

/* 大見出しの直後の中見出しは詰める */
.post__body h2 + h3 {
  margin-top: 21px;
}

.post__body p {
  margin: 21px -11px 0 0; /* Figma の本文幅 795px（x:170〜）に合わせる */
  padding-left: 4px;
  font-size: 14px;
  line-height: 25.2px;
  letter-spacing: 0.1em;
  word-break: break-all;
}

/* エディターで入力される要素 */
.post__body h4 {
  margin-top: 28px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.post__body a {
  color: var(--c-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post__body ul,
.post__body ol {
  margin: 21px 0 0;
  padding-left: 1.5em;
  font-size: 14px;
  line-height: 25.2px;
  letter-spacing: 0.1em;
}

.post__body ul {
  list-style: disc;
}

.post__body img {
  height: auto;
}

.post__body figure,
.post__body .wp-block-image {
  margin: 28px 0 0;
}

.post__body figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-brown-light);
}

.post__body blockquote {
  margin: 28px 0 0;
  padding: 16px 24px;
  border-left: 3px solid var(--c-blue-mist);
  background: var(--c-beige-pale);
}

.post__body blockquote p:first-child {
  margin-top: 0;
}

.post__body .aligncenter {
  margin-inline: auto;
}

/* 1 カラムの固定ページ（page.php / 404.php） */
.post__layout--full {
  grid-template-columns: minmax(0, 788px);
  justify-content: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .post__layout {
    grid-template-columns: minmax(0, 1fr) 140px;
    padding: 0;
  }

  .post__layout--full {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .post__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .post__title {
    font-size: 24px;
  }

  .post__date {
    margin-top: 8px;
    font-size: 13px;
  }

  .post__thumb {
    width: 100%;
    margin-top: 20px;
  }

  .toc {
    width: 100%;
    margin-top: 32px;
    padding: 16px 20px 20px;
  }

  .toc__title {
    font-size: 18px;
  }

  .toc a {
    font-size: 15px;
  }

  .post__body h2 {
    margin-top: 56px;
    font-size: 20px;
  }

  .post__body > h2:first-child {
    margin-top: 40px;
  }

  .post__body h3 {
    margin-top: 36px;
    padding: 8px 14px;
    font-size: 17px;
    line-height: 1.6;
  }

  .post__body h2 + h3 {
    margin-top: 16px;
  }

  .post__body p {
    margin: 16px 0 0;
    padding-left: 0;
    line-height: 1.9;
  }
}
