/* ==========================================================
   言霊はこうして実現する 全文掲載サイト
   和モダン・読書向けスタイル
   ========================================================== */

/* ---------- 色・書体の定義 ---------- */
:root {
	--bg: #F6F2EA;
	--surface: #FFFDF8;
	--surface-2: #EFE9DD;
	--ink: #24221F;
	--ink-soft: #524C44;
	--muted: #7A7166;
	--line: #E0D8C9;
	--line-strong: #CFC4B0;
	--accent: #26415F;
	--accent-ink: #FFFFFF;
	--accent-soft: #E3E9F0;
	--gold: #A9864A;          /* 装飾用（細い線・記号） */
	--gold-bright: #D9BC7E;   /* 濃い背景の上で使う金 */
	--focus: #26415F;

	--hero-from: #172638;
	--hero-mid: #22395A;
	--hero-to: #2C4D74;
	--hero-ink: #F4EFE4;
	--hero-soft: #C7CFDA;

	--font-serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "BIZ UDPMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
	--font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;

	--read-size: 1.0625rem;
	--header-h: 60px;
	--radius: 12px;
	--shadow-sm: 0 1px 2px rgba(36, 34, 31, .06);
	--shadow: 0 1px 2px rgba(36, 34, 31, .05), 0 6px 20px rgba(36, 34, 31, .07);
	--shadow-lg: 0 2px 6px rgba(36, 34, 31, .06), 0 18px 40px rgba(36, 34, 31, .12);

	/* 青海波（せいがいは）の地紋 */
	--pattern-seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M0 28a28 28 0 0 1 56 0M7 28a21 21 0 0 1 42 0M14 28a14 14 0 0 1 28 0M21 28a7 7 0 0 1 14 0'/%3E%3Cpath d='M-28 14a28 28 0 0 1 56 0M-21 14a21 21 0 0 1 42 0M-14 14a14 14 0 0 1 28 0M-7 14a7 7 0 0 1 14 0M28 14a28 28 0 0 1 56 0M35 14a21 21 0 0 1 42 0M42 14a14 14 0 0 1 28 0M49 14a7 7 0 0 1 14 0'/%3E%3C/g%3E%3C/svg%3E");
	/* 麻の葉風の細かい地紋（明るい背景用） */
	--pattern-dots: radial-gradient(circle at 1px 1px, rgba(36, 34, 31, .06) 1px, transparent 0);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #14171B;
		--surface: #1C2026;
		--surface-2: #252A31;
		--ink: #E8E3D9;
		--ink-soft: #C8C1B5;
		--muted: #9A9286;
		--line: #2F343C;
		--line-strong: #3E444E;
		--accent: #A9BEDA;
		--accent-ink: #14171B;
		--accent-soft: #24303F;
		--gold: #C9AA6E;
		--gold-bright: #D9BC7E;
		--focus: #A9BEDA;
		--hero-from: #0E151F;
		--hero-mid: #15243A;
		--hero-to: #1D3352;
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .3);
		--shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45);
		--pattern-dots: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .04) 1px, transparent 0);
	}
}

html[data-font-size="s"] { --read-size: .9375rem; }
html[data-font-size="l"] { --read-size: 1.25rem; }

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

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

a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.ext { font-size: .75em; margin-left: .25em; opacity: .7; }

.skip-link {
	position: absolute; left: 8px; top: -100px; z-index: 100;
	padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 6px;
}
.skip-link:focus { top: 8px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 760px; }

/* ---------- ボタン ---------- */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: .25em;
	min-height: 46px; padding: 10px 24px;
	border: 1px solid var(--accent); border-radius: 999px;
	background: var(--accent); color: var(--accent-ink);
	font-family: var(--font-sans); font-size: .9375rem; font-weight: 600; line-height: 1.4; letter-spacing: .04em;
	text-decoration: none; cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.button:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.button--outline { background: transparent; color: var(--accent); }
