/* ==========================================================================
   DESIGN SYSTEM & VARIABLES (Based on DESIGN.md)
   ========================================================================== */

:root {
  /* Layout Spacing */
  --content-max-width: 900px;
  --card-radius: 8px;
  --card-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(238, 143, 53, 0.08);
  --card-shadow-focus: 0 0 0 2px var(--color-accent), 0 18px 40px rgba(0, 0, 0, 0.08);
  --transition-standard: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Colors (Luxury Japanese Modern Beige & Orange Palette) */
  --color-bg: #f2efed;              /* Warm Beige (Official Site Background) */
  --color-bg-alt: #fcfaf9;          /* Premium Light Beige (Card, Section Background) */
  --color-accent: #ee8f35;          /* Signature Japanese Orange */
  --color-accent-rgb: 238, 143, 53;
  --color-accent-light: #f8b777;    /* Soft Light Orange */
  --color-accent-dark: #c46e20;     /* Contrast Orange (Active states, dark highlights) */
  
  --color-text: #000000;            /* Primary text and headings */
  --color-text-muted: #333333;      /* Quotations and secondary text */
  --color-text-light: #888888;      /* Light Muted Gray (Sub-labels) */
  
  --color-border-subtle: #e4dedb;   /* Subtle divider border */
  --color-quote-line: #b6b3b1;      /* Midtone line for self quotations */

  /* Fonts */
  --font-en: 'Cinzel', serif;
  --font-jp: 'Noto Serif JP', serif;

  /* Z-index system */
  --z-background: -10;
  --z-content: 1;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   AMBIENT DECORATIONS (WOW Light Theme Effects)
   ========================================================================== */

/* 音楽の波紋やレコードの溝を想起させる極薄のサークル・ウェーブ */
.bg-ambient-waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-background);
  pointer-events: none;
  opacity: 0.08;
  background-image: 
    radial-gradient(circle at 10% 20%, transparent 400px, rgba(238, 143, 53, 0.15) 401px, transparent 403px),
    radial-gradient(circle at 10% 20%, transparent 600px, rgba(238, 143, 53, 0.1) 601px, transparent 604px),
    radial-gradient(circle at 90% 80%, transparent 300px, rgba(238, 143, 53, 0.15) 301px, transparent 303px),
    radial-gradient(circle at 90% 80%, transparent 500px, rgba(238, 143, 53, 0.1) 501px, transparent 504px);
  background-repeat: no-repeat;
  animation: pulseWaves 25s infinite alternate ease-in-out;
}

/* 五線譜を彷彿とさせる繊細なグリッド */
.bg-grid-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-background);
  pointer-events: none;
  opacity: 0.35;
  background-image: 
    linear-gradient(to right, var(--color-border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border-subtle) 1px, transparent 1px);
  background-size: 80px 80px;
}

@keyframes pulseWaves {
  0% { transform: scale(1) rotate(0deg); opacity: 0.06; }
  50% { transform: scale(1.05) rotate(1deg); opacity: 0.1; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.06; }
}

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */

