@charset "UTF-8";
/**
 * editor.css
 * 投稿本文（Gutenbergブロック）の共通スタイル＝「単一ソース」。
 *
 * フロント本文（.entry-content）とGutenbergエディタ内（.editor-styles-wrapper）を
 * :is(.entry-content, .editor-styles-wrapper) の共通セレクタで同時に指定し、
 * 「投稿画面の見た目」と「フロント表示」を一致させる。
 *
 * 読み込み： functions.php の enqueue_block_assets（フロント・エディタ両方）。
 *   ・フロント … 全ページで読まれるが、実効するのは .entry-content 内のみ。
 *   ・エディタ … iframe内でそのまま読まれ、.editor-styles-wrapper 内に効く。
 *     （style.css の :root はエディタには無いため、トークンは下でこのファイルが供給する）
 *
 * 対象は利用頻度の高い汎用ブロックに限定：
 *   見出し / 段落 / リンク / 強調 / リスト / 引用 / 画像＋キャプション /
 *   テーブル / ボタン / 区切り線 / 整列 / コード。
 *
 * ※ style.css の全体リセット（h1..h6,p{margin:0}／ul,li{list-style:none}）はフロントのみ。
 *   ここで余白・マーカーを明示指定することで、両画面の差を消している。
 */

/* ---- トークン（エディタ内供給。フロントは style.css と同値のため重複無害） ---- */
:is(.entry-content, .editor-styles-wrapper) {
  --ec-text: #333;
  --ec-text-lighter: #4e483f;
  --ec-text-light: #837a6b;
  --ec-green: #80B75D;
  --ec-darkgreen: #2B5A46;
  --ec-beige: #D8CEB8;
  --ec-ivory: #F7F2E5;
  --ec-lightgray: #F1EDE4;
  --ec-accent: #E65B38;

  color: var(--ec-text);
  font-size: 1rem;
  line-height: 1.9;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 先頭要素の上マージンは詰める（帯・ヘッダーとの間隔は各テンプレ側で管理） */
:is(.entry-content, .editor-styles-wrapper) > *:first-child { margin-top: 0; }



/* ---- 全体 ---- */
@media (min-width: 600px) {}
@media (max-width: 599px) {
  :is(.entry-content, .editor-styles-wrapper) {
    font-size: 0.8rem;
  }
}

/* ---- 段落 ---- */
:is(.entry-content, .editor-styles-wrapper) p {
  margin: 0 0 1.5em;
  line-height: 1.9;
  text-align: justify;
}

/* ---- 見出し ---- */
@media (min-width: 600px) {
  :is(.entry-content, .editor-styles-wrapper) h2 { font-size: 1.3rem; }
  :is(.entry-content, .editor-styles-wrapper) h3 { font-size: 1.28rem; }
  :is(.entry-content, .editor-styles-wrapper) h4 { font-size: 1.12rem; }
  :is(.entry-content, .editor-styles-wrapper) h5,
  :is(.entry-content, .editor-styles-wrapper) h6 { font-size: 1rem; }
}
@media (max-width: 599px) {
  :is(.entry-content, .editor-styles-wrapper) h1 { font-size: 1.5rem; }
  :is(.entry-content, .editor-styles-wrapper) h2 { font-size: 1.1rem; }
  :is(.entry-content, .editor-styles-wrapper) h3 { font-size: 1.05rem; }
  :is(.entry-content, .editor-styles-wrapper) h4,
  :is(.entry-content, .editor-styles-wrapper) h5,
  :is(.entry-content, .editor-styles-wrapper) h6 { font-size: 1rem; }
}
:is(.entry-content, .editor-styles-wrapper) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--ec-darkgreen);
  font-weight: 700;
  line-height: 1.45;
}
:is(.entry-content, .editor-styles-wrapper) h2 {
  margin: 2.4em 0 0.9em;
  padding: 0.2em 0 0.3em 0.6em;
  border-left: 6px solid var(--ec-green);
  border-bottom: 1px solid var(--ec-beige);
}
:is(.entry-content, .editor-styles-wrapper) h3 {
  margin: 2.2em 0 0.7em;
  padding-left: 0.6em;
  border-left: 4px solid var(--ec-beige);
}
:is(.entry-content, .editor-styles-wrapper) h4 {
  margin: 2em 0 0.6em;
}
:is(.entry-content, .editor-styles-wrapper) h5,
:is(.entry-content, .editor-styles-wrapper) h6 {
  margin: 1.8em 0 0.5em;
}

