/*
Theme Name: YataGarasu Theme
Theme URI: https://yata-garasu.site/
Author: ウインズ合同会社
Author URI: https://yata-garasu.site/
Description: Project YataGarasu（AI編集部）のオウンドメディア用テーマ。士業・中小企業向け専門メディアとして、可読性と信頼感を優先した構成とする。仕様: docs/52〜docs/66。
Version: 0.1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yatagarasu-theme
Tags: blog, news, two-columns, custom-menu, featured-images, right-sidebar
*/

/* ============================================================
   1. デザイントークン（docs/52 ブランド設計書）
   配色・タイポグラフィをCSSカスタムプロパティで一元管理する。
   ============================================================ */

:root {
	/* 配色（docs/52 の配色表） */
	--yg-primary: #1a2333; /* プライマリ（濃紺・墨色系） */
	--yg-accent: #c89b3c; /* アクセント（琥珀・金系） */
	--yg-bg: #fafaf8; /* 背景（オフホワイト） */
	--yg-text: #2a2a2a; /* テキスト（ダークグレー） */
	--yg-link: #2e4260; /* リンク（プライマリ派生色） */
	--yg-error: #c0392b; /* 警告・エラー */
	--yg-success: #27ae60; /* 成功・公開済み */

	/* 上記から導出した補助色（コントラスト比 WCAG AA を満たす範囲で使用する） */
	--yg-surface: #ffffff;
	--yg-muted: #6b6b6b; /* 補助テキスト。背景比 5.1:1 */
	--yg-border: #e4e2dc;
	--yg-border-strong: #cfccc4;
	--yg-primary-soft: #f0f2f6;
	--yg-accent-soft: #f7f0e0;

	/* タイポグラフィ（docs/52・docs/63：本文16px以上） */
	--yg-font-base: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
		"Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic Medium",
		"游ゴシック Medium", YuGothic, "游ゴシック体", Meiryo, sans-serif;
	/* 英字ロゴ用。Webフォントは読み込まずWebセーフフォントで賄う（docs/52・docs/65） */
	--yg-font-logo: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--yg-size-body: 1rem; /* 16px */
	--yg-line-body: 1.85;

	/* レイアウト */
	--yg-container: 1200px;
	--yg-gutter: 24px;
	--yg-sidebar: 320px;
	--yg-radius: 10px;
	--yg-radius-sm: 4px;

	/* 影（枠線ではなく影で階層を表現する） */
	--yg-shadow: 0 1px 2px rgba(26, 35, 51, 0.05), 0 4px 16px rgba(26, 35, 51, 0.06);
	--yg-shadow-hover: 0 2px 4px rgba(26, 35, 51, 0.07), 0 12px 28px rgba(26, 35, 51, 0.12);
}

/* ============================================================
   2. ベース
   ============================================================ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--yg-bg);
	color: var(--yg-text);
	font-family: var(--yg-font-base);
	font-size: var(--yg-size-body);
	line-height: var(--yg-line-body);
	/* CLS対策（docs/65）：フォント差し替えによるガタつきを避けるため字送りを固定する */
	letter-spacing: 0.01em;
	overflow-wrap: break-word;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

a {
	color: var(--yg-link);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover,
a:focus {
	color: var(--yg-accent);
	text-decoration: underline;
}

/* キーボード操作時のフォーカスを明示する（アクセシビリティ、docs/63） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--yg-accent);
	outline-offset: 2px;
	text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--yg-primary);
	font-weight: 700;
	line-height: 1.45;
}

p,
ul,
ol,
figure,
table,
blockquote,
pre {
	margin: 0;
}

button {
	font: inherit;
	color: inherit;
}

/* スクリーンリーダー専用テキスト */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--yg-primary);
	color: #fff;
}

.skip-link:focus {
	left: 0;
}

/* ============================================================
   3. レイアウト
   ============================================================ */