.button--outline:hover { background: var(--accent-soft); }
.button--small { min-height: 36px; padding: 6px 16px; font-size: .8125rem; }
/* 濃い背景（ヒーロー）用 */
.button--gold {
	border-color: var(--gold-bright);
	background: linear-gradient(180deg, #E3C98F 0%, var(--gold-bright) 100%);
	color: #1B2433;
}
.button--gold:hover { box-shadow: 0 6px 24px rgba(217, 188, 126, .35); }
.button--ghost { border-color: rgba(244, 239, 228, .45); background: rgba(255, 255, 255, .06); color: var(--hero-ink); }
.button--ghost:hover { border-color: var(--hero-ink); background: rgba(255, 255, 255, .12); }

/* ---------- ヘッダー ---------- */
.site-header {
	position: sticky; top: 0; z-index: 30;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	-webkit-backdrop-filter: saturate(1.2) blur(12px);
	backdrop-filter: saturate(1.2) blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
	background: linear-gradient(90deg, var(--accent), var(--gold) 50%, var(--accent));
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
	.site-header { background: var(--bg); }
}
.site-header__inner {
	display: flex; align-items: center; gap: 16px;
	max-width: 1280px; height: var(--header-h); margin: 0 auto; padding: 3px 16px 0;
}
.brand {
	display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0;
	color: var(--ink); text-decoration: none; line-height: 1.25;
}
.brand__title {
	font-family: var(--font-serif); font-size: 1.0625rem; font-weight: 600; letter-spacing: .06em;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__sub { font-size: .6875rem; color: var(--muted); letter-spacing: .14em; }

.site-nav { margin-left: auto; display: none; }
.site-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
	position: relative; display: block; padding: 8px 12px; border-radius: 6px;
	color: var(--ink-soft); font-size: .875rem; text-decoration: none;
}
.site-nav a::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1px;
	background: var(--gold); transform: scaleX(0); transition: transform .2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

.site-header__actions { display: flex; flex: none; align-items: center; gap: 8px; margin-left: auto; }
.site-nav + .site-header__actions { margin-left: 0; }

.lang-switch {
	display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px;
	border: 1px solid var(--line-strong); border-radius: 999px;
	color: var(--ink-soft); font-size: .8125rem; text-decoration: none; white-space: nowrap;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

.menu-button {
	display: none; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px;
	border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
	color: var(--ink); font: inherit; font-size: .8125rem; cursor: pointer;
}
.js .menu-button { display: inline-flex; }
.menu-button__label { white-space: nowrap; }
.menu-button__icon, .menu-button__icon::before, .menu-button__icon::after {
	display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 1px; content: "";
}
.menu-button__icon { position: relative; }
.menu-button__icon::before { position: absolute; top: -5px; }
.menu-button__icon::after { position: absolute; top: 5px; }

@media (max-width: 479.98px) {
	.site-header__inner { gap: 8px; padding: 3px 12px 0; }
	.brand__title { font-size: .9375rem; letter-spacing: .02em; }
	.brand__sub { font-size: .625rem; letter-spacing: .08em; }
	.site-header__actions { gap: 6px; }
	.lang-switch { padding: 4px 10px; font-size: .75rem; }
	.menu-button { padding: 6px 10px; gap: 6px; }
}
@media (min-width: 1024px) {
	.brand { flex: 0 1 auto; }
	.site-nav { display: block; }
	.site-nav a { white-space: nowrap; }
	.js .menu-button { display: none; }
}
/* 英語版はメニュー名が長いため、横並びのメニューは広い画面でのみ表示する */
@media (min-width: 1024px) and (max-width: 1279.98px) {
	html[lang="en"] .site-nav { display: none; }
	html[lang="en"] .brand { flex: 1 1 auto; }
	html.js[lang="en"] .menu-button { display: inline-flex; }
}

/* 読書の進み具合 */
.read-progress {
	position: sticky; top: var(--header-h); z-index: 29; height: 2px; margin-top: -2px;
	background: transparent; pointer-events: none;
}
.read-progress__bar {
	display: block; height: 100%;
	background: linear-gradient(90deg, var(--gold), var(--accent));
	transform: scaleX(0); transform-origin: 0 50%;
}
html:not(.js) .read-progress { display: none; }

/* ---------- ドロワー（スマートフォン用メニュー） ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(15, 18, 24, .5); animation: fade-in .2s ease-out; }
.drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: min(90vw, 400px); overflow-y: auto; overscroll-behavior: contain;
	background: var(--bg); box-shadow: var(--shadow-lg);
	padding: 0 16px 32px;
	animation: slide-in .25s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__head {
	position: sticky; top: 0; z-index: 1;
	display: flex; align-items: center; justify-content: space-between;
	height: var(--header-h); margin: 0 -16px 8px; padding: 0 16px;
	background: var(--bg); border-bottom: 1px solid var(--line);
}
.drawer__heading { font-family: var(--font-serif); font-weight: 600; letter-spacing: .2em; }
.drawer__close {
	width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: transparent; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.drawer__close:hover { background: var(--surface-2); }
.drawer__links { margin: 16px 0 0; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--line); }
.drawer__links a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; font-size: .9375rem; }
body.is-drawer-open { overflow: hidden; }

/* ---------- サイドバー・ドロワーの目次 ---------- */
.toc__chapters { margin: 0; padding: 0; list-style: none; }
.toc__chapter + .toc__chapter { border-top: 1px solid var(--line); }
.toc__chapter--extra:first-of-type, .toc__chapter--main + .toc__chapter--extra { border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 4px; }

.toc__head {
	position: relative; display: flex; align-items: flex-start; gap: 12px;
	padding: 12px 28px 12px 2px; cursor: pointer; list-style: none;
	color: var(--ink); text-decoration: none; line-height: 1.5;
}
a.toc__head { padding-right: 4px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary.toc__head::after {
	content: ""; position: absolute; right: 8px; top: 22px;
	width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
	transform: rotate(45deg); transition: transform .2s;
}
.toc details[open] > summary.toc__head::after { transform: rotate(-135deg); top: 25px; }
.toc__head:hover .toc__title { color: var(--accent); }

.toc__mark {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 30px; height: 30px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: 50%;
	background: var(--surface); color: var(--accent);
	font-family: var(--font-serif); font-size: .875rem; font-weight: 600; line-height: 1;
}
.toc__chapter--extra .toc__mark { border-style: dashed; color: var(--muted); }
.toc__chapter.is-current .toc__mark { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.toc__text { display: flex; flex-direction: column; min-width: 0; }
.toc__label { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; color: var(--gold); }
.toc__title { font-family: var(--font-serif); font-size: .9375rem; font-weight: 600; transition: color .15s; }
.toc__chapter.is-current .toc__title { color: var(--accent); }
.toc__count {
	position: absolute; right: 22px; top: 14px;
	min-width: 1.8em; padding: 0 .4em; border-radius: 999px;
	background: var(--surface-2); color: var(--muted); font-size: .6875rem; line-height: 1.6; text-align: center;
	display: none;
}

/* 節の一覧：縦線と丸で進み具合を示す */
.toc__sections {
	position: relative; margin: 0 0 12px 16px; padding: 0 0 0 0; list-style: none; counter-reset: sec;
}
.toc__sections::before {
	content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong);
}
.toc__sections li { position: relative; counter-increment: sec; }
.toc__sections li::before {
	content: ""; position: absolute; left: -5px; top: 13px; z-index: 1;
	width: 9px; height: 9px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--bg);
}
.toc__sections li.is-read::before { border-color: var(--gold); background: var(--gold); }
.toc__sections li.is-current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toc__sections a {
	display: block; margin-left: 12px; padding: 6px 10px; border-radius: 8px;
	color: var(--ink-soft); font-size: .875rem; line-height: 1.6; text-decoration: none;
}
.toc__sections a:hover { background: var(--surface-2); color: var(--ink); }
.toc__sections li.is-read a { color: var(--muted); }
.toc__sections a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- 書籍カード ---------- */
.book-card { display: flex; gap: 14px; align-items: flex-start; }
.book-card__cover { width: 84px; flex: none; border-radius: 2px 4px 4px 2px; box-shadow: var(--shadow); }
.book-card__meta { margin: 0 0 10px; font-size: .8125rem; line-height: 1.6; }
.book-card__meta div { display: flex; gap: .6em; }
.book-card__meta dt { color: var(--muted); min-width: 3em; }
.book-card__meta dd { margin: 0; }

/* ---------- トップページ：ヒーロー ---------- */
.hero {
	position: relative; overflow: hidden; isolation: isolate;
	padding: 48px 0 56px;
	background: linear-gradient(140deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
	color: var(--hero-ink);
}
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background-image: var(--pattern-seigaiha); background-size: 56px 28px; opacity: .07;
	-webkit-mask-image: linear-gradient(100deg, transparent 0%, #000 45%, #000 100%);
	mask-image: linear-gradient(100deg, transparent 0%, #000 45%, #000 100%);
}
.hero::after {
	content: ""; position: absolute; z-index: -1; right: -12%; top: -30%;
	width: 60vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(circle, rgba(217, 188, 126, .18) 0%, rgba(217, 188, 126, 0) 65%);
}
.hero__inner {
	display: grid; gap: 32px; justify-items: center; text-align: center;
	max-width: 1040px; margin: 0 auto; padding: 0 16px;
}

/* 立体的な本 */
.hero__book { perspective: 1200px; }
.book3d {
	position: relative; width: 168px;
	transform: rotateY(-18deg) rotateX(2deg); transform-style: preserve-3d;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.book3d:hover { transform: rotateY(-6deg) rotateX(0); }
.book3d__cover {
	display: block; width: 100%; border-radius: 2px 5px 5px 2px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .25), 18px 26px 40px rgba(0, 0, 0, .45);
}
.book3d::before {
	/* 背（綴じ側）の陰影 */
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; z-index: 1;
	background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(255, 255, 255, .15) 45%, rgba(0, 0, 0, .1));
	border-radius: 2px 0 0 2px;
}
.book3d::after {
	/* 小口（ページの束） */
	content: ""; position: absolute; top: 3px; bottom: 3px; right: -9px; width: 10px;
	background: repeating-linear-gradient(90deg, #f5f0e4 0 1px, #ddd4c2 1px 2px);
	transform: rotateY(60deg); transform-origin: left center;
	border-radius: 0 2px 2px 0;
}

.hero__eyebrow {
	display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
	color: var(--gold-bright); font-size: .8125rem; font-weight: 600; letter-spacing: .3em;
}
.hero__eyebrow::before, .hero__eyebrow::after { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .7; }
.hero__title {
	margin: 0 0 14px; font-family: var(--font-serif); font-weight: 600;
	font-size: clamp(1.4375rem, 1rem + 2.4vw, 2.875rem); line-height: 1.35; letter-spacing: .02em;
	text-wrap: balance; color: #FFFDF8;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.hero__subtitle {
	margin: 0 0 22px; font-family: var(--font-serif); color: var(--hero-soft);
	font-size: clamp(.9375rem, .85rem + .4vw, 1.1875rem); letter-spacing: .04em;
}
.hero__lead { margin: 0 auto 22px; max-width: 34em; color: var(--hero-soft); font-size: .9375rem; line-height: 1.95; }
.hero__meta {
	display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 0 0 28px; padding: 10px 18px;
	border: 1px solid rgba(244, 239, 228, .18); border-radius: 999px; background: rgba(255, 255, 255, .04);
	font-size: .8125rem;
}
.hero__meta div { display: flex; gap: .5em; }
.hero__meta dt { color: var(--gold-bright); }
.hero__meta dd { margin: 0; color: var(--hero-ink); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (min-width: 768px) {
	.hero { padding: 80px 0 88px; }
	.hero__inner { grid-template-columns: auto 1fr; gap: 64px; justify-items: start; text-align: left; align-items: center; }
	.book3d { width: 220px; }
	.hero__lead { margin-left: 0; }
	.hero__actions { justify-content: flex-start; }
}

/* ---------- 見出し ---------- */
.section-heading { margin: 0 0 32px; text-align: center; }
.section-heading__en {
	display: block; margin-bottom: 4px;
	color: var(--gold); font-family: var(--font-serif); font-size: .8125rem; font-style: italic; letter-spacing: .3em; text-transform: uppercase;
}
.section-heading__title {
	display: inline-flex; align-items: center; gap: 18px; margin: 0;
	font-family: var(--font-serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 600; letter-spacing: .3em;
}
.section-heading__title::before, .section-heading__title::after {
	content: ""; width: 40px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold));
}
.section-heading__title::after { background: linear-gradient(90deg, var(--gold), transparent); }
html[lang="en"] .section-heading__title, html[lang="en"] .page-hero__title { letter-spacing: .04em; }
.section-heading__note { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; letter-spacing: .08em; }

/* ---------- トップページ：目次 ---------- */
.home-toc {
	padding: 64px 0 56px;
	background-image: var(--pattern-dots); background-size: 18px 18px;
}
.contents__main { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }

.chapter-card {
	position: relative; overflow: hidden;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface); box-shadow: var(--shadow-sm);
	transition: box-shadow .2s, border-color .2s;
}
.chapter-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.chapter-card::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
	background: linear-gradient(180deg, var(--gold), var(--accent));
}
.chapter-card__head { display: flex; align-items: center; gap: 18px; padding: 22px 22px 14px 26px; }
.chapter-card__mark {
	display: flex; align-items: center; justify-content: center; flex: none;
	width: 64px; height: 64px; border-radius: 50%;
	background: radial-gradient(circle at 30% 25%, var(--hero-to), var(--hero-from));
	color: var(--gold-bright); font-family: var(--font-serif); font-size: 1.875rem; font-weight: 600; line-height: 1;
	box-shadow: inset 0 0 0 3px rgba(217, 188, 126, .25), var(--shadow-sm);
}
.chapter-card__heading { min-width: 0; }
.chapter-card__label {
	display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 2px;
	color: var(--gold); font-size: .75rem; font-weight: 700; letter-spacing: .16em;
}
.chapter-card__count {
	padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 999px;
	color: var(--muted); font-size: .6875rem; font-weight: 500; letter-spacing: .06em; line-height: 1.6;
}
.chapter-card__title { margin: 0; font-family: var(--font-serif); font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); font-weight: 600; line-height: 1.5; letter-spacing: .04em; }
.chapter-card__title a { color: var(--ink); text-decoration: none; }
.chapter-card__title a:hover { color: var(--accent); }

.chapter-card__details > summary {
	display: none; align-items: center; justify-content: space-between;
	margin: 0 22px 14px 26px; padding: 10px 14px; border-radius: 8px;
	background: var(--surface-2); color: var(--ink-soft); font-size: .8125rem; cursor: pointer; list-style: none;
}
.chapter-card__details > summary::-webkit-details-marker { display: none; }
.chapter-card__details > summary::after {
	content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.chapter-card__details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }

.chapter-card__sections {
	margin: 0; padding: 4px 22px 20px 26px; list-style: none;
	border-top: 1px dashed var(--line);
}
.chapter-card__sections li { break-inside: avoid; }
.chapter-card__sections a {
	display: flex; align-items: baseline; gap: 12px; padding: 9px 8px;
	border-bottom: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; line-height: 1.6;
	transition: background-color .15s, color .15s;
}
.chapter-card__sections a:hover { background: var(--accent-soft); color: var(--accent); }
.chapter-card__num {
	flex: none; width: 1.8em; color: var(--gold); font-family: var(--font-serif); font-size: .8125rem; font-weight: 600;
	font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.chapter-card__section { font-size: .9375rem; }

@media (max-width: 767.98px) {
	.chapter-card__head { padding: 18px 16px 12px 20px; gap: 14px; }
	.chapter-card__mark { width: 52px; height: 52px; font-size: 1.5rem; }
	.js .chapter-card__details > summary { display: flex; margin: 0 16px 14px 20px; }
	.chapter-card__sections { padding: 0 16px 14px 20px; border-top: 0; }
}
@media (min-width: 768px) {
	.chapter-card__sections { columns: 2; column-gap: 32px; padding-top: 8px; }
}

.contents__subheading {
	display: flex; align-items: center; gap: 14px; margin: 48px 0 18px;
	font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; letter-spacing: .2em;
}
.contents__subheading::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.contents__extra { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .contents__extra { grid-template-columns: 1fr 1fr; } }
.extra-card {
	position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.extra-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
/* カード全体をタイトルへのリンクにする（節のリンクはその上に重ねる） */
.extra-card__title::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.extra-card__mark {
	display: flex; align-items: center; justify-content: center; flex: none;
	width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%;
	color: var(--gold); font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600;
}
.extra-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.extra-card__label { color: var(--gold); font-size: .6875rem; font-weight: 700; letter-spacing: .16em; }
.extra-card__title { color: var(--ink); font-family: var(--font-serif); font-size: 1rem; font-weight: 600; line-height: 1.55; text-decoration: none; }
.extra-card:hover .extra-card__title { color: var(--accent); }
.extra-card__items { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.extra-card__items a {
	position: relative; z-index: 1; display: inline-block; padding: 2px 10px;
	border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
	color: var(--ink-soft); font-size: .8125rem; line-height: 1.7; text-decoration: none;
}
.extra-card__items a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- トップページ：関連リンク ---------- */
.home-links { padding: 8px 0 72px; }
.link-cards { display: grid; gap: 16px; }
@media (min-width: 768px) { .link-cards { grid-template-columns: repeat(3, 1fr); } }
.link-card {
	position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 22px 24px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
	color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.link-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.link-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.link-card__label { font-family: var(--font-serif); font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.link-card__text { font-size: .875rem; color: var(--ink-soft); line-height: 1.7; }

/* ---------- 本文ページのレイアウト ---------- */
.layout { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.sidebar { display: none; }
.main { min-width: 0; max-width: 760px; margin: 0 auto; padding: 24px 0 72px; }

@media (min-width: 1024px) {
	.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; }
	.sidebar { display: block; }
	.sidebar__inner {
		position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h));
		overflow-y: auto; overscroll-behavior: contain; padding: 24px 8px 32px 0;
		scrollbar-width: thin;
	}
	.sidebar .book-card {
		padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius);
		background: var(--surface);
	}
	.main { margin: 0; padding-top: 32px; }
}
/* JavaScriptが無効な場合でも目次を辿れるよう、スマートフォンでは本文の下に目次を表示 */
@media (max-width: 1023.98px) {
	html:not(.js) .sidebar { display: block; padding: 0 0 32px; border-top: 1px solid var(--line); }
}

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 24px; padding: 0; list-style: none; font-size: .8125rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- 記事 ---------- */
.article__header {
	position: relative; overflow: hidden; margin-bottom: 36px; padding: 28px 24px 22px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface); box-shadow: var(--shadow-sm);
}
.article__header::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
	background: linear-gradient(90deg, var(--accent), var(--gold));
}
.article__mark {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 34px; height: 34px; border-radius: 50%;
	background: radial-gradient(circle at 30% 25%, var(--hero-to), var(--hero-from));
	color: var(--gold-bright); font-family: var(--font-serif); font-size: 1rem; font-weight: 600; line-height: 1;
	box-shadow: inset 0 0 0 2px rgba(217, 188, 126, .25);
}
.article__eyebrow { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0 0 14px; }
.article__chapter {
	display: inline-block; padding: 3px 12px; border-radius: 999px;
	background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 600; letter-spacing: .1em;
}
.article__chapter-title { font-family: var(--font-serif); color: var(--ink-soft); font-size: .9375rem; }
.article__title {
	margin: 0; font-family: var(--font-serif); font-weight: 600;
	font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem); line-height: 1.45; letter-spacing: .04em;
	text-wrap: pretty;
}
.article__subtitle {
	margin: 12px 0 0; padding-left: 14px; border-left: 2px solid var(--gold);
	font-family: var(--font-serif); color: var(--ink-soft); font-size: 1.0625rem;
}
.article__tools {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
	margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.article__progress { display: flex; align-items: center; gap: 10px; }
.article__count { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { position: relative; display: block; width: 96px; height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter__bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--accent)); }

