/* =========================================================
 * 取締役会DX用語集 デザイン反映層 (当社)
 *
 * Figma: Corp「2026/10 取締役会DX用語集（一覧・詳細）デザイン」C. 実装デザイン
 *   PC 一覧 7387:29070 / SP 一覧 7383:28942 / PC 詳細 7438:30341 / SP 詳細 7438:30572
 *
 * 先方納品の dictionary.css の後に読み (inc/dictionary.php)、先方 CSS は書き換えずに
 * ここで上書きする。先方テンプレートの HTML も変えない前提で組んでいるため、
 * 並べ替えは display: contents + order、全幅の背景は box-shadow で行う。
 * ブレークポイントは先方 CSS と同じ 767px / 768px。
 * ========================================================= */

.post-type-archive-dictionary,
.single-dictionary {
	--yg-gray1: #313232;
	--yg-gray2: #515253;
	--yg-gray3: #818384;
	--yg-gray4: #bdbfc0;
	--yg-gray5: #e1e3e6;
	--yg-gray6: #f1f3f5;
	--yg-gray7: #fbfcfd;
	--yg-green: #369f83;
	--yg-link: #2196d6;
	--yg-bg-green: #f4faf6;
	--yg-primary: linear-gradient(225deg, #369f83 0%, #2196d6 100%);
	/* 一覧・詳細で共通の幅 (2026-11-18 竹内さん: 970px は 1 行が長すぎ、720px は窮屈)。
	   本文はサイト内の読み物ページ (取締役会DXラボの記事詳細 .media-article) と同じ 844px
	   = 16px で 1 行約 52 字。ページ全体 = 本文 844 + 間 40 + 右カラム 160 */
	--yg-content-width: 844px;
	--yg-page-width: 1044px;
	/* 定義文・新着記事の Medium (500)。ヒラギノ角ゴ ProN は W3/W6 しか無く 500 が W3 に落ちるため、
	   W5 を持つヒラギノ角ゴシック (Hiragino Sans) を先に指定する */
	--yg-font-medium: "Hiragino Sans", "ヒラギノ角ゴシック", "ヒラギノ角ゴシック ProN", "Helvetica Neue", sans-serif;

	/* 先方 CSS が body の書体を独自のものに変えているので、サイト共通 (main.css) に戻す */
	font-family: "ヒラギノ角ゴシック ProN", "Helvetica Neue", sans-serif;
	color: var(--yg-gray1);
}

.post-type-archive-dictionary .wapper.only-top,
.single-dictionary .wapper.only-top {
	max-width: none;
}

/* 矢印の線色はリンクの文字色と同じにする。先方 CSS は .arw svg path を一律で白
   (戻るリンクは別の青 rgb(32,163,217)) にしており、途中の要素にも別の色が付くため、
   矢印の要素すべてで親の文字色を引き継がせる */
.yougo-main span.arw,
.yougo-main span.arw svg,
.yougo-main span.arw svg path {
	color: inherit;
}

.yougo-main span.arw svg path {
	stroke: currentColor;
}

.yougo-main span.arw {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 16px;
	height: 16px;
	padding: 0;
}

/* ---------------------------------------------------------
 * 新着記事 (一覧の右カラム・詳細の「次に読む」で共通)
 * 部品 Side Article Card 7383:27163 / More Link 7415:27163
 * --------------------------------------------------------- */
.yougo-main .sidebar-post,
.yougo-main .c-aside-keyword-wrap {
	margin: 0;
}

.yougo-main .sidebar-post .c-border-caption {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: var(--yg-gray1);
	text-align: left;
}

/* 見出しの出どころ「取締役会DXラボ」: 上の行に小さく出す (色は「新着記事」と同じ) */
.yougo-main .sidebar-post-source {
	display: block;
	font-size: 12px;
	line-height: 18px;
	/* 一覧の「Board DX Glossary」と同じく、ProN に無い W5 は Hiragino Sans で出す */
	font-family: var(--yg-font-medium);
	font-weight: 500;
	color: inherit;
}

.yougo-main .latest-posts {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.yougo-main li.latest-post-item {
	margin: 0;
	min-width: 0;
}

.yougo-main .latest-post-item a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--yg-gray1);
	text-decoration: none;
}

.yougo-main .latest-post-item .thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 8px;
	background: var(--yg-gray6);
}

.yougo-main .latest-post-item a img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.yougo-main .latest-post-item a .content {
	width: auto;
	max-width: none;
}