.yg-container {
	width: 100%;
	max-width: var(--yg-container);
	margin: 0 auto;
	padding: 0 var(--yg-gutter);
}

.yg-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.yg-main {
	flex: 1 0 auto;
	padding: 40px 0 64px;
}

/* 本文＋サイドバーの2カラム（docs/63：デスクトップ1024px以上） */
.yg-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
}

@media (min-width: 1024px) {
	.yg-layout--with-sidebar {
		grid-template-columns: minmax(0, 1fr) var(--yg-sidebar);
		align-items: start;
	}
}

.yg-content {
	min-width: 0;
}

/* ============================================================
   4. ヘッダー・グローバルナビゲーション（docs/62）
   ============================================================ */

.yg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid var(--yg-border);
}

.yg-header__bar {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 68px;
}

.yg-logo {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-shrink: 0;
	text-decoration: none;
}

.yg-logo:hover,
.yg-logo:focus {
	text-decoration: none;
}

.yg-logo__mark {
	font-family: var(--yg-font-logo);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--yg-primary);
	line-height: 1.2;
}

.yg-logo__sub {
	font-size: 0.75rem;
	letter-spacing: 0.3em;
	color: var(--yg-accent);
}

.yg-logo img {
	max-height: 44px;
	width: auto;
}

/* カテゴリ名が長いため、ナビゲーションはロゴ行の下に独立した行として置く */
.yg-nav {
	border-top: 1px solid var(--yg-border);
}

.yg-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
	/* 画面幅が足りない場合は折り返さず、ナビ内だけを横スクロールさせる（docs/63） */
	overflow-x: auto;
	scrollbar-width: none;
}

.yg-nav__list::-webkit-scrollbar {
	display: none;
}

.yg-nav__list a {
	/* タップ領域44px以上を確保する（docs/63） */
	padding: 11px 13px;
	min-height: 44px;
	display: flex;
	align-items: center;
	white-space: nowrap;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--yg-primary);
	border-radius: var(--yg-radius-sm);
	position: relative;
}

.yg-nav__list a:hover,
.yg-nav__list a:focus {
	color: var(--yg-primary);
	background: var(--yg-primary-soft);
	text-decoration: none;
}

.yg-nav__list .current-menu-item > a,
.yg-nav__list .current-cat > a {
	color: var(--yg-primary);
}

.yg-nav__list .current-menu-item > a::after,
.yg-nav__list .current-cat > a::after {
	content: "";
	position: absolute;
	left: 13px;
	right: 13px;
	bottom: 4px;
	height: 2px;
	background: var(--yg-accent);
}

/* ヘッダー内検索（docs/62：全ページ共通の検索ボックス） */
.yg-header__search {
	flex-shrink: 0;
	margin-left: auto;
}

.yg-searchform {
	display: flex;
	align-items: center;
	background: var(--yg-bg);
	border: 1px solid var(--yg-border);
	border-radius: 999px;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.yg-searchform:focus-within {
	border-color: var(--yg-accent);
}

.yg-searchform input[type="search"] {
	width: 150px;
	min-height: 40px;
	padding: 0 8px 0 16px;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--yg-text);
}

.yg-searchform input[type="search"]:focus {
	outline: none;
}

.yg-searchform button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: var(--yg-muted);
	cursor: pointer;
}

.yg-searchform button:hover {
	color: var(--yg-primary);
}

/* ハンバーガーメニュー（モバイル、docs/63） */
.yg-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-left: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--yg-primary);
	cursor: pointer;
}

.yg-menu-toggle__bars,
.yg-menu-toggle__bars::before,
.yg-menu-toggle__bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.yg-menu-toggle__bars {
	position: relative;
}

.yg-menu-toggle__bars::before,
.yg-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.yg-menu-toggle__bars::before {
	top: -7px;
}

.yg-menu-toggle__bars::after {
	top: 7px;
}

.yg-menu-toggle[aria-expanded="true"] .yg-menu-toggle__bars {
	background: transparent;
}

