/* 現行WPから移行した本文（講座詳細など）。書式は prose.css（ALC記事準拠）に委譲し、ここは幅と画像の見え方だけ */
.wpbody{max-width:1040px} /* 9/28: 旧サイトの本文幅に合わせる（旧固定ページのブロックをそのまま描画するため） */
.wpbody img{border:1px solid var(--line);border-radius:12px;margin:1.4em auto}
.wpbody figcaption{text-align:center}
.wpbody strong,.wpbody b{font-weight:700}
/* 旧サイト固定ページの本文（ebmi_legacy_page_content）: 画像は旧サイトどおり枠なし */
.legacy-content img{border:0;border-radius:0;margin:0 auto}
.legacy-content figure{margin-left:auto;margin-right:auto}
.legacy-content .legacy-featured{margin:0 0 32px}
.legacy-content .legacy-featured img{width:100%;height:auto;display:block}

/* ── 旧固定ページのブロック本文を新サイトの意匠に合わせる（9/28 村山: 背景と文字色が合わず読みづらい）── */
/* 見出し: prose の下線をやめ、本文側の区切り線（wp-block-separator）を金の短いアクセントにする＝二重線をなくす */
.legacy-content h2{border-bottom:0;padding-bottom:0;margin:3.4em 0 .5em;font-size:1.9rem !important;line-height:1.45} /* 10/2 夜 村山: もうワンサイズ大きく（折り返しは word-break:auto-phrase と意図した br で語単位） */ /* 9/28 村山: 見出しを大きく・前の段落との間を広く（旧本文の inline font-size も揃える） */
.legacy-content h2:first-child{margin-top:0}
.legacy-content .legacy-featured + h2{margin-top:3.4em} /* 10/2 村山: 他の見出しと同じ間隔に */
.legacy-content .wp-block-buttons + h2,.legacy-content .smb-box + h2,.legacy-content .wp-block-columns + h2,.legacy-content .wp-block-group + h2{margin-top:3.8em}
.legacy-content h2,.legacy-content h3{text-wrap:wrap;word-break:auto-phrase} /* 10/2: balance が語の途中で折っていた。意図した <br> は PHP 側で残す */
.legacy-content li,.legacy-content th,.legacy-content td,.wpbody table td{word-break:auto-phrase}
.wpbody figure.spec td:first-child{white-space:nowrap;width:7em}
.legacy-content h2 span.sme-font-size{font-size:inherit !important}
.legacy-content hr.wp-block-separator{border:0 !important;height:3px;width:56px;margin:14px auto 36px;background:var(--gold) !important;opacity:1;color:var(--gold)}
/* ボタン: 背景色つきボタンの文字は白・下線なし（prose のリンク色が乗らないように） */
.legacy-content .wp-block-button__link,.legacy-content .wp-block-button__link *{color:#fff !important;text-decoration:none !important}
.legacy-content .wp-block-button__link{border-radius:999px;padding:14px 32px;line-height:1.4;box-shadow:none;transition:opacity .15s}
.legacy-content .wp-block-button__link:hover{opacity:.85}
.legacy-content .wp-block-button__link.has-black-background-color{background:var(--ink) !important}
/* 手順番号の丸（幅25%のボタン）: 正円にして数字を白で */
.legacy-content .wp-block-button__width-25{width:auto !important}
.legacy-content .wp-block-button__width-25 .wp-block-button__link{width:64px !important;min-width:64px;height:64px;padding:0 !important;display:flex;align-items:center;justify-content:center;font-size:24px;margin:0 auto;border-radius:50% !important}
.legacy-content .wp-block-button__width-25 .wp-block-button__link .sme-font-size{font-size:24px !important}
/* ボックス・段組: 角丸と余白をそろえる */
.legacy-content .smb-box{border-radius:12px}
.legacy-content .smb-box__body>:first-child{margin-top:0}
.legacy-content .smb-box__body>:last-child{margin-bottom:0}
.legacy-content .wp-block-columns{gap:24px}
.legacy-content .wp-block-column>:first-child{margin-top:0}
.legacy-content p:empty,.legacy-content p:has(> br:only-child){display:none}
/* 旧本文の改行連打（<br><br>）による空白を詰める */
.legacy-content p{margin:.9em 0}
.legacy-content ul,.legacy-content ol{margin:.6em 0 .6em 1.2em}
.legacy-content li{margin:.35em 0}
.legacy-content .wp-block-image{margin:1.2em 0}
.legacy-content figure.wp-block-table,.legacy-content .wp-block-flexible-table-block-table{margin:1.2em 0}
.legacy-content .wp-block-flexible-table-block-table th{background:var(--paper2);font-weight:700}
.legacy-content .wp-block-flexible-table-block-table td,.legacy-content .wp-block-flexible-table-block-table th{border-color:var(--line);padding:14px 18px}
/* 9/28 村山: 横並びの枠は高さをそろえる／文字はすべて左揃え */
.legacy-content .wp-block-columns{align-items:stretch}
.legacy-content .wp-block-column{align-self:stretch !important;display:flex;flex-direction:column}
.legacy-content .wp-block-column>.smb-box,.legacy-content .wp-block-column>.wp-block-group{flex:1 1 auto}
.legacy-content .smb-box{display:flex}
.legacy-content .smb-box__body{flex:1 1 auto}
.legacy-content,.legacy-content .has-text-align-center,.legacy-content .has-text-align-right,.legacy-content h2,.legacy-content h3,.legacy-content p,.legacy-content li,.legacy-content td,.legacy-content th,.legacy-content figcaption{text-align:left !important}
.legacy-content hr.wp-block-separator{margin-left:0;margin-right:auto}
.legacy-content .wp-block-buttons:has(.wp-block-button__width-25){justify-content:flex-start}
.legacy-content .wp-block-button__width-25 .wp-block-button__link{margin:0}
/* 9/28 村山: 箇条書き入りの 3 段組（お悩み）は文字幅が狭すぎる → 縦積みにし、各枠は「見出し｜箇条書き」の横並びに */
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul){flex-direction:column;gap:14px}
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) > .wp-block-column{flex-basis:auto !important;width:100%}
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) .smb-box{padding:22px 28px !important}
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) .smb-box__body{display:flex;flex-direction:column;gap:10px;align-items:stretch} /* 10/2 村山: 見出しを上・箇条書きを全幅に（横並びだと行が短く不自然に折れる） */
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) .smb-box__body > p{margin:0}
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) .smb-box__body > ul{margin:0;padding-left:1.1em}
@media (max-width:700px){.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) .smb-box__body{flex-direction:column;gap:8px}.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box ul) .smb-box__body > p{flex-basis:auto}}
/* それ以外の段組の枠は内側の余白を少し詰めて文字幅を確保 */
.legacy-content .wp-block-column > .smb-box{padding:22px 22px !important}
.legacy-content .wp-block-column ul{margin-left:0;padding-left:1.1em}
.legacy-content .smb-box > .smb-box__body > .wp-block-columns{margin-top:4px}
/* 段組の直後のボックス（「その悩み…」の金枠）との間隔 */
.legacy-content .wp-block-columns + .smb-box,.legacy-content .wp-block-columns + p + .smb-box,.legacy-content .wp-block-columns + p + p + .smb-box{margin-top:22px}
/* 9/28 村山: 段組の直後のボタンが枠と重なる → ブロック間の縦の間隔を固定で確保 */
.legacy-content .wp-block-columns{margin-top:16px;margin-bottom:36px}
.legacy-content .wp-block-buttons{margin:36px 0}
.legacy-content > .smb-box{margin:18px 0 36px}
.legacy-content .wp-block-columns + .wp-block-buttons,.legacy-content .wp-block-columns + p + .wp-block-buttons,.legacy-content .wp-block-columns + p + p + .wp-block-buttons{margin-top:44px}

