/* ==================================================================
 * page-article.css — 汎用記事テンプレート
 * ------------------------------------------------------------------
 * 出所: 新推進協会モック（2026/9/8）のインラインCSSを機械分割。
 * モック側のセクションコメントをそのまま境界に使っているので、
 * モックと突き合わせながら追える。
 * 手を入れる場合はこのヘッダーに変更点を追記すること。
 *   2026/10/15 rev81  固定ページ・お知らせの本文を .entry に入れたのに合わせ、
 *                     ブロック本文（ギャラリー・段組み・表）の指定を末尾に追加
 * ================================================================== */

/* ============================================
   汎用記事テンプレート（ガイド記事／目的別／固定ページ）
   ============================================ */
.art-head{background:#fff;border-bottom:1px solid var(--line)}
.art-head .wrap{padding-block:28px 24px}
.art-head .cat{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;
  letter-spacing:.06em;background:var(--sky);color:var(--blue-ink);padding:4px 11px;border-radius:6px;margin-bottom:11px}
.art-head .cat.gold{background:var(--gold-soft);color:var(--gold)}
.art-head h1{font-size:clamp(23px,3.4vw,34px);font-weight:900;color:var(--navy);line-height:1.5;margin-bottom:12px}
.art-head .lead{font-size:15.5px;color:var(--body);max-width:44em;line-height:1.9}
.art-meta{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:14px;
  font-size:12.5px;color:var(--muted)}
.art-meta time{font-family:"Barlow Condensed",sans-serif;font-size:14px;letter-spacing:.04em}
.art-meta .tags{display:flex;gap:6px;flex-wrap:wrap}
.art-meta .tags a{font-size:12px;background:var(--sky-2);border:1px solid var(--line);color:var(--body);
  padding:3px 10px;border-radius:99px}
.art-eyecatch{border-radius:var(--r-lg);overflow:hidden;margin-bottom:28px}
.art-eyecatch .ph{aspect-ratio:16/9}
.art{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:44px;align-items:start;padding-block:34px}
.art.is-wide{grid-template-columns:minmax(0,1fr);max-width:820px;margin-inline:auto}
.art-side{position:sticky;top:96px;display:grid;gap:16px}
/* 目次（サイドバー） */
.side-toc{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:18px 20px}
.side-toc h2{font-size:13px;font-weight:800;color:var(--navy);margin-bottom:11px;letter-spacing:.04em}
.side-toc ol{display:grid;gap:2px;counter-reset:t}
.side-toc a{display:block;font-size:13px;color:var(--body);padding:7px 10px;border-radius:8px;line-height:1.6}
.side-toc a:hover{background:var(--sky-2);color:var(--blue-ink);text-decoration:none}
.side-toc a.is-cur{background:var(--sky);color:var(--blue-ink);font-weight:700}
.side-toc .lv3{padding-left:22px;font-size:12.5px}
/* 本文（ブロックエディタ出力） */
.entry{font-size:16px;line-height:2;color:#33475A}
.entry > * + *{margin-top:20px}
.entry h2{font-size:23px;font-weight:800;color:var(--navy);line-height:1.55;
  margin-top:48px;padding:0 0 12px;border-bottom:2px solid var(--line);position:relative;scroll-margin-top:100px}
.entry h2::after{content:"";position:absolute;left:0;bottom:-2px;width:70px;height:2px;background:var(--blue)}
.entry h3{font-size:19px;font-weight:800;color:var(--navy);line-height:1.6;margin-top:36px;
  padding-left:14px;border-left:4px solid var(--blue);scroll-margin-top:100px}
.entry h4{font-size:16.5px;font-weight:800;color:var(--navy);margin-top:28px}
.entry p{margin-top:16px}
.entry a{text-decoration:underline;text-underline-offset:3px}
.entry strong{font-weight:700;color:var(--navy);background:linear-gradient(transparent 62%,rgba(242,179,61,.4) 62%)}
.entry ul,.entry ol{display:grid;gap:10px;margin-top:16px}
.entry ul li{display:flex;gap:11px;line-height:1.9}
.entry ul li::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--blue);
  flex-shrink:0;margin-top:11px}
