/*
 * 本文スタイル（表側の .entry-content とブロックエディタで共通）
 * エディタ側は本文の入れ物が .is-root-container になるため、両方を対象にする。
 */

:is(.entry-content,.is-root-container){line-height:1.9}
:is(.entry-content,.is-root-container) > * + *{margin-top:1.2em}
:is(.entry-content,.is-root-container) a{color:var(--accent-d);text-decoration:underline;text-underline-offset:3px}
:is(.entry-content,.is-root-container) a:hover{color:var(--brown)}

/* ---------------------------------------------------------
   見出し（h2〜h4）
   既定：h2＝小麦帯 / h3＝小麦帯（小） / h4＝左ライン
   ブロックスタイル「小麦帯・下線・左ライン・装飾なし」で上書きできる
   --------------------------------------------------------- */
:is(.entry-content,.is-root-container) :is(h2,h3,h4){color:var(--brown);font-weight:700;line-height:1.5;margin-top:2em;margin-bottom:0}
:is(.entry-content,.is-root-container) > :is(h2,h3,h4):first-child{margin-top:0}
:is(.entry-content,.is-root-container) h2{
  font-size:21px;
  background:#f5ead0 url("../img/h_bg-01.png") no-repeat right center/cover;
  border:1px solid var(--line);border-radius:10px;padding:.75em 1.35em;
}
:is(.entry-content,.is-root-container) h3{
  font-size:18px;
  background:#f8efd9 url("../img/h_bg-01.png") no-repeat right center/cover;
  border:1px solid var(--line);border-radius:8px;padding:.5em 1.1em;
}
:is(.entry-content,.is-root-container) h4{font-size:16px;border-left:4px solid var(--accent);padding:.1em 0 .1em .7em}

/* ブロックスタイル（見出しのレベルに関係なく選べる。引用ブロック等の同名スタイルに影響しないよう見出しに限定） */
:is(.entry-content,.is-root-container) :is(h2,h3,h4).is-style-wheat{
  background:#f5ead0 url("../img/h_bg-01.png") no-repeat right center/cover;
  border:1px solid var(--line);border-radius:10px;padding:.75em 1.35em;
}
:is(.entry-content,.is-root-container) :is(h2,h3,h4).is-style-underline{background:none;border:none;border-bottom:2px solid var(--line);border-radius:0;padding:0 0 .35em}
:is(.entry-content,.is-root-container) :is(h2,h3,h4).is-style-bar{background:none;border:none;border-left:4px solid var(--accent);border-radius:0;padding:.1em 0 .1em .7em}
:is(.entry-content,.is-root-container) :is(h2,h3,h4).is-style-plain{background:none;border:none;border-radius:0;padding:0}

/* ---------------------------------------------------------
   段落・リスト・引用・区切り
   --------------------------------------------------------- */
