/* ==========================================================================
   content.css：本文（.post_content）
   --------------------------------------------------------------------------
   design-v2 段階6-a：本文の装飾を作り直した（見本帳：_renewal/tmp/mockups/content.html。報告：_renewal/23〜）。
   クラス名（.box1・.box2・.box3・.red・Spectra の補正）は引き継ぎ、見た目は新しいデザインにした。
   （以前の目標：TCD 親テーマの design-plus.css ＋ 追加CSS ID 105 の再現）
   値はすべて base.css のトークン（--bm-*）を経由する。em は本文の文字サイズが基準。
   セレクタは .post_content 配下に限定する（エディタでは .post_content を body に
   置き換えて読み込む。inc/enqueue.php の bm_theme_editor_content_styles() を参照）。

   元データとの対応：
   - 見出し h2〜h4、.box1〜3、ul の margin、Spectra の補正 …… 追加CSS 105（L1-L80）
   - 段落・リスト・表・引用・画像の基本 ………………………… 親テーマ css/design-plus.css L8-L127
   - 表の「ストライプ」……………………………………………… コアの表ブロックの is-style-stripes
   - .red ……………………………………………………………………… 親テーマ css/design-plus.css L481
   ========================================================================== */

/* 行の高さ：ラッパーは 1。段落・リスト・表のセルなどは個別に指定する */
.post_content {
	font-size: var(--bm-content-font-size);
	line-height: var(--bm-content-line-height-base);
	letter-spacing: var(--bm-content-tracking);
	overflow-wrap: anywhere;
}

.post_content::after {
	content: "";
	display: table;
	clear: both;
}

.post_content > :first-child {
	margin-top: 0 !important;
}

.post_content > :last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   段落・リンク・強調・コード（design-v2 段階6-a：本文の装飾）
   -------------------------------------------------------------------------- */
.post_content p {
	margin: 0 0 var(--bm-content-block-gap);
	line-height: var(--bm-content-line-height);
}

.post_content a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

.post_content a:hover {
	text-decoration: underline;
}

/* 強調：淡いネイビーの下線（design-v2 段階6-a の手直し。以前は下半分に淡い青のマーカー）。
   段落・表のセルと、手で書いたリストの中の強調だけ（見出し・型・パターン・囲みの中には付けない） */
.post_content :is(p, td) strong,
.post_content :where(ul.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ul:not([class]), ol:not([class])) > li strong {
	text-decoration-line: underline;
	text-decoration-color: var(--bm-content-marker);
	text-decoration-thickness: 3px;
	text-decoration-skip-ink: none;
	text-underline-offset: 0.2em;
}

.post_content :is(h1, h2, h3, h4, h5, h6, th, .wp-block-button__link, .uagb-notice-title, [class*="is-style-bm-"], [class*="bm-"], .box1, .box2, .box3) strong {
	background: none;
	text-decoration-line: none;
}

.post_content :not(pre) > code {
	padding: 0.1em 0.4em;
	background: var(--bm-color-bg-subtle);
	border: 1px solid var(--bm-table-border-color);
	border-radius: 3px;
	font-family: var(--bm-font-mono);
	font-size: 0.875em;
}

/* --------------------------------------------------------------------------
   見出し：H2＝左揃え、上に細い線と短い濃紺の線。H3＝濃紺の文字。H4＝左の線（CLAUDE.md §8-1）
   -------------------------------------------------------------------------- */
.post_content h1,
.post_content h2,
.post_content h3,
.post_content h4,
.post_content h5,
.post_content h6 {
	clear: both;
	padding: 0;
	color: var(--bm-color-primary-dark);
	letter-spacing: 0.02em;
}

.post_content h2 {
	position: relative;
	margin: 3.2em 0 1em;
	padding-top: 1.1em;
	border-top: 1px solid var(--bm-content-h2-line);
	font-size: var(--bm-content-h2-size);
	font-weight: var(--bm-content-h2-weight);
	line-height: 1.5;
	text-align: left;
}

.post_content h2::before {
	position: absolute;
	top: -1px;
	left: 0;
	width: 48px;
	height: 2px;
	background: var(--bm-content-h2-bar);
	content: "";
}

.post_content > h2:first-child {
	padding-top: 0;
	border-top: 0;
}

.post_content > h2:first-child::before {
	display: none;
}

.post_content h3 {
	margin: 2.4em 0 0.8em;
	color: var(--bm-content-h3-color);
	font-size: var(--bm-content-h3-size);
	font-weight: var(--bm-content-h3-weight);
	line-height: 1.6;
}

.post_content h4 {
	margin: 2em 0 0.8em;
	padding-left: var(--bm-content-h4-bar-gap);
	border-left: var(--bm-content-h4-bar-width) solid var(--bm-content-h4-bar-color);
	font-size: var(--bm-content-h4-size);
	font-weight: var(--bm-content-h4-weight);
	line-height: var(--bm-content-line-height-tight);
}

.post_content h5,
.post_content h6 {
	margin: 2em 0 0.8em;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   リスト：役割ごとに目立たせ方の強さを変える（design-v2 段階6-a の手直し）
   - 番号なし（並べるだけ）：控えめ。小さな濃紺の四角、行の間を少し広く
   - 番号付き（手順・順番）：手順らしく強める。大きな番号（英字の書体・濃紺）を細い縦線でつなぎ、項目の文字を少し太く
   - チェック（メリット・できること）：淡いネイビーの面の中。✓ は濃紺の丸の中に白で
   - 種類の違うリスト同士や、リストと段落の間は、段落同士より広く空ける
   -------------------------------------------------------------------------- */
.post_content ul,
.post_content ol,
.post_content dl {
	margin: 0 0 var(--bm-content-block-gap);
}

/* 手で書いたリスト（エディタのリストと、class のないリスト）だけに効かせる。パターンのリスト（bm-*）・RTOC・Spectra は対象外。
   :where() で優先度を 0 にして、パターンの指定が勝つようにする */
.post_content :where(ul.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ul:not([class])),
.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])),
.post_content ul.is-style-bm-check {
	padding-left: 0;
	list-style: none;
}