.entry ol{counter-reset:n;list-style:none}
.entry ol li{display:flex;gap:12px;line-height:1.9;counter-increment:n}
.entry ol li::before{content:counter(n);width:23px;height:23px;border-radius:50%;background:var(--navy);
  color:#fff;display:grid;place-items:center;font-family:"Barlow Condensed",sans-serif;font-weight:700;
  font-size:13px;flex-shrink:0;margin-top:6px}
.entry figure{margin:26px 0}
.entry figure .ph,.entry figure img{border-radius:var(--r)}
.entry figcaption{font-size:12.5px;color:var(--muted);margin-top:8px;text-align:center;line-height:1.7}
.entry blockquote{border-left:4px solid var(--blue);background:var(--sky-2);
  border-radius:0 var(--r) var(--r) 0;padding:18px 22px;margin:24px 0;font-size:15.5px;color:#33475A}
.entry blockquote p{margin-top:0}
.entry blockquote cite{display:block;font-size:12.5px;color:var(--muted);font-style:normal;margin-top:9px}
/* 表 */
.entry table{width:100%;border-collapse:collapse;font-size:14.5px;background:#fff;
  border:1px solid var(--line);border-radius:var(--r);overflow:hidden;margin-top:20px}
.entry table th,.entry table td{padding:13px 16px;text-align:left;border-bottom:1px solid var(--line);
  line-height:1.8}
.entry table thead th{background:var(--navy);color:#fff;font-size:13px;font-weight:700;letter-spacing:.02em}
.entry table tbody th{background:var(--sky-2);font-family:"Zen Kaku Gothic New",sans-serif;
  font-weight:700;color:var(--navy);font-size:14px;width:30%}
.entry table tr:last-child th,.entry table tr:last-child td{border-bottom:0}
.entry .table-scroll{overflow-x:auto}
/* 注釈ボックス（ブロックエディタ：グループ＋追加CSSクラス） */
.box{border-radius:var(--r);padding:20px 22px;margin-top:24px;display:grid;gap:9px}
.box > .bt{display:flex;align-items:center;gap:9px;font-family:"Zen Kaku Gothic New",sans-serif;
  font-weight:800;font-size:15.5px}
.box p{margin-top:0;font-size:14.5px;line-height:1.9}
.box ul{margin-top:0}
.box-point{background:var(--gold-soft);border:1px solid #F1DFBB}
.box-point > .bt{color:var(--gold)}
.box-note{background:var(--sky-2);border:1px solid #CFE3F5}
.box-note > .bt{color:var(--blue-ink)}
.box-caution{background:#FDF1F1;border:1px solid #F3D3D3}
.box-caution > .bt{color:#C62828}
/* 手順（番号付きカード） */
.steplist{display:grid;gap:12px;margin-top:24px;counter-reset:s}
.steplist .st{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:20px 22px;
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 18px;counter-increment:s;align-items:start}
.steplist .st::before{content:"STEP " counter(s);grid-row:1/3;font-family:"Barlow Condensed",sans-serif;
  font-weight:700;font-size:12px;letter-spacing:.1em;color:#fff;background:var(--navy);
  padding:6px 10px;border-radius:7px;white-space:nowrap;align-self:start}
.steplist .st b{font-family:"Zen Kaku Gothic New",sans-serif;font-size:17px;color:var(--navy);
  line-height:1.5;margin-bottom:7px;display:block}
.steplist .st p{margin:0;font-size:14.5px;line-height:1.9}
/* 内部リンクカード */
.linkcard{display:grid;grid-template-columns:132px minmax(0,1fr);gap:0;background:#fff;
  border:1px solid var(--line);border-radius:var(--r);overflow:hidden;margin-top:24px;transition:.18s}
.linkcard:hover{border-color:#BFD7EE;box-shadow:var(--shadow-h);text-decoration:none;transform:translateY(-2px)}
.linkcard .ph{height:100%;min-height:104px}
.linkcard .b{padding:15px 18px}
.linkcard .lb{font-size:10.5px;font-weight:800;letter-spacing:.1em;color:var(--muted);
  font-family:"Barlow Condensed",sans-serif;text-transform:uppercase}
.linkcard h3{font-size:16px;font-weight:800;color:var(--navy);margin:4px 0 5px;padding:0;border:0;line-height:1.55}
.linkcard p{font-size:12.5px;color:var(--body);margin:0;line-height:1.75}
/* 記事内CTA */
.inline-cta{background:linear-gradient(115deg,var(--navy) 0%,#0B5490 100%);border-radius:var(--r-lg);
  padding:26px 28px;margin-top:32px;color:#fff;display:flex;gap:22px;align-items:center;flex-wrap:wrap}
.inline-cta h3{font-size:19px;font-weight:800;margin:0 0 6px;padding:0;border:0;color:#fff;line-height:1.5}
.inline-cta p{margin:0;font-size:13.5px;color:#DCEDF9;line-height:1.8}
.inline-cta .txt{flex:1;min-width:250px}
.inline-cta .btn{flex-shrink:0}
/* 記事末尾の関連 */
.art-foot{border-top:1px solid var(--line);margin-top:44px;padding-top:28px}
@media(max-width:1024px){
  .art{grid-template-columns:1fr;gap:26px}
  .art-side{position:static;display:grid;grid-template-columns:1fr 1fr}
  .side-toc{grid-column:1/-1}
}
@media(max-width:820px){
  .entry{font-size:15.5px}
  .entry h2{font-size:20px;margin-top:38px}
  .entry h3{font-size:17.5px;margin-top:30px}
  .entry table th,.entry table td{padding:11px 12px;font-size:13.5px}
  .entry table tbody th{width:36%}
  .art-side{grid-template-columns:1fr}
  .steplist .st{grid-template-columns:1fr;gap:10px}
  .steplist .st::before{grid-row:auto;justify-self:start}
  .linkcard{grid-template-columns:96px minmax(0,1fr)}
  .inline-cta{padding:20px 18px}
  .inline-cta .btn{width:100%;justify-content:center}
}
/* ============================================
   汎用 記事テンプレート
   ============================================ */
.art-head{background:#fff;border-bottom:1px solid var(--line)}
.art-head .wrap{padding-block:28px 24px}
.art-cat{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}
.art-cat span,.art-cat a{font-size:11.5px;font-weight:700;padding:4px 11px;border-radius:6px;
  background:var(--sky);color:var(--blue-ink)}
.art-cat a:hover{background:#D9E9FA;text-decoration:none}
.art-cat .gold{background:var(--gold-soft);color:var(--gold)}
.art-head h1{font-size:clamp(23px,3.4vw,34px);font-weight:900;color:var(--navy);line-height:1.5;margin-bottom:14px}
.art-lead{font-size:15.5px;color:#33475A;line-height:1.95;max-width:44em;margin-bottom:16px}
.art-meta{display:flex;flex-wrap:wrap;gap:16px;align-items:center;font-size:12.5px;color:var(--muted)}
.art-meta span{display:flex;align-items:center;gap:6px}
.art-meta time{font-family:"Barlow Condensed",sans-serif;font-size:14px;letter-spacing:.04em}
.art-eye{border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--line);margin-top:20px}
.art-eye .ph{aspect-ratio:16/9}
.art-wrap{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:44px;align-items:start;padding-block:36px}
.art-wrap.is-solo{grid-template-columns:minmax(0,1fr);max-width:820px;margin-inline:auto}
.art-side{position:sticky;top:96px;display:grid;gap:16px}
/* 目次（サイドバー） */
.toc-side{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:17px 18px}
.toc-side h2{font-size:13px;font-weight:800;color:var(--navy);margin-bottom:11px;
  padding-bottom:9px;border-bottom:1px solid var(--line);letter-spacing:.04em}
.toc-side ol{display:grid;gap:2px;counter-reset:t}
.toc-side a{display:flex;gap:9px;font-size:13px;color:var(--body);padding:7px 8px;border-radius:8px;line-height:1.55}
.toc-side a::before{counter-increment:t;content:counter(t,decimal-leading-zero);
  font-family:"Barlow Condensed",sans-serif;color:var(--blue);font-size:12px;flex-shrink:0;padding-top:1px}
.toc-side a:hover{background:var(--sky-2);color:var(--blue-ink);text-decoration:none}
.toc-side a.is-cur{background:var(--sky);color:var(--blue-ink);font-weight:700}
.toc-side li.lv3 a{padding-left:26px;font-size:12.5px}
.toc-side li.lv3 a::before{content:"–";color:#B9CBDA}
/* 目次（本文中・SP） */
.toc-inline{display:none;background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:6px 18px 14px;margin-bottom:26px}
.toc-inline summary{cursor:pointer;list-style:none;padding:14px 0;font-family:"Zen Kaku Gothic New",sans-serif;
  font-weight:800;font-size:14px;color:var(--navy);display:flex;align-items:center;gap:9px}
.toc-inline summary::-webkit-details-marker{display:none}
.toc-inline summary .ar{margin-left:auto;color:var(--muted);transition:transform .2s}
.toc-inline[open] summary .ar{transform:rotate(90deg)}
.toc-inline ol{display:grid;gap:3px;counter-reset:t2;border-top:1px dashed var(--line);padding-top:10px}
.toc-inline a{display:flex;gap:9px;font-size:13.5px;color:var(--body);padding:6px 0;line-height:1.6}
.toc-inline a::before{counter-increment:t2;content:counter(t2,decimal-leading-zero);
  font-family:"Barlow Condensed",sans-serif;color:var(--blue);font-size:12px;flex-shrink:0}
.toc-inline li.lv3 a{padding-left:22px;font-size:12.5px}
.toc-inline li.lv3 a::before{content:"–";color:#B9CBDA}
/* ---------- 本文 ---------- */
.entry{font-size:16px;line-height:2;color:#33475A}
.entry > *{margin-bottom:22px}
.entry > *:last-child{margin-bottom:0}
.entry h2{font-size:22px;font-weight:800;color:var(--navy);line-height:1.55;
  margin:44px 0 18px;padding:0 0 12px 16px;border-bottom:2px solid var(--line);position:relative;scroll-margin-top:100px}
.entry h2::before{content:"";position:absolute;left:0;top:2px;bottom:14px;width:5px;
  border-radius:3px;background:var(--navy)}
.entry h2:first-child{margin-top:0}
.entry h3{font-size:18px;font-weight:800;color:var(--navy);line-height:1.6;
  margin:34px 0 14px;display:flex;gap:10px;align-items:flex-start;scroll-margin-top:100px}
.entry h3::before{content:"";width:9px;height:9px;border-radius:2px;background:var(--gold-bright);
  flex-shrink:0;margin-top:11px}
.entry h4{font-size:16px;font-weight:800;color:var(--navy);margin:26px 0 10px}
.entry p{margin-bottom:22px}
.entry a{text-decoration:underline;text-underline-offset:3px}
.entry strong{font-weight:700;color:var(--navy);
  background:linear-gradient(transparent 62%,rgba(242,179,61,.42) 62%)}
.entry ul,.entry ol{display:grid;gap:11px;margin-bottom:24px;padding-left:2px}
.entry li{line-height:1.9;display:flex;gap:12px}
.entry ul > li::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--blue);
  flex-shrink:0;margin-top:11px}
.entry ol{counter-reset:oi}
.entry ol > li::before{counter-increment:oi;content:counter(oi);width:23px;height:23px;border-radius:50%;
  background:var(--sky);color:var(--blue-ink);display:grid;place-items:center;flex-shrink:0;margin-top:4px;
  font-family:"Barlow Condensed",sans-serif;font-weight:700;font-size:13px}
.entry blockquote{background:var(--sky-2);border-left:4px solid var(--blue);
  border-radius:0 var(--r) var(--r) 0;padding:18px 24px;font-size:15.5px;color:#33475A}
.entry blockquote p:last-child{margin-bottom:0}
.entry blockquote cite{display:block;font-style:normal;font-size:12.5px;color:var(--muted);margin-top:9px}
.entry figure{margin:0 0 24px}
.entry figure .ph,.entry figure img{border-radius:var(--r);width:100%}
.entry figcaption{font-size:12.5px;color:var(--muted);margin-top:9px;line-height:1.7;text-align:center}
.entry hr{border:0;border-top:1px dashed var(--line);margin:34px 0}
/* 表 */
.entry .tbl{background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.entry table{width:100%;border-collapse:collapse;font-size:14.5px}
.entry th,.entry td{padding:13px 17px;text-align:left;border-bottom:1px solid var(--line);line-height:1.7}
.entry thead th{background:var(--sky-2);font-size:12.5px;letter-spacing:.03em;color:var(--muted);font-weight:700}
.entry tbody th{font-family:"Zen Kaku Gothic New",sans-serif;font-weight:700;color:var(--navy);font-size:14px}
.entry tr:last-child th,.entry tr:last-child td{border-bottom:0}
.entry .fee{font-family:"Barlow Condensed",sans-serif;font-size:20px;color:var(--navy);
  font-weight:600;letter-spacing:.02em}
/* 囲みボックス */
.box{border-radius:var(--r);padding:20px 24px;display:flex;gap:14px;align-items:flex-start}
.box .ic{flex-shrink:0;margin-top:2px}
.box b{display:block;font-family:"Zen Kaku Gothic New",sans-serif;font-size:15px;margin-bottom:7px}
.box p{font-size:14.5px;line-height:1.9;margin-bottom:0}
.box p + p{margin-top:10px}
.box ul{margin:8px 0 0}
.box li{font-size:14.5px}
.box-point{background:var(--sky-2);border:1px solid #CFE3F5}
.box-point b{color:var(--blue-ink)}
.box-point .ic{color:var(--blue-ink)}
.box-note{background:#F7F8FA;border:1px solid var(--line)}
.box-note b{color:var(--navy)}
.box-note .ic{color:var(--muted)}
.box-warn{background:var(--gold-soft);border:1px solid #F1DFBB}
.box-warn b{color:var(--gold)}
.box-warn .ic{color:var(--gold)}
.box-warn p,.box-warn li{color:#6B5A38}
/* 手順 */
.entry .howto{display:grid;gap:12px;counter-reset:hs}
.entry .howto > div{background:#fff;border:1px solid var(--line);border-radius:var(--r);
  padding:18px 22px 16px;position:relative;padding-left:64px}
.entry .howto > div::before{counter-increment:hs;content:counter(hs);position:absolute;left:20px;top:18px;
  width:30px;height:30px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;
  font-family:"Barlow Condensed",sans-serif;font-weight:700;font-size:16px}
.entry .howto b{display:block;font-family:"Zen Kaku Gothic New",sans-serif;font-size:16px;
  color:var(--navy);margin-bottom:6px}
.entry .howto p{font-size:14.5px;margin-bottom:0}
/* 内部リンクカード */
.entry .linkcard{display:grid;grid-template-columns:150px minmax(0,1fr);background:#fff;
  border:1px solid var(--line);border-radius:var(--r);overflow:hidden;transition:.18s}
.entry .linkcard:hover{border-color:#BFD7EE;box-shadow:var(--shadow-h);text-decoration:none;transform:translateY(-2px)}
.entry .linkcard .ph{height:100%;min-height:110px}
.entry .linkcard .b{padding:15px 18px}
.entry .linkcard .lb{font-size:10.5px;font-weight:800;letter-spacing:.1em;color:var(--gold);
  font-family:"Barlow Condensed",sans-serif;text-transform:uppercase}
.entry .linkcard h4{font-size:16px;margin:4px 0 5px;color:var(--navy)}
.entry .linkcard p{font-size:12.5px;color:var(--body);line-height:1.7;margin-bottom:0}
/* 記事中CTA */
.entry .cta-in{background:linear-gradient(160deg,var(--navy) 0%,#0B5490 100%);border-radius:var(--r-lg);
  padding:26px 28px;color:#fff;display:flex;gap:22px;align-items:center;flex-wrap:wrap;position:relative;overflow:hidden}
.entry .cta-in::after{content:"";position:absolute;right:-60px;top:-60px;width:200px;height:200px;
  border-radius:50%;border:1px dashed rgba(242,179,61,.3)}
.entry .cta-in > div{flex:1;min-width:250px;position:relative;z-index:2}
.entry .cta-in b{display:block;font-family:"Zen Kaku Gothic New",sans-serif;font-size:19px;
  font-weight:800;margin-bottom:7px}
.entry .cta-in p{font-size:13.5px;color:#DCEDF9;margin-bottom:0;line-height:1.8}
.entry .cta-in .btn{position:relative;z-index:2;flex-shrink:0}
/* 記事フッター */
.art-foot{border-top:1px solid var(--line);margin-top:40px;padding-top:24px}
.art-tags{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-bottom:22px}
.art-tags .lb{font-size:12px;color:var(--muted);font-weight:700;margin-right:3px}
.art-tags a{font-size:12.5px;background:var(--sky-2);border:1px solid var(--line);color:var(--body);
  padding:5px 12px;border-radius:99px;font-weight:600}
.art-tags a:hover{border-color:var(--blue);color:var(--blue-ink);text-decoration:none}
.art-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.art-nav a{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:15px 18px;color:var(--ink)}
.art-nav a:hover{border-color:var(--blue);text-decoration:none}
.art-nav .lb{font-size:11px;color:var(--muted);font-family:"Barlow Condensed",sans-serif;
  letter-spacing:.1em;font-weight:700;display:flex;align-items:center;gap:5px;margin-bottom:5px}
.art-nav b{font-family:"Zen Kaku Gothic New",sans-serif;font-size:14px;color:var(--navy);line-height:1.6}
.art-nav .next{text-align:right}
.art-nav .next .lb{justify-content:flex-end}
@media(max-width:1024px){
  .art-wrap{grid-template-columns:1fr;gap:26px}
  .art-side{position:static;display:grid;grid-template-columns:1fr 1fr}
  .toc-side{display:none}
  .toc-inline{display:block}
}
@media(max-width:820px){
  .art-side{grid-template-columns:1fr}
  .entry{font-size:15.5px}
  .entry h2{font-size:19px;margin-top:36px;padding-left:13px}
  .entry h3{font-size:16.5px}
  .entry .linkcard{grid-template-columns:1fr}
  .entry .linkcard .ph{aspect-ratio:16/9;min-height:0}
  .entry .cta-in{padding:20px 18px}
  .entry .cta-in .btn{width:100%;justify-content:center}
  .entry .howto > div{padding:16px 16px 14px 54px}
  .entry .howto > div::before{left:14px;top:15px}
  .entry .tbl{overflow-x:auto}
  .entry table{min-width:520px}
  .box{padding:16px 17px;gap:11px}
  .art-nav{grid-template-columns:1fr}
}
/* ==================================================================
 * 本文の画像・動画（2026/10/13）
 * ------------------------------------------------------------------
 * 学校ページ（page-school.css）で直した内容を、記事側にも入れる。
 * ガイド記事・チェーンTOP・固定ページはこのCSSを使うため、学校側の修正が
 * 効いていなかった。
 *
 * 画像：大きい画像は本文の幅（.art-main）に合わせて縮め、
 *       小さい画像は原寸のまま出す（引き伸ばさない）。
 *       上の .entry figure img{width:100%} を打ち消す。
 *       旧サイトの本文は <p><img width="…" height="…"> の形が多く、
 *       height 属性が残ると縮めたときに縦に潰れるので height:auto も必須。
 * ギャラリーは1枚ずつ枠いっぱいに並べたいので、従来どおり width:100%。
 * ================================================================== */
.entry img{max-width:100%;height:auto}
.entry figure img,
.entry .wp-block-image img{width:auto;max-width:100%;height:auto}
.entry .wp-block-image.aligncenter,
.entry figure.aligncenter{text-align:center}
.entry .wp-block-image.aligncenter img,
.entry figure.aligncenter img{margin-inline:auto}
.entry .wp-block-gallery figure img,
.entry .wp-block-gallery.has-nested-images figure.wp-block-image img{width:100% !important;max-width:100% !important}

/* 動画・地図などの埋め込み
 * YouTube/Vimeo は旧サイトの width="640" などがそのまま残っていて、
 * 本文幅より広いとはみ出す。幅は本文に合わせ、高さは16:9で決める。
 * 旧サイトの「親に position:relative がある前提」の絶対配置 iframe も、
 * 通常の配置に戻す（学校ページで起きたヒーロー重なりの対策と同じ）。 */
.entry{position:relative}
.entry iframe{max-width:100%;border:0}
.entry iframe[src*="youtube"],
.entry iframe[src*="youtu.be"],
.entry iframe[src*="vimeo"]{
  display:block;width:100% !important;height:auto !important;aspect-ratio:16/9;
  border-radius:var(--r)}
.entry iframe[style*="absolute"]{position:static !important;width:100% !important;height:auto !important;aspect-ratio:16/9}
.entry .wp-block-embed{margin:24px 0}
/* 比率は iframe 自身の aspect-ratio で作る。ラッパーで比率を作る方式
   （padding-top:56.25% ＋ 絶対配置）とは混ぜない。ブロックエディタの埋め込み
   ブロックも、旧サイトの動画用 div も、余白と絶対配置を外して同じ形にそろえる。 */
.entry .wp-block-embed__wrapper,
.entry div:has(> iframe[src*="youtube"]),
.entry div:has(> iframe[src*="vimeo"]){position:static !important;padding-top:0 !important;height:auto !important}
.entry .wp-block-embed__wrapper::before{content:none !important;display:none !important}   /* WP本体が比率用の余白をここで作る */
.entry .wp-block-embed__wrapper > iframe,
.entry div:has(> iframe[src*="youtube"]) > iframe,
.entry div:has(> iframe[src*="vimeo"]) > iframe{position:static !important}

/* ==================================================================
 * 本文のリスト（2026/10/13）
 * ------------------------------------------------------------------
 * 上の指定は li を display:flex にして、::before の丸や番号を横に並べていた。
 * モックの素朴なリストでは問題ないが、旧サイトの本文は
 *   <li><strong>学費</strong>：説明文…<a href="…">詳しく</a></li>
 * のように太字やリンクが混ざる。flex だと strong・文字・a がそれぞれ別の
 * 「列」になり、太字の後ろの文が右に寄って狭い列で折り返す
 * （インデントが大きく見えていた原因）。
 *
 * li は普通の文章の箱に戻し、記号は左の余白に絶対配置で置く。
 * 見た目（青い丸・番号の丸）はそのまま。
 * ================================================================== */
.entry ul,.entry ol{display:block;padding-left:0;margin:16px 0 24px;list-style:none}
/* 上の .entry ul li / .entry ol li（詳細度 0,1,2）に勝つよう、同じ形で書く */
.entry ul li,.entry ol li{display:block;position:relative;line-height:1.9;margin:0;gap:0}
.entry ul li + li,.entry ol li + li{margin-top:10px}
.entry ul > li{padding-left:1.25em}
.entry ul > li::before{position:absolute;left:.3em;top:.72em;margin:0}
.entry ol{counter-reset:oi}
.entry ol > li{padding-left:2.1em;counter-increment:oi}
.entry ol > li::before{position:absolute;left:0;top:.28em;margin:0;counter-increment:none}
/* 入れ子のリストは少し詰める */
.entry li > ul,.entry li > ol{margin:8px 0 4px}
/* 旧サイトの li の中の段落は余白を消す（行間が空きすぎるため） */
.entry li > p{margin:0}

/* ==================================================================
 * 本文の表（2026/10/14）
 * ------------------------------------------------------------------
 * 旧サイトの表は <table width="600"> や style="width:680px"、
 * <td width="150"> のように幅を固定したものが多い。
 *   ・本文より広いと右にはみ出す
 *   ・本文より狭いと左に寄って中途半端な幅になる
 * どちらも出ないよう、表は常に本文の幅いっぱいにする。
 * 列の幅は旧サイトの指定（td の width）をそのまま比率として生かす。
 * 長い英単語やURLでセルが押し広げられないよう、セル内は折り返す。
 * ================================================================== */
.entry table{width:100% !important;max-width:100%;height:auto !important;table-layout:auto}
.entry table th,.entry table td{height:auto !important;overflow-wrap:break-word;word-break:normal}
.entry table img{max-width:100%;height:auto}
@media (max-width:760px){
  /* モック由来の .tbl で包んだ表だけは横スクロール（min-width:520px）のまま。
     包まれていない旧サイトの表は、画面幅に収めて折り返す。 */
  .entry table{min-width:0 !important}
  .entry .tbl table{min-width:520px !important}
}

/* ==================================================================
 * ブロック本文のレイアウト（2026/10/15・rev81）
 * ------------------------------------------------------------------
 * 固定ページ（/about/ など）は取り込み時に本文をブロックへ変換している
 * （学校ページと同じ変換）。ギャラリー・段組み・表のブロック用の指定が
 * 学校用CSS（page-school.css）にしか無かったので、記事側にも入れる。
 * WordPress本体CSSが .is-layout-flex 等で後から当ててくるため、
 * 学校側と同じくレイアウト系のクラスごと上書きする。
 * ================================================================== */
.entry .wp-block-gallery,
.entry .wp-block-gallery.is-layout-flex,
.entry .wp-block-gallery.wp-block-gallery-is-layout-flex{
  display:grid !important;grid-template-columns:repeat(3,1fr) !important;gap:10px !important;
  margin:22px 0;align-items:start}
.entry .wp-block-gallery.columns-2,
.entry .wp-block-gallery.columns-2.is-layout-flex{grid-template-columns:repeat(2,1fr) !important}
.entry .wp-block-gallery figure.wp-block-image{
  margin:0 !important;width:100% !important;max-width:none !important;flex:none !important;display:block !important}
.entry .wp-block-gallery figure.wp-block-image img{
  width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:8px;display:block}

.entry .wp-block-columns{display:flex;gap:26px;margin:22px 0}
.entry .wp-block-column{flex:1;min-width:0}
.entry .wp-block-column > *:first-child{margin-top:0}

.entry figure.wp-block-table{margin:22px 0;overflow-x:auto}
.entry figure.wp-block-table table{margin:0}

/* 段落の中の画像（旧サイトの <p><img></p>）。行間の余白で画像の下が空かないように */
.entry p > img:only-child,.entry p > a:only-child > img{display:block}

@media(max-width:760px){
  .entry .wp-block-columns{flex-direction:column;gap:16px}
  .entry .wp-block-gallery,
  .entry .wp-block-gallery.is-layout-flex{grid-template-columns:repeat(2,1fr) !important}
}

/* ==================================================================
 * 本文の表・列が多い表（2026/11/06・rev96）
 * ------------------------------------------------------------------
 * 不具合：9列ある表（大学ランキング・費用）で数字の列が1文字幅に潰れ、
 *   「$45,188」が縦1文字ずつになっていた。原因は2つ。
 *   1. セルの折り返しを overflow-wrap:anywhere にしていたため、表の列幅の計算で
 *      「どこでも折り返せる＝最小幅は1文字」と扱われ、数字の列が最小まで縮んだ
 *      → 上で break-word に変更（見た目の折り返しは同じで、列幅の計算には影響しない）
 *   2. 項目名のセル（tbody th）に width:30% が当たっていて、1列目の「順位」が
 *      表の3割を取っていた → 30% は「項目名＋値」の2列の表だけにする
 * 列が6列以上の表は、余白と文字を少し詰め、数字の桁をそろえる。
 * スマホでは列が多い表を潰さず、表の中だけ横にスクロールさせる。
 * ================================================================== */
.entry table tbody th{width:auto}
.entry table tbody tr > th:first-child:nth-last-child(2){width:30%}
.entry table td,.entry table th{font-variant-numeric:tabular-nums}

.entry table:has(tr > :nth-child(6)) th,
.entry table:has(tr > :nth-child(6)) td{padding:10px 9px;font-size:13.5px;line-height:1.6}
.entry table:has(tr > :nth-child(6)) thead th{font-size:12.5px}
/* 「順位」「1位」のような短い語が1文字ずつ折れないよう、セルに最小幅 */
.entry table:has(tr > :nth-child(6)) th,
.entry table:has(tr > :nth-child(6)) td{min-width:3.4em}

@media (max-width:820px){
  .entry table tbody tr > th:first-child:nth-last-child(2){width:36%}
}
@media (max-width:760px){
  /* 列が5列以上の表は、潰さずに表の中だけ横スクロール */
  .entry table:has(tr > :nth-child(5)){display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;
    width:100% !important;min-width:0 !important}
  /* table を block にしても、中の行はひとつの表としてまとまる（見出しと列がずれない）。
     セルに最小幅を持たせ、表が画面より広くなったぶんは横スクロール */
  .entry table:has(tr > :nth-child(5)) th,
  .entry table:has(tr > :nth-child(5)) td{min-width:5.5em}
}