:is(.entry-content,.is-root-container) :is(ul,ol){padding-left:1.5em}
:is(.entry-content,.is-root-container) ul{list-style:disc}
:is(.entry-content,.is-root-container) ol{list-style:decimal}
:is(.entry-content,.is-root-container) li + li{margin-top:.3em}
:is(.entry-content,.is-root-container) blockquote{border-left:4px solid var(--line);background:#fbf6e9;border-radius:0 8px 8px 0;padding:14px 18px;color:var(--brown-soft)}
:is(.entry-content,.is-root-container) hr{border:none;border-top:1px dashed var(--line);margin:2.2em 0}

/* ---------------------------------------------------------
   画像（ブロック・旧記事のクラシックHTML両対応）
   --------------------------------------------------------- */
:is(.entry-content,.is-root-container) img{max-width:100%;height:auto;border-radius:10px}
:is(.entry-content,.is-root-container) figcaption{margin-top:.5em;font-size:13px;color:var(--brown-soft);text-align:center}
:is(.entry-content,.is-root-container) .aligncenter{margin-left:auto;margin-right:auto;text-align:center}
:is(.entry-content,.is-root-container) img.aligncenter{display:block}
:is(.entry-content,.is-root-container) .alignleft{float:left;margin:.3em 1.4em 1em 0}
:is(.entry-content,.is-root-container) .alignright{float:right;margin:.3em 0 1em 1.4em}
:is(.entry-content,.is-root-container)::after{content:"";display:table;clear:both}
.wp-caption{max-width:100%}
.wp-caption-text{margin-top:.5em;font-size:13px;color:var(--brown-soft);text-align:center}

/* ---------------------------------------------------------
   テーブル
   --------------------------------------------------------- */
:is(.entry-content,.is-root-container) table{width:100%;border-collapse:collapse;font-size:14px}
:is(.entry-content,.is-root-container) :is(th,td){border:1px solid var(--line);padding:9px 14px;text-align:left;vertical-align:top}
:is(.entry-content,.is-root-container) th{background:var(--cream);color:var(--brown);font-weight:700;white-space:nowrap}
:is(.entry-content,.is-root-container) .wp-block-table{overflow-x:auto}
:is(.entry-content,.is-root-container) .wp-block-table.is-style-stripes tbody tr:nth-child(odd){background:#fbf6e9}
:is(.entry-content,.is-root-container) .wp-block-table.is-style-stripes :is(th,td){border-color:var(--line)}
/* 列の幅（％）：エディタ右カラム「列の幅」。figure に --nable-col-N（functions.php / table-width.js）。
   固定レイアウトにして指定どおりの幅に（未指定の列は残りを等分）。12列まで */
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w table{table-layout:fixed;width:100%}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w th{white-space:normal}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w :is(th,td){overflow-wrap:anywhere}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(1){width:var(--nable-col-1,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(2){width:var(--nable-col-2,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(3){width:var(--nable-col-3,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(4){width:var(--nable-col-4,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(5){width:var(--nable-col-5,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(6){width:var(--nable-col-6,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(7){width:var(--nable-col-7,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(8){width:var(--nable-col-8,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(9){width:var(--nable-col-9,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(10){width:var(--nable-col-10,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(11){width:var(--nable-col-11,auto)}
:is(.entry-content,.is-root-container) .wp-block-table.nable-col-w tr > :nth-child(12){width:var(--nable-col-12,auto)}

/* ---------------------------------------------------------
   埋め込み（YouTube・Googleマップ・内部リンクカード等）
   --------------------------------------------------------- */
:is(.entry-content,.is-root-container) .wp-block-embed iframe{max-width:100%;border-radius:10px}
:is(.entry-content,.is-root-container) iframe[src*="google.com/maps"]{width:100%;min-height:320px;border:0;border-radius:10px}
:is(.entry-content,.is-root-container) .wp-block-embed.is-type-wp-embed{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fff}

/* ---------------------------------------------------------
   ナブル紹介（同期パターン「ナブル紹介（記事の最後）」。ナブル通信の本文末尾に自動表示）
   中身はグループ（.nable-signature）＞カラム（ロゴ 150px｜文章）。781px以下はWP標準どおり縦積み
   --------------------------------------------------------- */
.entry-content > .nable-signature-area{margin-top:44px}
:is(.entry-content,.is-root-container) .nable-signature{background:var(--card,#fbf3d1);border:1px solid var(--line,#ecdfb4);border-radius:var(--radius,14px);box-shadow:var(--shadow,0 6px 20px rgba(160,130,70,.14));padding:22px 24px;font-size:13.5px;line-height:1.8}
:is(.entry-content,.is-root-container) .nable-signature .wp-block-columns{margin:0;gap:10px 22px}
:is(.entry-content,.is-root-container) .nable-signature :is(p,.wp-block-image,.wp-block-buttons){margin:0}
:is(.entry-content,.is-root-container) .nable-signature .wp-block-image img{width:150px;max-width:100%;height:auto;border-radius:0;box-shadow:none}
:is(.entry-content,.is-root-container) .nable-signature .nable-signature-name{font-weight:700;color:var(--brown);font-size:15px}
:is(.entry-content,.is-root-container) .nable-signature .wp-block-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
:is(.entry-content,.is-root-container) .nable-signature .wp-block-button__link{display:inline-flex;align-items:center;padding:8px 16px;border-radius:10px;font-size:13px;font-weight:700;line-height:1.6;text-decoration:none;background:var(--accent);border:1px solid var(--accent);color:#fff;transition:transform .2s,background .2s}
:is(.entry-content,.is-root-container) .nable-signature .wp-block-button__link:hover{transform:translateY(-2px);background:var(--accent-d);color:#fff}
:is(.entry-content,.is-root-container) .nable-signature .is-style-outline .wp-block-button__link{background:#fff;border-color:var(--line);color:var(--brown)}
:is(.entry-content,.is-root-container) .nable-signature .is-style-outline .wp-block-button__link:hover{background:#fff;color:var(--brown)}

/* 追加CSSクラス .pc_hide（PCで表示しない。表側の非表示は style.css）: エディタでは消さずに点線で目印 */
.is-root-container .pc_hide{outline:2px dashed #c9a45c;outline-offset:4px}

@media(max-width:680px){
  :is(.entry-content,.is-root-container) h2{font-size:18px}
  :is(.entry-content,.is-root-container) h3{font-size:16.5px}
  :is(.entry-content,.is-root-container) :is(.alignleft,.alignright){float:none;margin:1em auto}
}
