/**
 * Blockman メインスタイル
 * すべて :root の CSS 変数（inc/dynamic-css.php が出力）を参照する。
 */

/* ============================================================
 * 変数のフォールバック（カスタマイザー未設定時の保険）
 * ============================================================ */
:root {
	--bm-site-max-width: 1100px;
	--bm-sidebar-width: 300px;
	--bm-content-gap: 40px;
	--bm-bg: #ffffff;
	--bm-text: #333333;
	--bm-accent: #06a4d4;
	--bm-link: #0073aa;
	--bm-link-hover: #06a4d4;
	--bm-font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	--bm-font-size-pc: 16px;
	--bm-font-size-sp: 15px;
	--bm-header-bg: #ffffff;
	--bm-header-text: #333333;
	--bm-header-link: #333333;
	--bm-header-link-hover: #06a4d4;
	--bm-logo-height-pc: 50px;
	--bm-logo-height-sp: 40px;
	--bm-sidebar-bg: #f7f7f7;
	--bm-sidebar-text: #333333;
	--bm-sidebar-link: #0073aa;
	--bm-sidebar-link-hover: #06a4d4;
	--bm-footer-bg: #222222;
	--bm-footer-text: #eeeeee;
	--bm-footer-link: #eeeeee;
	--bm-footer-link-hover: #06a4d4;
	--bm-footer-font-size-pc: 14px;
	--bm-footer-font-size-sp: 13px;
	--bm-radius: 8px;
	--bm-shadow: 0 2px 12px rgba(0, 0, 0, .06);
	--bm-border-width: 1px;
	--bm-border-style: none;
	--bm-border-color: #e3e3e3;
	--bm-border: var(--bm-border-width) var(--bm-border-style) var(--bm-border-color);
}

/* ============================================================
 * リセット & ベース
 * ============================================================ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background-color: var(--bm-bg);
	color: var(--bm-text);
	font-family: var(--bm-font-family);
	font-size: var(--bm-font-size-sp);
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: bottom;
}

a {
	color: var(--bm-link);
	text-decoration: none;
	transition: color .2s ease, opacity .2s ease, background-color .2s ease;
}

a:hover {
	color: var(--bm-link-hover);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 100;
}
.skip-link:focus {
	left: 8px;
	top: 8px;
	background: #fff;
	padding: 8px 16px;
	border-radius: 4px;
}

/* ============================================================
 * レイアウト
 * ============================================================ */
.site-container {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bm-content-gap);
	max-width: var(--bm-site-max-width);
	margin: 0 auto;
	padding: 40px 16px 64px;
}

.site-main {
	flex: 1 1 0;
	min-width: 0;
}

.site-sidebar {
	flex: 0 0 var(--bm-sidebar-width);
	width: var(--bm-sidebar-width);
}

/* サイドバー領域にはシェアボタン（AddToAny等）を表示しない
   ── プラグインがウィジェット描画時の the_content にボタンを差し込むのを抑制 */
.site-sidebar .a2a_kit,
.site-sidebar .addtoany_list,
.site-sidebar .addtoany_share_save_container,
.site-sidebar .sharedaddy,
.site-sidebar .jp-relatedposts {
	display: none !important;
}

/* サイドバー位置（body class で切替） */
body.sidebar-left .site-main {
	order: 2;
}
body.sidebar-left .site-sidebar {
	order: 1;
}

/* サイドバー無し */
body.no-sidebar .site-main {
	flex-basis: 100%;
}
body.no-sidebar .site-sidebar {
	display: none;
}

/* ============================================================
 * ヘッダー
 * ============================================================ */
.site-header {
	background-color: var(--bm-header-bg);
	color: var(--bm-header-text);
	box-shadow: var(--bm-shadow);
	position: relative;
	z-index: 20;
}
/* ドロワー／検索オーバーレイを開いている間はヘッダーを前面へ。
   ドロワーはヘッダー内にあるため、ヘッダーの重なり順を背景オーバーレイ(1000)より
   上げないと、オーバーレイがドロワーを覆ってクリックできなくなる。 */
body.bm-no-scroll .site-header {
	z-index: 1001;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: var(--bm-site-max-width);
	margin: 0 auto;
	padding: 12px 16px;
}

