@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/* わなものぐらし：投稿記事の基本レイアウト
   本文幅・本文の文字サイズ／太さ・行間・段落余白はCocoon側の設定を維持する。 */

/* 記事タイトル（H1） */
body.single-post .article > .article-header > h1.entry-title {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  color: inherit;
  text-align: left;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.5;
}

/* 本文直下の見出しに限定し、ボックス・目次などの内部は対象にしない。 */
body.single-post .article > .entry-content > h2,
body.single-post .article > .entry-content > h3 {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  color: inherit;
  text-align: left;
  font-weight: 600;
  line-height: 1.5;
}

/* 章見出し（H2）：余白と短いPeacockの線で区切る。 */
body.single-post .article > .entry-content > h2 {
  margin: 56px 0 30px;
  font-size: 24px;
}

body.single-post .article > .entry-content > h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 14px;
  background: #008C83;
}

/* 小見出し（H3）：装飾色を使わず、文字サイズと余白で階層を示す。 */
body.single-post .article > .entry-content > h3 {
  margin: 36px 0 20px;
  font-size: 20px;
}

/* 一次情報：この記事で実際に確認した対象・条件・実施内容を記録する。 */
body.single-post .entry-content .wanamono-field-note {
  margin-block: 32px;
  padding: 28px;
  background: #FAF8F4;
  border: 1px solid #E7E2DA;
  border-radius: 4px;
  box-shadow: none;
  font-size: inherit;
  line-height: 1.8;
}

body.single-post .entry-content .wanamono-field-note p,
body.single-post .entry-content .wanamono-field-note ul,
body.single-post .entry-content .wanamono-field-note ol {
  margin-block: 0 16px;
  font-size: inherit;
  line-height: inherit;
}

body.single-post .entry-content .wanamono-field-note ul,
body.single-post .entry-content .wanamono-field-note ol {
  padding-inline-start: 1.5em;
}

body.single-post .entry-content .wanamono-field-note ul {
  list-style-type: disc;
}

body.single-post .entry-content .wanamono-field-note ol {
  list-style-type: decimal;
}

body.single-post .entry-content .wanamono-field-note li {
  margin-block: 0 6px;
}

/* 見出しタグではなく、段落ブロックに付けるタイトル用クラス。 */
body.single-post .entry-content .wanamono-field-note .wanamono-field-note__title {
  margin-block: 0 20px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}

body.single-post .entry-content .wanamono-field-note .wanamono-field-note__title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 10px;
  background: #008C83;
}

body.single-post .entry-content .wanamono-field-note .wanamono-field-note__label {
  margin-block: 20px 8px;
  font-weight: 600;
}

/* 従来のグループブロックの内側ラッパーと、入れ子のリストにも対応。 */
body.single-post .entry-content .wanamono-field-note > :first-child,
body.single-post .entry-content .wanamono-field-note .wp-block-group__inner-container > :first-child {
  margin-block-start: 0;
}

body.single-post .entry-content .wanamono-field-note > :last-child,
body.single-post .entry-content .wanamono-field-note .wp-block-group__inner-container > :last-child,
body.single-post .entry-content .wanamono-field-note li:last-child,
body.single-post .entry-content .wanamono-field-note li > :last-child {
  margin-block-end: 0;
}

/* Cocoon標準目次：投稿本文内の静かなナビゲーション。 */
body.single-post .article > .entry-content .toc {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 32px 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  text-align: left;
  font-size: 16px;
  line-height: 1.8;
}

body.single-post .article > .entry-content .toc .toc-title {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
}

body.single-post .article > .entry-content .toc .toc-title::before {
  content: none;
}

/* ::afterの開閉文言と、checkbox / toc-contentの表示制御はCocoonに任せる。 */
body.single-post .article > .entry-content .toc .toc-title::after {
  color: inherit;
  font-size: 13px;
  font-weight: 400;
  opacity: 0.7;
}

/* 番号・カウンター・最上位リストの字下げはCocoonの設定を維持する。 */
body.single-post .article > .entry-content .toc .toc-list {
  margin-block: 12px 0;
}