.font-size { display: none; align-items: center; gap: 4px; margin-left: auto; }
.js .font-size { display: inline-flex; }
.font-size__label { margin-right: 4px; color: var(--muted); font-size: .75rem; }
.font-size button {
	min-width: 36px; min-height: 32px; padding: 0 8px;
	border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
	color: var(--ink-soft); font-family: var(--font-serif); cursor: pointer;
}
.font-size button[data-font-size="s"] { font-size: .75rem; }
.font-size button[data-font-size="m"] { font-size: .875rem; }
.font-size button[data-font-size="l"] { font-size: 1rem; }
.font-size button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

@media (max-width: 599.98px) {
	.article__header { padding: 22px 16px 18px; margin-left: -4px; margin-right: -4px; }
	.meter { width: 64px; }
}

/* 本文 */
.prose {
	font-family: var(--font-serif); font-size: var(--read-size); line-height: 2.05; letter-spacing: .02em;
	color: var(--ink);
}
.prose p { margin: 0 0 1.25em; }
.prose--ja p { text-indent: 1em; }
.prose--en { line-height: 1.85; letter-spacing: 0; }
.prose img { display: block; margin: 1.75em auto; border-radius: 6px; box-shadow: var(--shadow); }
.prose table {
	display: block; max-width: 100%; overflow-x: auto; margin: 1.75em 0;
	border-collapse: collapse; font-family: var(--font-sans); font-size: .875em; line-height: 1.6;
}
.prose th, .prose td { padding: .5em .6em; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); }