.site-branding {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.site-logo img,
.custom-logo {
	height: var(--bm-logo-height-sp);
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.2;
}
.site-title a {
	color: var(--bm-header-text);
}
.site-description {
	margin: 2px 0 0;
	font-size: .75rem;
	opacity: .7;
}

/* グローバルナビ */
.global-nav__list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
}
.global-nav__list a {
	color: var(--bm-header-link);
	display: inline-block;
	padding: 6px 4px;
	font-size: .95rem;
}
.global-nav__list a:hover {
	color: var(--bm-header-link-hover);
}

/* PC（タブレット以上）：ハンバーガーではなく通常のテキストメニュー */
@media (min-width: 783px) {
	/* PC ではハンバーガー非表示・検索ボタンは表示 */
	.menu-toggle {
		display: none;
	}
	.header-search-toggle {
		display: inline-flex;
	}

	/* ロゴ左寄せ（既定）→ ロゴ左・メニュー＋検索を右寄せ（横並び） */
	body.logo-left .site-header__inner {
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
	}
	body.logo-left .site-branding {
		margin-right: auto; /* ロゴを左、残りを右へ */
	}
	body.logo-left .global-nav {
		order: 2;
	}
	body.logo-left .global-nav__list {
		justify-content: flex-end;
	}
	body.logo-left .header-search-toggle {
		order: 3;
		margin-left: 14px;
	}

	/* ロゴ中央 → ロゴを中央に置き、その下にメニューと検索を横並びで中央表示 */
	body.logo-center .site-header__inner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 10px;
	}
	body.logo-center .site-branding {
		flex-basis: 100%; /* ロゴは単独行（中央） */
		align-items: center;
		text-align: center;
	}
	body.logo-center .global-nav {
		width: auto;
		margin-left: 0;
		order: 2;
	}
	body.logo-center .global-nav__list {
		justify-content: center;
	}
	body.logo-center .header-search-toggle {
		position: static;
		order: 3;
	}
}

/* ハンバーガー（正方形に3本線を収める） */
.menu-toggle {
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 8px;
	cursor: pointer;
	z-index: 1002;
}
.menu-toggle__bar {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 2px;
	margin-top: -1px;
	transform: translateX(-50%);
	background: var(--bm-header-text);
	transition: background .2s ease;
}
.menu-toggle__bar::before,
.menu-toggle__bar::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--bm-header-text);
	transition: transform .3s ease;
}
.menu-toggle__bar::before {
	top: -7px;
}
.menu-toggle__bar::after {
	top: 7px;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar {
	background: transparent;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before {
	transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after {
	transform: translateY(-7px) rotate(-45deg);
}
/* 開いているとき（×＝閉じるボタン）はドロワーの文字色に合わせる */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before,
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after {
	background: var(--bm-drawer-text, var(--bm-header-text));
}
.menu-toggle[aria-expanded="true"] {
	border-color: color-mix(in srgb, var(--bm-drawer-text, var(--bm-header-text)) 40%, transparent);
}

/* 検索ボタン */
.header-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 8px;
	cursor: pointer;
	color: var(--bm-header-link);
	font-size: 1.05rem;
	transition: color .2s ease, border-color .2s ease;
}
.header-search-toggle:hover {
	color: var(--bm-header-link-hover);
	border-color: var(--bm-header-link-hover);
}

/* 検索オーバーレイ */
.search-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1100;
	background: rgba(0, 0, 0, .6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	padding: 20px;
	justify-content: center;
	align-items: center;
}
.search-overlay.is-active {
	display: flex;
}
.search-overlay__inner {
	width: min(680px, 100%);
}
.search-overlay__inner .search-form {
	display: flex;
	gap: 8px;
	width: 100%;
	align-items: stretch;
	justify-content: center;
}
.search-overlay__inner .search-form label {
	flex: 1;
	display: block;
	margin: 0;
}
.search-overlay__inner .search-form .search-field,
.search-overlay__inner .search-form input[type="search"] {
	width: 100%;
	box-sizing: border-box;
	font-size: 1.1rem;
	padding: 16px 18px;
	border: 0;
	border-radius: var(--bm-radius);
}
.search-overlay__inner .search-form .search-submit,
.search-overlay__inner .search-form button,
.search-overlay__inner .search-form input[type="submit"] {
	flex: 0 0 auto;
	padding: 0 22px;
	font-size: 1rem;
	border: 0;
	border-radius: var(--bm-radius);
	background: var(--bm-accent);
	color: #fff;
	cursor: pointer;
}
.search-overlay__close {
	position: absolute;
	top: 20px;
	right: 24px;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 1.6rem;
	cursor: pointer;
	line-height: 1;
}

/* ドロワーの背景オーバーレイ */
.global-nav-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .3s ease;
	z-index: 1000;
}
.global-nav-overlay.is-active {
	display: block;
	opacity: 1;
}
body.bm-no-scroll {
	overflow: hidden;
}

/* ============================================================
 * フロント：メインビジュアル
 * ============================================================ */
.front-mv {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 380px;
	padding: 64px 16px;
	background-size: cover;
	background-position: center;
	background-color: var(--bm-accent);
	color: #fff;
	text-align: center;
}
.front-mv::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .28);
}
.front-mv__inner {
	position: relative;
	z-index: 1;
	max-width: 720px;
}
.front-mv__title {
	margin: 0 0 16px;
	font-size: clamp(1.6rem, 4vw, 2.6rem);
	line-height: 1.3;
}
.front-mv__text {
	margin: 0 0 24px;
	font-size: 1.05rem;
}