/* ---- リンク ---- */
:is(.entry-content, .editor-styles-wrapper) a {
  color: var(--ec-darkgreen);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
:is(.entry-content, .editor-styles-wrapper) a:hover {
  text-decoration: none;
}

/* ---- 強調 ---- */
:is(.entry-content, .editor-styles-wrapper) strong { font-weight: 700; }
:is(.entry-content, .editor-styles-wrapper) em { font-style: italic; }
:is(.entry-content, .editor-styles-wrapper) mark {
  background: #fdf3c9;
  padding: 0 0.15em;
}

/* ---- リスト ---- */
:is(.entry-content, .editor-styles-wrapper) ul,
:is(.entry-content, .editor-styles-wrapper) ol {
  margin: 0 0 1.5em;
  padding-left: 1.6em;
  line-height: 1.9;
}
:is(.entry-content, .editor-styles-wrapper) ul { list-style: disc; }
:is(.entry-content, .editor-styles-wrapper) ol { list-style: decimal; }
/* li 自身にもマーカーを再指定。style.css の全体リセット ul,li{list-style:none} が
   li に直接当たって勝つため、ここで打ち消さないとバレットが出ない */
:is(.entry-content, .editor-styles-wrapper) ul > li { list-style-type: disc; }
:is(.entry-content, .editor-styles-wrapper) ol > li { list-style-type: decimal; }
:is(.entry-content, .editor-styles-wrapper) li { margin: 0 0 0.4em; }
:is(.entry-content, .editor-styles-wrapper) li > ul,
:is(.entry-content, .editor-styles-wrapper) li > ol { margin: 0.4em 0 0; }

/* ---- 引用 ---- */
:is(.entry-content, .editor-styles-wrapper) blockquote {
  margin: 0 0 1.5em;
  padding: 0.9em 1.2em;
  border-left: 4px solid var(--ec-beige);
  background: var(--ec-ivory);
  color: var(--ec-text);
}
:is(.entry-content, .editor-styles-wrapper) blockquote p { margin-bottom: 0.6em; }
:is(.entry-content, .editor-styles-wrapper) blockquote > :last-child { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) blockquote cite,
:is(.entry-content, .editor-styles-wrapper) blockquote .wp-block-quote__citation {
  display: block;
  margin-top: 0.6em;
  font-style: normal;
  font-size: 0.85em;
  color: var(--ec-text-light);
}

/* ---- 画像・キャプション ---- */
:is(.entry-content, .editor-styles-wrapper) img {
  max-width: 100%;
  height: auto;
}
:is(.entry-content, .editor-styles-wrapper) figure { margin: 0 0 1.5em; }
:is(.entry-content, .editor-styles-wrapper) .tiled-gallery__col figure { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) figcaption,
:is(.entry-content, .editor-styles-wrapper) .wp-element-caption {
  margin-top: 0.5em;
  font-size: 0.85em;
  line-height: 1.6;
  color: var(--ec-text-light);
  text-align: center;
}

/* ---- テーブル ---- */
:is(.entry-content, .editor-styles-wrapper) table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  font-size: 0.95em;
  background-color: #fff;
}
:is(.entry-content, .editor-styles-wrapper) th,
:is(.entry-content, .editor-styles-wrapper) td {
  padding: 0.5em 0.7em;
  border: 1px solid var(--ec-beige);
  text-align: left;
  vertical-align: top;
}
:is(.entry-content, .editor-styles-wrapper) thead th,
:is(.entry-content, .editor-styles-wrapper) th {
  background: var(--ec-lightgray);
}
/* ストライプスタイル時は枠線・見出し背景をコアに委ねる（raw table の枠線は維持） */
:is(.entry-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes th,
:is(.entry-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes td {
  border: 0;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes thead th,
:is(.entry-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes th {
  background: transparent;
}

/* ---- ボタン ---- */
:is(.entry-content, .editor-styles-wrapper) .wp-block-button { margin: 0 0 1.5em; }
:is(.entry-content, .editor-styles-wrapper) .wp-block-button__link {
  display: inline-block;
  padding: 0.7em 1.8em;
  border-radius: 40px;
  background: var(--ec-darkgreen);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--ec-darkgreen);
  border: 1px solid var(--ec-darkgreen);
}

/* ---- メディアとテキスト ---- */
@media (min-width: 600px) {
  :is(.entry-content, .editor-styles-wrapper) .wp-block-media-text .wp-block-media-text__content {
    padding-right: 8%;
    padding-left: 0;
  }
  :is(.entry-content, .editor-styles-wrapper) .wp-block-media-text figure + .wp-block-media-text__content {
    padding-right: 0;
    padding-left: 8%;
  }
}
@media (max-width: 599px) {
  :is(.entry-content, .editor-styles-wrapper) .wp-block-media-text .wp-block-media-text__media {
    margin-bottom: 1.5rem;
  }
  :is(.entry-content, .editor-styles-wrapper) .wp-block-media-text .wp-block-media-text__content {
    padding-left: 0;
    padding-right: 0;
  }
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-media-text {
  margin-bottom: 2em;
}

/* ---- ギャラリー（コア wp-block-gallery を固定列グリッドに：PC3列／SP2列） ---- */
@media (min-width: 600px) {
  :is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.is-layout-flex {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 599px) {
  :is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.is-layout-flex {
    grid-template-columns: repeat(2, 1fr);
  }
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.wp-block-gallery-is-layout-flex {
  display: grid;
  grid-gap: 10px;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.wp-block-gallery-is-layout-flex figure {
  width: 100% !important;
  margin: 0;
  padding: 0;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.wp-block-gallery-is-layout-flex figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- カラム（縦積み時の列間余白：SP） ---- */
@media (max-width: 599px) {
  :is(.entry-content, .editor-styles-wrapper) .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    margin-bottom: 20px;
  }
}

/* ---- 区切り線 ---- */
:is(.entry-content, .editor-styles-wrapper) hr,
:is(.entry-content, .editor-styles-wrapper) .wp-block-separator {
  height: 0;
  border: 0;
  border-top: 1px solid var(--ec-beige);
  margin: 2.4em auto;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-separator.has-alpha-channel-opacity { opacity: 1; }

/* ---- コード ---- */
:is(.entry-content, .editor-styles-wrapper) code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: var(--ec-lightgray);
  font-size: 0.9em;
}
:is(.entry-content, .editor-styles-wrapper) pre {
  margin: 0 0 1.5em;
  padding: 1em 1.2em;
  border-radius: 6px;
  background: #2b2b2b;
  color: #f5f5f5;
  overflow-x: auto;
  line-height: 1.7;
}
:is(.entry-content, .editor-styles-wrapper) pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: 0.9em;
}

/* ---- 整列（コア提供と重複するが両画面の保険として明示） ---- */
:is(.entry-content, .editor-styles-wrapper) .has-text-align-center { text-align: center; }
:is(.entry-content, .editor-styles-wrapper) .has-text-align-right { text-align: right; }
:is(.entry-content, .editor-styles-wrapper) .has-text-align-left { text-align: left; }



/* -------------------------------------------------------
// # Wordpress Editor iframe内枠
// ------------------------------------------------------*/
body.block-editor-iframe__body {
  max-width: 1000px;
  padding-left: 50px;
  padding-right: 50px;
}


/* -------------------------------------------------------
// # 追加elements
// ------------------------------------------------------*/
:is(.entry-content, .editor-styles-wrapper) .slogan {
  font-size: 120%;
  font-weight: bold;
  line-height: 1.5;
  color: var(--ec-text-lighter);
}
:is(.entry-content, .editor-styles-wrapper) .qanda {
  padding-left: 60px;
  position: relative;
  padding-top: 20px;
  margin-bottom: 30px;
}
:is(.entry-content, .editor-styles-wrapper) .qanda::before {
  content: "";
  display: inline-block;
  width: 50px;
  height: 50px;
  position: absolute;
  top: 0;
  left: 0;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: contain;
}
:is(.entry-content, .editor-styles-wrapper) .qanda.q::before {
  background-image: url(../images/ico_qanda_q.svg);
}
:is(.entry-content, .editor-styles-wrapper) .qanda.a::before {
  background-image: url(../images/ico_qanda_a.svg);
}
:is(.entry-content, .editor-styles-wrapper) .qanda.q {
  font-size: 110%;
  font-weight: bold;
  margin-bottom: 10px;
}

/* -------------------------------------------------------
// # Carousel内の閉じるボタン
// ------------------------------------------------------*/
.jp-carousel-overlay .jp-carousel-close-hint,
.jp-carousel-overlay .jp-carousel-close-hint svg {
  width: 55px;
  height: 55px;
}
.jp-carousel-overlay .jp-carousel-close-hint {
  top: 0;
  right: 0;
  padding: 0;
}
.jp-carousel-overlay .jp-carousel-close-hint svg {
  padding: 0;
}

/* -------------------------------------------------------
// # Carousel内の次前ボタン
// ------------------------------------------------------*/
.jp-carousel-overlay .jp-carousel-container .jp-swiper-button-next,
.jp-carousel-overlay .jp-carousel-container .jp-swiper-button-next svg,
.jp-carousel-overlay .jp-carousel-container .jp-swiper-button-prev,
.jp-carousel-overlay .jp-carousel-container .jp-swiper-button-prev svg {
  width: 55px;
  height: 55px;
}
.jp-carousel-overlay .jp-carousel-container .swiper-button-prev,
.jp-carousel-overlay .jp-carousel-container .swiper-button-next {
  padding: 0;
}