/* リストの前後の余白（段落の間 1.6em より広く。囲みの中のリストは除く） */
.post_content > :is(ul, ol):where(.wp-block-list:not([class*="bm-"]), :not([class])) {
	margin-top: 2.6em;
	margin-bottom: 2.6em;
}

/* 種類の違うリストが続くとき（番号なし → 番号付き → チェック）は、さらに広く空ける（項目どうしの間の約3倍以上） */
.post_content > :is(ul, ol) + :is(ul, ol) {
	margin-top: 3.4em;
}

.post_content > :where(ul, ol):first-child {
	margin-top: 0;
}

.post_content li,
.post_content dt,
.post_content dd {
	line-height: var(--bm-content-line-height-list);
}

.post_content :where(li + li) {
	margin-top: 0.45em;
}

/* 番号なし：控えめ */
.post_content :where(ul.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ul:not([class])) > li {
	position: relative;
	padding-left: 1.3em;
}

.post_content :where(ul.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ul:not([class])) > li + li {
	margin-top: 0.6em;
}

.post_content :where(ul.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ul:not([class])) > li::before {
	position: absolute;
	top: calc(var(--bm-content-line-height-list) * 0.5em - 3px);
	left: 0.2em;
	width: 6px;
	height: 6px;
	background: var(--bm-color-primary);
	content: "";
}

/* 番号付き：大きな番号を細い縦線でつなぐ */
.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])) {
	counter-reset: bm-ol;
}

/* --bm-ol-col：番号の欄の幅／--bm-ol-gap：項目どうしの間／--bm-ol-mid：1行目の中心（番号の中心をここにそろえる） */
.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])) > li {
	--bm-ol-col: 3em;
	--bm-ol-gap: 1.5em;
	--bm-ol-mid: calc(var(--bm-content-line-height-list) * 0.5em);
	position: relative;
	min-height: 2.4em;
	padding-left: calc(var(--bm-ol-col) + 0.9em);
	color: var(--bm-color-primary-dark);
	font-weight: 600;
	counter-increment: bm-ol;
}

.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])) > li + li {
	margin-top: var(--bm-ol-gap);
}

/* 番号：固定幅の欄の中央。数字は等幅。背景の色で、後ろを通る線を番号の所だけ隠す */
.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])) > li::before {
	position: absolute;
	z-index: 1;
	top: calc(var(--bm-ol-mid) / 1.75 - 0.55em); /* 数字だけを大きく（1.75倍）。位置と幅は li の文字の大きさに換算 */
	left: 0;
	width: calc(var(--bm-ol-col) / 1.75);
	background: var(--bm-ol-mask, var(--bm-color-bg)); /* 置かれた面の色（下の --bm-ol-mask）。白い四角に見えないように */
	color: var(--bm-color-primary);
	font-family: var(--bm-font-en);
	font-size: 1.75em;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1.1; /* 線を隠すのは数字の高さだけ（線が番号のすぐ上下まで届く） */
	text-align: center;
	content: counter(bm-ol, decimal-leading-zero);
}

/* 番号の後ろを隠す色：番号付きリストが置かれた面の色にそろえる（design-v2 段階6-c §1-5）。
   淡いグレーのセクション・囲みの中で、番号の後ろが白い四角に見えないようにする。カスタムプロパティなので中の要素に引き継がれる */
:is(.bm-section--subtle, .bm-band--subtle, .bm-sec--subtle, .has-bg-subtle-background-color, .is-style-bm-case > :nth-child(2)) {
	--bm-ol-mask: var(--bm-color-bg-subtle);
}


.post_content .is-style-bm-box-note {
	--bm-ol-mask: var(--bm-box-note-bg);
}

.post_content .box3 {
	--bm-ol-mask: var(--bm-box3-bg);
}


/* 番号の中心を通る1本の線：各項目の番号の中心から、次の項目の番号の中心まで（最後の項目には付けない） */
.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])) > li:not(:last-child)::after {
	position: absolute;
	top: var(--bm-ol-mid);
	bottom: calc(-1 * (var(--bm-ol-gap) + var(--bm-ol-mid)));
	left: calc(var(--bm-ol-col) / 2);
	width: 1px;
	background: rgba(20, 40, 75, 0.32);
	content: "";
}

/* 番号付きの項目の中の、入れ子のリストや段落は普通の太さ */
.post_content :where(ol.wp-block-list:not([class*="bm-"]):not([class*="is-style-"]), ol:not([class])) > li :is(ul, ol, p) {
	color: var(--bm-color-text);
	font-weight: 400;
}

/* チェック：淡いネイビーの面の中。✓ は濃紺の丸の中に白で */
.post_content ul.is-style-bm-check {
	margin-top: 2.6em;
	margin-bottom: 2.6em;
	padding: 0.6em 1.6em;
	background: #edf1f7; /* 淡いネイビー（文字 #0d1b33 との比 15.6:1） */
}

.post_content ul.is-style-bm-check > li {
	position: relative;
	margin: 0;
	padding: 0.85em 0 0.85em 2.3em;
	border-bottom: 1px solid rgba(20, 40, 75, 0.1);
	color: var(--bm-color-primary-dark);
	text-wrap: pretty;
}

.post_content ul.is-style-bm-check > li:last-child {
	border-bottom: 0;
}