/* ============================================================
 * フロント：記事スライダー
 * ============================================================ */
.front-slider {
	position: relative;
	margin: 0 auto;
	padding: var(--bm-slider-pad-y, 24px) 16px;
	background-color: var(--bm-slider-bg, transparent);
}
.front-slider--contained {
	max-width: var(--bm-site-max-width);
}
.front-slider--full {
	max-width: none;
	width: 100%;
	margin-left: 0;
	margin-right: 0;
}
.front-slider__viewport {
	overflow: hidden;
}
.front-slider__track {
	display: flex;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
	transition: transform .4s ease;
	--bm-pv: 3; /* JS が data-per-view に応じて上書き */
}
/* スライド枚数が表示枚数に満たないときは中央寄せ */
.front-slider.is-centered .front-slider__track {
	justify-content: center;
}
/* 両端を半分見切れさせる（peek）。表示枚数+1 で割り、JS が中央位置に寄せる */
.front-slider__slide {
	flex: 0 0 calc((100% - var(--bm-pv, 3) * 16px) / (var(--bm-pv, 3) + 1));
	max-width: calc((100% - var(--bm-pv, 3) * 16px) / (var(--bm-pv, 3) + 1));
}
.front-slider__slide a {
	display: block;
	color: var(--bm-slider-text, var(--bm-text));
}
.front-slider__title {
	display: block;
	margin-top: 8px;
	font-weight: 600;
	font-size: .95rem;
	color: var(--bm-slider-text, var(--bm-text));
}
@media (max-width: 600px) {
	.front-slider__title {
		font-size: .8rem;
		margin-top: 6px;
		line-height: 1.4;
	}
}
.front-slider__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--bm-radius);
}
.front-slider__nav {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: var(--bm-shadow);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: var(--bm-text);
}
.front-slider__nav--prev { left: 4px; }
.front-slider__nav--next { right: 4px; }

/* ============================================================
 * 投稿一覧 / アーカイブ
 * ============================================================ */
.post-list-wrap {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.entry--list,
.entry--archive {
	display: flex;
	gap: 20px;
	padding-bottom: 24px;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.entry--list .entry-thumb,
.entry--archive .entry-thumb {
	flex: 0 0 220px;
}
.entry--list .entry-thumb img,
.entry--archive .entry-thumb img,
.entry-thumb__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--bm-radius);
	background: rgba(0, 0, 0, .06);
}
.entry-summary-wrap {
	flex: 1 1 0;
	min-width: 0;
}
.entry--list .entry-title,
.entry--archive .entry-title {
	margin: 0 0 8px;
	font-size: 1.2rem;
	line-height: 1.4;
}
.entry--list .entry-title a,
.entry--archive .entry-title a {
	color: var(--bm-text);
}
.entry--list .entry-title a:hover,
.entry--archive .entry-title a:hover {
	color: var(--bm-accent);
}
.read-more {
	display: inline-block;
	margin-top: 8px;
	font-size: .9rem;
	font-weight: 600;
}