/* 英語版で使われている表（旧 main-en.css より移植） */
.prose .list-50 td { border: 0; border-bottom: 1px solid var(--line); }
.prose .list-50 td:nth-child(1), .prose .list-50 td:nth-child(2) { width: 1.5em; text-align: center; white-space: nowrap; }
.prose .list-50 td:nth-child(3) { width: 6em; text-align: center; white-space: nowrap; }
.prose .list-50 td:nth-child(4)::first-line { font-weight: 700; }
.prose .five-strata-mandala, .prose .five-strata-wisdom, .prose .unify-stratified-barriers, .prose .correlations-9-stages { display: table; width: 100%; }
.prose .five-strata-mandala td { width: 20%; height: 3em; text-align: center; line-height: 1.2; }
.prose .five-strata-wisdom td { width: 25%; text-align: center; border: 0; line-height: 2; }
.prose .unify-stratified-barriers td { width: 14.2%; height: 3em; text-align: center; line-height: 1.2; }
.prose .correlations-9-stages td, .prose .correlations-9-stages th { text-align: center; height: 2em; }
.prose .correlations-9-stages td { height: 4em; line-height: 1.2; }
@media (max-width: 599.98px) {
	.prose .five-strata-mandala, .prose .unify-stratified-barriers, .prose .correlations-9-stages { display: block; }
}