.post_content ul.is-style-bm-check > li::before {
	position: absolute;
	top: calc(0.85em + var(--bm-content-line-height-list) * 0.5em - 0.7em);
	left: 0;
	width: 1.4em;
	height: 1.4em;
	border-radius: 50%;
	background: var(--bm-color-primary) no-repeat center / 58% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%23ffffff' stroke-width='1.8'/%3E%3C/svg%3E");
	content: "";
}

@media (max-width: 767px) {
	.post_content ul.is-style-bm-check {
		padding: 0.4em 1.1em;
	}
}

.post_content li > ul,
.post_content li > ol {
	margin: 0.45em 0 0;
}

.post_content dt {
	font-weight: var(--bm-font-weight-bold);
}

.post_content dd {
	margin: 0 0 1em;
}

/* --------------------------------------------------------------------------
   囲み：.box2＝ポイント、.box1＝補足は、この少し下の指定（2026-11-30 にオーナーが見本から選んだ形）。.box3＝そのまま。
   グループのスタイル「ポイント」「補足」（is-style-bm-box-point／memo）は .box2／.box1 と同じ形。
   「注意」（is-style-bm-box-note）は段階6-a の見た目。オレンジは使わない
   -------------------------------------------------------------------------- */
.post_content .box3,
.post_content .is-style-bm-box-note {
	margin: 0 0 var(--bm-content-block-gap);
	padding: var(--bm-box-padding);
	border: 1px solid transparent;
}

.post_content .is-style-bm-box-note {
	background: var(--bm-box-note-bg);
	border-left: 3px solid var(--bm-box-note-color);
}

.post_content .box3 {
	background: var(--bm-box3-bg);
	border: 1px solid var(--bm-box3-border-color);
}

/* 囲みの中の最後の要素は、下に余白を付けない。リストに付けたときは記号の分の余白を保つ */
.post_content :is(.box1, .box2, .box3, .is-style-bm-box-point, .is-style-bm-box-note, .is-style-bm-box-memo) > :last-child {
	margin-bottom: 0;
}

.post_content :is(ul, ol).box3 {
	padding: var(--bm-box-padding);
}

.post_content :is(.box1, .box2, .box3, .is-style-bm-box-point, .is-style-bm-box-memo) li {
	line-height: var(--bm-content-line-height-tight);
}

.post_content :is(.box1, .box2, .box3, .is-style-bm-box-point, .is-style-bm-box-memo) li + li {
	margin-top: 0.6em;
}

/* ポイント（.box2、グループの「囲み：ポイント」）と補足（.box1、「囲み：補足」）。段落・リスト・グループのどれに付けても同じ形。
   枠線は付けない。上に英字のラベル（飾り。読み上げない）。字の組み方は目次の「CONTENTS」と同じ。
   グループの中に見出しの段落（ラベルのスタイル）を自分で書いた場合は、それをラベルの形にして、POINT／NOTE は重ねない */
.post_content .box1,
.post_content .box2,
.post_content .is-style-bm-box-point,
.post_content .is-style-bm-box-memo {
	position: relative;
	margin: 0 0 var(--bm-content-block-gap);
	border: 0;
	color: var(--bm-color-text);
}

.post_content .box1::before,
.post_content .box2::before,
.post_content .is-style-bm-box-point::before,
.post_content .is-style-bm-box-memo::before {
	position: static;
	display: block;
	width: auto;
	height: auto;
	margin: 0 0 0.5rem;
	padding: 0;
	background: none;
	border: 0;
	color: var(--bm-color-primary);
	font-family: var(--bm-font-en);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: var(--bm-tracking-wider);
	line-height: 1.4;
}

/* 見出しの段落を自分で書いたグループは、POINT／NOTE を重ねない。
   :has() に対応しないブラウザで上の指定まで無効にならないように、別の指定にする */
.post_content .is-style-bm-box-point:has(> .is-style-bm-label)::before,
.post_content .is-style-bm-box-memo:has(> .is-style-bm-label)::before {
	display: none;
	content: none;
}

.post_content :is(.box1, .box2, .is-style-bm-box-point, .is-style-bm-box-memo) > .is-style-bm-label {
	display: block;
	margin: 0 0 0.5rem;
	color: var(--bm-color-primary);
	font-family: var(--bm-font-en), var(--bm-font-base);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: var(--bm-tracking-wider);
	line-height: 1.4;
}

/* ポイント：淡いネイビーの面と、左の濃紺の縦線 */
.post_content .box2,
.post_content .is-style-bm-box-point {
	--bm-ol-mask: var(--bm-box2-bg);
	padding: 1.1rem 1.5rem 1.25rem;
	background: var(--bm-box2-bg);
	border-left: 4px solid var(--bm-color-primary);
	border-radius: 0;
}

.post_content .box2::before,
.post_content .is-style-bm-box-point::before {
	content: "POINT";
	content: "POINT" / "";
}

/* 短いポイント（段落1つ・改行なし・40字以下）：要点として大きく太く。目印の .is-short は、
   表示のときにテーマが付ける（inc/template-tags.php の bm_theme_mark_short_box()。本文は変えない） */
.post_content .box2.is-short,
.post_content .is-style-bm-box-point.is-short > p:not(.is-style-bm-label) {
	color: var(--bm-color-primary-dark);
	font-size: 1.125rem;
	font-weight: var(--bm-font-weight-bold);
	line-height: 1.75;
}