/* アーカイブ：カードレイアウト */
body.bm-archive-card .archive-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}
body.bm-archive-card .entry--archive {
	flex-direction: column;
	gap: 12px;
	border-bottom: 0;
	padding: 0;
	background: #fff;
	border-radius: var(--bm-radius);
	border: var(--bm-border);
	box-shadow: var(--bm-shadow);
	overflow: hidden;
}
body.bm-archive-card .entry--archive .entry-thumb {
	flex: none;
}
body.bm-archive-card .entry--archive .entry-thumb img,
body.bm-archive-card .entry-thumb__placeholder {
	border-radius: 0;
}
body.bm-archive-card .entry-summary-wrap {
	padding: 4px 16px 20px;
}

/* アーカイブ：リストレイアウト */
body.bm-archive-list .archive-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* メタ情報 */
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-size: .82rem;
	color: rgba(0, 0, 0, .55);
}
.entry-meta a {
	color: rgba(0, 0, 0, .6);
}
.entry-meta a:hover {
	color: var(--bm-accent);
}

/* ============================================================
 * 単一記事
 * ============================================================ */

/* コンテンツボックス（背景色・ボーダー・パディング）
 * - タイトル・本文は常にパディング分だけ内側に配置
 * - アイキャッチは負マージンでコンテンツ幅いっぱいにはみ出す
 * - サイト全体の角丸設定（--bm-radius）をボックスに適用し、
 *   overflow:hidden により上端アイキャッチも同じ角丸にクリップする
 */
.entry--single,
.entry--page {
	--bm-content-pad: 32px; /* タイトル・本文の左右内側余白（既定） */
	background: var(--bm-content-bg, #fff);
	padding: var(--bm-content-pad);
	border-radius: var(--bm-radius);
	border: var(--bm-border);
	overflow: hidden;
}

/* ボーダーの種類は body class で切替 */
body.bm-content-border-line .entry--single,
body.bm-content-border-line .entry--page,
body.bm-content-border-line-round .entry--single,
body.bm-content-border-line-round .entry--page {
	border: 1px solid rgba(0, 0, 0, .12);
}
body.bm-content-border-shadow .entry--single,
body.bm-content-border-shadow .entry--page,
body.bm-content-border-shadow-round .entry--single,
body.bm-content-border-shadow-round .entry--page {
	box-shadow: var(--bm-shadow);
}

.entry--single .entry-title,
.entry--page .entry-title {
	font-size: clamp(1.5rem, 3.5vw, 2.1rem);
	line-height: 1.35;
	margin: 0 0 12px;
}

/* アイキャッチをコンテンツ最上部・全幅に配置（左右上をパディング分はみ出させる） */
.entry-thumbnail {
	margin: 0 0 28px;
}
.entry-thumbnail img {
	width: 100%;
	display: block;
}
.entry-thumbnail--top {
	margin-top: calc(-1 * var(--bm-content-pad));
	margin-right: calc(-1 * var(--bm-content-pad));
	margin-left: calc(-1 * var(--bm-content-pad));
	margin-bottom: 32px;
}
.entry-thumbnail--top img {
	width: 100%;
	/* 角丸はボックス側の overflow:hidden で制御するため画像自体は角丸なし */
	border-radius: 0;
}

.entry-content {
	/* body に適用された基本フォントサイズ（--bm-font-size-pc/sp）を継承する。
	   1rem 固定だとカスタマイザーの基本サイズが本文に反映されないため inherit を使用。 */
	font-size: inherit;
	line-height: 2; /* 本文の行間を広めに */
	letter-spacing: var(--bm-letter-spacing, normal);
}
.entry-content > * {
	margin-top: 1.6em;
	margin-bottom: 1.6em;
}
.entry-content a {
	text-decoration: underline;
}


/* 見出しの共通ベース */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	line-height: 1.4;
	font-weight: 700;
}
.entry-content h2 {
	font-size: 1.5rem;
	margin-top: 3em;
	margin-bottom: 1.8em;
}
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.1rem; }

/* --- 見出しデザイン: body class で切替（h2） --- */
body.bm-h2-underline .entry-content h2 {
	padding-bottom: .3em;
	border-bottom: 3px solid var(--bm-accent);
}
body.bm-h2-border-left .entry-content h2 {
	padding: .5em 0 .5em .85em;
	border-left: 6px solid var(--bm-accent);
}
body.bm-h2-fill .entry-content h2 {
	padding: .4em .7em;
	background: var(--bm-accent);
	color: #fff;
	border-radius: 4px;
}
body.bm-h2-double .entry-content h2 {
	padding: .4em 0;
	border-top: 2px solid var(--bm-accent);
	border-bottom: 2px solid var(--bm-accent);
}