.yg-menu-toggle[aria-expanded="true"] .yg-menu-toggle__bars::before {
	transform: translateY(7px) rotate(45deg);
}

.yg-menu-toggle[aria-expanded="true"] .yg-menu-toggle__bars::after {
	transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   5. 記事カード・カードグリッド
   「美しく記事が並ぶ」ことを最優先し、枠線ではなく余白と影で区切る。
   ============================================================ */

.yg-card-grid {
	display: grid;
	grid-template-columns: repeat(var(--yg-card-cols, 3), minmax(0, 1fr));
	gap: 32px 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* サイドバーがあるページでは1段の枚数を減らす */
.yg-layout--with-sidebar .yg-card-grid {
	--yg-card-cols: 2;
}

.yg-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.yg-card:hover,
.yg-card:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--yg-shadow-hover);
}

.yg-card__thumb {
	display: block;
	position: relative;
	/* CLS対策（docs/65）：画像読み込み前から高さを確保する */
	aspect-ratio: 16 / 9;
	background: var(--yg-primary-soft);
	overflow: hidden;
}

.yg-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.yg-card:hover .yg-card__thumb img {
	transform: scale(1.04);
}

/* アイキャッチ未設定時の代替表示 */
.yg-card__thumb--placeholder {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	color: var(--yg-primary);
	opacity: 0.35;
	font-family: var(--yg-font-logo);
	font-size: 1.5rem;
	letter-spacing: 0.12em;
}

.yg-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
	gap: 10px;
	padding: 18px 20px 22px;
}

.yg-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	font-size: 0.75rem;
	color: var(--yg-muted);
}

.yg-card__title {
	font-size: 1.0625rem;
	line-height: 1.55;
	/* 3行を超えるタイトルで高さが崩れないようにする */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yg-card__title a {
	color: var(--yg-primary);
}

.yg-card__title a:hover,
.yg-card__title a:focus {
	color: var(--yg-link);
	text-decoration: none;
}

.yg-card__excerpt {
	font-size: 0.875rem;
	line-height: 1.75;
	color: var(--yg-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* カテゴリ・業種タグのバッジ（docs/55） */
.yg-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	line-height: 1.6;
	white-space: nowrap;
}

.yg-badge--category {
	background: var(--yg-primary);
	color: #fff;
}

a.yg-badge--category:hover,
a.yg-badge--category:focus {
	background: var(--yg-link);
	color: #fff;
	text-decoration: none;
}

.yg-badge--sub {
	background: var(--yg-primary-soft);
	color: var(--yg-link);
}

a.yg-badge--sub:hover,
a.yg-badge--sub:focus {
	background: var(--yg-border);
	color: var(--yg-primary);
	text-decoration: none;
}

.yg-badge--industry {
	background: var(--yg-accent-soft);
	color: #7a5c14;
}

a.yg-badge--industry:hover,
a.yg-badge--industry:focus {
	background: #f0e4c8;
	color: #6a4f10;
	text-decoration: none;
}

.yg-badge-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ============================================================
   6. セクション見出し
   ============================================================ */

.yg-section {
	margin-bottom: 64px;
}

.yg-section:last-child {
	margin-bottom: 0;
}

.yg-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--yg-border);
}

.yg-section__title {
	position: relative;
	font-size: 1.25rem;
	letter-spacing: 0.02em;
	padding-left: 14px;
}

.yg-section__title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.25em;
	bottom: 0.25em;
	width: 4px;
	border-radius: 2px;
	background: var(--yg-accent);
}

.yg-section__more {
	font-size: 0.875rem;
	white-space: nowrap;
}

/* ============================================================
   7. トップページ（docs/54）
   ============================================================ */

.yg-lead {
	background: var(--yg-primary);
	color: #fff;
	padding: 56px 0;
	/* 金のヘアラインでアクセントを効かせる */
	border-bottom: 3px solid var(--yg-accent);
}