/* 補足：淡いグレーの面と、左上の短い濃紺の線。線は背景で描く（::after は編集画面の選択の枠が使うため） */
.post_content .box1,
.post_content .is-style-bm-box-memo {
	--bm-ol-mask: var(--bm-box1-bg);
	padding: 1.35rem 1.5rem 1.25rem;
	background: linear-gradient(var(--bm-color-primary), var(--bm-color-primary)) 1.5rem 0 / 32px 3px no-repeat, var(--bm-box1-bg);
	border-radius: 3px;
}

.post_content .box1::before,
.post_content .is-style-bm-box-memo::before {
	content: "NOTE";
	content: "NOTE" / "";
}

@media (min-width: 768px) {
	.post_content .box2.is-short,
	.post_content .is-style-bm-box-point.is-short > p:not(.is-style-bm-label) {
		font-size: 1.1875rem;
	}
}

@media (max-width: 767px) {
	.post_content .box2,
	.post_content .is-style-bm-box-point {
		padding: 1rem 1.1rem 1.1rem;
	}

	.post_content .box1,
	.post_content .is-style-bm-box-memo {
		padding: 1.2rem 1.1rem 1.1rem;
		background-position: 1.1rem 0, 0 0;
	}
}

/* 囲みの見出し（グループの中の最初の段落を「ラベル」スタイルにしたもの）。
   事例の型（.is-style-bm-case）のラベルは、英字の下に日本語を置く別の形なので当てない（見た目は types.css）。
   :where() は、この指定の強さ（詳細度）を変えないため */
.post_content .is-style-bm-label:where(:not(.is-style-bm-case *)) {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 0.6em;
	color: var(--bm-color-primary);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.4;
}

.post_content .is-style-bm-box-note .is-style-bm-label {
	color: var(--bm-box-note-color);
}


/* --------------------------------------------------------------------------
   画像と説明文
   -------------------------------------------------------------------------- */
.post_content img {
	max-width: 100%;
	height: auto;
	vertical-align: bottom;
}

/* リンク付きの画像（コアは a を inline-block にする）が画像の元の幅まで広がり、スマホではみ出すのを防ぐ */
.post_content .wp-block-image a {
	max-width: 100%;
}

.post_content figure {
	margin: 0 0 var(--bm-content-block-gap);
}

.post_content .wp-block-image img {
	border: 1px solid var(--bm-table-border-color);
}

.post_content figcaption,
.post_content .wp-caption-text {
	margin-top: 0.7em;
	color: var(--bm-color-text-muted);
	font-size: var(--bm-font-size-sm);
	line-height: 1.6;
	text-align: left;
}

.post_content .alignleft {
	float: left;
	margin: 0.4em 1.5em 1em 0;
}

.post_content .alignright {
	float: right;
	margin: 0.4em 0 1em 1.5em;
}

.post_content .aligncenter {
	margin-right: auto;
	margin-left: auto;
}

/* --------------------------------------------------------------------------
   表：上に濃紺の線、見出しの行は淡いグレー、細い横線だけ。
   横に長い表は、表ブロックの figure の中で横にスクロールする（HTML は変えない）。スマホでは1列目の見出しを固定
   -------------------------------------------------------------------------- */
.post_content .wp-block-table {
	margin: 0 0 var(--bm-content-block-gap);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.post_content table {
	width: 100%;
	margin: 0 0 var(--bm-content-block-gap);
	border-collapse: collapse;
	border-top: var(--bm-table-head-border);
	font-size: 0.9375em;
}

.post_content th,
.post_content td {
	padding: var(--bm-table-cell-padding);
	border-bottom: 1px solid var(--bm-table-border-color);
	background: transparent;
	line-height: var(--bm-content-line-height-list);
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
}

.post_content thead th {
	background: var(--bm-table-head-bg);
	color: var(--bm-color-primary-dark);
	font-weight: 700;
}

.post_content tbody th {
	color: var(--bm-color-primary);
	font-weight: 700;
}

.post_content .wp-block-table table {
	margin-bottom: 0;
	border-right: 0;
	border-bottom: 0;
	border-left: 0;
}

/* コアの表ブロックの CSS（セルの四方の線）を打ち消し、横の細い線だけにする */
.post_content .wp-block-table :is(th, td) {
	border-width: 0 0 1px;
	border-style: solid;
	border-color: var(--bm-table-border-color);
}

.post_content .wp-block-table thead {
	border-bottom: 0;
}

/* ストライプ：偶数行にごく淡い色 */
.post_content .wp-block-table.is-style-stripes {
	border-bottom: 0;
}

.post_content .wp-block-table.is-style-stripes th,
.post_content .wp-block-table.is-style-stripes td {
	border-color: var(--bm-table-border-color);
}

.post_content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--bm-table-stripe-bg);
}

/* スマホ：列の多い表は、文字が詰まりすぎないよう最小の幅を取り、横にスクロールする。1列目の見出しは固定 */
@media (max-width: 767px) {
	.post_content .wp-block-table table:has(tr > :nth-child(4)) {
		min-width: 640px;
	}

	.post_content .wp-block-table table:has(tr > :nth-child(4)) tbody th:first-child,
	.post_content .wp-block-table table:has(tr > :nth-child(4)) tbody td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		background: var(--bm-color-bg);
		box-shadow: 1px 0 0 var(--bm-table-border-color);
	}
}

/* 比較表（表のスタイル「比較表」）：おすすめの列（2列目）を淡く塗り、上に濃紺の線 */
.post_content .wp-block-table.is-style-bm-compare thead th {
	vertical-align: bottom;
}

.post_content .wp-block-table.is-style-bm-compare :is(th, td):nth-child(3) {
	background: rgba(20, 40, 75, 0.04);
}

.post_content .wp-block-table.is-style-bm-compare thead th:nth-child(3) {
	box-shadow: inset 0 3px 0 var(--bm-color-primary);
}