.yougo-main .c-article-pop-ttl {
	margin: 0;
	padding: 0;
	font-family: var(--yg-font-medium);
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: var(--yg-gray1);
}

.yougo-main .latest-post-item a:hover .c-article-pop-ttl {
	text-decoration: underline;
}

/* 「もっと見る」は上部の戻るリンクと同じ文字のスタイル (14px Regular・行間 20px) */
.yougo-main a.sidebar-post-link {
	display: flex;
	align-items: center;
	gap: 4px;
	width: fit-content;
	margin-left: auto;
	font-size: 14px;
	line-height: 20px;
	font-weight: 400;
	color: var(--yg-link);
	text-align: right;
	text-decoration: none;
}

.yougo-main a.sidebar-post-link:hover {
	text-decoration: underline;
}

/* =========================================================
 * 一覧 (/board-dx-glossary/)
 * ========================================================= */
.post-type-archive-dictionary .yougo-main {
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: center;
	gap: 40px;
	width: min(var(--yg-page-width), calc(100% - 40px));
	margin: 0 auto;
	padding: 80px 0 120px;
}

.post-type-archive-dictionary .yougo-main > .l-section {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
}

.post-type-archive-dictionary .yougo-single {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 48px;
	margin: 0;
	letter-spacing: normal;
}

.post-type-archive-dictionary h1.yougo-ttl.c-caption {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 32px;
	line-height: 48px;
	font-weight: 700;
	color: var(--yg-gray1);
}

.post-type-archive-dictionary .c-caption .en {
	margin: 0;
	font-size: 12px;
	line-height: 18px;
	/* ヒラギノ ProN には W5 が無く 600 は 700 と同じ見た目になるため、Hiragino Sans の W5 を使う */
	font-family: var(--yg-font-medium);
	font-weight: 500;
	color: var(--yg-green);
	text-shadow: none;
	text-transform: none;
}

/* 頭文字タブ (部品 Index Tab 7283:27194) */
.post-type-archive-dictionary .yougo-index {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0;
}

.post-type-archive-dictionary .yougo-index a,
.post-type-archive-dictionary .yougo-index .is-disabled {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	padding: 8px 12px;
	border: 1px solid var(--yg-gray4);
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
	line-height: 28px;
	font-weight: 700;
	color: var(--yg-gray1);
	text-decoration: none;
	opacity: 1;
}

/* PC はスクロールしても頭文字タブを画面の上端に残す (2026-11-18 竹内さん。PC の一覧は
   200 語を 1 ページに出すので縦に長く、上部のタブが流れると探しにくい)。CSS だけで行う。
   下の用語が透けないよう白地を敷き、上下 8px の余白は負のマージンで相殺して配置を変えない。
   スマホは固定しない (2 段で約 120px を占め、タブを押した後に先方 JS が一覧の先頭を
   画面上端から 80px に置くため、固定した帯が先頭の用語に重なる。20 件ずつのページ送りで短い) */
@media (min-width: 768px) {
	.post-type-archive-dictionary .yougo-index {
		position: sticky;
		top: 0;
		z-index: 10;
		margin: -8px 0;
		padding: 8px 0;
		background: #fff;
	}
}

/* タブレット幅 (768〜1023px) はグローバルナビ (高さ 80px) がサイト全体で上端に固定されるので、
   タブはその下に固定する (同じ top: 0 だとナビの下に隠れる) */
@media (min-width: 768px) and (max-width: 1023px) {
	.post-type-archive-dictionary .yougo-index {
		top: 80px;
	}
}

/* 幅 768px ちょうどはサイト共通のナビがスマホ用 (高さ 70px) に切り替わる (main.css は 768px 以下) */
@media (min-width: 768px) and (max-width: 768px) {
	.post-type-archive-dictionary .yougo-index {
		top: 70px;
	}
}

/* サイト共通の外枠 .eZEqHR は、先方 main.css で幅 1281px 以上でも overflow-x: auto になっており、
   はみ出すものが無くてもスクロールの基準になって上の固定が効かない。1281px 以上は外枠
   (min-width 1280px) が画面に収まりはみ出しが無いので、clip (切るだけでスクロールの基準に
   ならない。main.css が 1280px 以下で使っているのと同じ値) に替えて見た目を変えずに固定を効かせる。
   1024〜1280px は site-overrides.css が意図して外枠を横スクロールさせている (QA#73) ので触らず、
   その幅ではタブは固定されない */