/* --- h3 --- */
body.bm-h3-underline .entry-content h3 {
	padding-bottom: .25em;
	border-bottom: 2px solid var(--bm-accent);
}
body.bm-h3-border-left .entry-content h3 {
	padding: .4em 0 .4em .75em;
	border-left: 5px solid var(--bm-accent);
}
body.bm-h3-fill .entry-content h3 {
	padding: .35em .6em;
	background: var(--bm-accent);
	color: #fff;
	border-radius: 4px;
}
body.bm-h3-double .entry-content h3 {
	padding: .35em 0;
	border-top: 2px solid var(--bm-accent);
	border-bottom: 2px solid var(--bm-accent);
}

/* --- h4 --- */
body.bm-h4-underline .entry-content h4 {
	padding-bottom: .2em;
	border-bottom: 1px solid var(--bm-accent);
}
body.bm-h4-border-left .entry-content h4 {
	padding: .35em 0 .35em .7em;
	border-left: 4px solid var(--bm-accent);
}
body.bm-h4-fill .entry-content h4 {
	padding: .3em .5em;
	background: var(--bm-accent);
	color: #fff;
	border-radius: 4px;
}
body.bm-h4-double .entry-content h4 {
	padding: .3em 0;
	border-top: 1px solid var(--bm-accent);
	border-bottom: 1px solid var(--bm-accent);
}

/* --- 追加デザイン（h2・h3・h4 共通） --- */

/* 点線下線 */
body.bm-h2-dotted .entry-content h2,
body.bm-h3-dotted .entry-content h3,
body.bm-h4-dotted .entry-content h4 {
	padding-bottom: .3em;
	border-bottom: 3px dotted var(--bm-accent);
}

/* 下線＋アクセント（全幅の細線＋左側の短い太線） */
body.bm-h2-bottom-accent .entry-content h2,
body.bm-h3-bottom-accent .entry-content h3,
body.bm-h4-bottom-accent .entry-content h4 {
	position: relative;
	padding-bottom: .4em;
	border-bottom: 1px solid rgba(0, 0, 0, .15);
}
body.bm-h2-bottom-accent .entry-content h2::after,
body.bm-h3-bottom-accent .entry-content h3::after,
body.bm-h4-bottom-accent .entry-content h4::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 80px;
	height: 3px;
	background: var(--bm-accent);
}

/* 囲み枠 */
body.bm-h2-box .entry-content h2,
body.bm-h3-box .entry-content h3,
body.bm-h4-box .entry-content h4 {
	padding: .5em .8em;
	border: 2px solid var(--bm-accent);
	border-radius: 6px;
	background: color-mix(in srgb, var(--bm-accent) 6%, #fff);
}

/* 左線＋背景 */
body.bm-h2-left-fill .entry-content h2,
body.bm-h3-left-fill .entry-content h3,
body.bm-h4-left-fill .entry-content h4 {
	padding: .4em .8em;
	border-left: 6px solid var(--bm-accent);
	background: color-mix(in srgb, var(--bm-accent) 10%, #fff);
	border-radius: 0 4px 4px 0;
}

/* マーカー（下半分をアクセント色でハイライト） */
body.bm-h2-marker .entry-content h2,
body.bm-h3-marker .entry-content h3,
body.bm-h4-marker .entry-content h4 {
	display: block;
	width: fit-content;
	max-width: 100%;
	padding: .1em .15em;
	background: linear-gradient(transparent 62%, color-mix(in srgb, var(--bm-accent) 35%, transparent) 62%);
}

/* 左ストライプ（二重バー） */
body.bm-h2-stripe .entry-content h2,
body.bm-h3-stripe .entry-content h3,
body.bm-h4-stripe .entry-content h4 {
	position: relative;
	padding: .4em 0 .4em .9em;
}
body.bm-h2-stripe .entry-content h2::before,
body.bm-h3-stripe .entry-content h3::before,
body.bm-h4-stripe .entry-content h4::before {
	content: "";
	position: absolute;
	left: 0;
	top: .15em;
	bottom: .15em;
	width: 6px;
	background: var(--bm-accent);
	box-shadow: 10px 0 0 -3px color-mix(in srgb, var(--bm-accent) 35%, #fff);
}

/* ============================================================
 * パンくず / ページタイトル / ナビ
 * ============================================================ */
.breadcrumb {
	font-size: .8rem;
	margin-bottom: 20px;
}
.breadcrumb ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}
.breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-left: 6px;
	color: rgba(0, 0, 0, .4);
}

.page-header {
	margin-bottom: 32px;
}
.page-title {
	font-size: 1.8rem;
	margin: 0;
}

.post-navigation {
	margin-top: 48px;
}
.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.post-navigation .nav-previous {
	grid-column: 1;
}
.post-navigation .nav-next {
	grid-column: 2;
}
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	position: relative;
	height: 100%;
	padding: 16px 20px 16px 46px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: var(--bm-radius);
	color: var(--bm-text);
	font-weight: 600;
	font-size: .92rem;
	line-height: 1.6;
	transition: border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.post-navigation .nav-next a {
	padding: 16px 46px 16px 20px;
	text-align: right;
}
.post-navigation a:hover {
	border-color: var(--bm-accent);
	color: var(--bm-accent);
	box-shadow: var(--bm-shadow);
	transform: translateY(-2px);
}
.post-navigation .nav-label {
	display: block;
	margin-bottom: 4px;
	font-size: .72rem;
	font-weight: 500;
	color: rgba(0, 0, 0, .5);
}
.post-navigation a:hover .nav-label {
	color: var(--bm-accent);
}
/* 矢印 */
.post-navigation .nav-previous a::before {
	content: "‹";
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--bm-accent);
}
.post-navigation .nav-next a::after {
	content: "›";
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--bm-accent);
}