.post_content .wp-block-table figcaption {
	margin-top: 0.7em;
}

/* --------------------------------------------------------------------------
   引用：左に濃紺の細い線、出典は小さく
   -------------------------------------------------------------------------- */
.post_content blockquote {
	position: relative;
	margin: 0 0 var(--bm-content-block-gap);
	padding: 0.2em 0 0.2em 1.4em;
	border-left: var(--bm-quote-border);
	background: var(--bm-quote-bg);
	color: var(--bm-quote-color);
}

.post_content blockquote p {
	font-size: 1.0625em;
	line-height: 1.85;
}

.post_content blockquote p:last-of-type {
	margin-bottom: 0;
}

.post_content blockquote cite {
	display: block;
	margin-top: 0.8em;
	color: var(--bm-color-text-muted);
	font-size: var(--bm-font-size-sm);
	font-style: normal;
	text-align: left;
}

.post_content blockquote cite::before {
	content: "— ";
}

/* --------------------------------------------------------------------------
   ボタン：問い合わせ（is-style-cta）＝オレンジ、ほか＝濃紺。線のボタン（is-style-outline）は濃紺の線
   -------------------------------------------------------------------------- */
.post_content .wp-block-buttons {
	margin-bottom: var(--bm-content-block-gap);
}

.post_content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	min-height: 52px;
	padding: 0.6em 1.6em;
	border-radius: var(--bm-radius-small, 4px);
	font-weight: var(--bm-font-weight-bold);
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
}

.post_content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
	background: var(--bm-color-primary);
}

.post_content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color) {
	color: var(--bm-color-on-dark);
}

.post_content .wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid var(--bm-color-primary);
	background: transparent;
	color: var(--bm-color-primary);
}

.post_content .wp-block-button__link:hover {
	opacity: 0.85;
	text-decoration: none;
}

/* デモのボタン（.bm-demo-button）：ページ見出しの帯のボタン（.page-header__button）と同じ白い枠。スマホは幅いっぱい */
.post_content .bm-demo-button .wp-block-button.is-style-outline .wp-block-button__link {
	min-width: 15rem;
	background: var(--bm-color-bg);
	font-size: var(--bm-font-size-md);
}

.post_content .bm-demo-button .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--bm-color-primary-light);
	opacity: 1;
}

@media (max-width: 599px) {
	.post_content .bm-demo-button .wp-block-button {
		flex-basis: 100%;
	}

	.post_content .bm-demo-button .wp-block-button .wp-block-button__link {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   区切り線（細い線／点のスタイル）、コード、開閉（よくある質問）
   -------------------------------------------------------------------------- */
.post_content hr,
.post_content .wp-block-separator {
	width: 100%;
	height: 1px;
	margin: 3.2em auto;
	background: var(--bm-table-border-color);
	border: 0;
}

.post_content .wp-block-separator.is-style-dots {
	width: 54px;
	height: 6px;
	background: radial-gradient(circle, var(--bm-color-primary) 2px, transparent 2.5px) 0 0 / 22px 6px repeat-x;
	opacity: 0.45;
}

.post_content .wp-block-separator.is-style-dots::before {
	content: none;
}

.post_content pre {
	margin: 0 0 var(--bm-content-block-gap);
	padding: 1.2em 1.4em;
	overflow: auto;
	background: var(--bm-color-terminal-bg);
	border-radius: 6px;
	color: var(--bm-color-terminal-text);
	font-family: var(--bm-font-mono);
	font-size: var(--bm-font-size-sm);
	line-height: 1.75;
	letter-spacing: 0;
}

.post_content pre code {
	padding: 0;
	background: none;
	border: 0;
	font-size: inherit;
}

/* 開閉（よくある質問）の見た目は faq.css */
/* フォームの必須マーク（フォーム294で3か所。本文の外でも使えるよう .post_content に限定しない） */
.red {
	color: var(--bm-color-required);
}

/* --------------------------------------------------------------------------
   Spectra（uagb）の補正。色や余白の多くは Spectra が投稿ごとに出力する CSS（uag-css-*）が持っている。
   -------------------------------------------------------------------------- */

/* 注意書き（inline-notice）：濃紺の太い帯の見出しをやめ、本文の囲み「ポイント」と同じ見た目にする（段階6-a） */
.post_content .wp-block-uagb-inline-notice {
	margin-bottom: var(--bm-content-block-gap);
}

.post_content .wp-block-uagb-inline-notice.wp-block-uagb-inline-notice .uagb-notice-title {
	margin: 0;
	padding: 1.1em 1.6em 0;
	background: var(--bm-color-bg);
	border: 1px solid var(--bm-box-point-border);
	border-top-width: 3px;
	border-bottom: 0;
	border-radius: 0;
	color: var(--bm-color-primary);
	font-size: 1em;
	font-weight: 700;
	line-height: 1.6;
	text-align: left;
}

.post_content .wp-block-uagb-inline-notice.wp-block-uagb-inline-notice .uagb-notice-text {
	padding: 0.6em 1.6em 1.3em;
	background: var(--bm-color-bg);
	border: 1px solid var(--bm-box-point-border);
	border-top: 0;
	border-radius: 0;
	color: var(--bm-color-text);
}

.post_content .wp-block-uagb-inline-notice .uagb-notice-text p:last-child {
	margin-bottom: 0;
}

/* アイコン付きリスト（icon-list）のアイコンと丸い枠：#ff4000 を新しい配色に上書きする */
.post_content .wp-block-uagb-icon-list.wp-block-uagb-icon-list .wp-block-uagb-icon-list-child .uagb-icon-list__source-wrap {
	border-color: var(--bm-spectra-icon-color);
	border-width: 1px;
}

.post_content .wp-block-uagb-icon-list.wp-block-uagb-icon-list .wp-block-uagb-icon-list-child .uagb-icon-list__source-wrap svg {
	color: var(--bm-spectra-icon-color);
	fill: var(--bm-spectra-icon-color);
}

.post_content .uagb-icon-list__label {
	line-height: var(--bm-content-line-height-tight);
}

/* 情報ボックス（info-box）：本文の見出し・段落と同じ余白の付き方にしない（Spectra の指定を使う） */
.post_content .wp-block-uagb-info-box .uagb-ifb-title {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.post_content .wp-block-uagb-info-box .uagb-ifb-title::before {
	content: none;
}

/* --------------------------------------------------------------------------
   目次（RTOC プラグイン）：本文の中の目次の箱を、新しい目次の見た目に合わせる
   -------------------------------------------------------------------------- */
/* design-v2 段階6-c-0 §1-4：淡いグレーの面＋上に濃紺の線。左に「CONTENTS 目次」、右に細い枠の小さな「CLOSE」。
   大きい見出しは Barlow の番号（01, 02…）、小見出しは短い線。RTOC の設定と DB は変えない（CSS だけ）。
   RTOC は自分の CSS に !important を付けるので、こちらも !important で上書きする（RTOC の更新で崩れないか、段階7で確認） */
.post_content #rtoc-mokuji-wrapper {
	margin: 0 0 var(--bm-content-block-gap) !important;
	padding: 1.4em 1.6em 1.5em !important;
	background: var(--bm-color-bg-subtle) !important;
	border: 0 !important;
	border-top: 2px solid var(--bm-color-primary) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* RTOC の枠（frame2 の ::before の 4px の線）と、最大幅 700px を打ち消す */
.post_content #rtoc-mokuji-wrapper::before,
.post_content #rtoc-mokuji-wrapper::after {
	display: none !important;
}

.post_content #rtoc-mokuji-wrapper.rtoc-mokuji-content {
	max-width: none !important;
}

.post_content #rtoc-mokuji-wrapper #rtoc-mokuji-title {
	display: flex !important;
	flex-direction: row !important; /* RTOC は row-reverse（「CLOSE」が左になる） */
	align-items: center !important;
	justify-content: space-between !important;
	gap: 16px;
	margin: 0 0 0.8em !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	text-align: left !important;
}