body.single-post .article > .entry-content .toc .toc-list ul,
body.single-post .article > .entry-content .toc .toc-list ol {
  margin: 6px 0 0;
  padding-left: 1.5em;
}

body.single-post .article > .entry-content .toc .toc-list li {
  margin-block: 0 6px;
}

body.single-post .article > .entry-content .toc .toc-list li:last-child {
  margin-bottom: 0;
}

body.single-post .article > .entry-content .toc .toc-list a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

body.single-post .article > .entry-content .toc .toc-list a:hover {
  color: #008C83;
  text-decoration: underline;
}

/* 写真：横方向の配置・指定サイズはWordPressに任せ、上下の余白だけ整える。 */
body.single-post .article > .entry-content .wp-block-image {
  margin-block: 28px;
  max-width: 100%;
}

body.single-post .article > .entry-content .wp-block-image img {
  max-width: 100%;
  height: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* 写真の条件・測定方法。後続本文との間隔は画像ブロックの余白で確保する。 */
body.single-post .article > .entry-content .wp-block-image figcaption {
  margin: 0;
  /* 配置指定時のdisplay: table-captionでも写真との間隔を保つ。 */
  padding: 8px 0 0;
  background: none;
  border: none;
  box-shadow: none;
  color: inherit;
  opacity: 0.8;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* 表：標準figureとCocoonが追加する内側ラッパーで横スクロールを受け止める。 */
body.single-post .article > .entry-content .wp-block-table {
  display: block;
  max-width: 100%;
  min-width: 0;
  margin-block: 28px;
  overflow-x: auto;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
}

body.single-post .article > .entry-content .wp-block-table .scrollable-table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

body.single-post .article > .entry-content .wp-block-table table {
  width: 100%;
  max-width: none;
  margin-block: 0;
  border-collapse: collapse;
  border: 1px solid #E7E2DA;
  border-radius: 0;
  box-shadow: none;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: 1.7;
  /* 固定レイアウトでもセルが潰れないよう、内容と最小幅で列幅を決める。 */
  table-layout: auto;
}

body.single-post .article > .entry-content .wp-block-table table thead,
body.single-post .article > .entry-content .wp-block-table table tfoot {
  border-color: #E7E2DA;
  border-style: solid;
  border-width: 1px 0;
}

/* Cocoon標準とWordPressのストライプスタイルの交互背景を解除。 */
body.single-post .article > .entry-content .wp-block-table table tr:nth-child(n) {
  background: none;
}

body.single-post .article > .entry-content .wp-block-table table th,
body.single-post .article > .entry-content .wp-block-table table td {
  min-width: 7em;
  padding: 12px 16px;
  border: solid #E7E2DA;
  border-width: 0 0 1px;
  background: none;
  color: inherit;
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

body.single-post .article > .entry-content .wp-block-table table th {
  background: #FAF8F4;
  font-weight: 600;
}

/* 通常表は左揃えを基本とし、エディターで指定したセル配置は維持。 */
body.single-post .article > .entry-content .wp-block-table table :is(th, td):not(.has-text-align-left, .has-text-align-center, .has-text-align-right) {
  text-align: left;
}

/* テーブルブロックの追加CSSクラス。2列目以降が数値の比較表専用。 */
body.single-post .article > .entry-content .wp-block-table.wanamono-data-table table tr > :first-child {
  min-width: 9em;
  text-align: left;
}

body.single-post .article > .entry-content .wp-block-table.wanamono-data-table table tr > :nth-child(n+2) {
  min-width: 8em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/

  body.single-post .article > .article-header > h1.entry-title {
    font-size: 24px;
  }

  body.single-post .article > .entry-content > h2 {
    font-size: 22px;
  }

  body.single-post .article > .entry-content > h3 {
    font-size: 19px;
  }

  body.single-post .entry-content .wanamono-field-note {
    padding: 20px;
  }

  body.single-post .entry-content .wanamono-field-note .wanamono-field-note__title {
    font-size: 18px;
  }

  body.single-post .article > .entry-content .toc {
    margin-block: 28px;
    font-size: 15px;
  }
}