.page {
  position: relative;
  overflow-x: hidden;
  line-height: 1.9;
  font-weight: 400;
  letter-spacing: 0.04em;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-jp);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ページ内の <header>（.bio-index-header等）は、
   component.css の サイドバー用 header{border-right:5px solid #EE8F35}
   が要素セレクタで誤爆するため打ち消す。 */
.page header {
  position: static;
  z-index: auto;
  width: auto;
  height: auto;
  background: transparent;
  border-right: none;
  border-bottom: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(0, 0, 0, 0.42),
      rgba(0, 0, 0, 0.5)
    ),
    url("../img-mock/ph_0000_img_cover@2x.png") center 42% / cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.42)),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.hero-content {
  width: 100%;
  max-width: 800px;
  z-index: var(--z-content);
  position: relative;
  animation: fadeInUp 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero-sub {
  font-family: var(--font-en);
  font-size: 1.52rem;
  letter-spacing: 0.35em;
  color: var(--color-accent-light);
  margin-bottom: 1.5rem;
  max-width: calc(100% - 2rem);
  margin-left: auto;
  margin-right: auto;
  font-weight: 600;
  line-height: 1.8;
}

.hero-title {
  margin-bottom: 2rem;
}

.hero-title .jp.hero-name {
  display: block;
  font-size: 4.16rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.9rem;
  padding-left: 0.35em;
}

.hero-title .en {
  display: block;
  font-family: var(--font-en);
  font-size: 4.96rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-title .period {
  font-size: 4.16rem;
  margin-top: 0.15em;
}

.hero-title .jp {
  display: block;
  font-family: var(--font-jp);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1.2rem;
}

.hero-project {
  display: block;
  font-family: var(--font-jp);
  font-size: 1.56rem;
  letter-spacing: 0.2em;
  color: var(--color-accent-light);
  opacity: 0.8;
  margin: 0.2rem 0 1.2rem;
  font-weight: 400;
}

.hero-lead {
  font-size: 1.68rem;
  max-width: 600px;
  margin: 0 auto 3rem auto;
  color: rgba(255, 255, 255, 0.86);
  line-height: 2;
  font-weight: 400;
}

/* スクロールインジケーター */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 2rem;
}

.scroll-indicator span {
  font-family: var(--font-en);
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: var(--color-accent-light);
  font-weight: 600;
  opacity: 0.8;
}

.scroll-indicator .arrow {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-accent-light) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.scroll-indicator .arrow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent-light);
  animation: scrollArrow 2.2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scrollArrow {
  0% { transform: translateY(-100%); }
  80% { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CHAPTER SECTIONS
   ========================================================================== */

.chapter-intro {
  padding: 52px 110px 22px;
}

.chapter-intro-inner {
  width: 100%;
  max-width: 705px;
  margin: 0 auto;
  text-align: center;
}

.chapter-intro-label {
  margin: 0 0 0.7rem;
  color: var(--color-accent-dark);
  font-family: var(--font-en);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
}

.chapter-intro-heading {
  margin: 0;
  font-weight: 400;
}

.chapter-intro-period,
.chapter-intro-title {
  display: block;
}

.chapter-intro-period {
  color: var(--color-text);
  font-family: var(--font-en);
  font-size: 3.04rem;
  line-height: 1.25;
  letter-spacing: 0.05em;
}

.chapter-intro-title {
  margin-top: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-jp);
  font-size: 1.68rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.12em;
}

.chapter {
  position: relative;
  background-color: transparent;
  display: flex;
  flex-direction: column;
}

/* 交互に少し背景を変えて奥行き感を出す（和モダングレーベージュの交互配色） */
.chapter:nth-of-type(even) {
  background: linear-gradient(to bottom, transparent, rgba(252, 250, 249, 0.65), transparent);
}

/* ==========================================================================
   CHAPTER BODY
   ========================================================================== */

.chapter-body {
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
  /* 左右はsonglist / biographyと同じ110px、縦余白は一時的に0 */
  padding: 0 110px;
}

.chapter-text-wrapper {
  /* 1行あたりの文字数が読みやすくなる幅で固定する。
     （ウィンドウ1200px時の本文幅に合わせた値。
       これ以上ウィンドウが広くなっても行長は変えず、左右の余白が広がる） */
  max-width: 705px;
  margin: 0 auto;
  width: 100%;
}

/* 本文：標準の段落 */
.chapter-text-wrapper p {
  font-size: 1.68rem;
  color: var(--color-text);
  margin-bottom: 1.85rem;
  text-align: justify;
  font-weight: 400;
  line-height: 1.95;
  font-feature-settings: "palt", "kern";
}

/* 日本語Biography 1〜4の通常本文のみ、段落の行頭を1字下げる。 */
.page--history-ja .chapter-text-wrapper > p {
  text-indent: 1em;
}

/* 装飾的セパレータ（必要に応じて段落間に挟む） */
.chapter-text-wrapper .text-divider {
  display: block;
  width: 100%;
  text-align: center;
  margin: 1.5rem 0 2.4rem;
  color: var(--color-text-light);
  letter-spacing: 1em;
  font-size: 1.28rem;
  opacity: 0.6;
  user-select: none;
}

.chapter-text-wrapper .text-divider::before {
  content: '· · ·';
}

/* ==========================================================================
   QUOTE SYSTEM — 4種類の引用デザイン
   ----------------------------------------------------------------------------
   .quote--self       … 本人が語った発言の引用（最も主張のあるアクセント）
   .quote--testimony  … 関係者が語った発言の引用（軽やかな縦線＋出典）
   .quote--citation   … 書誌・TVなど掲載文からの引用（カード形式の正式な引用）
   .quote-source      … <cite>要素で表現する出典（共通の体裁）
   ========================================================================== */

.chapter-text-wrapper .quote {
  position: relative;
  margin: 2.5rem 0 2.75rem;
  padding: 0;
  font-feature-settings: "palt", "kern";
}

.chapter-text-wrapper .quote p {
  margin: 0;
  text-align: justify;
}

.chapter-text-wrapper .quote p + p {
  margin-top: 1.1rem;
}

/* --- A. 本人が語った発言：上線と一本の斜線を持つ下線で示す吹き出し --- */
.chapter-text-wrapper .quote--self {
  --quote-self-inset: 3.2rem;
  --quote-self-line-gutter: 4.8rem;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 3rem auto 3.2rem;
  padding: 0;
}

.chapter-text-wrapper .quote--self::before {
  content: '';
  display: block;
  width: calc(100% - var(--quote-self-line-gutter));
  height: 1px;
  margin: 0 auto 2.2rem;
  background: var(--color-quote-line);
}

/* 下線を一度切り、一本の斜線で水平線へ戻す。V字や三角形にはしない。 */
.chapter-text-wrapper .quote--self::after {
  content: '';
  display: block;
  width: calc(100% - var(--quote-self-line-gutter));
  height: 30px;
  margin: 1.8rem auto 0;
  background-color: var(--color-quote-line);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0 1 H46 M46 29 L51.5 1 H100' fill='none' stroke='%23000' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 30px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0 1 H46 M46 29 L51.5 1 H100' fill='none' stroke='%23000' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 30px no-repeat;
}

/* 本文：通常本文と同サイズ・同ウェイトで、文字色と行間を引用向けに抑える */
.chapter-text-wrapper .quote--self p {
  padding-inline: var(--quote-self-inset);
  font-family: var(--font-jp);
  font-size: 1.68rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.75;
  letter-spacing: 0.04em;
  text-align: justify;
}

.chapter-text-wrapper .quote--self p + p {
  margin-top: 1.2rem;
}

/* --- B. 関係者の証言：細い縦線＋ややくすんだ本文＋出典 --- */
.chapter-text-wrapper .quote--testimony {
  padding: 0.4rem 0 0.4rem 1.85rem;
  margin-left: 1rem;
  border-left: 2px solid var(--color-border-subtle);
}

.chapter-text-wrapper .quote--testimony p {
  font-size: 1.584rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* --- C. 書誌・TVなどからの引用：きちんとした囲みカード --- */
.chapter-text-wrapper .quote--citation {
  /* 上パディングは開き引用符（::before, 3.84rem）の下端をクリアする値。
     これより小さいと引用符が本文1行目に重なる。 */
  padding: 2.9rem 1.85rem 1.4rem;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--card-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.chapter-text-wrapper .quote--citation::before {
  content: '“';
  position: absolute;
  top: -0.1rem;
  left: 0.85rem;
  font-family: var(--font-en);
  font-size: 3.84rem;
  line-height: 1;
  color: var(--color-accent-light);
  background: transparent;
  padding: 0 0.3rem;
  pointer-events: none;
}

.chapter-text-wrapper .quote--citation p {
  font-size: 1.552rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* --- 出典表示（<cite>要素）：3種の引用で共通の体裁 --- */
.chapter-text-wrapper .quote .quote-source {
  display: block;
  margin-top: 1.2rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--color-border-subtle);
  text-align: right;
  font-style: normal;
  font-size: 1.248rem;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  line-height: 1.75;
}

.chapter-text-wrapper .quote .quote-source::before {
  content: '──';
  margin-right: 0.55em;
  color: var(--color-accent);
  letter-spacing: 0;
  opacity: 0.75;
}

/* 英文原稿の出典行は先頭の em dash も原文の一部なので、そのまま表示する。 */
.chapter-text-wrapper .quote .quote-source--verbatim::before {
  content: none;
}

.chapter-text-wrapper .quote-source-speaker {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.376rem;
  letter-spacing: 0.06em;
}

.chapter-text-wrapper .quote-source-note {
  color: var(--color-text-muted);
  font-size: 1.248rem;
  margin-left: 0.2em;
}

.chapter-text-wrapper .quote-source-medium {
  display: inline-block;
  margin-left: 0.55em;
  padding-left: 0.65em;
  border-left: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  font-style: normal;
}

/* 引用のあとに本文が続くときの余白整理 */
.chapter-text-wrapper .quote + p {
  margin-top: 0.3rem;
}

/* ==========================================================================
   CHAPTER CREDIT（執筆者クレジット・出典注記）
   ----------------------------------------------------------------------------
   各章末尾に置く、本文とは別トーンの奥付。
   罫線で本文から切り離し、書体はそのまま・サイズと色だけを落として
   「読み物の続き」ではなく「注記」であることを示す。
   ========================================================================== */

.chapter-credit {
  max-width: 705px;
  margin: 4.2rem auto 0;
  padding-top: 2.4rem;
  border-top: 1px solid var(--color-border-subtle);
}

.chapter-text-wrapper p.chapter-credit-author {
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.chapter-credit-author-en {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

.chapter-text-wrapper p.chapter-credit-notes {
  font-size: 0.96rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
  line-height: 1.75;
  text-align: left;
}

/* ==========================================================================
   MEDIA / GALLERY SYSTEM
   ----------------------------------------------------------------------------
   .chapter-media         … 単一画像（本文中の挿絵としてのインセット）
   .chapter-media-grid    … 複数画像の2カラムグリッド
   --wide                 … 特別なときだけ大きく見せる（600px）
   --narrow               … 小さなインセットとして使う（260px）
   <figcaption>           … 任意キャプション
   ----------------------------------------------------------------------------
   設計思想：
   - 元画像の比率を絶対に変えない。顔の見切れ・歪みを起こさない
   - 単一画像は本文を圧倒しないインセットサイズ（360px基準）
   - 複数画像は2カラムに収め、各画像は元比率を保ったまま列幅に合わせる
   - モバイルは縦積み。1枚ずつしっかりの大きさで見せる
   ========================================================================== */

.chapter-media,
.chapter-media-grid {
  margin: 3.4rem auto 3.6rem;
  width: 100%;
}

/* --- 単一画像（元比率を保持） --- */
.chapter-media {
  max-width: 360px;
}

.chapter-media--narrow {
  max-width: 260px;
}

.chapter-media--wide {
  max-width: 600px;
}

/* 単一画像：白マット＋四隅の角押さえ斜線 */
.chapter-media {
  position: relative;
  padding: 5px;
  background: #ffffff;
}

.chapter-media > img {
  display: block;
  width: 100%;
  height: auto;             /* 元の比率を保持 */
  filter: grayscale(1);
  background: var(--color-bg-alt);
}

/* 四隅から外にはみ出す斜線（写真コーナー風）
   inset:-3px ＋ box 12×12 で、線の中心を頂点から3px内側に移動 */
.chapter-media::before {
  content: '';
  position: absolute;
  inset: -3px;
  pointer-events: none;
  background:
    /* TL: ／ */
    linear-gradient(
      135deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) top left / 12px 12px no-repeat,
    /* TR: ＼ */
    linear-gradient(
      45deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) top right / 12px 12px no-repeat,
    /* BR: ／ */
    linear-gradient(
      135deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) bottom right / 12px 12px no-repeat,
    /* BL: ＼ */
    linear-gradient(
      45deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) bottom left / 12px 12px no-repeat;
}

/* --- 複数画像：本文幅に収まる2カラムグリッド --- */
.chapter-media-grid {
  max-width: 800px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.chapter-media-grid-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  padding: 5px;
  background: #ffffff;
}

.chapter-media-grid-item > img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;      /* 縦横どちらも切り抜かず、同じ表示枠に収める */
  object-position: center;
  max-width: 100%;
  filter: grayscale(1);
  background: var(--color-bg-alt);
}

/* 四隅から外にはみ出す斜線（写真コーナー風）— 単一画像と同仕様 */
.chapter-media-grid-item::before {
  content: '';
  position: absolute;
  inset: -3px;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) top left / 12px 12px no-repeat,
    linear-gradient(
      45deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) top right / 12px 12px no-repeat,
    linear-gradient(
      135deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) bottom right / 12px 12px no-repeat,
    linear-gradient(
      45deg,
      transparent calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% - 0.5px),
      rgba(var(--color-accent-rgb), 0.65) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ) bottom left / 12px 12px no-repeat;
}

/* 1枚しか入っていない場合は単一画像と同じ振る舞いに */
.chapter-media-grid:has(> :only-child) {
  max-width: 360px;
}

.chapter-media-grid:has(> :only-child) .chapter-media-grid-item {
  grid-column: 1 / -1;
}

.chapter-media-grid:has(> :only-child) .chapter-media-grid-item > img {
  height: auto;
  width: 100%;
}

/* --- キャプション（<figcaption>） --- */
.chapter-media > figcaption,
.chapter-media-grid-item > figcaption {
  margin-top: 0.7rem;
  font-family: var(--font-jp);
  font-size: 1.216rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  line-height: 1.7;
}

.chapter-media > figcaption {
  text-align: center;
  padding: 0 0.4rem 0.6rem;
}

.chapter-media-grid-item > figcaption {
  text-align: center;
  padding: 0 0.4rem 0.6rem;
}

/* --- ホバー時のごく控えめなインタラクション（デスクトップのみ） --- */
@media (hover: hover) {
  .chapter-media > img,
  .chapter-media-grid-item > img {
    transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .chapter-media:hover > img,
  .chapter-media-grid-item:hover > img {
    filter: grayscale(0.35);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */

/* --- MOBILE LAYOUT (768px以下) --- */
@media (max-width: 768px) {
  .hero-title .en {
    font-size: 3.92rem;
  }

  .hero-title .period {
    font-size: 3.2rem;
  }

  .hero-title .jp.hero-name {
    font-size: 3.2rem;
  }

  .chapter-intro {
    padding: 7.5vw 6.25vw 3.75vw;
  }

  .chapter-intro-label {
    font-size: 1.2rem;
  }

  .chapter-intro-period {
    font-size: 2.56rem;
  }

  .chapter-intro-title {
    margin-top: 0.55rem;
    font-size: 1.52rem;
  }

  .chapter-body {
    /* SPも左右余白のみ維持し、縦余白は一時的に0 */
    padding: 0 6.25vw;
  }

  .chapter-text-wrapper p {
    font-size: 1.52rem;
    margin-bottom: 1.4rem;
  }

  /* --- Quote system (Mobile) --- */
  .chapter-text-wrapper .quote {
    margin: 2rem 0 2.25rem;
  }

  .chapter-text-wrapper .quote--self {
    --quote-self-inset: 1.75rem;
    --quote-self-line-gutter: 2.5rem;
    margin: 2.4rem auto 2.6rem;
  }

  .chapter-text-wrapper .quote--self::before {
    margin-bottom: 1.5rem;
  }

  .chapter-text-wrapper .quote--self::after {
    height: 22px;
    margin: 1.3rem auto 0;
    -webkit-mask-size: 100% 22px;
    mask-size: 100% 22px;
  }

  .chapter-text-wrapper .quote--self p {
    font-size: 1.52rem;
    line-height: 1.75;
    letter-spacing: 0.04em;
  }

  .chapter-text-wrapper .quote--testimony {
    margin-left: 0;
    padding-left: 1.2rem;
  }

  .chapter-text-wrapper .quote--testimony p {
    font-size: 1.488rem;
  }

  .chapter-text-wrapper .quote--citation {
    /* SPは引用符が 3.36rem と大きいので上パディングも増やす */
    padding: 2.6rem 1.25rem 1.15rem;
  }

  .chapter-text-wrapper .quote--citation::before {
    font-size: 3.36rem;
    top: -0.15rem;
    left: 0.55rem;
    padding: 0 0.25rem;
  }

  .chapter-text-wrapper .quote--citation p {
    font-size: 1.488rem;
  }

  .chapter-text-wrapper .quote-source-medium {
    display: block;
    margin: 0.35rem 0 0;
    padding: 0;
    border: 0;
  }

  /* --- メディア（モバイル） --- */
  /* 縦積みに統一：1枚ずつ元の比率のまま大きく見せる */
  .chapter-media,
  .chapter-media-grid {
    margin: 2rem auto 2.4rem;
    max-width: 86%;
  }

  .chapter-media--narrow {
    max-width: 60%;
  }

  .chapter-media--wide {
    max-width: 100%;
  }

  .chapter-media-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .chapter-media-grid .chapter-media-grid-item {
    width: 100%;
  }

  .chapter-media-grid .chapter-media-grid-item > img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;       /* モバイルでは枠を解除して元比率全幅 */
  }

  .chapter-media > figcaption,
  .chapter-media-grid-item > figcaption {
    font-size: 1.152rem;
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   COVER PAGE (index.html)
   ========================================================================== */

/* カバーページは右側固定TOCを持たないため、デスクトップ時の右パディングを解除 */
@media (min-width: 1024px) {
  .page--cover {
    padding-right: 0;
  }
}

/* --- Cover Hero --- */
.hero--cover .hero-title--cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 2.4rem;
}

.hero-title--cover .jp--name {
  font-family: var(--font-jp);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 600;
  letter-spacing: 0.4em;
  color: #ffffff;
  line-height: 1.1;
  margin-right: -0.4em; /* 字間補正：右端を揃える */
  padding-left: 0.4em;
}

.hero-title--cover .en {
  font-family: var(--font-en);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: #ffffff;
  line-height: 1.3;
  margin-top: 0.6rem;
  padding-left: 0.35em;
}

.hero-title--cover .period {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.2rem;
}

/* --- Prologue (序文) --- */
.cover-intro {
  position: relative;
  padding: clamp(5rem, 12vh, 9rem) 2rem;
  background: linear-gradient(to bottom, transparent, rgba(252, 250, 249, 0.6) 30%, rgba(252, 250, 249, 0.85));
  border-bottom: 1px solid var(--color-border-subtle);
  z-index: var(--z-content);
}

.cover-intro-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.cover-intro-eyebrow {
  font-family: var(--font-en);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.4em;
  color: var(--color-accent-dark);
  margin: 0 0 1.5rem;
}

.cover-intro-heading {
  font-family: var(--font-jp);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0 0 2.5rem;
}

.cover-intro-lead {
  font-size: 1.68rem;
  line-height: 2.1;
  color: var(--color-text);
  margin: 0 0 1.5rem;
  text-align: justify;
}

.cover-intro-body {
  font-size: 1.6rem;
  line-height: 2;
  color: var(--color-text-muted);
  margin: 0;
  text-align: justify;
}

/* 出典などの注釈文は本文の続きではないので、
   左の罫線と一段小さい文字で「補足」であることを示す。 */
.cover-intro-note {
  font-size: 1.36rem;
  line-height: 1.95;
  color: var(--color-text-light);
  margin: 2.4rem 0 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 2px solid var(--color-border-subtle);
  text-align: left;
}

.cover-intro-body strong {
  color: var(--color-accent-dark);
  font-weight: 600;
}

/* --- Chapters Index --- */
.bio-index {
  position: relative;
  padding: clamp(4rem, 10vh, 7rem) 2rem clamp(5rem, 12vh, 9rem);
  z-index: var(--z-content);
}

.bio-index-header {
  max-width: 760px;
  margin: 0 auto clamp(3rem, 6vh, 4.5rem);
  text-align: center;
}

.bio-index-eyebrow {
  font-family: var(--font-en);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.4em;
  color: var(--color-accent-dark);
  margin: 0 0 0.8rem;
}

.bio-index-heading {
  font-family: var(--font-jp);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-text);
  margin: 0 0 0.8rem;
  padding-left: 0.3em;
}

.bio-index-sub {
  font-family: var(--font-en);
  font-size: 1.36rem;
  letter-spacing: 0.3em;
  color: var(--color-text-light);
  margin: 0;
}

/* --- Card Grid --- */
.bio-card-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

/* --- Cover Page Credit --- */
/* カード一覧の直後に置く奥付。
   罫線はカードグリッド（1200px）と幅を揃えてセクションの区切りを示し、
   中身のテキストは和文で35〜40字に収まる幅に絞って中央に置く。
   罫線いっぱいに文字を流すと1行58字前後になり、行頭に目が戻らない。 */
.cover-credit {
  max-width: 1200px;
  margin: clamp(4rem, 8vh, 6rem) auto 0;
  padding-top: clamp(2rem, 4vh, 2.8rem);
  border-top: 1px solid var(--color-border-subtle);
}

.cover-credit-inner {
  max-width: 820px;
  margin: 0 auto;
}

.cover-credit .chapter-credit-author {
  margin: 0 0 1.4rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--color-text);
}

.cover-credit .chapter-credit-author-en {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-en);
  font-size: 1.24rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

.cover-credit .chapter-credit-notes {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  text-align: left;
  text-indent: -1em;
  padding-left: 1em;
}

/* 参考文献は「※」で始まらないので、ぶら下げインデントは打ち消す。
   ラベルだけ色を起こして、長い書名の羅列の頭を掴みやすくする。 */
.cover-credit .chapter-credit-refs {
  margin-top: 1rem;
  text-indent: 0;
  padding-left: 0;
  color: var(--color-text-light);
}

/* 書名が行末で不用意に切れないよう、「」単位で折り返す。
   和文は既定でどの文字でも改行できるため、明示しないと書名が分断される。 */
.cover-credit .chapter-credit-refs .ref-title {
  display: inline-block;
}

.cover-credit .chapter-credit-refs-label {
  font-weight: 600;
  color: var(--color-text-muted);
}

/* --- 英語版 --- */
/* 英語は「※」で始まらないので、和文用のぶら下げインデントを打ち消す。
   欧文は単語間で折り返すため .ref-title のような書名の囲みも不要。
   :lang() は header.php の言語設定に依存して不安定なのでクラスで明示する。 */
.cover-credit--en .chapter-credit-notes {
  text-indent: 0;
  padding-left: 0;
}

/* 「Text:」「Note:」のラベルは、和文の「参考文献」と同じ強さに揃える。 */
.cover-credit .chapter-credit-label {
  font-weight: 600;
  color: var(--color-text-muted);
}

.cover-credit .chapter-credit-notes em,
.cover-credit .chapter-credit-refs em {
  font-style: italic;
}

@media (max-width: 768px) {
  .bio-card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cover-credit {
    margin-top: 3.5rem;
    padding-top: 2rem;
  }

  .cover-credit .chapter-credit-author {
    font-size: 1.4rem;
  }

  .cover-credit .chapter-credit-author-en {
    font-size: 1.16rem;
  }

  .cover-credit .chapter-credit-notes {
    font-size: 1.2rem;
    line-height: 1.9;
    text-align: left;
  }

  /* 画面幅より長い書名は途中で折り返させる。
     inline-block のままだと横スクロールが発生する。 */
  .cover-credit .chapter-credit-refs .ref-title {
    display: inline;
  }
}

/* --- Single Card --- */
.bio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform var(--transition-slow),
              box-shadow var(--transition-slow),
              border-color 0.3s ease;
  height: 100%;
}

.bio-card:hover,
.bio-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--color-accent-light);
  outline: none;
}