.yg-lead__inner {
	max-width: 760px;
}

.yg-lead__eyebrow {
	display: inline-block;
	margin-bottom: 14px;
	padding: 4px 12px;
	border: 1px solid rgba(200, 155, 60, 0.6);
	border-radius: 999px;
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	color: var(--yg-accent);
}

.yg-lead__title {
	margin-bottom: 16px;
	color: #fff;
	font-size: 1.75rem;
	line-height: 1.55;
}

.yg-lead__text {
	color: rgba(255, 255, 255, 0.86);
	font-size: 0.9375rem;
	line-height: 1.9;
}

/* カテゴリ別ハイライト（docs/54 の6） */
.yg-highlight {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-highlight__item {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 16px;
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
	transition: box-shadow 0.18s ease;
}

.yg-highlight__item:hover {
	box-shadow: var(--yg-shadow-hover);
}

.yg-highlight__thumb {
	flex-shrink: 0;
	width: 104px;
	aspect-ratio: 4 / 3;
	border-radius: var(--yg-radius-sm);
	background: var(--yg-primary-soft);
	overflow: hidden;
}

.yg-highlight__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yg-highlight__body {
	min-width: 0;
}

.yg-highlight__cat {
	display: block;
	margin-bottom: 6px;
	font-size: 0.75rem;
	color: var(--yg-accent);
	font-weight: 700;
	letter-spacing: 0.06em;
}

.yg-highlight__title {
	font-size: 0.9375rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* おすすめ書籍・ツール（docs/60・docs/61） */
.yg-item-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-item {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 20px;
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
}

.yg-item__thumb {
	margin-bottom: 14px;
	aspect-ratio: 4 / 3;
	border-radius: var(--yg-radius-sm);
	background: var(--yg-primary-soft);
	overflow: hidden;
}

.yg-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.yg-item__title {
	margin-bottom: 6px;
	font-size: 1rem;
	line-height: 1.55;
}

.yg-item__author {
	margin-bottom: 10px;
	font-size: 0.8125rem;
	color: var(--yg-muted);
}

.yg-item__excerpt {
	flex: 1 0 auto;
	font-size: 0.875rem;
	line-height: 1.75;
	color: var(--yg-muted);
}

.yg-item__link {
	margin-top: 14px;
}

/* ステマ規制対応のPRラベル（docs/05・docs/59） */
.yg-item__pr {
	padding: 1px 6px;
	border: 1px solid currentColor;
	border-radius: 3px;
	font-size: 0.625rem;
	letter-spacing: 0.08em;
	opacity: 0.8;
}

.yg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: var(--yg-radius-sm);
	background: var(--yg-primary);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background 0.15s ease;
}

.yg-button:hover,
.yg-button:focus {
	background: var(--yg-link);
	color: #fff;
	text-decoration: none;
}

.yg-button--ghost {
	background: transparent;
	border: 1px solid var(--yg-border-strong);
	color: var(--yg-primary);
}

.yg-button--ghost:hover,
.yg-button--ghost:focus {
	background: var(--yg-primary-soft);
	color: var(--yg-primary);
}

/* ============================================================
   8. アーカイブ・ページヘッダー
   ============================================================ */

.yg-page-head {
	margin-bottom: 40px;
}

.yg-page-head__title {
	font-size: 1.625rem;
	line-height: 1.5;
}

.yg-page-head__desc {
	margin-top: 12px;
	color: var(--yg-muted);
	font-size: 0.9375rem;
	line-height: 1.9;
}

.yg-page-head__count {
	margin-top: 8px;
	font-size: 0.8125rem;
	color: var(--yg-muted);
}

/* 記事0件時のメッセージ（docs/54・docs/56・docs/57） */
.yg-empty {
	padding: 56px 24px;
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
	text-align: center;
	color: var(--yg-muted);
}

/* ============================================================
   9. パンくずリスト（docs/53・docs/62）
   ============================================================ */

.yg-breadcrumb {
	padding: 16px 0 0;
	font-size: 0.8125rem;
	color: var(--yg-muted);
}

.yg-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-breadcrumb li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.yg-breadcrumb li + li::before {
	content: "›";
	color: var(--yg-border-strong);
}

.yg-breadcrumb [aria-current="page"] {
	color: var(--yg-text);
	/* 長い記事タイトルでパンくずが折り返しすぎないようにする */
	display: inline-block;
	max-width: 28em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ============================================================
   10. 記事ページ（docs/55）
   ============================================================ */

.yg-article {
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
	overflow: hidden;
}

.yg-article__header {
	padding: 36px 40px 0;
}

.yg-article__title {
	margin-bottom: 18px;
	font-size: 1.875rem;
	line-height: 1.5;
}

.yg-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	font-size: 0.8125rem;
	color: var(--yg-muted);
}

.yg-article__meta time {
	white-space: nowrap;
}

.yg-article__author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: var(--yg-primary);
}