/* 本文の終わりの飾り */
.article__end { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 40px 0 0; }
.article__end::before, .article__end::after { content: ""; width: 72px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.article__end::after { background: linear-gradient(90deg, var(--gold), transparent); }
.article__end span { width: 8px; height: 8px; border: 1px solid var(--gold); transform: rotate(45deg); }

/* 前後リンク */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.pager__link {
	position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
	color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pager__link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.pager__link--next { grid-column: 2; text-align: right; background: linear-gradient(135deg, var(--surface) 60%, var(--accent-soft)); }
.pager__dir { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; }
.pager__link--next .pager__dir { justify-content: flex-end; }
.pager__chapter {
	padding: 0 8px; border: 1px solid var(--gold); border-radius: 999px;
	color: var(--gold); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; line-height: 1.6;
}
.pager__title { font-family: var(--font-serif); font-size: 1rem; line-height: 1.6; }
@media (max-width: 599.98px) {
	.pager { grid-template-columns: 1fr; }
	.pager__link--next { grid-column: 1; grid-row: 1; }
	.pager__spacer { display: none; }
}

.buy-note {
	position: relative; overflow: hidden; isolation: isolate;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
	margin-top: 28px; padding: 18px 22px; border-radius: var(--radius);
	background: linear-gradient(140deg, var(--hero-from), var(--hero-to)); color: var(--hero-ink);
}
.buy-note::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background-image: var(--pattern-seigaiha); background-size: 56px 28px; opacity: .06;
}
.buy-note p { margin: 0; font-family: var(--font-serif); font-size: .9375rem; }
.buy-note .button--outline { border-color: var(--gold-bright); color: var(--gold-bright); }
.buy-note .button--outline:hover { background: rgba(217, 188, 126, .12); }

/* ---------- 汎用ページ ---------- */
.page-hero {
	position: relative; overflow: hidden; isolation: isolate;
	padding: 48px 0 44px; text-align: center;
	background: linear-gradient(140deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
	color: var(--hero-ink);
}
.page-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background-image: var(--pattern-seigaiha); background-size: 56px 28px; opacity: .07;
}
.page-hero--overlap { padding-bottom: 96px; }
.page-hero__en { display: block; margin-bottom: 6px; color: var(--gold-bright); font-family: var(--font-serif); font-size: .8125rem; font-style: italic; letter-spacing: .3em; text-transform: uppercase; }
.page-hero__title { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); letter-spacing: .12em; color: #FFFDF8; }

.plain { padding-top: 40px; padding-bottom: 72px; }
.page-title {
	margin: 0 0 28px; font-family: var(--font-serif); font-weight: 600;
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); letter-spacing: .06em;
}