.bio-card:focus-visible {
  box-shadow: var(--card-shadow-focus);
}

.bio-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg);
}

.bio-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  filter: grayscale(0.25) brightness(0.96);
  transition: transform var(--transition-media),
              filter 0.6s ease;
}

.bio-card:hover .bio-card-photo img,
.bio-card:focus-visible .bio-card-photo img {
  transform: scale(1.05);
  filter: grayscale(0) brightness(1);
}

.bio-card-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.bio-card-body {
  padding: 2rem 1.85rem 2.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.bio-card-num {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-family: var(--font-en);
  margin: 0;
  color: var(--color-accent-dark);
}

.bio-card-num-label {
  font-size: 1.152rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--color-text-light);
}

.bio-card-num-figure {
  font-size: 2.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.bio-card-period {
  font-family: var(--font-en);
  font-size: 1.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-text);
  margin: 0;
}

.bio-card-title {
  font-family: var(--font-jp);
  font-size: 2.24rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-text);
  margin: 0.2rem 0 0.3rem;
  padding-left: 0.2em;
  line-height: 1.5;
}

.bio-card-lead {
  font-size: 1.52rem;
  line-height: 1.95;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
  flex: 1;
  text-align: justify;
}

.bio-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-en);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--color-accent-dark);
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border-subtle);
  transition: color 0.3s ease, gap 0.3s ease;
}