.yg-article__terms {
	margin-top: 18px;
}

.yg-article__thumb {
	margin: 28px 0 0;
}

.yg-article__thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.yg-article__body {
	padding: 32px 40px 40px;
}

/* 記事本文 */
.yg-entry-content {
	font-size: 1.0625rem;
	line-height: 1.95;
}

.yg-entry-content > * + * {
	margin-top: 1.4em;
}

/* 先頭要素が見出しでも、本文冒頭に余分な余白を作らない */
.yg-entry-content > *:first-child {
	margin-top: 0;
}

.yg-entry-content h2 {
	margin-top: 2.4em;
	margin-bottom: 0.9em;
	padding: 0 0 12px 16px;
	border-bottom: 2px solid var(--yg-border);
	font-size: 1.375rem;
	position: relative;
}

.yg-entry-content h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	bottom: 20px;
	width: 4px;
	border-radius: 2px;
	background: var(--yg-accent);
}

.yg-entry-content h3 {
	margin-top: 2em;
	margin-bottom: 0.7em;
	font-size: 1.1875rem;
}

.yg-entry-content h4 {
	margin-top: 1.8em;
	margin-bottom: 0.6em;
	font-size: 1.0625rem;
}

.yg-entry-content ul,
.yg-entry-content ol {
	padding-left: 1.6em;
}

.yg-entry-content li + li {
	margin-top: 0.5em;
}

.yg-entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.yg-entry-content blockquote {
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--yg-accent);
	color: var(--yg-muted);
}

.yg-entry-content pre {
	padding: 16px 18px;
	background: var(--yg-primary);
	color: #f2f2f2;
	border-radius: var(--yg-radius-sm);
	overflow-x: auto;
	font-size: 0.875rem;
	line-height: 1.7;
}

.yg-entry-content code {
	padding: 2px 6px;
	background: var(--yg-primary-soft);
	border-radius: 3px;
	font-size: 0.9em;
}

.yg-entry-content pre code {
	padding: 0;
	background: transparent;
	color: inherit;
}

.yg-entry-content img {
	border-radius: var(--yg-radius-sm);
}

/* 表は横スクロールさせ、モバイルで画面外へはみ出さないようにする（docs/63） */
.yg-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.yg-entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.yg-entry-content th,
.yg-entry-content td {
	padding: 10px 14px;
	border: 1px solid var(--yg-border);
	text-align: left;
	vertical-align: top;
}

.yg-entry-content th {
	background: var(--yg-primary-soft);
	color: var(--yg-primary);
	white-space: nowrap;
}

/* AI生成開示文の軽い強調（docs/55） */
.yg-ai-disclosure {
	padding: 14px 18px;
	background: var(--yg-primary-soft);
	border-left: 3px solid var(--yg-link);
	border-radius: var(--yg-radius-sm);
	font-size: 0.875rem;
	line-height: 1.8;
	color: var(--yg-muted);
}