.post_content #rtoc-mokuji-wrapper #rtoc-mokuji-title > span {
	order: -1;
	display: inline-flex !important;
	align-items: baseline;
	gap: 12px;
	color: var(--bm-color-primary-dark) !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
}

.post_content #rtoc-mokuji-wrapper #rtoc-mokuji-title > span::before {
	color: var(--bm-color-text-muted);
	font-family: var(--bm-font-en);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: var(--bm-tracking-wider);
	content: "CONTENTS";
	content: "CONTENTS" / "";
}

.post_content #rtoc-mokuji-wrapper .rtoc_open_close {
	position: static !important;
	min-height: 32px;
	margin: 0 0 0 auto !important;
	padding: 4px 12px !important;
	border: 1px solid rgba(20, 40, 75, 0.3) !important;
	border-radius: 0 !important;
	background: var(--bm-color-bg) !important;
	color: var(--bm-color-primary) !important;
	font-family: var(--bm-font-en) !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	letter-spacing: var(--bm-tracking-wider) !important;
	line-height: 1.4 !important;
	cursor: pointer;
}

.post_content #rtoc-mokuji-wrapper .rtoc_open_close:focus-visible {
	outline: 3px solid var(--bm-color-focus);
	outline-offset: 2px;
}

.post_content #rtoc-mokuji-wrapper a {
	color: var(--bm-color-primary-dark) !important;
	text-decoration: none !important;
}

.post_content #rtoc-mokuji-wrapper a:hover {
	text-decoration: underline !important;
	text-underline-offset: 0.25em;
}

/* 大きい見出し：Barlow の番号（01, 02…） */
.post_content #rtoc-mokuji-wrapper ol.level-1 {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	counter-reset: bm-rtoc;
}

.post_content #rtoc-mokuji-wrapper ol.level-1 > li {
	position: relative !important;
	margin: 0 !important;
	padding: 0.55em 0 0.55em 2.6em !important;
	border-top: 1px solid rgba(20, 40, 75, 0.1);
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1.7 !important;
	counter-increment: bm-rtoc;
}

.post_content #rtoc-mokuji-wrapper ol.level-1 > li:first-child {
	border-top: 0;
}

.post_content #rtoc-mokuji-wrapper ol.level-1 > li::before {
	position: absolute !important;
	top: 0.6em !important;
	left: 0 !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	color: var(--bm-color-primary) !important;
	font-family: var(--bm-font-en) !important;
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	font-variant-numeric: tabular-nums;
	line-height: 1.5 !important;
	content: counter(bm-rtoc, decimal-leading-zero) !important;
}

/* 小見出し：短い線 */
.post_content #rtoc-mokuji-wrapper ul.level-2 {
	margin: 0.3em 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.post_content #rtoc-mokuji-wrapper ul.level-2 > li {
	position: relative !important;
	margin: 0 !important;
	padding: 0.2em 0 0.2em 1.4em !important;
	border: 0 !important;
	font-size: 0.875rem !important;
	font-weight: 400 !important;
	line-height: 1.7 !important;
}

.post_content #rtoc-mokuji-wrapper ul.level-2 > li::before {
	position: absolute !important;
	top: calc(0.2em + 0.85em) !important;
	left: 0 !important;
	width: 0.7em !important;
	height: 1px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: rgba(20, 40, 75, 0.4) !important;
	content: "" !important;
}