@media (max-width:899px){.prose figure.spec table{display:table;width:100%;min-width:0}.prose figure.spec table tbody{display:table-row-group;min-width:0;width:auto}.wpbody figure.spec td:first-child{width:5.5em}} /* 10/2: 募集要項の表は SP で横スクロールせず折り返す */

/* 10/2 村山: 見出し→区切り線→段落の間が空きすぎ（旧本文の span 内先頭 <br>・末尾の <br><br>）＝他の節と揃える */
.legacy-content hr.wp-block-separator + p{margin-top:0}
.legacy-content hr.wp-block-separator{margin-bottom:28px}
/* 10/2 村山: 「なぜ、この講座が…」の枠＝冒頭の空き（strong>span 内の先頭 br）を詰め、導入文をひとまわり大きく、番号は下の文章に寄せ、上の段落からは離す */
.legacy-content .smb-box:has(.wp-block-button__width-25) .smb-box__body > p:first-child .has-medium-font-size{font-size:23px !important;line-height:1.7}
.legacy-content .smb-box .wp-block-columns:has(.wp-block-button__width-25){margin-top:40px}
.legacy-content .wp-block-buttons:has(.wp-block-button__width-25){margin:0 0 12px}
.legacy-content .wp-block-buttons:has(.wp-block-button__width-25) + p{margin-top:0}
/* 10/2 夜: 段落の余白用 <br> は PHP（ebmi_legacy_page_content）が文字の有無で判定して除くので、CSS では br を消さない（文中の意図した改行まで消えていた）。段組の段落は語単位で折る */
.legacy-content .wp-block-column p{word-break:auto-phrase}
/* 10/2 村山: 箇条書きの直後に画像（段組）が続くときは 1 行分あける（CEP「講義内容」の箱） */
.legacy-content .smb-box__body > ul + .wp-block-columns,.legacy-content ul + .wp-block-columns{margin-top:32px !important}
/* 10/2 村山: 旧本文で「見出し」が p（大きな文字＋区切り線）で組まれている箇所は h2 と同じ扱い（受講者の声） */
.legacy-content p:has(+ hr.wp-block-separator){margin:3.4em 0 .5em !important;font-size:1.9rem !important;font-weight:700;line-height:1.45}
.legacy-content p:has(+ hr.wp-block-separator) .sme-font-size{font-size:inherit !important}
/* 10/2 村山: 受講者の声（右寄せの署名を持つ箱の段組）は 3 列でなく縦に 3 行。本文は語の途中でも自然に折る */
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box p.has-text-align-right){flex-direction:column;gap:16px}
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box p.has-text-align-right) > .wp-block-column{flex-basis:auto !important;width:100%}
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box p.has-text-align-right) p{word-break:normal}
/* 10/2 村山: 受講者の声の本文中の改行は使わない（旧本文の <br>） */
.legacy-content .wp-block-columns:has(> .wp-block-column > .smb-box p.has-text-align-right) p:not(.has-text-align-right) br{display:none}