/* プロフィール */
.profile {
	display: grid; gap: 24px; align-items: start; margin: -72px 0 48px; padding: 28px 24px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
	position: relative;
}
.profile__photo { width: 150px; border-radius: var(--radius); box-shadow: var(--shadow); justify-self: center; }
.profile__name { margin: 0 0 4px; font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .14em; }
.profile__role { margin: 0 0 16px; color: var(--gold); font-size: .8125rem; font-weight: 600; letter-spacing: .16em; }
@media (min-width: 640px) { .profile { grid-template-columns: 150px 1fr; gap: 32px; padding: 32px; } .profile__photo { justify-self: start; } }

.quote-list { display: grid; gap: 20px; }
.quote {
	position: relative; margin: 0; padding: 28px 24px 22px 28px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.quote::before {
	content: "“"; position: absolute; left: 14px; top: -6px;
	color: var(--gold); font-family: Georgia, var(--font-serif); font-size: 4rem; line-height: 1; opacity: .5;
}
.quote p { margin: 0 0 .9em; font-family: var(--font-serif); line-height: 2; }
.quote cite { display: block; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .8125rem; font-style: normal; }

.subheading {
	display: flex; align-items: center; gap: 14px; margin: 0 0 20px;
	font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .08em;
}
.subheading::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* ---------- フッター ---------- */
.site-footer {
	position: relative; overflow: hidden; isolation: isolate;
	background: linear-gradient(160deg, var(--hero-from), var(--hero-mid)); color: var(--hero-soft);
}
.site-footer::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background-image: var(--pattern-seigaiha); background-size: 56px 28px; opacity: .05;
}
.site-footer__inner { max-width: 1120px; margin: 0 auto; padding: 40px 16px 44px; text-align: center; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 0 0 20px; padding: 0; list-style: none; font-size: .875rem; }
.site-footer__links a { color: var(--hero-ink); text-decoration: none; }
.site-footer__links a:hover { color: var(--gold-bright); text-decoration: underline; }
.site-footer__notice { max-width: 40em; margin: 0 auto 14px; color: var(--hero-soft); font-size: .75rem; line-height: 1.9; opacity: .85; }
.site-footer__copy { margin: 0; color: var(--hero-soft); font-size: .75rem; opacity: .7; letter-spacing: .04em; }

.to-top {
	position: fixed; right: 16px; bottom: 16px; z-index: 20;
	display: flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border: 1px solid var(--line-strong); border-radius: 50%;
	background: var(--surface); color: var(--accent); box-shadow: var(--shadow); text-decoration: none; font-size: 1.125rem;
	opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s, border-color .2s;
}
.to-top.is-visible, html:not(.js) .to-top { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { border-color: var(--accent); }

/* ---------- 印刷 ---------- */
@media print {
	.site-header, .sidebar, .drawer, .pager, .buy-note, .to-top, .article__tools, .breadcrumb, .site-footer__links, .read-progress, .article__mark { display: none !important; }
	body { background: #fff; color: #000; }
	.layout, .main { display: block; max-width: none; padding: 0; }
	.article__header { border: 0; box-shadow: none; padding: 0; }
	.site-footer { background: none; color: #000; }
}