@media (min-width: 1281px) {
	.post-type-archive-dictionary .eZEqHR {
		overflow-x: clip;
	}

	/* 外枠を clip にすると、グローバルナビ (CSS 上は position: sticky) まで上端に固定され、
	   同じ上端のタブを覆ってしまう。他のページの PC 幅ではナビは固定されずに流れるので、
	   それにそろえてナビの固定を外す */
	.post-type-archive-dictionary nav.sc-c335336f-3 {
		position: static;
	}
}

/* 全タブを 48px 四方にそろえる (「すべて」「英数」も同じ大きさ。スマホで 1 段 6 個並ぶ)。
   左右の余白を付けると 2〜3 文字のタブだけ広がるので 0 にし、幅を固定する */
.post-type-archive-dictionary .yougo-index a,
.post-type-archive-dictionary .yougo-index .is-disabled {
	width: 48px;
	padding-inline: 0;
}

/* ホバーで枠線と文字を同じ色に (関連する用語のタグと同じ変化)。選択中のタブは下の指定が勝つ */
.post-type-archive-dictionary .yougo-index a:hover {
	border-color: var(--yg-green);
	color: var(--yg-green);
}

.post-type-archive-dictionary .yougo-index a.is-active {
	border-color: transparent;
	background: var(--yg-primary);
	color: #fff;
}

.post-type-archive-dictionary .yougo-index .is-disabled {
	border-color: var(--yg-gray5);
	background: var(--yg-gray7);
	color: var(--yg-gray4);
	cursor: default;
}

/* 行ごとの見出し + 語句の行 (部品 List Row 7261:27182) */
.post-type-archive-dictionary .yougo-groups {
	display: flex;
	flex-direction: column;
	gap: 48px;
	width: 100%;
}

.post-type-archive-dictionary .yougo-group {
	margin: 0;
}

.post-type-archive-dictionary .yougo-group__title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: var(--yg-green);
}

/* デザインは 2 列を「縦に読む順」(左列を上から下、次に右列) に並べている。
   先方の grid は横に読む順になるので、段組み (columns) に切り替える。
   行見出し (英数・ア…) の下線は 2 列をまたいで 1 本につなげ、行の区切り線 (Gray5) より
   一段濃い Gray4 にする (2026-11-18 竹内さん) */
.post-type-archive-dictionary .yougo-list {
	display: block;
	columns: 2;
	column-gap: 48px;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--yg-gray4);
	list-style: none;
	background: none;
}

.post-type-archive-dictionary .yougo-list li {
	break-inside: avoid;
	border-top: 0;
	border-bottom: 1px solid var(--yg-gray5);
}

.post-type-archive-dictionary ul.yougo-list li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	/* 左右の余白は付けない: 用語の先頭を行見出し (ア・カ…) と区切り線の左端に、
	   矢印を区切り線の右端にそろえる (2026-11-18 竹内さん。List Row の左右 24 は
	   ニュース一覧の日付用の空きで、日付の無い用語集では字下げに見えるだけだった) */
	padding: 24px 0;
	font-size: 14px;
	line-height: 28px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--yg-gray1);
	text-decoration: none;
}

.post-type-archive-dictionary ul.yougo-list li a:hover {
	color: var(--yg-green);
}

.post-type-archive-dictionary .yougo-list a::after {
	content: "";
	position: static;
	flex: none;
	width: 16px;
	height: 16px;
	transform: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M5.5 3L10.5 8L5.5 13' stroke='%23818384' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

/* 右カラムの新着記事 */
.post-type-archive-dictionary aside.c-aside {
	flex: none;
	width: 160px;
	max-width: none;
	margin: 0;
}

.post-type-archive-dictionary .sidebar-post-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 20px;
}

.post-type-archive-dictionary .latest-posts {
	flex-direction: column;
	gap: 16px;
}

/* =========================================================
 * 詳細 (/board-dx-glossary/{用語}/)
 *
 * 先方 HTML では「戻る」ボタン (.c-btn) が関連記事より前、新着記事は section の外にある。
 * デザインは 関連記事 → 新着記事 → 戻る を 1 つの薄緑の帯にまとめるので、
 * 中間の section / div を display: contents で外し、main 直下で order を付けて並べる。
 * ========================================================= */
.single-dictionary .yougo-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0; /* 先方 CSS は 1024px 以上で gap: 1rem (右カラム用) を付けている */
	padding: 80px 0 0;
}

.single-dictionary .yougo.l-section,
.single-dictionary .yougo-single {
	display: contents;
}

.single-dictionary :is(.yougo-nav, .page-title, .yougo-sgcontent, .related-dictionary) {
	box-sizing: border-box;
	width: min(var(--yg-content-width), calc(100% - 40px));
	margin: 0;
}