/* --------------------------------------------------------------------------
   RTOC（目次）：サービス詳細では出さない（子テーマ functions.php L36-40 と同じ）
   -------------------------------------------------------------------------- */
.single-service .rtoc-mokuji-content,
.single-service #rtoc-mokuji-wrapper,
.page-template-page-industry .rtoc-mokuji-content,
.page-template-page-industry #rtoc-mokuji-wrapper {
	display: none !important;
}

/* RTOC が JavaScript で追加する、画面の隅の「目次」ボタン。サービス・業種ページはテーマの固定の目次を使うので出さない */
.single-service #rtoc_return,
.page-template-page-industry #rtoc_return {
	display: none !important;
}

.post_content #rtoc-mokuji-wrapper ul,
.post_content #rtoc-mokuji-wrapper ol {
	margin-bottom: 0;
}

/* ==========================================================================
   フェーズ5で追加：本文のブロックの配置「幅広」「全幅」（_renewal/memo-page-width.md）
   --------------------------------------------------------------------------
   - 本文の幅（--bm-width-content、760px）は変えず、配置を指定したブロックだけ広げる。
   - 幅広：--bm-width-wide（1200px）まで。ただし画面の幅（左右の余白を除く）を超えない。
   - 全幅：画面の端まで。100vw はスクロールバーの分だけはみ出すので、.site-main で横方向を切り取る（overflow-x: clip。
     clip はスクロール領域を作らないので、sticky のヘッダーや目次には影響しない）。
   - サイドバーのあるページ（.l-main。ブログ・お知らせ）では、本文の列より広げない。
   ========================================================================== */
.site-main {
	overflow-x: clip;
}

.entry:not(.l-main) .post_content > .alignwide {
	width: min(var(--bm-width-wide), 100vw - var(--bm-gutter) * 2);
	max-width: none;
	margin-inline: calc(50% - min(var(--bm-width-wide), 100vw - var(--bm-gutter) * 2) / 2);
}

.entry:not(.l-main) .post_content > .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

.l-main .post_content > .alignwide,
.l-main .post_content > .alignfull {
	width: auto;
	max-width: 100%;
	margin-inline: 0;
}

/* 全幅の画像は、端まで画像を広げる */
.post_content > .alignfull img {
	width: 100%;
}

/* ==========================================================================
   フェーズ5で追加：サービス・固定ページの本文の部品（patterns/service-*、solution-*、page-*）
   追加CSS の本文スタイル（.post_content のリスト・見出し）より優先させるため、.post_content を付けている。
   ========================================================================== */

/* カードの並び */
.post_content .bm-grid {
	display: grid;
	gap: var(--bm-space-sm);
	grid-template-columns: minmax(0, 1fr);
	margin: 0 0 var(--bm-content-block-gap);
}