.bio-card-link .arrow {
  font-family: var(--font-en);
  font-size: 1.6rem;
  transition: transform var(--transition-standard);
}

.bio-card:hover .bio-card-link,
.bio-card:focus-visible .bio-card-link {
  color: var(--color-accent);
  gap: 0.9rem;
}

.bio-card:hover .bio-card-link .arrow,
.bio-card:focus-visible .bio-card-link .arrow {
  transform: translateX(4px);
}

/* --- Cover Page Mobile Adjustments --- */
@media (max-width: 768px) {
  .cover-intro {
    padding: 4rem 1.5rem;
  }

  .cover-intro-lead {
    font-size: 1.568rem;
    line-height: 2;
  }

  .cover-intro-note {
    font-size: 1.28rem;
    margin-top: 2rem;
    padding: 0.2rem 0 0.2rem 1.1rem;
  }

  .bio-index {
    padding: 3.5rem 1.25rem 5rem;
  }

  .bio-card-body {
    padding: 1.6rem 1.4rem 1.8rem;
  }

  .bio-card-title {
    font-size: 2rem;
  }
}

/* 画面下に固定された章ナビのぶん、最終リンクの下へ操作可能な余白を確保する。 */
@media (max-width: 768px) {
  .bio-nav {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   BIO NAVIGATION (Story Link)
   ========================================================================== */

.bio-nav {
  position: relative;
  z-index: var(--z-content);
  border-top: 1px solid var(--color-border-subtle);
  background-color: var(--color-bg-alt);
}

.bio-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 3.5rem 2rem 3rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
}

.bio-nav-eyebrow {
  display: block;
  font-family: var(--font-en);
  font-size: 1.088rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.bio-nav-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.bio-nav-en {
  font-family: var(--font-en);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text);
  transition: color var(--transition-standard);
}

.bio-nav-period {
  font-family: var(--font-en);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  transition: color var(--transition-standard);
}

.bio-nav-jp {
  font-family: var(--font-jp);
  font-size: 1.52rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.1rem;
  transition: color var(--transition-standard);
}

.bio-nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: 1rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  flex-shrink: 0;
  color: var(--color-accent);
  transition: background-color var(--transition-standard), color var(--transition-standard), transform var(--transition-standard);
}

.bio-nav-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

.bio-nav-arrow--up {
  transform: rotate(-90deg);
}

/* Hover states */
.bio-nav-link:hover .bio-nav-en {
  color: var(--color-accent);
}

.bio-nav-link:hover .bio-nav-arrow {
  background-color: var(--color-accent);
  color: #fff;
}

.bio-nav-link:hover .bio-nav-arrow:not(.bio-nav-arrow--up) {
  transform: translateX(5px);
}

.bio-nav-link:hover .bio-nav-arrow--up {
  transform: rotate(-90deg) translateX(5px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-subtle);
  padding: 1.6rem 2rem;
  text-align: center;
  position: relative;
  z-index: var(--z-content);
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-copy {
  font-size: 1.28rem;
  color: var(--color-text-light);
  margin: 0;
  font-weight: 400;
}