/* 「次に読む」帯: 関連記事 → 新着記事 → 戻る */
.single-dictionary :is(.related-posts, aside.c-aside, .c-btn) {
	box-sizing: border-box;
	width: min(var(--yg-page-width), calc(100% - 40px));
	max-width: none;
	/* 上の余白は下の個別指定で付ける (ここで margin: 0 にすると :is() の詳細度で打ち消してしまう) */
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	background: var(--yg-bg-green);
	box-shadow: 0 0 0 100vmax var(--yg-bg-green);
	clip-path: inset(0 -100vmax);
}

.single-dictionary .related-posts {
	order: 1;
	margin-top: 80px;
	padding-top: 80px;
}

.single-dictionary aside.c-aside {
	order: 2;
	margin-top: 80px;
	padding-top: 80px;
}

/* 関連記事がある (検索で見つかった) ときは、新着記事はその続き */
.single-dictionary .yougo-main:has(.related-posts) aside.c-aside {
	margin-top: 0;
	padding-top: 64px;
}

.single-dictionary .c-btn {
	order: 3;
	display: flex;
	justify-content: center;
	padding: 64px 0 96px;
	text-align: center;
}

/* 上部の戻るリンク (部品 Back Link 7300:27163) */
.single-dictionary .yougo-nav {
	display: flex; /* 行の高さをリンクの 20px に合わせる (block だと親の行の高さ 24px になる) */
	padding-bottom: 48px;
}

.single-dictionary .yougo-nav a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	line-height: 20px;
	color: var(--yg-link);
	text-decoration: none;
}

.single-dictionary .yougo-nav a:hover {
	text-decoration: underline;
}

/* 用語名 + よみ (PC は横並び・ベースラインそろえ)。
   「取締役会DX支援のミチビクが解説」(h1 内の span.small-ttl) は次の行に置き、
   その右端に本文最初の見出し「〇〇とは」を補助表示する (下の .yougo-sgcontent 参照)。 */
.single-dictionary .page-title {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: baseline;
	column-gap: 8px; /* 全角［の字面の左に余白があるので、見た目は 8px より少し広い */
	padding-bottom: 78px; /* 次の行: 上 40 + 行の高さ 30 + 下 8 */
}

.single-dictionary .yougo-title {
	order: 1;
	margin: 0;
	font-size: 32px;
	line-height: 48px;
	font-weight: 700;
	color: var(--yg-gray1);
}

.single-dictionary span.yougo-reading {
	order: 2;
	margin: 0;
	font-size: 12px;
	line-height: 18px;
	font-weight: 400;
	color: var(--yg-gray3);
}

.single-dictionary h1.yougo-title .small-ttl {
	position: absolute;
	top: 88px; /* 用語名の行 48 + 上 40 */
	left: 0;
	display: block;
	margin: 0;
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: var(--yg-green); /* michibiku の緑 (2026-11-18 竹内さん) */
}

/* 本文 */
.single-dictionary .yougo-sgcontent {
	position: relative;
}

.single-dictionary .yougo-sgcontent hr {
	display: none;
}

/* 本文のリズム (2026-11-18 見直し): 入稿データは 1 文ごとに段落が分かれるため、
   段落の間 = 見出しと本文の間 = 16px と詰め、セクションの間 (見出しの上) を 56px と広く取る。
   見出しが下の本文とまとまり、セクションの区切りがはっきりする */
.single-dictionary .yougo-sgcontent > h2 {
	position: relative;
	margin: 56px 0 0;
	padding: 4px 0 4px 18px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: var(--yg-gray1);
}