/* SNSシェア（docs/55 の13） */
.yg-share {
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--yg-border);
}

.yg-share__label {
	margin-bottom: 12px;
	font-size: 0.8125rem;
	color: var(--yg-muted);
}

.yg-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-share__list a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--yg-border-strong);
	border-radius: 999px;
	font-size: 0.875rem;
	color: var(--yg-primary);
}

.yg-share__list a:hover,
.yg-share__list a:focus {
	background: var(--yg-primary);
	border-color: var(--yg-primary);
	color: #fff;
	text-decoration: none;
}

/* 関連記事（docs/62） */
.yg-related {
	margin-top: 56px;
}

.yg-related .yg-card-grid {
	--yg-card-cols: 3;
	gap: 24px 20px;
}

/* ============================================================
   11. サイドバー・ウィジェット
   ============================================================ */

.yg-sidebar {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.yg-widget {
	padding: 22px 20px;
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
	font-size: 0.9375rem;
}

.yg-widget__title,
.yg-widget .widget-title,
.yg-widget .wp-block-heading {
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--yg-border);
	font-size: 1rem;
}

.yg-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-widget li + li {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dotted var(--yg-border);
}

.yg-widget img {
	border-radius: var(--yg-radius-sm);
}

/* ============================================================
   12. 広告枠（docs/59）
   ステマ規制対応として、全ての広告枠に「広告」ラベルを一律付与する。
   ============================================================ */

.yg-ad {
	margin: 0 0 28px;
}

.yg-ad--in-content {
	margin: 40px 0;
}

.yg-ad--header,
.yg-ad--footer {
	margin: 0;
	padding: 16px 0;
	background: var(--yg-primary-soft);
}

.yg-ad__label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	color: var(--yg-muted);
}

.yg-ad__body > * + * {
	margin-top: 16px;
}

/* 広告内の画像に高さが無いと読み込み時にレイアウトがずれる（docs/65 CLS対策） */
.yg-ad__body img {
	height: auto;
}

/* ============================================================
   13. ページネーション
   ============================================================ */

.yg-pagination {
	margin-top: 48px;
}

.yg-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.yg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--yg-radius-sm);
	background: var(--yg-surface);
	box-shadow: var(--yg-shadow);
	color: var(--yg-primary);
	font-size: 0.9375rem;
}

.yg-pagination a.page-numbers:hover,
.yg-pagination a.page-numbers:focus {
	background: var(--yg-primary-soft);
	text-decoration: none;
}

.yg-pagination .page-numbers.current {
	background: var(--yg-primary);
	color: #fff;
}

.yg-pagination .page-numbers.dots {
	background: transparent;
	box-shadow: none;
}

/* ============================================================
   14. フッター
   ============================================================ */

.yg-footer {
	margin-top: auto;
	background: var(--yg-primary);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.875rem;
}

.yg-footer a {
	color: rgba(255, 255, 255, 0.78);
}

.yg-footer a:hover,
.yg-footer a:focus {
	color: var(--yg-accent);
}

.yg-footer__main {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	padding: 56px 0 40px;
}

.yg-footer__brand .yg-logo__mark {
	color: #fff;
}

.yg-footer__desc {
	margin-top: 14px;
	line-height: 1.9;
	color: rgba(255, 255, 255, 0.68);
}

.yg-footer__title {
	margin-bottom: 14px;
	color: #fff;
	font-size: 0.9375rem;
	letter-spacing: 0.04em;
}

.yg-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-footer__list li + li {
	margin-top: 10px;
}