@media (min-width: 640px) {
	.post_content .bm-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.post_content .bm-card {
	padding: var(--bm-space-md);
	background: var(--bm-color-bg);
	border: 1px solid var(--bm-color-border);
	border-radius: var(--bm-radius-md);
}

.post_content .bm-card > * {
	margin: 0;
}

.post_content .bm-card > * + * {
	margin-top: var(--bm-space-xs);
}

.post_content .bm-card p {
	line-height: 1.8;
}

.post_content .bm-card__title {
	color: var(--bm-color-primary);
	font-size: 1.0625rem;
}

/* チェック付きのリスト（こんなお悩み・効果） */
.post_content .bm-check-list {
	display: grid;
	gap: var(--bm-space-xs);
	padding: 0;
	list-style: none;
}

.post_content .bm-check-list li {
	position: relative;
	padding: 0.75rem 1rem 0.75rem 2.75rem;
	background: var(--bm-color-bg-subtle);
	border-radius: var(--bm-radius-md);
	line-height: 1.7;
}

.post_content .bm-check-list li::before {
	position: absolute;
	top: 0.75rem;
	left: 1rem;
	color: var(--bm-color-primary);
	font-weight: var(--bm-font-weight-bold);
	content: "\2713";
	content: "\2713" / "";
}

/* 手順（番号付き） */
.post_content .bm-steps {
	display: grid;
	gap: var(--bm-space-sm);
	padding: 0;
	list-style: none;
	counter-reset: bm-step;
}

.post_content .bm-steps li {
	position: relative;
	padding: var(--bm-space-sm) var(--bm-space-sm) var(--bm-space-sm) 3.5rem;
	background: var(--bm-color-bg-subtle);
	border-radius: var(--bm-radius-md);
	counter-increment: bm-step;
	line-height: 1.8;
}

.post_content .bm-steps li::before {
	position: absolute;
	top: var(--bm-space-sm);
	left: var(--bm-space-sm);
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	background: var(--bm-color-primary);
	border-radius: 50%;
	color: var(--bm-color-on-primary);
	content: counter(bm-step);
	font-size: 0.875rem;
	font-weight: var(--bm-font-weight-bold);
	line-height: 1;
}

.post_content .bm-steps strong {
	display: block;
	color: var(--bm-color-primary);
}

/* よくある質問（core/details） */
.post_content .bm-faq__list {
	display: grid;
	gap: var(--bm-space-xs);
	margin: 0 0 var(--bm-content-block-gap);
}

/* お問い合わせのボックス */
.post_content .bm-cta-box {
	margin: var(--bm-space-lg) 0 0;
	padding: var(--bm-space-lg) var(--bm-space-md);
	background: var(--bm-color-primary);
	border-radius: var(--bm-radius-lg);
	color: var(--bm-color-on-primary);
	text-align: center;
}

.post_content .bm-cta-box > * {
	margin: 0;
}

.post_content .bm-cta-box > * + * {
	margin-top: var(--bm-space-sm);
}

.post_content .bm-cta-box p {
	line-height: 1.8;
}

.post_content .bm-cta-box__title {
	font-family: var(--bm-font-heading);
	font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
	font-weight: var(--bm-font-weight-bold);
	line-height: 1.5;
	word-break: auto-phrase;
}

.post_content .bm-cta-box .wp-block-buttons {
	justify-content: center;
}

.post_content .bm-cta-box .wp-block-button__link:focus-visible {
	outline: 3px solid var(--bm-color-on-primary);
	outline-offset: 3px;
}

/* bm/post-list のカード（本文の中） */
.post_content .bm-post-list__items {
	display: grid;
	gap: var(--bm-space-sm);
	margin: 0 0 var(--bm-content-block-gap);
	padding: 0;
	list-style: none;
}

.post_content .bm-post-list--cards .bm-post-list__items {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.post_content .bm-post-card {
	position: relative;
	height: 100%;
	padding: var(--bm-space-sm) var(--bm-space-md);
	border: 1px solid var(--bm-color-border);
	border-radius: var(--bm-radius-md);
}

.post_content .bm-post-card > * {
	margin: 0;
}

.post_content .bm-post-card__title {
	font-size: 1rem;
	text-align: left;
}

.post_content .bm-post-card__link::after {
	position: absolute;
	inset: 0;
	content: "";
}

/* 「問い合わせ（オレンジ）」のボタンは、本文の中でもオレンジにする
   （上の .post_content .wp-block-button:not(.is-style-outline) …:not(.has-background) の紺より優先させる） */
.post_content .wp-block-button.is-style-cta .wp-block-button__link:not(.has-background) {
	background: var(--bm-color-cta);
	border: 2px solid var(--bm-color-cta);
	color: var(--bm-color-cta-text);
}

.post_content .wp-block-button.is-style-cta .wp-block-button__link:not(.has-background):hover {
	background: var(--bm-color-cta-hover);
	border-color: var(--bm-color-cta-hover);
}

/* ==========================================================================
   design-v2 段階5：サービスの導入部分（patterns/service-intro.php）
   - 本文の冒頭に置く「幅広」のグループ。PC（960px 以上）は2列（左：見出しとリード文、右：ターミナル風の実演）。
   - スマホとタブレット（960px 未満）は、文章が先、実演が後に縦に並ぶ（HTML の順のまま）。
   - 列の比率・間・上下の余白は、サービスの全ページで同じにする（段階1のトークン）。
   ========================================================================== */
.post_content > .bm-service-intro {
	display: grid;
	gap: var(--bm-grid-gap);
	align-items: start; /* PC の2列：左の列（見出しとリード文）は上そろえ（目次の下に空きを作らない） */
	margin-block: 0 var(--bm-section-head-gap);
}

.post_content > .bm-service-intro > * {
	min-width: 0;
	margin-block: 0;
}

.post_content .bm-service-intro__text > * {
	margin-block: 0;
}

.post_content .bm-service-intro__text > * + * {
	margin-top: 1em;
}

/* 見出しは左揃え（本文の H2 は中央揃え）。2列の左の列の先頭に置く */
.post_content .bm-service-intro__text > h2 {
	margin: 0 0 0.8em;
	text-align: left;
	text-wrap: balance;
	word-break: auto-phrase;
}

.post_content .bm-service-intro__text > p {
	line-height: 1.9;
}

@media (min-width: 960px) {
	.post_content > .bm-service-intro {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
		gap: clamp(2rem, 1rem + 2.5vw, 4rem);
	}
}

/* 実演の位置を指す言葉：PC は「右」、実演が下に並ぶ幅では「下」。本文には両方を入れ、「下」は hidden 属性で隠しておく
   （テーマの CSS がない所でも「右」だけが出る） */
@media (max-width: 959.98px) {
	.post_content .bm-service-intro__text .bm-dir-wide {
		display: none;
	}

	.post_content .bm-service-intro__text .bm-dir-narrow[hidden] {
		display: inline;
	}
}

/* 実演の下の注記（「※ 表示の内容はサンプルです」）：実演のすぐ下に置く */
.post_content > .bm-service-intro > .bm-sec-note {
	margin-top: calc(8px - var(--bm-grid-gap));
}

/* PC の2列：右の列（実演と注記）は、左の文に対して上下中央に置く。上下の余り（1fr の行）を同じ高さにする */
@media (min-width: 960px) {
	.post_content > .bm-service-intro:has(> .bm-sec-note) {
		grid-template-rows: 1fr auto auto 1fr;
		row-gap: 0;
	}

	.post_content > .bm-service-intro:has(> .bm-sec-note) > .bm-service-intro__text {
		grid-column: 1;
		grid-row: 1 / -1;
	}

	.post_content > .bm-service-intro:has(> .bm-sec-note) > .bm-flow-terminal {
		grid-column: 2;
		grid-row: 2;
	}

	.post_content > .bm-service-intro > .bm-sec-note {
		grid-column: 2;
		grid-row: 3;
		margin-top: 8px;
	}
}

/* 本文の中のターミナル風の実演（bm/flow-terminal）：本文用の段落・リストの指定（余白、行の高さ、リストの印）を打ち消し、
   トップページなどで使うときと同じ見た目にする */
.post_content .bm-flow-terminal p,
.post_content .bm-flow-terminal ul {
	margin: 0;
	line-height: inherit;
}

.post_content .bm-flow-terminal ul {
	padding-left: 0;
	list-style: none;
}

.post_content .bm-flow-terminal li {
	line-height: inherit;
}

.post_content .bm-flow-terminal .bm-flow-terminal__command {
	margin-bottom: 10px;
}