/* 見出しの縦線 (部品 Article H2 7261:27196: 幅 6px の Primary グラデ、文字との間 12) */
.single-dictionary .yougo-sgcontent > h2::before {
	content: "";
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 0;
	display: block;
	width: 6px;
	height: auto;
	margin: 0;
	border-radius: 0;
	background: linear-gradient(258.69deg, #369f83 0%, #2196d6 100%);
}

/* 最初の見出し「〇〇とは」: 見出しとして目立たせず、SEO 用の補助情報として小さく出す。
   隠さない・削除しない (2026-11-17 決定)。HTML 上の位置と文言はそのまま。
   PC は「取締役会DX支援のミチビクが解説」と同じ行の右端 (行の中央にそろえる: (30-18)/2 = 6)。 */
.single-dictionary .yougo-sgcontent > h2:first-of-type {
	position: absolute;
	/* 「取締役会DX支援のミチビクが解説」の行の中央 (-32px) から 5px 下げる (2026-11-18 竹内さん。
	   ベースラインを完全にそろえる -19px や 8px 下げと画面で比べ、5px に決定) */
	top: -27px;
	right: 0;
	max-width: calc(100% - 320px);
	margin: 0;
	padding: 0;
	font-size: 12px;
	line-height: 18px;
	font-weight: 400;
	color: var(--yg-green); /* 同じ行の「取締役会DX支援のミチビクが解説」と同じ michibiku の緑 */
	text-align: right;
}

.single-dictionary .yougo-sgcontent > h2:first-of-type::before {
	content: none;
}

/* 本文は定義文と同じ大きさ (PC 16px)。太さは Regular のままにして定義文と区別する。
   行間は 1.8 (2026-11-18 竹内さん。1.7 と画面で比べて 1.8 に決定。基準 1.5 倍以上は満たす) */
.single-dictionary .yougo-sgcontent > p,
.single-dictionary .yougo-sgcontent > ul,
.single-dictionary .yougo-sgcontent > ol {
	margin: 16px 0 0;
	font-size: 16px;
	line-height: 1.8;
	font-weight: 400;
	color: var(--yg-gray2);
}

/* 定義カード (最初のセクション。div.yougo-lead は inc/dictionary.php の the_content フィルタで付与)。
   枠線は 1px のグラデーション (右上 Primary2 → 左下 Link) を背景 2 層で描く。 */
.single-dictionary .yougo-lead {
	margin: 0;
	padding: 20px; /* 上下左右共通 */
	border: 1px solid transparent;
	border-radius: 8px;
	background:
		linear-gradient(#fff, #fff) padding-box,
		linear-gradient(to bottom left, #369f83, #2196d6) border-box;
}

.single-dictionary .yougo-lead > p {
	margin: 0;
	font-family: var(--yg-font-medium);
	font-size: 16px;
	line-height: 1.8;
	font-weight: 500;
	color: var(--yg-gray1);
}

.single-dictionary .yougo-lead > p + p {
	margin-top: 16px;
}

/* 定義カードの下は、セクションの間 (56px) より広く取って定義と解説を分ける */
.single-dictionary .yougo-sgcontent > .yougo-lead + h2 {
	margin-top: 72px;
}

/* 関連する用語 (部品 Term Tag 7283:27184) */
.single-dictionary .related-dictionary {
	padding-top: 64px;
}

.single-dictionary .related-dictionary__title {
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: var(--yg-gray1);
}

.single-dictionary .related-dictionary__list {
	gap: 8px;
}

/* 関連する用語は移動用のボタンではなく参照なので、「もどる」ボタン (高さ 48px) より弱くする。
   形と文字の大きさは変えず、高さを 30px に (2026-11-18 竹内さん) */
.single-dictionary .related-dictionary__link {
	padding: 4px 12px;
	border: 1px solid var(--yg-gray4);
	border-radius: 9999px;
	background: #fff;
	font-size: 14px;
	line-height: 20px;
	color: var(--yg-gray1);
	text-decoration: none;
	transition:
		border-color 0.2s,
		color 0.2s;
}

/* ホバーで枠線と文字を同じ色に変える */
.single-dictionary .related-dictionary__link:hover {
	border-color: var(--yg-green);
	background: #fff;
	color: var(--yg-green);
}

/* 関連記事 (部品 Article Card 7261:27189。先方 HTML の並び 日付→タイトル→タグ を
   デザインの カテゴリ→タイトル→日付 に order で並べ替える) */
.single-dictionary .related-posts .c-border-caption,
.single-dictionary aside.c-aside .c-border-caption {
	width: auto;
	margin: 0 0 24px;
	padding: 0;
	border: 0;
	font-size: 24px;
	line-height: 36px;
	font-weight: 700;
	color: var(--yg-gray1);
	text-align: left;
}

.single-dictionary .related-posts-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 40px 24px;
}

.single-dictionary a.related-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: calc((100% - 48px) / 3);
	max-width: none;
	margin: 0;
	overflow: visible;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--yg-gray1);
	text-decoration: none;
}

.single-dictionary a.related-item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 410 / 230;
	object-fit: cover;
	border-radius: 8px;
	background: var(--yg-gray6);
}