@media (max-width: 600px) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}
	.post-navigation .nav-previous,
	.post-navigation .nav-next {
		grid-column: 1;
	}
	.post-navigation .nav-next a {
		text-align: left;
		padding: 16px 20px 16px 46px;
	}
	.post-navigation .nav-next a::after {
		content: none;
	}
	.post-navigation .nav-next a::before {
		content: "›";
		position: absolute;
		left: 18px;
		top: 50%;
		transform: translateY(-50%);
		font-size: 1.5rem;
		line-height: 1;
		color: var(--bm-accent);
	}
}

.pagination,
.comments-pagination {
	margin-top: 48px;
}
.pagination .nav-links,
.comments-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .04);
	color: var(--bm-text);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
	background: var(--bm-accent);
	color: #fff;
}

/* ============================================================
 * サイドバー / ウィジェット
 * ============================================================ */
.site-sidebar {
	color: var(--bm-sidebar-text);
}
.site-sidebar .widget {
	background: var(--bm-sidebar-bg);
	color: var(--bm-sidebar-text);
	padding: 20px;
	border-radius: var(--bm-radius);
	border: var(--bm-border);
	margin-bottom: 24px;
}
.site-sidebar .widget a {
	color: var(--bm-sidebar-link);
}
.site-sidebar .widget a:hover {
	color: var(--bm-sidebar-link-hover);
}
.site-sidebar .widget-title {
	margin: 0 0 14px;
	font-size: 1.05rem;
	line-height: 1.4;
}

/* ウィジェット見出しデザイン（サイドバー・ドロワー共通。body.bm-wtitle-* で切替） */
/* 下線（アクセント） */
.bm-wtitle-border-bottom .site-sidebar .widget-title,
.bm-wtitle-border-bottom .drawer-widgets .widget-title {
	padding-bottom: 8px;
	border-bottom: 2px solid var(--bm-wtitle-accent, var(--bm-accent));
}
/* 左ボーダー */
.bm-wtitle-border-left .site-sidebar .widget-title,
.bm-wtitle-border-left .drawer-widgets .widget-title {
	padding: 2px 0 2px 12px;
	border-left: 4px solid var(--bm-wtitle-accent, var(--bm-accent));
}
/* 背景塗り */
.bm-wtitle-fill .site-sidebar .widget-title,
.bm-wtitle-fill .drawer-widgets .widget-title {
	background: var(--bm-wtitle-accent, var(--bm-accent));
	color: #fff;
	padding: 7px 12px;
	border-radius: 4px;
}
/* 二重下線 */
.bm-wtitle-double .site-sidebar .widget-title,
.bm-wtitle-double .drawer-widgets .widget-title {
	padding-bottom: 8px;
	border-bottom: 4px double var(--bm-wtitle-accent, var(--bm-accent));
}
/* 点線下線 */
.bm-wtitle-dotted .site-sidebar .widget-title,
.bm-wtitle-dotted .drawer-widgets .widget-title {
	padding-bottom: 8px;
	border-bottom: 2px dotted var(--bm-wtitle-accent, var(--bm-accent));
}
/* リボン（帯） */
.bm-wtitle-ribbon .site-sidebar .widget-title,
.bm-wtitle-ribbon .drawer-widgets .widget-title {
	padding: 8px 12px;
	border-left: 4px solid var(--bm-wtitle-accent, var(--bm-accent));
	background: color-mix(in srgb, var(--bm-wtitle-accent, var(--bm-accent)) 14%, transparent);
	border-radius: 0 4px 4px 0;
}
/* 左右ライン（－ 見出し －） */
.bm-wtitle-lines .site-sidebar .widget-title,
.bm-wtitle-lines .drawer-widgets .widget-title {
	display: flex;
	align-items: center;
	gap: 12px;
	text-align: center;
}
.bm-wtitle-lines .site-sidebar .widget-title::before,
.bm-wtitle-lines .site-sidebar .widget-title::after,
.bm-wtitle-lines .drawer-widgets .widget-title::before,
.bm-wtitle-lines .drawer-widgets .widget-title::after {
	content: "";
	flex: 1;
	height: 2px;
	background: var(--bm-wtitle-accent, var(--bm-accent));
}