.yg-footer__industries {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yg-footer__industries a {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	font-size: 0.8125rem;
}

.yg-footer__industries a:hover,
.yg-footer__industries a:focus {
	border-color: var(--yg-accent);
	text-decoration: none;
}

.yg-footer__bottom {
	padding: 18px 0 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   15. 検索結果・404
   ============================================================ */

.yg-notfound {
	max-width: 640px;
	margin: 0 auto;
	padding: 64px 24px;
	text-align: center;
}

.yg-notfound__code {
	font-family: var(--yg-font-logo);
	font-size: 4rem;
	font-weight: 700;
	color: var(--yg-border-strong);
	line-height: 1;
}

.yg-notfound__title {
	margin: 16px 0 12px;
	font-size: 1.375rem;
}

.yg-notfound__text {
	margin-bottom: 28px;
	color: var(--yg-muted);
}

.yg-notfound .yg-searchform {
	max-width: 420px;
	margin: 0 auto 28px;
	background: var(--yg-surface);
}

.yg-notfound .yg-searchform input[type="search"] {
	width: 100%;
}

/* ============================================================
   16. 固定ページ
   ============================================================ */

.yg-page {
	padding: 36px 40px 44px;
	background: var(--yg-surface);
	border-radius: var(--yg-radius);
	box-shadow: var(--yg-shadow);
}

.yg-page__title {
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--yg-border);
	font-size: 1.625rem;
}

/* ============================================================
   17. レスポンシブ（docs/63 のブレークポイント）
   ============================================================ */

/* タブレット：768px〜1023px（1〜2カラム） */
@media (max-width: 1023px) {
	.yg-card-grid {
		--yg-card-cols: 2;
	}

	.yg-related .yg-card-grid {
		--yg-card-cols: 2;
	}

	/* サイドバーは本文の下へ回す */
	.yg-layout--with-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}

	.yg-article__header,
	.yg-article__body,
	.yg-page {
		padding-left: 28px;
		padding-right: 28px;
	}

	.yg-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* モバイル：〜767px（1カラム・ハンバーガーメニュー） */
@media (max-width: 767px) {
	:root {
		--yg-gutter: 16px;
	}

	.yg-card-grid,
	.yg-related .yg-card-grid,
	.yg-item-grid,
	.yg-highlight {
		--yg-card-cols: 1;
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.yg-menu-toggle {
		display: flex;
	}

	.yg-header__bar {
		flex-wrap: wrap;
		min-height: 60px;
		gap: 12px;
	}

	/* モバイルではナビゲーションと検索をハンバーガー内へ格納する */
	.yg-nav,
	.yg-header__search {
		display: none;
		width: 100%;
		margin-left: 0;
	}

	.yg-header.is-open .yg-nav,
	.yg-header.is-open .yg-header__search {
		display: block;
	}

	.yg-header.is-open .yg-header__bar {
		padding-bottom: 16px;
	}

	.yg-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		overflow-x: visible;
	}

	.yg-nav__list li + li {
		border-top: 1px solid var(--yg-border);
	}

	.yg-nav__list a {
		padding: 14px 4px;
	}

	.yg-nav__list .current-menu-item > a::after,
	.yg-nav__list .current-cat > a::after {
		display: none;
	}

	.yg-searchform input[type="search"] {
		width: 100%;
	}

	.yg-main {
		padding: 24px 0 48px;
	}

	.yg-lead {
		padding: 36px 0;
	}

	.yg-lead__title {
		font-size: 1.375rem;
	}

	.yg-section {
		margin-bottom: 44px;
	}

	.yg-article__header,
	.yg-article__body,
	.yg-page {
		padding-left: 18px;
		padding-right: 18px;
	}

	.yg-article__header {
		padding-top: 26px;
	}

	.yg-article__title {
		font-size: 1.4375rem;
	}

	.yg-entry-content {
		font-size: 1rem;
	}

	.yg-entry-content h2 {
		font-size: 1.1875rem;
	}

	.yg-highlight__item {
		align-items: flex-start;
	}

	.yg-highlight__thumb {
		width: 84px;
	}

	.yg-footer__main {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		padding: 40px 0 32px;
	}
}

/* 動きを減らす設定を尊重する */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}

	.yg-card:hover {
		transform: none;
	}
}