.single-dictionary a.related-item .c-article-txt {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.single-dictionary a.related-item .c-article-date-ttl {
	display: contents;
}

.single-dictionary a.related-item .c-article-keyword {
	order: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-dictionary a.related-item .c-article-keyword-item {
	display: flex; /* 先方 HTML の改行が「#」の後ろの空白にならないように */
	font-size: 12px;
	line-height: 18px;
	font-weight: 700;
	color: var(--yg-green);
}

.single-dictionary a.related-item .c-article-keyword-item::before {
	content: "#";
}

.single-dictionary a.related-item .c-article-ttl {
	order: 2;
	margin: 0;
	padding: 0; /* 先方テンプレートのインライン style="padding-top: 0;" をここへ移した */
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: var(--yg-gray1);
}

.single-dictionary a.related-item:hover .c-article-ttl {
	text-decoration: underline;
}

.single-dictionary a.related-item .c-article-date {
	order: 3;
	font-size: 12px;
	line-height: 18px;
	font-weight: 400;
	color: var(--yg-gray3);
}

/* 新着記事 (6 件を 1 段) */
.single-dictionary .latest-posts {
	gap: 24px;
}

.single-dictionary li.latest-post-item {
	flex: 1 1 0;
}

.single-dictionary a.sidebar-post-link {
	margin-top: 24px;
}

/* 戻るボタン (部品 Button / Back 7261:27152) */
.single-dictionary .c-btn a {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 320px;
	height: 48px;
	margin: 0;
	padding: 12px 32px;
	border: 1px solid var(--yg-gray4);
	border-radius: 9999px;
	background: #fff;
	box-shadow: none;
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--yg-gray1);
	text-decoration: none;
}

/* ホバーで枠線と文字を同じ緑に (関連する用語のタグ・頭文字タブと同じ変化) */
.single-dictionary .c-btn a:hover {
	border-color: var(--yg-green);
	color: var(--yg-green);
	opacity: 1;
}

.single-dictionary .c-btn .arw {
	display: none;
}

/* =========================================================
 * 詳細 PC (1024px 以上): 一覧と同じ 2 カラム (本文 + 右に新着記事 160px)
 *
 * 2026-11-18 竹内さん決定。右カラムがあっても本文は気にならずに読める。
 * 本文側の 4 ブロックを左列、新着記事を右列に置き、関連記事と戻るボタンは
 * 2 列をまたぐ薄緑の帯に残す。タブレット・スマホは上の 1 カラム (帯の中に新着記事) のまま。
 *
 * 行は「本文 4 行 (auto) + 余りを受ける 1 行 (minmax(0, 1fr))」。右カラムは 5 行すべてをまたぐ。
 * 右カラムが本文より高いとき、またいだ行に余りの高さが配られる。以前は右カラムが本文の 4 行
 * だけをまたいでいたので、余りが本文の行に配られ、戻るリンク・見出し・定義・関連する用語の
 * 間に 72〜146px の隙間が空いていた (本文が短い用語ほど大きい。2026-11-25 PR #564 の
 * ローカル検証で 44 語中 40 語)。可変の行をまたぐ要素の余りは可変の行にだけ配られる
 * (CSS Grid §11.5) ので、本文の行は中身の高さのままになる。
 * ========================================================= */
@media (min-width: 1024px) {
	.single-dictionary .yougo-main {
		box-sizing: border-box;
		display: grid;
		grid-template-columns: minmax(0, 1fr) 160px;
		grid-template-rows: repeat(4, auto) minmax(0, 1fr);
		column-gap: 40px;
		align-items: start;
		width: min(var(--yg-page-width), calc(100% - 40px));
		margin: 0 auto;
	}

	.single-dictionary :is(.yougo-nav, .page-title, .yougo-sgcontent, .related-dictionary) {
		grid-column: 1;
		width: auto;
	}

	.single-dictionary .yougo-nav {
		grid-row: 1;
	}

	.single-dictionary .page-title {
		grid-row: 2;
	}

	.single-dictionary .yougo-sgcontent {
		grid-row: 3;
	}

	.single-dictionary .related-dictionary {
		grid-row: 4;
	}

	/* 帯の中身は 2 カラム全体の幅にそろえる。基本の width: min(…) は
	   :is(…, aside.c-aside, …) で詳細度が高いので、.yougo-main を足して上回る */
	.single-dictionary .yougo-main :is(.related-posts, .c-btn) {
		grid-column: 1 / -1;
		width: auto;
	}

	.single-dictionary .related-posts {
		grid-row: 6;
	}

	.single-dictionary .c-btn {
		grid-row: 7;
	}

	/* 関連記事が無い用語では、戻るボタンが帯の先頭になる */
	.single-dictionary .yougo-main:not(:has(.related-posts)) .c-btn {
		margin-top: 80px;
		padding-top: 80px;
	}

	/* 右カラム: 帯から外して一覧の右カラムと同じ見た目に */
	.single-dictionary .yougo-main aside.c-aside,
	.single-dictionary .yougo-main:has(.related-posts) aside.c-aside {
		grid-column: 2;
		grid-row: 1 / 6;
		width: 160px;
		margin: 0;
		padding: 0;
		background: none;
		box-shadow: none;
		clip-path: none;
	}

	.single-dictionary aside.c-aside .c-border-caption {
		margin: 0;
		font-size: 20px;
		line-height: 30px;
	}

	.single-dictionary .sidebar-post-inner {
		display: flex;
		flex-direction: column;
		gap: 20px;
		margin-top: 20px;
	}

	.single-dictionary .latest-posts {
		flex-direction: column;
		gap: 16px;
	}

	.single-dictionary li.latest-post-item {
		flex: none;
	}

	.single-dictionary a.sidebar-post-link {
		margin-top: 0;
	}
}

/* =========================================================
 * タブレット幅
 * ========================================================= */
@media (max-width: 1023px) {
	/* 一覧: 新着記事を右カラムから一覧の下へ */
	.post-type-archive-dictionary .yougo-main {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.post-type-archive-dictionary aside.c-aside {
		width: 100%;
		padding-top: 48px;
	}

	.post-type-archive-dictionary .latest-posts {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 24px 16px;
	}

	.post-type-archive-dictionary li.latest-post-item {
		flex: 0 0 calc((100% - 32px) / 3);
	}

	/* 詳細: 新着記事 6 件を 3 件 × 2 段に */
	.single-dictionary .latest-posts {
		flex-wrap: wrap;
		gap: 24px 16px;
	}

	.single-dictionary li.latest-post-item {
		flex: 0 0 calc((100% - 32px) / 3);
	}
}

/* =========================================================
 * スマートフォン
 * ========================================================= */
@media (max-width: 767px) {
	/* ---- 一覧 ---- */
	.post-type-archive-dictionary .yougo-main {
		padding: 48px 0 80px;
	}

	.post-type-archive-dictionary .yougo-single {
		gap: 32px;
	}

	.post-type-archive-dictionary h1.yougo-ttl.c-caption {
		font-size: 24px;
		line-height: 36px;
	}

	.post-type-archive-dictionary .yougo-groups {
		gap: 32px;
	}

	.post-type-archive-dictionary .yougo-group__title {
		font-size: 16px;
		line-height: 24px;
	}

	.post-type-archive-dictionary .yougo-list {
		columns: 1;
	}

	.post-type-archive-dictionary ul.yougo-list li a {
		padding: 20px 0;
	}

	/* ページ送り (部品 Pagination Item 7261:27179) */
	.post-type-archive-dictionary .yougo-pagination {
		gap: 4px;
		margin: 0;
	}

	.post-type-archive-dictionary .yougo-pagination button,
	.post-type-archive-dictionary .yougo-pagination span {
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 40px;
		height: 40px;
		padding: 8px 12px;
		border: 1px solid var(--yg-gray4);
		border-radius: 4px;
		background: #fff;
		font-family: inherit;
		font-size: 14px;
		line-height: 28px;
		font-weight: 700;
		color: var(--yg-gray1);
	}

	.post-type-archive-dictionary .yougo-pagination span {
		border-color: transparent;
		background: none;
		color: var(--yg-gray3);
	}

	.post-type-archive-dictionary .yougo-pagination button.is-active {
		border-color: transparent;
		background: var(--yg-primary);
		color: #fff;
	}

	/* 前後の矢印 (‹ ›) は枠なし。端のページで使えない矢印は出さない */
	.post-type-archive-dictionary .yougo-pagination button:first-child,
	.post-type-archive-dictionary .yougo-pagination button:last-child {
		border-color: transparent;
		background: none;
	}

	.post-type-archive-dictionary .yougo-pagination button:disabled {
		display: none;
	}

	.post-type-archive-dictionary .sidebar-post-inner {
		gap: 16px;
		margin-top: 16px;
	}

	.post-type-archive-dictionary li.latest-post-item {
		flex: 0 0 calc((100% - 16px) / 2);
	}

	/* ---- 詳細 ---- */
	.single-dictionary .yougo-main {
		padding-top: 48px;
	}

	.single-dictionary .yougo-nav {
		padding-bottom: 32px;
	}

	/* 用語名 → よみ → 解説の行 → 補助見出し を縦に積む。
	   HTML はよみが先なので order で入れ替える。解説の行は h1 の中にあり order では動かせないため、
	   よみの下へ絶対配置し、その分の高さ (上 32 + 行の高さ 28) を margin-bottom で空ける */
	.single-dictionary .page-title {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		padding-bottom: 0;
		margin-bottom: 60px;
	}

	.single-dictionary span.yougo-reading {
		display: block;
		margin-top: 8px;
		/* 全角［は字面の左に半角分の空きがあり、用語名より右に見えるので行頭で詰める */
		text-spacing-trim: trim-start;
	}

	@supports not (text-spacing-trim: trim-start) {
		.single-dictionary span.yougo-reading {
			margin-left: -0.5em;
		}
	}

	.single-dictionary .yougo-title {
		font-size: 24px;
		line-height: 36px;
	}

	.single-dictionary h1.yougo-title .small-ttl {
		top: calc(100% + 32px);
		right: 0;
		font-size: 14px;
		line-height: 28px;
		font-weight: 400;
	}

	/* 補助見出しは「解説」の下に置き、下線で本文と区切る */
	.single-dictionary .yougo-sgcontent > h2:first-of-type {
		position: static;
		max-width: none;
		margin: 4px 0 0;
		padding: 0 0 8px;
		border-bottom: 1px solid var(--yg-gray5);
		text-align: left;
	}

	.single-dictionary .yougo-lead {
		padding: 16px;
	}

	.single-dictionary .yougo-sgcontent > p,
	.single-dictionary .yougo-sgcontent > ul,
	.single-dictionary .yougo-sgcontent > ol {
		font-size: 14px;
	}

	.single-dictionary .yougo-lead > p {
		font-size: 14px;
	}

	.single-dictionary .yougo-lead > p + p {
		margin-top: 14px; /* 本文の段落の間と同じ */
	}

	.single-dictionary .yougo-sgcontent > h2 {
		margin-top: 40px;
		font-size: 16px;
		line-height: 24px;
	}

	.single-dictionary .yougo-sgcontent > .yougo-lead + h2 {
		margin-top: 56px;
	}

	/* 段落の間隔 (行の高さ 25.2 + 14 = 39.2px) を行の高さの 1.5 倍以上に (WCAG 1.4.8 の目安) */
	.single-dictionary .yougo-sgcontent > p,
	.single-dictionary .yougo-sgcontent > ul,
	.single-dictionary .yougo-sgcontent > ol {
		margin-top: 14px;
	}

	.single-dictionary .related-dictionary {
		padding-top: 48px;
	}

	.single-dictionary .related-dictionary__title {
		margin-bottom: 12px;
		font-size: 16px;
		line-height: 24px;
	}

	/* 次に読む帯 */
	.single-dictionary .related-posts {
		margin-top: 56px;
		padding-top: 48px;
	}

	.single-dictionary aside.c-aside {
		margin-top: 56px;
		padding-top: 48px;
	}

	.single-dictionary .yougo-main:has(.related-posts) aside.c-aside {
		padding-top: 48px;
	}

	.single-dictionary .related-posts .c-border-caption,
	.single-dictionary aside.c-aside .c-border-caption {
		font-size: 18px;
		line-height: 27px;
	}

	.single-dictionary .related-posts .c-border-caption {
		margin-bottom: 20px;
	}

	.single-dictionary aside.c-aside .c-border-caption {
		margin-bottom: 16px;
	}

	/* 関連記事は小さな横型カード (部品 Article Card Compact 7409:27163) */
	.single-dictionary .related-posts-inner {
		flex-direction: column;
		gap: 20px;
	}

	.single-dictionary a.related-item {
		flex-direction: row;
		align-items: flex-start;
		gap: 12px;
		width: 100%;
	}

	.single-dictionary a.related-item img {
		flex: none;
		width: 112px;
		height: 63px;
		aspect-ratio: auto;
	}

	.single-dictionary a.related-item .meta {
		flex: 1 1 0;
		min-width: 0;
	}

	.single-dictionary a.related-item .c-article-txt {
		gap: 4px;
	}

	.single-dictionary a.related-item .c-article-ttl {
		font-size: 14px;
		line-height: 28px;
	}

	.single-dictionary li.latest-post-item {
		flex: 0 0 calc((100% - 16px) / 2);
	}

	.single-dictionary a.sidebar-post-link {
		margin-top: 16px;
	}

	.single-dictionary .c-btn {
		padding: 48px 0 56px;
	}

	.single-dictionary .c-btn a {
		width: 100%;
	}
}