/* テキスト位置（左寄せ／中央） */
body.bm-wtitle-al-left .site-sidebar .widget-title,
body.bm-wtitle-al-left .drawer-widgets .widget-title {
	text-align: left;
}
body.bm-wtitle-al-center .site-sidebar .widget-title,
body.bm-wtitle-al-center .drawer-widgets .widget-title {
	text-align: center;
}

.site-sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-sidebar li {
	padding: 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .06);
}

/* ============================================================
 * フッター
 * ============================================================ */
.site-footer {
	background: var(--bm-footer-bg);
	color: var(--bm-footer-text);
	font-size: var(--bm-footer-font-size-sp);
	margin-top: 64px;
}
.site-footer a {
	color: var(--bm-footer-link);
}
.site-footer a:hover {
	color: var(--bm-footer-link-hover);
}
.site-footer__inner {
	max-width: var(--bm-site-max-width);
	margin: 0 auto;
	padding: 40px 16px;
	text-align: center;
}
.footer-nav__list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: center;
	margin: 0 0 20px;
	padding: 0;
}
.footer-nav__list a {
	color: var(--bm-footer-link);
}
.footer-nav__list a:hover {
	color: var(--bm-footer-link-hover);
}
.site-info {
	margin: 0;
	font-size: .9em;
	color: var(--bm-footer-text);
	opacity: .8;
}

/* フッターウィジェット（PC：左右2カラム / スマホ：上下） */
.footer-widgets {
	max-width: var(--bm-site-max-width);
	margin: 0 auto;
	padding: 48px 16px 8px;
	display: flex;
	gap: 40px;
}
.footer-widgets__col {
	flex: 1 1 0;
	min-width: 0;
}
.footer-widgets .widget {
	margin-bottom: 24px;
}
.footer-widgets .widget-title {
	font-size: 1.05rem;
	margin: 0 0 12px;
	color: var(--bm-footer-text);
}
.footer-widgets a {
	color: var(--bm-footer-link);
}
.footer-widgets a:hover {
	color: var(--bm-footer-link-hover);
}

/* 開閉メニュー内ウィジェット（PC では非表示、スマホのドロワー内のみ表示） */
.drawer-widgets {
	display: none;
}
.drawer-widgets .widget {
	margin-bottom: 20px;
}
.drawer-widgets .widget-title {
	font-size: 1rem;
	margin: 0 0 10px;
	color: var(--bm-drawer-text, var(--bm-header-text));
}
.drawer-widgets {
	color: var(--bm-drawer-text, var(--bm-header-text));
}
.drawer-widgets a {
	color: var(--bm-drawer-text, var(--bm-header-link));
}
.drawer-widgets a:hover {
	color: var(--bm-header-link-hover);
}

/* ============================================================
 * 共通ボタン
 * ============================================================ */
.bm-button {
	display: inline-block;
	padding: 14px 32px;
	background: var(--bm-accent);
	color: #fff;
	border-radius: 999px;
	font-weight: 700;
	box-shadow: var(--bm-shadow);
}
.bm-button:hover {
	color: #fff;
	opacity: .88;
	transform: translateY(-1px);
}

/* 検索フォーム */
.search-form {
	display: flex;
	gap: 8px;
}
.search-form input[type="search"] {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 6px;
}
.search-form button,
.search-form input[type="submit"] {
	padding: 10px 18px;
	border: 0;
	border-radius: 6px;
	background: var(--bm-accent);
	color: #fff;
	cursor: pointer;
}

/* ============================================================
 * コメント
 * ============================================================ */
.comments-area {
	margin-top: 56px;
}
.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.comment-list ol {
	list-style: none;
	padding-left: 24px;
}
.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

/* ============================================================
 * レスポンシブ
 * ============================================================ */
@media (min-width: 783px) {
	body {
		font-size: var(--bm-font-size-pc);
	}
	.site-footer {
		font-size: var(--bm-footer-font-size-pc);
	}
	.site-logo img,
	.custom-logo {
		height: var(--bm-logo-height-pc);
	}
}

@media (max-width: 782px) {
	.menu-toggle {
		display: block;
	}
	.header-search-toggle {
		display: inline-flex;
	}

	/* スマホのヘッダー配置：order と margin で出し分け */
	.site-header__inner {
		justify-content: flex-start;
		gap: 8px;
		position: relative;
	}

	/* (1) ロゴ左／検索・メニュー右寄せ */
	body.sp-logo-left .site-branding { order: 1; margin-right: auto; }
	body.sp-logo-left .header-search-toggle { order: 2; }
	body.sp-logo-left .menu-toggle { order: 3; }

	/* (2) ロゴ中央／検索左寄せ・メニュー右寄せ */
	body.sp-center-sm .header-search-toggle { order: 1; }
	body.sp-center-sm .site-branding { order: 2; margin: 0 auto; }
	body.sp-center-sm .menu-toggle { order: 3; }

	/* (3) ロゴ中央／メニュー左寄せ・検索右寄せ */
	body.sp-center-ms .menu-toggle { order: 1; }
	body.sp-center-ms .site-branding { order: 2; margin: 0 auto; }
	body.sp-center-ms .header-search-toggle { order: 3; }

	/* 右からスライドするドロワー（画面幅の90%・背景を少し透過） */
	.global-nav {
		display: block;
		position: fixed;
		top: 0;
		right: 0;
		width: 90%;
		max-width: 90%;
		height: 100vh;
		height: 100dvh;
		background: color-mix(in srgb, var(--bm-drawer-bg, var(--bm-header-bg)) 92%, transparent);
		color: var(--bm-drawer-text, var(--bm-header-text));
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
		box-shadow: -6px 0 24px rgba(0, 0, 0, .18);
		padding: 76px 24px 32px;
		transform: translateX(100%);
		transition: transform .3s ease;
		overflow-y: auto;
		z-index: 1001;
	}
	.global-nav.is-open {
		transform: translateX(0);
	}
	.global-nav__list {
		flex-direction: column;
		gap: 0;
	}
	.global-nav__list li {
		border-bottom: 1px solid rgba(0, 0, 0, .08);
	}
	.global-nav__list a {
		display: block;
		padding: 14px 4px;
		color: var(--bm-drawer-text, var(--bm-header-link));
	}
	/* ドロワー内ウィジェットを表示 */
	.drawer-widgets {
		display: block;
		margin-top: 24px;
		padding-top: 20px;
		border-top: 1px solid rgba(0, 0, 0, .12);
	}
	/* フッターウィジェットは上下に積む */
	.footer-widgets {
		flex-direction: column;
		gap: 0;
		padding-top: 32px;
	}

	.site-container {
		padding-top: 24px;
	}

	/* コンテンツの左右余白をモバイルで縮小（アイキャッチは全幅のまま） */
	.entry--single,
	.entry--page {
		--bm-content-pad: 18px;
	}
	.site-sidebar {
		flex-basis: 100%;
		width: 100%;
	}

	.entry--list,
	.entry--archive {
		flex-direction: column;
	}
	.entry--list .entry-thumb,
	.entry--archive .entry-thumb {
		flex-basis: auto;
	}

	body.bm-archive-card .archive-list {
		grid-template-columns: 1fr;
	}

	.front-slider__track {
		--bm-pv: 1.2; /* JS 無効時のモバイル既定。JS 有効時は上書きされる */
	}
}
