/* ============================================================
   クロニカ別館 — 作品ポータル  style.css
   ------------------------------------------------------------
   目次（§番号でファイル内検索）

   §1  カスタムプロパティ（変数・フォント）
   §2  リセット・ベーススタイル
   §3  レイアウト共通
   §4  ヘッダー
   §5  ナビゲーション（ハンバーガー）
   §6  ヒーロー・ページヘッダー
   §7  本文コンテンツ共通（見出し・本文・区切り・注記）
   §8  世界観ページ — 地図セクション
   §9  世界観ページ — 国家モーダル          ← world.html
   §10 人物ページ — キャラクターグリッド・カード
   §11 人物ページ — キャラクターモーダル    ← character.html
   §12 人物ページ — 表情差分ギャラリー
   §13 人物ページ — 表情差分ライトボックス
   §14 フッター
   §15 レスポンシブ（640px 以下）
   §16 アクセシビリティ（prefers-reduced-motion）
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

:root {
  --c-bg: #d7d1c8;
  --c-bg-deep: #cec7bd;
  --c-paper: #f4f0e8;
  --c-paper-deep: #ebe3d7;
  --c-ink: #2f2b25;
  --c-ink-soft: #4a443b;
  --c-muted: #7f7466;
  --c-line: #d2c8ba;
  --c-line-soft: #ddd4c9;
  --c-brass: #8b7350;
  --c-brass-soft: #b79e79;
  --c-brass-dk: #6e5b3a;
  --c-shadow: rgba(39, 29, 18, 0.1);
  --c-card-bg: rgba(255, 255, 255, 0.55);
  --c-card-border: rgba(139, 115, 80, 0.15);
  --c-card-shadow: 0 1px 5px rgba(39, 29, 18, 0.07);
  --c-heading-font: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;
  /* アクセントカラー: 緑青（verdigris）— brass の酸化色として文脈的に対をなす */
  --c-verdigris: #3e6e62;
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-weight: 400;
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

.page-template-page-chronica-top .chronica-main {
  position: relative;
  isolation: isolate;
  z-index: 0;
}

.page-template-page-chronica-top .chronica-main > * {
  position: relative;
  z-index: 1;
}

.page-template-page-chronica-top .chronica-main::after {
  content: "";
  position: fixed;
  right: 0;
  bottom: 0;
  width: min(36vw, 520px);
  height: min(58vh, 560px);
  background: linear-gradient(180deg, var(--c-ink-soft) 0%, var(--c-brass-soft) 100%);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  opacity: 0.072;
  pointer-events: none;
  z-index: 0;
  transform: scaleX(-1);
  transform-origin: right bottom;
  -webkit-mask: url("../images/castle.svg") no-repeat right bottom / contain;
  mask: url("../images/castle.svg") no-repeat right bottom / contain;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #695844;
  text-decoration: none;
}

a:hover {
  color: #3d3328;
}

/* =========================================
   ヘッダー・ナビ
   ========================================= */
.c-header {
  background: #38342e;
  border-bottom: 1px solid rgba(183, 158, 121, 0.22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}

.c-header-inner {
  max-width: 880px;
    margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.c-header-title {
  font-size: 0.82rem;
  font-weight: 400;
  color: #cec4b5;
  letter-spacing: 0.14em;
}

.c-header-title a {
  color: inherit;
}

.c-header-title a:hover {
  color: #efe5d3;
}

.c-header-back {
  font-size: 0.7rem;
  color: #9a8c78;
}

.c-header-back:hover {
  color: #cdb89a;
}

/* ナビゲーション */
.c-nav {
  background: #47433c;
  border-bottom: 1px solid rgba(183, 158, 121, 0.2);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 8px 18px rgba(28, 22, 16, 0.06);
  position: sticky;
  top: 48px;
  z-index: 95;
}

.c-nav-inner {
  max-width: 880px;
    margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 0;
}

.c-nav a {
  display: block;
  padding: 9px 18px;
  font-size: 0.78rem;
  color: #a8a08f;
  letter-spacing: 0.08em;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.c-nav a:hover {
  color: #ddd4c5;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 -1px 0 rgba(183, 158, 121, 0.32);
}

.c-nav a.is-current {
  color: #e6dccd;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 -3px 0 rgba(62, 110, 98, 1.0);
}

/* モバイルメニューボタン */
.c-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 9px 7px;
  border: 1px solid #50483e;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
}

.c-menu-bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #b4aa98;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

[aria-expanded="true"] .c-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

[aria-expanded="true"] .c-menu-bar:nth-child(2) {
  opacity: 0;
}

[aria-expanded="true"] .c-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   メインコンテンツ
   ========================================= */
.c-main {
  max-width: 880px;
    margin: 0 auto;
  background: var(--c-paper);
  border-left: 1px solid rgba(139, 115, 80, 0.12);
  border-right: 1px solid rgba(139, 115, 80, 0.12);
  box-shadow: 0 24px 64px var(--c-shadow);
  min-height: 60vh;
}

.c-nav + .c-main,
.c-nav + .story-section-layout,
.c-nav + .story-sidebar-bar {
  margin-top: 18px;
}

.story-sidebar-bar + .story-section-layout {
  margin-top: 18px;
}

.c-page {
  padding: 40px 48px 56px;
}

.c-page > .c-heading + .c-body-table {
  padding-top: 0;
}

.c-body-table > :first-child {
  margin-top: 0;
  padding-top: 0;
}

/* カードコンポーネントは上パディングを維持する */
.c-body-table > .c-book:first-child {
  padding-top: 20px;
}

/* --- 見出し --- */
.c-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--c-heading-font);
  font-size: 1.0rem;
  font-weight: 500;
  color: #4a3f32;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
  margin-top: 36px;
}

.c-heading::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  /* 外枠ひし形（fill .55 + stroke 1px）＋内芯 solid で ❖ 相当の強度を確保 */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5 .6L9.4 5 5 9.4.6 5z' fill='%233e6e62' fill-opacity='.55' stroke='%233e6e62' stroke-width='1'/%3E%3Cpath d='M5 3L7 5 5 7 3 5z' fill='%233e6e62'/%3E%3C/svg%3E") no-repeat center / contain;
}

.c-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(139, 115, 80, 0.25);
}

/* 最初の見出しと区切り線直後の見出しはマージン不要 */
.c-page > .c-heading:first-child,
.c-page > :first-child + .c-heading,
.c-divider + .c-heading {
  margin-top: 0;
}

/* 地図セクション直後の見出しは詰め気味にして地図から本文へ自然に流す */
.c-map-section + .c-heading {
  margin-top: 22px;
}

/* セクション間隔 */
.c-section {
  margin-top: 44px;
}

/* --- 段落 --- */
.c-page p {
  font-size: 0.875rem;
  color: #3a352f;
  line-height: 2;
  margin-bottom: 12px;
}

.c-page p:last-child {
  margin-bottom: 0;
}

/* --- 区切り線 --- */
.c-divider {
  border: none;
  margin: 44px 0;
  position: relative;
  height: 1px;
  /* 中央 24px をギャップとして残す二分割ライン */
  background:
    linear-gradient(var(--c-line), var(--c-line)) left center / calc(50% - 12px) 1px no-repeat,
    linear-gradient(var(--c-line), var(--c-line)) right center / calc(50% - 12px) 1px no-repeat;
}

.c-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5 1L9 5 5 9 1 5z' fill='%23b79e79' fill-opacity='.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* --- 補足 --- */
.c-note {
  font-size: 0.75rem;
  color: #9a9084;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--c-line-soft);
  line-height: 1.85;
}

/* =========================================
   index.html — 別館トップ
   ========================================= */

/* ビジュアル */
.c-visual {
  position: relative;
  line-height: 0;
  overflow: hidden;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(139, 115, 80, 0.16);
  background: #302b25;
}

.c-visual::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(218, 196, 160, 0.22);
  pointer-events: none;
  z-index: 1;
}

.c-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 1;
}

.c-visual img {
  width: 100%;
  object-fit: cover;
  max-height: 380px;
  filter: saturate(0.82) contrast(1.04) brightness(0.92);
}

/* 作品の顔 */
.c-face {
  margin-bottom: 32px;
}

.c-face-title {
  font-family: var(--c-heading-font);
  font-size: clamp(2.0rem, 4.2vw, 2.6rem);
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: 0.1em;
  padding-bottom: 16px;
  margin-bottom: 0;
  position: relative;
}

/* タイトル下の短い装飾ライン */
.c-face-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 1px;
  background: var(--c-brass);
}

.c-face-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 22px;
}

.c-face-sub {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin-bottom: 0;
}

/* 進行状況バッジ — 目立つよう強化 */
.c-face-status {
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  padding: 4px 12px;
  border: 1px solid rgba(139, 115, 80, 0.38);
  background: rgba(183, 158, 121, 0.12);
  color: #5a4b39;
  font-weight: 500;
  margin-bottom: 0;
}

.c-face-lead {
  font-size: 0.92rem;
  color: #3a352f;
  line-height: 2.05;
  margin-bottom: 24px;
}

/* ポータルナビ — 三段階の優先度 */
.c-portal-nav {
  display: flex;
  flex-direction: column;
}

/* 共通 */
.c-portal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line-soft);
  color: inherit;
  transition: color 0.15s, background 0.15s, padding-left 0.15s;
}

.c-portal-item:hover {
  color: #3e3428;
  padding-left: 3px;
}

/* Primary: 最重要 — 長編を読む */
.c-portal-item.is-primary {
  padding: 20px 20px;
  margin-top: 6px;
  margin-bottom: 8px;
  border: 1px solid rgba(139, 115, 80, 0.3);
  border-left: 4px solid rgba(139, 115, 80, 0.78);
  background: rgba(183, 158, 121, 0.08);
  box-shadow: 0 2px 8px rgba(39, 29, 18, 0.07);
}

.c-portal-item.is-primary:hover {
  background: rgba(183, 158, 121, 0.13);
  padding-left: 20px;
  box-shadow: 0 3px 12px rgba(39, 29, 18, 0.1);
}

/* Secondary: 補助 — 短編を読む */
.c-portal-item.is-secondary {
  padding: 13px 2px;
}

/* Tertiary: 参照系 — 人物・世界観・更新履歴 */
.c-portal-nav .c-portal-item:not(.is-primary):not(.is-secondary) {
  padding: 10px 0;
}

.c-portal-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.c-portal-tag {
  font-size: 0.68rem;
  color: var(--c-brass);
  letter-spacing: 0.14em;
  font-weight: 500;
}

.c-portal-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: #635343;
}

.c-portal-item:hover .c-portal-label {
  color: #3e3428;
}

/* Primary label — 最大化 */
.c-portal-item.is-primary .c-portal-label {
  font-size: 1.12rem;
  font-weight: 700;
  color: #3c3020;
  letter-spacing: 0.03em;
}

/* Secondary label */
.c-portal-item.is-secondary .c-portal-label {
  font-size: 0.9rem;
  color: #5a4d41;
}

/* Tertiary label */
.c-portal-nav .c-portal-item:not(.is-primary):not(.is-secondary) .c-portal-label {
  font-size: 0.86rem;
  color: #6b5f52;
}

.c-portal-desc {
  font-size: 0.8rem;
  color: #8f8578;
}

.c-portal-mark {
  flex-shrink: 0;
  font-family: var(--c-heading-font);
  font-size: 0.88rem;
  color: #aa9680;
  letter-spacing: 0.08em;
}

.c-portal-item.is-primary .c-portal-mark {
  color: var(--c-brass);
  font-size: 1.05rem;
}

.c-portal-item.is-secondary .c-portal-mark {
  font-size: 0.85rem;
  color: #b0a494;
}

.c-portal-nav .c-portal-item:not(.is-primary):not(.is-secondary) .c-portal-mark {
  font-size: 0.78rem;
  color: #c0b5a5;
}

/* =========================================
   story.html — 物語群
   ========================================= */

/* あらすじ */
.c-synopsis p {
  font-size: 0.9rem;
  color: #3a3834;
  line-height: 2.1;
  margin-bottom: 12px;
}

.c-synopsis p:last-child {
  margin-bottom: 0;
}

/* 物語グループ */
.c-story-group {
  margin-bottom: 28px;
}

.c-story-group:last-child {
  margin-bottom: 0;
}

/* グループタイトル — 章扉風 */
.c-story-group-title {
  font-family: var(--c-heading-font);
  font-size: 0.88rem;
  font-weight: 500;
  color: #5a4d3e;
  letter-spacing: 0.1em;
  padding: 8px 0 8px 12px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(139, 115, 80, 0.22);
  position: relative;
}

.c-story-group-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: rgba(139, 115, 80, 0.55);
  border-radius: 1px;
}

.c-story-list {
  list-style: none;
}

.c-story-list li {
  border-bottom: 1px solid #e2d8cb;
}

.c-story-list a {
  display: flex;
  align-items: baseline;
  padding: 10px 8px 10px 4px;
  font-size: 0.875rem;
  color: #3a3834;
  transition: color 0.15s;
}

.c-story-list a:hover {
  color: #3e2e1e;
}

.c-story-list .c-story-num {
  color: #a89274;
  font-size: 0.74rem;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 付属情報（短編・外伝ラベル） */
.c-story-note {
  font-size: 0.74rem;
  color: #b0a89c;
  margin-left: 6px;
}

/* NEW バッジ */
.c-story-note.is-new {
  display: inline-block;
  vertical-align: middle;
  padding: 1px 6px;
  margin-left: 8px;
  background: rgba(138, 60, 30, 0.09);
  border: 1px solid rgba(138, 60, 30, 0.28);
  color: #803820;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.c-read-note {
  font-size: 0.78rem;
  color: #999088;
  margin-bottom: 12px;
}

/* 本編章リスト */
.c-chapters {
  list-style: none;
}

.c-chapters li {
  border-bottom: 1px solid #e2d8cb;
}

.c-chapters li:first-child {
  border-top: 1px solid #e2d8cb;
}

.c-chapters li a {
  display: flex;
  align-items: baseline;
  padding: 10px 4px;
  font-size: 0.875rem;
  color: #3a3834;
  transition: color 0.15s, background 0.15s, padding-left 0.15s;
}

.c-chapters li a:hover {
  color: #3e2e1e;
  background: rgba(183, 158, 121, 0.08);
  padding-left: 10px;
}

.c-ch-num {
  color: #a89274;
  font-size: 0.74rem;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 書籍版 — カード + 額装カバー */
.c-book {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  box-shadow: var(--c-card-shadow);
}

.c-book + .c-book {
  margin-top: 14px;
}

.c-book-cover {
  flex-shrink: 0;
  width: 120px;
  padding: 6px;
  background: #f0ece4;
  border: 1px solid rgba(139, 115, 80, 0.2);
  box-shadow: 2px 3px 10px rgba(39, 29, 18, 0.16);
  line-height: 0;
}

.c-book-cover img {
  width: 100%;
  display: block;
}

.c-book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.05)),
    #5f564e;
}

.c-book-info {
  flex: 1;
}

.c-book-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #2e2b25;
  margin-bottom: 5px;
}

.c-book-meta {
  font-size: 0.76rem;
  color: #8a8075;
  margin-bottom: 10px;
}

.c-book-info > p {
  font-size: 0.84rem;
  color: #4a4840;
  line-height: 1.9;
  margin-bottom: 10px;
}

/* BOOTHリンク — ボタン寄りに */
.c-book-buy {
  margin-top: 10px;
  margin-bottom: 0;
}

.c-book-buy a {
  display: inline-block;
  padding: 5px 16px;
  border: 1px solid rgba(139, 115, 80, 0.35);
  background: rgba(183, 158, 121, 0.09);
  color: #5a4b39;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.c-book-buy a:hover {
  background: rgba(183, 158, 121, 0.18);
  border-color: rgba(139, 115, 80, 0.55);
  color: #3e3224;
}

/* =========================================
   character.html — 登場人物
   ========================================= */
.c-character {
  padding: 18px 20px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  box-shadow: var(--c-card-shadow);
  margin-bottom: 12px;
}

.c-character:last-child {
  margin-bottom: 0;
}

/* 主要人物 — 左アクセント */
.c-character.is-main {
  border-left: 3px solid rgba(139, 115, 80, 0.5);
}

.c-character-name {
  font-size: 1.0rem;
  font-weight: 700;
  color: #252218;
  margin-bottom: 5px;
}

.c-character-role {
  display: inline-block;
  font-size: 0.71rem;
  letter-spacing: 0.07em;
  color: #6a5a44;
  background: rgba(139, 115, 80, 0.1);
  border: 1px solid rgba(139, 115, 80, 0.18);
  padding: 2px 8px;
  margin-bottom: 11px;
}

.c-character-desc {
  font-size: 0.85rem;
  color: #3a3834;
  line-height: 1.95;
}

/* =========================================
   world.html — 世界観
   ========================================= */
.c-world-section {
  margin-bottom: 28px;
}

.c-world-section:last-child {
  margin-bottom: 0;
}

/* 用語リスト（共通）— 辞典スタイル: 箱を使わずボーダーのみで引き締める */
.c-term-list {
  font-size: 0.86rem;
}

.c-term {
  padding: 8px 0 8px 12px;
  background: transparent;
  border: none;
  border-left: 2px solid rgba(139, 115, 80, 0.22);
  margin-bottom: 8px;
}

.c-term dt {
  font-weight: 600;
  color: #2e2b22;
  margin-bottom: 3px;
  font-size: 0.88rem;
}

.c-term dd {
  color: #504940;
  line-height: 1.92;
}

/* 主要国家・勢力 — 存在感のあるカード */
.c-term-list--nations .c-term {
  padding: 16px 18px;
  background: var(--c-card-bg);
  border: 1px solid rgba(139, 115, 80, 0.18);
  border-left: 3px solid rgba(139, 115, 80, 0.5);
  box-shadow: var(--c-card-shadow);
  margin-bottom: 10px;
}

.c-term-list--nations .c-term dt {
  font-family: var(--c-heading-font);
  font-size: 0.96rem;
  font-weight: 500;
  color: #1e1c14;
  margin-bottom: 7px;
  letter-spacing: 0.06em;
}

.c-term-list--nations .c-term dd {
  font-size: 0.84rem;
  color: #4a4640;
  line-height: 1.95;
}

/* =========================================
   log.html — 更新履歴
   ========================================= */
.c-log-entry {
  display: flex;
  gap: 16px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(139, 115, 80, 0.1);
  border-left: 3px solid rgba(139, 115, 80, 0.18);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

/* 話数公開 — 主な更新 */
.c-log-entry.is-story {
  border-left-color: rgba(139, 115, 80, 0.55);
  background: rgba(255, 255, 255, 0.38);
}

/* 書籍版 */
.c-log-entry.is-book {
  border-left-color: rgba(100, 78, 48, 0.6);
  background: rgba(183, 158, 121, 0.08);
}

/* サイト更新・メンテ */
.c-log-entry.is-site {
  border-left-color: rgba(139, 115, 80, 0.2);
}

.c-log-date {
  flex-shrink: 0;
  width: 7.5em;
  color: #8f8578;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.c-log-text {
  color: #3a3834;
}

/* 制作メモ — 日誌カード */
.c-memo-item {
  padding: 16px 18px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  border-top: 2px solid rgba(139, 115, 80, 0.4);
  box-shadow: var(--c-card-shadow);
  margin-bottom: 14px;
}

.c-memo-item:last-child {
  margin-bottom: 0;
}

.c-memo-date {
  font-size: 0.71rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.c-memo-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2a2720;
  margin-bottom: 6px;
}

.c-memo-text {
  font-size: 0.84rem;
  color: #4a4840;
  line-height: 1.95;
}

/* =========================================
   body scroll lock
   ========================================= */
body.c-modal-open {
  overflow: hidden;
}

/* =========================================
   world.html — 大陸地図
   ========================================= */
.c-map-section {
  margin-bottom: 0;
  padding-bottom: 24px;
  border-bottom: none;
}

/* 地図コンテナ: aspect-ratio で比率を維持 */
.c-map-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 880 / 480;
  /* 地形風背景（画像なし時のフォールバック） */
  background: #2e261c;
  border: 1px solid rgba(139, 115, 80, 0.28);
  box-shadow:
    0 6px 24px rgba(20, 15, 10, 0.32),
    0 2px 6px rgba(20, 15, 10, 0.2),
    inset 0 0 40px rgba(12, 9, 6, 0.3);
}

/* 内側装飾枠線 */
.c-map-container::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(183, 158, 121, 0.15);
  pointer-events: none;
  z-index: 2;
}

/* 周縁ビネット */
.c-map-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 2;
}

/* 地図画像 / 草稿SVG
   ── 本番写真地図に差し替える場合:
      opacity: 0.75; filter: sepia(0.4) contrast(0.85) brightness(0.78);
   ── 草稿SVGの場合はSVG自身が色調を持つためフィルター不要 */
.c-map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  filter: none;
}

/* マーカーボタン
   位置は style="--mx:X%;--my:Y%" で個別指定 */
.c-map-marker {
  position: absolute;
  left: var(--mx);
  top: var(--my);
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
}

/* マーカードット */
.c-map-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(210, 182, 130, 0.96);
  border: 2px solid rgba(240, 220, 185, 0.9);
  box-shadow:
    0 0 0 3px rgba(183, 158, 121, 0.32),
    0 1px 4px rgba(12, 9, 6, 0.5);
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

/* 滅亡国家 — くすんだドット */
.c-map-dot.is-ruin {
  background: rgba(172, 158, 138, 0.65);
  border-color: rgba(210, 196, 176, 0.5);
  box-shadow: 0 1px 3px rgba(12, 9, 6, 0.4);
}

/* 組織・宗教 — やや異なるトーン */
.c-map-dot.is-org {
  background: rgba(186, 158, 122, 0.9);
  border-color: rgba(225, 200, 168, 0.7);
  box-shadow:
    0 0 0 3px rgba(183, 158, 121, 0.24),
    0 1px 4px rgba(12, 9, 6, 0.45);
}

/* マーカーラベル — 地図上の注記札に見えるよう明朝体・半透明 */
.c-map-label {
  font-size: 0.67rem;
  font-weight: 400;
  font-family: var(--c-heading-font);
  color: rgba(225, 205, 170, 0.72);
  letter-spacing: 0.08em;
  background: rgba(20, 14, 8, 0.48);
  padding: 2px 7px;
  white-space: nowrap;
  border: 1px solid rgba(183, 158, 121, 0.18);
  pointer-events: none;
  line-height: 1.5;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

/* ホバー / フォーカス */
.c-map-marker:hover .c-map-dot,
.c-map-marker:focus-visible .c-map-dot {
  transform: scale(1.35);
  box-shadow:
    0 0 0 5px rgba(183, 158, 121, 0.4),
    0 1px 6px rgba(12, 9, 6, 0.5);
}

.c-map-marker:hover .c-map-label,
.c-map-marker:focus-visible .c-map-label {
  color: rgba(252, 238, 210, 0.98);
  background: rgba(20, 14, 8, 0.86);
  border-color: rgba(183, 158, 121, 0.52);
}

/* 橋渡しキャプション（地図の下） */
.c-map-caption {
  font-size: 0.8rem;
  color: var(--c-ink-soft);
  line-height: 1.85;
  letter-spacing: 0.03em;
  margin-top: 11px;
  margin-bottom: 0;
  text-align: center;
}

/* キャプション内のUI補足注記 */
.c-map-caption-note {
  display: block;
  font-size: 0.68rem;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.c-map-marker:focus-visible {
  outline: none;
}

.c-map-marker:focus-visible .c-map-dot {
  outline: 2px solid rgba(195, 168, 120, 0.8);
  outline-offset: 3px;
}

/* スマホ補助ボタン（JS非依存の操作導線） */
.c-map-mobile-nav {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.c-map-mobile-btn {
  font-family: inherit;
  padding: 8px 14px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  color: #5a4d3e;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.c-map-mobile-btn:hover,
.c-map-mobile-btn:active {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(139, 115, 80, 0.3);
}

/* =========================================
   §9  世界観ページ — 国家モーダル
       （world.html の地図マーカークリックで開くパネル）
   ========================================= */
.c-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.c-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

/* 背景オーバーレイ */
.c-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 12, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* パネル本体 */
.c-modal-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: var(--c-paper);
  border: 1px solid rgba(139, 115, 80, 0.24);
  border-top: 2px solid rgba(139, 115, 80, 0.58);
  box-shadow: 0 16px 44px rgba(24, 18, 12, 0.32);
  transform: translateY(20px) scale(0.93);
  opacity: 0;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.c-modal.is-open .c-modal-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.c-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  background: transparent;
  border-bottom: 1px solid var(--c-line);
}

.c-modal-titles {
  flex: 1;
  min-width: 0;
}

.c-modal-name {
  font-family: var(--c-heading-font);
  font-size: 1.08rem;
  font-weight: 500;
  color: #2a2218;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.c-modal-type {
  display: inline-block;
  font-size: 0.67rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  margin: 0;
  padding: 2px 8px;
  background: rgba(139, 115, 80, 0.08);
  border: 1px solid rgba(139, 115, 80, 0.22);
}

.c-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid rgba(139, 115, 80, 0.38);
  color: #6e6258;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}

.c-modal-close:hover {
  background: rgba(139, 115, 80, 0.14);
  border-color: rgba(139, 115, 80, 0.55);
  color: #3e3428;
  transform: scale(1.06);
}

.c-modal-close:focus-visible {
  outline: 2px solid rgba(139, 115, 80, 0.5);
  outline-offset: 2px;
}

.c-modal-body {
  padding: 16px 22px 22px;
}

.c-modal-desc {
  font-size: 0.875rem;
  color: #3a3530;
  line-height: 2;
  margin-bottom: 10px;
}

.c-modal-note {
  font-size: 0.78rem;
  color: #7a7060;
  line-height: 1.85;
  padding-left: 12px;
  border-left: 2px solid rgba(139, 115, 80, 0.3);
  margin-bottom: 0;
}

/* =========================================
   World Map Manager — Chronica 受け口
   ========================================= */
.chronica-editor--world .wmm-map__figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 880 / 480;
  background: #2e261c;
  border: 1px solid rgba(139, 115, 80, 0.28);
  box-shadow:
    0 6px 24px rgba(20, 15, 10, 0.32),
    0 2px 6px rgba(20, 15, 10, 0.2),
    inset 0 0 40px rgba(12, 9, 6, 0.3);
}

.chronica-editor--world .wmm-map__figure::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(183, 158, 121, 0.15);
  pointer-events: none;
  z-index: 1;
}

.chronica-editor--world .wmm-map__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chronica-editor--world .wmm-map__image--placeholder {
  min-height: min(480px, 56vw);
  display: grid;
  place-items: center;
  background: #2e261c;
  color: rgba(225, 205, 170, 0.72);
}

.chronica-editor--world .wmm-map-marker {
  position: absolute;
  left: var(--wmm-x);
  top: var(--wmm-y);
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
}

.chronica-editor--world .wmm-map-marker__dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(210, 182, 130, 0.96);
  border: 2px solid rgba(240, 220, 185, 0.9);
  box-shadow:
    0 0 0 3px rgba(183, 158, 121, 0.32),
    0 1px 4px rgba(12, 9, 6, 0.5);
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.chronica-editor--world .wmm-map-marker__dot.is-ruin {
  background: rgba(172, 158, 138, 0.65);
  border-color: rgba(210, 196, 176, 0.5);
  box-shadow: 0 1px 3px rgba(12, 9, 6, 0.4);
}

.chronica-editor--world .wmm-map-marker__dot.is-org {
  background: rgba(186, 158, 122, 0.9);
  border-color: rgba(225, 200, 168, 0.7);
  box-shadow:
    0 0 0 3px rgba(183, 158, 121, 0.24),
    0 1px 4px rgba(12, 9, 6, 0.45);
}

.chronica-editor--world .wmm-map-marker__label {
  font-size: 0.67rem;
  font-weight: 400;
  font-family: var(--c-heading-font);
  color: rgba(225, 205, 170, 0.72);
  letter-spacing: 0.08em;
  background: rgba(20, 14, 8, 0.48);
  padding: 2px 7px;
  white-space: nowrap;
  border: 1px solid rgba(183, 158, 121, 0.18);
  pointer-events: none;
  line-height: 1.5;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.chronica-editor--world .wmm-map-marker:hover .wmm-map-marker__dot,
.chronica-editor--world .wmm-map-marker:focus-visible .wmm-map-marker__dot {
  transform: scale(1.35);
  box-shadow:
    0 0 0 5px rgba(183, 158, 121, 0.4),
    0 1px 6px rgba(12, 9, 6, 0.5);
}

.chronica-editor--world .wmm-map-marker:hover .wmm-map-marker__label,
.chronica-editor--world .wmm-map-marker:focus-visible .wmm-map-marker__label {
  color: rgba(252, 238, 210, 0.98);
  background: rgba(20, 14, 8, 0.86);
  border-color: rgba(183, 158, 121, 0.52);
}

.chronica-editor--world .wmm-map__mobile-list {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chronica-editor--world .wmm-map-mobile-btn {
  font-family: inherit;
  padding: 8px 14px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  color: #5a4d3e;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.chronica-editor--world .wmm-map-mobile-btn:hover,
.chronica-editor--world .wmm-map-mobile-btn:active {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(139, 115, 80, 0.3);
}

.chronica-editor--world .wmm-map-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chronica-editor--world .wmm-map-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 12, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.chronica-editor--world .wmm-map-modal__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: var(--c-paper);
  border: 1px solid rgba(139, 115, 80, 0.24);
  border-top: 2px solid rgba(139, 115, 80, 0.58);
  box-shadow: 0 16px 44px rgba(24, 18, 12, 0.32);
}

.chronica-editor--world .wmm-map-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  background: linear-gradient(180deg, rgba(183, 158, 121, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--c-line);
}

.chronica-editor--world .wmm-map-modal__titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.chronica-editor--world .wmm-map-modal__title {
  font-family: var(--c-heading-font);
  font-size: 1.08rem;
  font-weight: 500;
  color: #2a2218;
  letter-spacing: 0.06em;
  margin: 0;
}

.chronica-editor--world .wmm-map-modal__type {
  display: inline-block;
  font-size: 0.67rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  margin: 0;
  padding: 2px 8px;
  background: rgba(139, 115, 80, 0.08);
  border: 1px solid rgba(139, 115, 80, 0.22);
}

.chronica-editor--world .wmm-map-modal__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid rgba(139, 115, 80, 0.38);
  color: #6e6258;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chronica-editor--world .wmm-map-modal__body {
  padding: 16px 22px 22px;
}

.chronica-editor--world .wmm-map-modal__desc-paragraph {
  font-size: 0.875rem;
  color: #3a3530;
  line-height: 2;
  margin: 0 0 10px;
}

.chronica-editor--world .wmm-map-modal__desc-paragraph:last-child {
  margin-bottom: 0;
}

.chronica-editor--world .wmm-map-modal__note {
  margin-top: 14px;
}

.chronica-editor--world .wmm-map-modal__note-paragraph {
  font-size: 0.78rem;
  color: #7a7060;
  line-height: 1.85;
  padding-left: 12px;
  border-left: 2px solid rgba(139, 115, 80, 0.3);
  margin: 0;
}

.chronica-editor--world .c-divider {
  display: none;
}

.chronica-editor--world .c-divider + .c-heading {
  margin-top: 36px;
}

/* =========================================
   §10 人物ページ — キャラクターグリッド・カード
       （character.html の一覧表示エリア）
   ========================================= */
.c-char-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* 勢力と関係者など少人数セクション用 */
.c-char-grid--sub {
  grid-template-columns: repeat(3, 1fr);
  max-width: 480px;
}

/* カードボタン */
.c-char-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  box-shadow: var(--c-card-shadow);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}

.c-char-card:hover,
.c-char-card:focus-visible {
  border-color: rgba(139, 115, 80, 0.44);
  box-shadow: 0 4px 16px rgba(24, 18, 12, 0.14);
  transform: translateY(-2px);
  outline: none;
}

.c-char-card:focus-visible {
  outline: 2px solid rgba(139, 115, 80, 0.6);
  outline-offset: 2px;
}

/* 画像エリア（3:4 縦長固定比率） */
.c-char-card-img-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1e1a14;
  flex-shrink: 0;
}

.c-char-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.22s ease;
}

.c-char-card:hover .c-char-card-img {
  transform: scale(1.04);
}

/* カード下部（名前・ラベル） */
.c-char-card-foot {
  padding: 8px 9px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-char-card-label {
  display: inline-block;
  font-size: 0.58rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 115, 80, 0.28);
  padding: 1px 5px;
  align-self: flex-start;
}

.c-char-card-name {
  font-family: var(--c-heading-font);
  font-size: 0.8rem;
  font-weight: 500;
  color: #2a2218;
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin: 0;
}

/* =========================================
   §11 人物ページ — キャラクターモーダル（左右2カラム）
       左カラム: 立ち絵 (.c-char-modal-img-col)
       右カラム: 名前・プロフィール・説明文 (.c-char-modal-content)
       §12 の表情差分ギャラリーは右カラム内の最下部に配置
   ========================================= */
.c-char-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 36px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.c-char-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.c-char-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 12, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* パネル本体 */
.c-char-modal-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 980px;
  min-height: min(660px, 82vh);
  max-height: 90vh;
  overflow: hidden;
  background: var(--c-paper);
  border: 1px solid rgba(139, 115, 80, 0.24);
  border-top: 2px solid rgba(139, 115, 80, 0.58);
  box-shadow: 0 20px 52px rgba(24, 18, 12, 0.36);
  transform: translateY(20px) scale(0.93);
  opacity: 0;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.c-char-modal.is-open .c-char-modal-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 左カラム: 全身立ち絵展示面 */
.c-char-modal-img-col {
  width: 300px;
  flex-shrink: 0;
  background: transparent;
  border-right: 1px solid rgba(139, 115, 80, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.c-char-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* 右カラム: テキスト */
.c-char-modal-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.c-char-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 28px 28px 22px 28px;
  background: transparent;
  border-bottom: 1px solid var(--c-line);
  flex-shrink: 0;
}

.c-char-modal-titles {
  flex: 1;
  min-width: 0;
}

.c-char-modal-name {
  font-family: var(--c-heading-font);
  font-size: 1.12rem;
  font-weight: 500;
  color: #2a2218;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.c-char-modal-role {
  display: inline-block;
  font-size: 0.67rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  padding: 2px 10px;
  background: rgba(139, 115, 80, 0.08);
  border: 1px solid rgba(139, 115, 80, 0.22);
  margin: 0;
}

.c-char-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid rgba(139, 115, 80, 0.22);
  color: #8a7a68;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.c-char-modal-close:hover {
  background: rgba(139, 115, 80, 0.1);
  border-color: rgba(139, 115, 80, 0.4);
  color: #3e3428;
}

.c-char-modal-body {
  padding: 24px 28px 32px;
  overflow-y: auto;
  flex: 1;
}

/* プロフィールグリッド */
.c-char-modal-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-line-soft);
}

.c-char-profile-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-char-profile-key {
  font-size: 0.59rem;
  color: var(--c-brass);
  letter-spacing: 0.14em;
}

.c-char-profile-val {
  font-size: 0.845rem;
  color: #2a2218;
  font-weight: 500;
  line-height: 1.55;
}

.c-char-modal-desc {
  font-size: 0.875rem;
  color: #3a3530;
  line-height: 2.1;
  margin: 0;
}

/* =========================================
   §12 人物ページ — 表情差分ギャラリー
       モーダル右カラム内の最下部に表示される小画像列。
       サムネイルサイズ: .c-char-expression-img の width を変更。
       クリックで §13 のライトボックスを開く。
   ========================================= */
.c-char-expressions {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line-soft);
}

.c-char-expressions-label {
  font-size: 0.62rem;
  color: var(--c-brass);
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

/* 3列グリッド / max-width で巨大化を抑制 */
.c-char-expressions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 460px;
  gap: 14px;
}

.c-char-expression-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
}

.c-char-expression-item:focus-visible {
  outline: 2px solid rgba(139, 115, 80, 0.5);
  outline-offset: 2px;
}

.c-char-expression-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  transition: opacity 0.14s, transform 0.14s, border-color 0.14s, box-shadow 0.14s;
}

.c-char-expression-item:hover .c-char-expression-img {
  opacity: 0.84;
  transform: scale(1.05);
  border-color: rgba(139, 115, 80, 0.44);
  box-shadow: 0 3px 10px rgba(20, 15, 10, 0.22);
}

.c-char-expression-caption {
  font-size: 0.63rem;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.3;
}

/* =========================================
   §16 アクセシビリティ（prefers-reduced-motion）
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .c-char-modal,
  .c-modal {
    transition: opacity 0.1s ease;
  }
  .c-char-modal-inner,
  .c-modal-inner {
    transform: none !important;
    transition: opacity 0.1s ease !important;
  }
  .c-expr-lightbox-inner {
    transform: none !important;
    transition: opacity 0.1s ease !important;
  }
}

/* =========================================
   §13 人物ページ — 表情差分ライトボックス
       z-index: 300（キャラモーダル z-index: 200 より上）
       script.js の openExprLightbox() が制御する。

   【画像サイズの調整方法】
     PC での拡大サイズ :  .c-expr-lightbox-img の width を変更
                          例) width: min(460px, 86vw)
                              → 460px の部分がPC最大幅
     スマホでの最大幅  :  同 min() の第2引数 86vw を変更
                          例) min(460px, 88vw) に増やすと横いっぱいに近づく
     縦の最大制限      :  .c-expr-lightbox-img の max-height を変更
                          例) max-height: 78vh
   ========================================= */
.c-expr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px 28px;   /* 上を多めに→閉じるボタンが viewport 内に収まる */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.c-expr-lightbox.is-open {
  pointer-events: auto;
  opacity: 1;
}

.c-expr-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 5, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.c-expr-lightbox-inner {
  position: relative;        /* 閉じるボタンの absolute 基点 */
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.c-expr-lightbox.is-open .c-expr-lightbox-inner {
  transform: scale(1);
  opacity: 1;
}

.c-expr-lightbox-img {
  display: block;
  /* width で強制アップスケール — max-width では小画像が拡大されないため */
  width: min(460px, 86vw);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid rgba(183, 158, 121, 0.2);
  box-shadow: 0 20px 56px rgba(8, 6, 4, 0.62);
}

.c-expr-lightbox-caption {
  font-size: 0.7rem;
  font-family: var(--c-heading-font);
  color: rgba(218, 196, 160, 0.68);
  letter-spacing: 0.14em;
  margin: 0;
}

.c-expr-lightbox-close {
  /* 画像右上に重ねる。inner が flex-column なので img の上に配置する別要素として扱う */
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(12, 10, 7, 0.82);
  border: 1px solid rgba(183, 158, 121, 0.3);
  color: rgba(218, 196, 160, 0.85);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.c-expr-lightbox-close:hover {
  background: rgba(44, 36, 24, 0.96);
  border-color: rgba(183, 158, 121, 0.5);
  color: rgba(218, 196, 160, 1);
}

.c-expr-lightbox-close:focus-visible {
  outline: 2px solid rgba(183, 158, 121, 0.45);
  outline-offset: 2px;
}

/* =========================================
   §13b キャラクター一覧ページ
        Chronica Characters プラグインの .cc-* CSS を
        クロニカ紙面デザインに合わせる
   ========================================= */

/* カスタムプロパティ上書き: ダーク→ペーパーへ反転 */
.chronica-editor--character .cc-wrap {
  --cc-bg:         var(--c-paper);
  --cc-surface:    rgba(139, 115, 80, 0.04);
  --cc-paper:      var(--c-ink);
  --cc-paper-dim:  var(--c-muted);
  --cc-brass:      var(--c-brass);
  --cc-muted:      var(--c-muted);
  --cc-backdrop:   rgba(30, 24, 16, 0.58);
}

/* グループ見出し */
.chronica-char-group-heading {
  margin: 32px 0 12px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 5px;
}

.chronica-char-group-heading:first-of-type {
  margin-top: 4px;
}

/* 準備中テキスト */
.chronica-char-empty-note {
  color: var(--c-muted);
  font-size: 0.82rem;
  margin: 12px 0 0;
}

/* カードグリッド: 紙面幅（880-96=784px）に合わせて gap を詰める */
.chronica-editor--character .cc-char-grid {
  gap: 10px;
}

/* カード: 静かな紙面の佇まい */
.chronica-editor--character .cc-char-card {
  height: 100%;
  background: var(--c-card-bg);
  border-color: var(--c-card-border);
  box-shadow: var(--c-card-shadow);
  border-radius: 0;
}

.chronica-editor--character .cc-char-card:hover,
.chronica-editor--character .cc-char-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(24, 18, 12, 0.14);
  border-color: rgba(139, 115, 80, 0.44);
}

/* カード画像: プレースホルダーをベタ色に */
.chronica-editor--character .cc-char-card-img-wrap {
  aspect-ratio: 8 / 9;
  background: #e8e0d4;
}

.chronica-editor--character .cc-char-card-img--placeholder {
  background: #e8e0d4;
}

/* カード足元 */
.chronica-editor--character .cc-char-card-foot {
  padding: 5px 7px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chronica-editor--character .cc-char-card-label {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0;
  padding: 1px 4px;
  font-size: 0.56rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 115, 80, 0.28);
  opacity: 1;
}

.chronica-editor--character .cc-char-card-name {
  font-family: var(--c-heading-font);
  font-size: 0.79rem;
  font-weight: 500;
  color: #2a2218;
  letter-spacing: 0.06em;
  margin-top: 4px;
  min-height: calc(1em * 2.48);
  line-height: 1.24;
}

/* モーダル: 紙面風パネル */
.chronica-editor--character .cc-char-modal-inner {
  max-width: 980px;
  min-height: min(660px, 82vh);
  background: linear-gradient(180deg, var(--c-paper) 0%, #f0ece3 100%);
  border-color: rgba(139, 115, 80, 0.24);
  border-radius: 0;
  border-top: 2px solid rgba(139, 115, 80, 0.58);
  box-shadow: 0 20px 52px rgba(24, 18, 12, 0.36);
}

.chronica-editor--character .cc-char-modal-img-col {
  width: 300px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
  border-right: 1px solid rgba(139, 115, 80, 0.16);
}

.chronica-editor--character .cc-char-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.chronica-editor--character .cc-char-modal-header {
  justify-content: space-between;
  gap: 14px;
  padding: 28px 28px 22px 28px;
  background: linear-gradient(180deg, rgba(183, 158, 121, 0.08) 0%, transparent 100%);
  border-color: var(--c-line);
}

.chronica-editor--character .cc-char-modal-name {
  font-family: var(--c-heading-font);
  font-size: 1.12rem;
  font-weight: 500;
  color: #2a2218;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.chronica-editor--character .cc-char-modal-role {
  display: inline-block;
  margin: 0;
  padding: 2px 10px;
  font-size: 0.67rem;
  color: var(--c-brass);
  letter-spacing: 0.1em;
  background: rgba(139, 115, 80, 0.08);
  border: 1px solid rgba(139, 115, 80, 0.22);
  opacity: 1;
}

.chronica-editor--character .cc-char-modal-body {
  padding: 24px 28px 32px;
  gap: 0;
}

/* 閉じるボタン: 紙面調 */
.chronica-editor--character .cc-char-modal-close {
  background: none;
  border: 1px solid rgba(139, 115, 80, 0.22);
  color: #8a7a68;
  border-radius: 0;
}

.chronica-editor--character .cc-char-modal-close:hover,
.chronica-editor--character .cc-char-modal-close:focus-visible {
  background: rgba(139, 115, 80, 0.1);
  border-color: rgba(139, 115, 80, 0.4);
  color: #3e3428;
  outline-color: var(--c-brass);
}

.chronica-editor--character .cc-char-modal-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-line-soft);
}

.chronica-editor--character .cc-char-profile-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 0;
  border-bottom: 0;
}

.chronica-editor--character .cc-char-profile-key {
  font-size: 0.59rem;
  color: var(--c-brass);
  letter-spacing: 0.14em;
  opacity: 1;
}

.chronica-editor--character .cc-char-profile-val {
  font-size: 0.845rem;
  color: #2a2218;
  font-weight: 500;
  line-height: 1.55;
}

.chronica-editor--character .cc-char-modal-desc {
  margin: 0;
  font-size: 0.875rem;
  color: #3a3530;
  line-height: 2.1;
}

.chronica-editor--character .cc-char-expressions {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line-soft);
}

.chronica-editor--character .cc-char-expressions-label {
  margin: 0 0 14px;
  font-size: 0.62rem;
  color: var(--c-brass);
  letter-spacing: 0.15em;
}

.chronica-editor--character .cc-char-expressions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 460px;
  gap: 14px;
}

.chronica-editor--character .cc-expr-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.chronica-editor--character .cc-expr-item:hover,
.chronica-editor--character .cc-expr-item:focus-visible {
  border-color: transparent;
}

.chronica-editor--character .cc-expr-item-img {
  background: var(--c-card-bg);
  border: 1px solid var(--c-card-border);
  object-position: top center;
}

.chronica-editor--character .cc-expr-item:hover .cc-expr-item-img,
.chronica-editor--character .cc-expr-item:focus-visible .cc-expr-item-img {
  opacity: 0.84;
  transform: scale(1.05);
  border-color: rgba(139, 115, 80, 0.44);
  box-shadow: 0 3px 10px rgba(20, 15, 10, 0.22);
}

.chronica-editor--character .cc-expr-item-cap {
  font-size: 0.63rem;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.3;
}

.chronica-editor--character .cc-char-modal-profile + .cc-char-modal-desc {
  margin-top: 0;
}

/* SP: グリッドを 3→2 列に抑制（紙面が狭いため） */
@media (max-width: 640px) {
  .chronica-editor--character .cc-char-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* =========================================
   §14 フッター
   ========================================= */
.c-footer {
  max-width: 880px;
    margin: 0 auto;
  padding: 20px 48px 44px;
  font-size: 0.72rem;
  color: #aa9b88;
  display: flex;
  justify-content: space-between;
}

.chronica-footer {
  flex-wrap: wrap;
}

.chronica-footer::before {
  content: "";
  flex-basis: 100%;
  height: 11px;
  margin: 0 auto 8px;
  /* 短い二分割ラインと中央ひし形の重ね合わせ */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5 1L9 5 5 9 1 5z' fill='%23b79e79' fill-opacity='.5'/%3E%3C/svg%3E") center center / 9px 9px no-repeat,
    linear-gradient(var(--c-line), var(--c-line)) left 50% center / 16px 1px no-repeat,
    linear-gradient(var(--c-line), var(--c-line)) right 50% center / 16px 1px no-repeat;
}

.c-footer a {
  color: #8f8578;
}

.c-footer a:hover {
  color: #5a5248;
}

/* =========================================
   §15 レスポンシブ（640px 以下）
   ========================================= */
@media (max-width: 640px) {
  .page-template-page-chronica-top .chronica-main::after {
    width: min(42vw, 260px);
    height: min(34vh, 240px);
    opacity: 0.055;
  }

  .c-menu-toggle {
    display: flex;
  }

  .c-nav {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
  }

  .c-nav-inner {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    max-width: none;
    margin: 0;
    padding: 6px 0;
    flex-direction: column;
    gap: 0;
    background: #38332d;
    border: 1px solid rgba(183, 158, 121, 0.22);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 16px 28px rgba(20, 16, 12, 0.2);
    overflow: hidden;
  }

  .c-nav-inner.is-open {
    display: flex;
  }

  .c-nav a {
    padding: 14px 22px;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .c-nav a:last-child {
    border-bottom: none;
  }

  .c-nav a.is-current {
    border-left: none;
    box-shadow: inset 3px 0 0 rgba(165, 143, 115, 0.9);
    background: rgba(255, 255, 255, 0.04);
  }

  .c-page {
    padding: 28px 18px 40px;
  }

  .c-face-title {
    font-size: 1.5rem;
  }

  .c-face-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .c-portal-item {
    gap: 12px;
  }

  .c-portal-item.is-primary {
    padding: 16px 14px;
  }

  .c-portal-item.is-primary:hover {
    padding-left: 14px;
  }

  .c-portal-mark {
    font-size: 0.8rem;
  }

  .c-book {
    flex-direction: column;
    gap: 16px;
  }

  .c-book-cover {
    width: 100px;
  }

  .c-log-entry {
    flex-direction: column;
    gap: 2px;
  }

  .c-footer {
    flex-direction: column;
    gap: 4px;
    padding: 20px 18px 36px;
  }

  /* キャラクターグリッド — スマホは3列に */
  .c-char-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .c-char-grid--sub {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

  /* キャラクターモーダル — 縦積みカード（上下左右に余白を持たせる） */
  .c-char-modal {
    align-items: center;
    padding: 20px;                    /* 左右20px = モーダル外周の余白 */
  }

  .c-char-modal-inner {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    max-height: 86vh;                 /* 上下にも余白が残るよう抑制 */
    border-radius: 2px;               /* 角を僅かに丸めてカード感を出す */
    /* PC側で border-left/right/bottom を none にしていないため、
       ここでは明示的に親の border 設定を復元する */
    border-left: 1px solid rgba(139, 115, 80, 0.24);
    border-right: 1px solid rgba(139, 115, 80, 0.24);
    border-bottom: 1px solid rgba(139, 115, 80, 0.24);
    transform: translateY(8px) scale(0.96);  /* 中央揃えなので scale 主体に */
  }

  .c-char-modal-img-col {
    width: 100%;
    height: 240px;
    flex-shrink: 0;
    padding: 14px;
    border-right: none;
    border-bottom: 1px solid rgba(139, 115, 80, 0.14);
  }

  .c-char-modal-header {
    padding: 18px 18px 14px 18px;
  }

  .c-char-modal-body {
    padding: 16px 18px 26px;
  }

  /* 表情差分 — モバイルは幅が限られるので gap を詰めて自然な3列に */
  .c-char-expressions-grid {
    max-width: none;
    gap: 9px;
  }

  /* 地図 — スマホ補助ボタンを表示 */
  .c-map-mobile-nav {
    display: flex;
  }

  /* モーダル — 下部スライドイン */
  .c-modal {
    align-items: flex-end;
    padding: 0;
  }

  .c-modal-inner {
    max-width: 100%;
  }

  .c-modal-header {
    padding: 16px 16px 12px;
  }

  .c-modal-body {
    padding: 12px 16px 24px;
  }
}

/* ============================================================
   Chronica WordPress Phase 1
   共通シェル + the_content() 補助
   ============================================================ */
.chronica-main {
  min-height: 60vh;
}

.chronica-editor {
  padding: 36px 46px 54px;
}

.chronica-editor > *:first-child {
  margin-top: 0;
}

.chronica-editor > * + * {
  margin-top: 24px;
}

.chronica-editor p,
.chronica-editor ul,
.chronica-editor ol,
.chronica-editor blockquote,
.chronica-editor figure,
.chronica-editor .wp-block-image,
.chronica-editor .wp-block-columns,
.chronica-editor .wp-block-group,
.chronica-editor .wp-block-buttons,
.chronica-editor .wp-block-table,
.chronica-editor .wp-block-quote,
.chronica-editor .wp-block-list {
  margin-top: 24px;
}

.chronica-editor h1,
.chronica-editor h2,
.chronica-editor h3,
.chronica-editor h4 {
  color: var(--c-ink);
}

.chronica-editor h2,
.chronica-editor .wp-block-heading:is(h2) {
  margin-top: 42px;
}

.chronica-editor h3,
.chronica-editor .wp-block-heading:is(h3) {
  margin-top: 30px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.chronica-editor p,
.chronica-editor li {
  font-size: 0.94rem;
  color: var(--c-ink-soft);
}

.chronica-editor ul,
.chronica-editor ol {
  padding-left: 1.4rem;
}

.chronica-editor li + li {
  margin-top: 0.35rem;
}

.chronica-editor a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.chronica-editor blockquote,
.chronica-editor .wp-block-quote {
  padding: 18px 20px;
  border-left: 3px solid rgba(139, 115, 80, 0.55);
  background: rgba(255, 255, 255, 0.42);
  color: var(--c-ink-soft);
}

.chronica-editor .wp-block-image img,
.chronica-editor figure img {
  border: 1px solid rgba(139, 115, 80, 0.16);
}

.chronica-editor figcaption,
.chronica-editor .wp-element-caption {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--c-muted);
  text-align: left;
}

.chronica-editor .wp-block-separator {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid rgba(139, 115, 80, 0.22);
}

.chronica-editor .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}

.chronica-editor .wp-block-table td,
.chronica-editor .wp-block-table th {
  border: 1px solid rgba(139, 115, 80, 0.16);
  padding: 10px 12px;
}

.chronica-editor .wp-block-button__link {
  border-radius: 0;
}

/* chronica-visual はプロトタイプ同様 c-visual の外観を踏襲する。
   c-visual 自体が max-height: 380px + filter を持つが、
   WP のアイキャッチ出力は <img> 直書きなので念のため明示。 */
.chronica-visual img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04) brightness(0.92);
}

.chronica-portal .c-heading {
  margin-top: 0;
}

.c-nav .current-menu-item > a,
.c-nav .current_page_item > a,
.c-nav .current-menu-ancestor > a,
.c-nav .current-page-ancestor > a {
  color: #e6dccd;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 -3px 0 rgba(62, 110, 98, 1.0);
}

.c-portal-item.is-disabled {
  cursor: default;
  opacity: 0.78;
}

.c-portal-item.is-disabled:hover {
  transform: none;
  box-shadow: var(--c-card-shadow);
}

@media (max-width: 640px) {
  .chronica-editor {
    padding: 26px 22px 34px;
  }

  .chronica-editor p,
  .chronica-editor li {
    font-size: 0.9rem;
  }
}

.c-nav-inner {
    margin: 0 auto;
  list-style: none;
}

.c-nav-inner > li {
  list-style: none;
}

.c-nav-inner > li > a {
  display: block;
}


/* Chronica Phase 2 - log helpers */
.chronica-editor .c-log-table {
  display: grid;
  gap: 4px;
}

.chronica-editor .c-note {
  margin-top: 14px;
}

.chronica-editor .c-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 0;
  list-style: none;
}

.chronica-editor .c-link-list li {
  margin: 0;
}

@media (max-width: 640px) {
  .chronica-editor .c-link-list {
    display: block;
  }

  .chronica-editor .c-link-list li + li {
    margin-top: 8px;
  }
}

/* ============================================================
   Story reading surface
   Story Manager Core の意味クラスをクロニカ別館側で受ける
   ------------------------------------------------------------
   story-lead: 単体ページ本文前で短い導入文を表示するクラス
   story-note: 一覧や補助表示で短い補足を受けるクラス
   summary / lead の入力データは当面兼用し、将来は用途ごとに分ける余地を残す
   ============================================================ */
.story-entry {
  padding: 0;
}

.story-header,
.story-body,
.story-nav,
.story-series-list,
.story-episode-list {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.story-header {
  margin-bottom: 28px;
}

.story-label {
  display: inline-block;
  margin: 0 0 10px;
  padding-bottom: 6px;
  font-family: var(--c-heading-font);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--c-brass-dk);
  border-bottom: 1px solid rgba(139, 115, 80, 0.18);
}

.story-title {
  margin: 0;
  font-family: var(--c-heading-font);
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--c-ink);
}

.story-lead {
  margin: 16px 0 0;
  font-size: 0.92rem;
  line-height: 1.95;
  color: var(--c-muted);
}

.story-body {
  font-size: 1.02rem;
  line-height: 2.1;
  color: var(--c-ink);
}

.story-body p {
  margin: 0;
}

.story-body p + p {
  margin-top: 0;
}

.story-body p:not(.story-noindent):not(.story-note):not(.has-text-align-center) {
  text-indent: 1em;
}

.story-body h2,
.story-body h3 {
  margin: 3rem 0 1.25rem;
  line-height: 1.75;
  text-indent: 0;
  color: var(--c-ink);
}

.story-body h2 {
  font-size: 1.05rem;
}

.story-body h3 {
  font-size: 0.96rem;
  letter-spacing: 0.04em;
}

.story-body ul,
.story-body ol,
.story-body blockquote,
.story-body figure,
.story-body .wp-block-image,
.story-body .wp-block-quote,
.story-body .wp-block-list,
.story-body .wp-block-table,
.story-body .wp-block-buttons,
.story-body .wp-block-group {
  margin-top: 24px;
}

.story-body ul,
.story-body ol {
  padding-left: 1.4rem;
}

.story-body li {
  line-height: 1.95;
  text-indent: 0;
}

.story-body li + li {
  margin-top: 0.4rem;
}

.story-body a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.story-body ruby {
  ruby-align: center;
  ruby-position: over;
}

.story-body rt {
  font-size: 0.55em;
  line-height: 1;
  letter-spacing: 0;
}

.story-note {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--c-muted);
  text-indent: 0;
}

.story-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 115, 80, 0.18);
}

.story-nav-prev,
.story-nav-next {
  display: block;
  padding: 4px 0 8px;
  border: none;
  background: none;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--c-ink-soft);
  transition: color 0.15s;
}

/* 前話・次話ラベル */
.story-nav-prev::before,
.story-nav-next::before {
  display: block;
  font-size: 0.7rem;
  color: var(--c-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.story-nav-prev::before {
  content: "― 前話";
}

.story-nav-next::before {
  content: "次話 ―";
}

.story-nav-next {
  text-align: right;
}

.story-series-list,
.story-episode-list {
  list-style: none;
  padding: 0;
  margin-top: 0;
}

.story-series-item,
.story-episode-item {
  padding: 14px 0;
  border-top: 1px solid rgba(139, 115, 80, 0.18);
}

.story-series-item:first-child,
.story-episode-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.story-series-link,
.story-episode-link {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--c-ink);
}

.story-series-link:hover,
.story-episode-link:hover,
.story-nav-prev:hover,
.story-nav-next:hover {
  color: var(--c-brass-dk);
}

.story-episode-item .story-label {
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .story-body,
  .story-nav,
  .story-series-list,
  .story-episode-list,
  .story-header {
    max-width: none;
  }

  .story-body {
    font-size: 0.98rem;
    line-height: 2.05;
  }

  .story-body rt {
    font-size: 0.58em;
  }

  .story-title {
    font-size: 1.04rem;
  }

  .story-nav {
    flex-direction: column;
    gap: 8px;
  }

  .story-nav-next {
    text-align: left;
  }
}

/* Story Manager Core / Chronica fine-tuning
   - 短いシリーズ・各話ページで紙面下が余りすぎないよう抑える
   - シリーズ説明と各話一覧の間に軽い呼吸を入れる */
.single-story_series .c-main,
.single-story_episode .c-main {
  min-height: auto;
}

.story-series-entry .story-episode-list {
  margin-top: 34px;
}

/* Chronica reading surface alignment
   - 短いシリーズ・各話ページの min-height を確実に抑える
   - main と footer を同じ紙面の延長として見せる
   - シリーズ紹介文から各話一覧、本文から前後話導線の呼吸を少しだけ整える */
.single-story_series .c-main,
.single-story_episode .c-main,
.single-story_series .chronica-main,
.single-story_episode .chronica-main {
  min-height: auto !important;
}

.single-story_series .c-footer,
.single-story_episode .c-footer {
  margin-top: 0;
  padding-top: 18px;
  background: var(--c-paper);
  border-left: 1px solid rgba(139, 115, 80, 0.12);
  border-right: 1px solid rgba(139, 115, 80, 0.12);
}

.story-series-entry .story-body {
  margin-bottom: 10px;
}

.story-series-entry .story-episode-list {
  margin-top: 22px;
}

.single-story_episode .story-nav {
  margin-top: 32px;
  padding-top: 18px;
}

/* ============================================================
   Chronica role-tuning — top and story only
   ============================================================ */

.chronica-editor--top .c-face {
  margin-bottom: 38px;
}


.chronica-top-copy {
  max-width: 46rem;
}

.chronica-top-copy > :first-child {
  margin-top: 0;
}

.chronica-top-copy .c-heading:first-child {
  margin-top: 0;
}

.chronica-editor--story .c-divider {
  margin: 36px 0;
}

.chronica-story-stage {
  margin: 0;
}

.chronica-story-shell {
  padding-top: 0;
}

/* 物語一覧: シリーズ見出し → シリーズ概要（1行リード）を引き寄せる
   .c-heading の margin-bottom(18px) を詰め、見出し付属感を出す */
.chronica-editor--story .c-heading + .chronica-story-shell {
  margin-top: -12px;
}

.chronica-story-shell--compact {
  padding-top: 0;
}

.chronica-story-stage--primary .c-read-note {
  margin-bottom: 16px;
}

.chronica-story-group {
  margin-bottom: 22px;
}

.chronica-story-group:last-child {
  margin-bottom: 0;
}

.chronica-story-series-note {
  margin: 0 0 18px 0;
  font-size: 0.78rem;
  color: #9a8e80;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* ─── 第1話ヒーローブロック ─── */
.c-story-hero {
  margin: 0 0 24px;
}

/* padding / border-left はリンク側に持たせ、hover で直接変化させる */
.c-story-hero-link {
  display: block;
  padding: 16px 20px 18px;
  border-left: 3px solid rgba(139, 115, 80, 0.40);
  border-radius: 0 2px 2px 0;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s, background-color 0.18s;
}

.c-story-hero-link:hover {
  border-left-color: rgba(139, 115, 80, 0.75);
  background: rgba(139, 115, 80, 0.04);
}

.c-story-hero-link:hover .c-story-hero-title {
  color: var(--c-brass);
}

/* focus-visible: hover より少し明確に — アウトライン追加 */
.c-story-hero-link:focus-visible {
  outline: 2px solid rgba(139, 115, 80, 0.55);
  outline-offset: 2px;
  border-left-color: rgba(139, 115, 80, 0.80);
  background: rgba(139, 115, 80, 0.05);
}

.c-story-hero-link:focus-visible .c-story-hero-title {
  color: var(--c-brass);
}

.c-story-hero-label {
  display: block;
  font-size: 0.70rem;
  color: var(--c-brass);
  letter-spacing: 0.10em;
  margin-bottom: 3px;
}

.c-story-hero-title {
  display: block;
  font-family: var(--c-heading-font);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: 0.04em;
  line-height: 1.4;
  transition: color 0.18s;
}

.c-story-hero-lead {
  display: block;
  margin-top: 8px;
  font-size: 0.80rem;
  line-height: 1.75;
  color: var(--c-ink-soft, #5a4f42);
}

/* ─── 続きの各話 ─── */
.c-story-continuation {
  margin-top: 0;
}

.c-story-continuation-heading {
  margin: 0 0 6px;
  font-size: 0.65rem;
  color: var(--c-muted);
  letter-spacing: 0.14em;
}

.c-story-continuation .c-story-list a {
  padding: 8px 8px 8px 4px;
  font-size: 0.86rem;
  transition: color 0.15s;
}

.c-story-continuation .c-story-list a:hover {
  color: var(--c-brass);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139, 115, 80, 0.45);
}

.c-story-continuation .c-story-list a:focus-visible {
  outline: 2px solid rgba(139, 115, 80, 0.55);
  outline-offset: 2px;
  color: var(--c-brass);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139, 115, 80, 0.60);
}

.c-story-continuation .c-story-list .c-story-num {
  font-size: 0.70rem;
}

/* ─── 書籍版（補足セクション）─── */
.chronica-books-heading {
  margin: 36px 0 10px;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 4px;
}

.chronica-books-section {
  font-size: 0.82rem;
  color: var(--c-ink-soft, #5a4f42);
  line-height: 1.75;
}

.chronica-books-section p {
  margin: 6px 0;
}

.chronica-story-list,
.chronica-story-short-list {
  max-width: none;
}

.chronica-story-list .story-episode-item,
.chronica-story-short-list .story-series-item {
  margin: 0;
}

.chronica-story-list .story-episode-link,
.chronica-story-short-list .story-series-link {
  display: flex;
  align-items: baseline;
  width: 100%;
  gap: 0;
}

.chronica-story-list .story-label {
  display: inline-block;
  margin: 0 10px 0 0;
  line-height: 1.4;
}

.chronica-story-short-list .c-story-num {
  min-width: 3.6em;
}

.chronica-story-link-title {
  flex: 1;
  min-width: 0;
}

.chronica-story-list .c-story-note,
.chronica-story-short-list .c-story-note {
  margin-left: 8px;
}

.chronica-story-item-note {
  /* タイトル行の補足情報: <a> 行に寄せ、一段弱めて表示 */
  margin: 0 8px 8px 4px;
  font-size: 0.76rem;
  color: #a09488;
  line-height: 1.65;
}

.chronica-story-stage--secondary > .c-body-table + .c-body-table {
  margin-top: 14px;
}

.chronica-editor--story .c-synopsis,
.chronica-editor--story .c-body-table {
  max-width: 46rem;
}


@media (max-width: 640px) {
  .chronica-editor--top .c-face {
    margin-bottom: 30px;
  }

  .chronica-editor--story .c-divider {
    margin: 30px 0;
  }

  .chronica-story-item-note {
    margin-left: 0;
  }

  .chronica-story-list .story-episode-link,
  .chronica-story-short-list .story-series-link {
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .chronica-story-list .story-label,
  .chronica-story-short-list .c-story-num {
    width: 100%;
    margin-right: 0;
  }
}

/* ============================================================
   Chronica story page — multi-shelf structure
   ============================================================ */

.chronica-story-stage-copy {
  max-width: 46rem;
}

.chronica-story-stage-copy .c-body-table {
  max-width: 46rem;
}

.chronica-story-stage-copy + .c-body-table {
  margin-top: 14px;
}

.chronica-story-shell--empty {
  padding-top: 0;
}

.chronica-story-empty-note {
  border-top: none;
  padding-top: 0;
  color: #8c8377;
}

.chronica-story-group--long .c-story-group-title {
  margin-bottom: 0;
}

.chronica-story-group--short .c-story-group-title a,
.chronica-story-group--gaiden .c-story-group-title a {
  color: inherit;
  text-decoration: none;
}

.chronica-story-group--short .c-story-group-title a:hover,
.chronica-story-group--short .c-story-group-title a:focus-visible,
.chronica-story-group--gaiden .c-story-group-title a:hover,
.chronica-story-group--gaiden .c-story-group-title a:focus-visible {
  color: var(--c-brass);
}

.chronica-story-group--short,
.chronica-story-group--gaiden {
  margin-bottom: 18px;
}

.chronica-story-group--short:last-child,
.chronica-story-group--gaiden:last-child {
  margin-bottom: 0;
}

.chronica-story-list--minor .story-label {
  color: #9f8d76;
}

.chronica-story-list--minor .chronica-story-link-title {
  color: #4a4034;
}

.chronica-story-list--minor .story-episode-link:hover .chronica-story-link-title {
  color: #3c3020;
}

.chronica-story-list--minor .c-story-note.is-new {
  background: rgba(139, 115, 80, 0.08);
  border-color: rgba(139, 115, 80, 0.22);
  color: #6f5b42;
}

.chronica-story-short-list--single {
  max-width: none;
}

.chronica-story-short-list--single .story-series-item {
  margin: 0;
}

.chronica-story-short-list--single .story-series-link {
  display: flex;
  align-items: baseline;
  gap: 0;
  width: 100%;
}

.chronica-story-short-list--single .c-story-num {
  min-width: 3.6em;
}

@media (max-width: 640px) {
  .chronica-story-stage-copy + .c-body-table {
    margin-top: 12px;
  }

  .chronica-story-short-list--single .story-series-link {
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .chronica-story-short-list--single .c-story-num {
    width: 100%;
    margin-right: 0;
  }
}

/* ============================================================
   Chronica reading surface — story single pages
   - 背景は Chronica 共通のものをそのまま使う（body/c-main の override なし）
   - 読書面の min-height を抑え、紙面下の余白を最小化
   - 前後話ナビは読後導線として静かに見せる（カードUIにしない）
   ============================================================ */

.single-story_series .c-main,
.single-story_episode .c-main {
  margin-bottom: 0;
}

.single-story_series .story-entry,
.single-story_episode .story-entry {
  padding: 20px 44px 4px;
}

.single-story_series .story-header,
.single-story_episode .story-header {
  margin-bottom: 18px;
}

.single-story_series .story-lead {
  margin-top: 4px;
}

.single-story_episode .story-lead {
  display: none;
}

.single-story_series .story-body,
.single-story_episode .story-body {
  padding-bottom: 0;
}

.single-story_series .story-body > *:last-child,
.single-story_episode .story-body > *:last-child {
  margin-bottom: 0;
}

.single-story_series .story-note,
.single-story_episode .story-note {
  margin-top: 10px;
}

/* 各話リード文はタイトル行に寄せる（story-note の 10px を打ち消す） */
.single-story_series .chronica-story-item-note {
  margin-top: 0;
}

/* 前後話ナビ — 読後導線 */
.single-story_series .story-nav,
.single-story_episode .story-nav {
  margin-top: 22px;
  padding-top: 14px;
}

.single-story_series .story-nav-prev,
.single-story_series .story-nav-next,
.single-story_episode .story-nav-prev,
.single-story_episode .story-nav-next {
  flex: 1 1 0;
  min-width: min(18rem, 100%);
}

.single-story_series .story-nav:has(.story-nav-next):not(:has(.story-nav-prev)),
.single-story_episode .story-nav:has(.story-nav-next):not(:has(.story-nav-prev)) {
  justify-content: flex-end;
}

.single-story_series .story-nav:has(.story-nav-prev):not(:has(.story-nav-next)),
.single-story_episode .story-nav:has(.story-nav-prev):not(:has(.story-nav-next)) {
  justify-content: flex-start;
}

.single-story_series .story-nav:has(.story-nav-next):not(:has(.story-nav-prev)) .story-nav-next,
.single-story_episode .story-nav:has(.story-nav-next):not(:has(.story-nav-prev)) .story-nav-next,
.single-story_series .story-nav:has(.story-nav-prev):not(:has(.story-nav-next)) .story-nav-prev,
.single-story_episode .story-nav:has(.story-nav-prev):not(:has(.story-nav-next)) .story-nav-prev {
  flex: 0 1 18rem;
}

.chronica-read-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  max-width: 42rem;
  margin: 36px auto 0;
  padding: 16px 0 16px;
  border-top: 1px solid rgba(139, 115, 80, 0.12);
  text-align: center;
}

.chronica-read-nav::before,
.chronica-read-nav::after {
  content: none;
}

.chronica-read-nav__link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--c-ink-soft);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.chronica-read-nav__link:hover,
.chronica-read-nav__link:focus-visible {
  color: var(--c-brass-dk);
}

.chronica-read-nav__link--home {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid rgba(139, 115, 80, 0.22);
  font-size: 0.76rem;
  color: #999;
}

.chronica-read-nav__link--home:hover,
.chronica-read-nav__link--home:focus-visible {
  color: #7f7466;
}

/* フッター */
.single-story_series .c-footer,
.single-story_episode .c-footer {
  margin-top: 0;
  padding-top: 10px;
  padding-bottom: 22px;
  border-top: 0;
  justify-content: center;
  text-align: center;
}

@media (max-width: 640px) {
  .single-story_series .story-entry,
  .single-story_episode .story-entry {
    padding: 18px 20px 2px;
  }

  .single-story_series .story-nav,
  .single-story_episode .story-nav {
    margin-top: 18px;
    padding-top: 12px;
  }

  .single-story_series .story-nav-prev,
  .single-story_series .story-nav-next,
  .single-story_episode .story-nav-prev,
  .single-story_episode .story-nav-next {
    flex-basis: 100%;
    min-width: 100%;
  }

  .chronica-read-nav {
    margin-top: 32px;
    gap: 6px 14px;
  }

  .chronica-read-nav__link--home {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

/* ============================================================
   Story series page — episode list alignment
   story-header / story-body が max-width: 42rem で中央揃えされるため
   各話一覧 (.c-body-table) も同じ幅に揃えてレイアウトの統一感を出す。
   ============================================================ */
/* 各話タイトルとリード文を近づける */
.story-series-entry .c-story-list a {
  padding-bottom: 2px;
}

.story-series-entry .c-body-table {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .story-series-entry .c-body-table {
    max-width: none;
  }
}

/* ============================================================
   物語セクション専用サイドバー (story-sidebar)
   モバイル: 全画面オーバーレイ（is-open で表示）
   PC(≥1200px): sticky 左カラム
   ============================================================ */

/* ── モバイルベース: 非表示の全画面オーバーレイ ── */
.story-sidebar {
  position: fixed;
  inset: 0;
  z-index: 150;
  padding: 0;
  overflow: visible;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.22s;
}

.story-sidebar.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

.story-sidebar__panel {
  position: relative;
  width: 100%;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  background: var(--c-paper);
  padding: 56px 32px 40px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}

.story-sidebar.is-open .story-sidebar__panel {
  transform: none;
}

/* ── SP 目次バー（本文上部に静かに配置） ── */
.story-sidebar-bar {
  max-width: 880px;
    margin: 0 auto;
  padding: 0 48px;
}

.story-sidebar-toggle {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(139, 115, 80, 0.30);
  padding: 10px 0;
  font-family: inherit;
  font-size: 0.70rem;
  color: var(--c-muted);
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.story-sidebar-toggle:hover,
.story-sidebar-toggle:focus-visible {
  color: var(--c-brass);
  border-color: rgba(139, 115, 80, 0.55);
  outline: none;
}

/* ── 閉じるボタン（オーバーレイ内） ── */
.story-sidebar-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--c-muted);
  cursor: pointer;
  padding: 6px 10px;
  font-family: inherit;
  line-height: 1;
  transition: color 0.15s;
}

.story-sidebar-close:hover,
.story-sidebar-close:focus-visible {
  color: var(--c-ink);
  outline: none;
}

/* ── シリーズ見出し ── */
.story-sidebar-heading {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--c-ink-soft, #5a4f42);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 3px double var(--c-line);
  text-decoration: none;
  transition: color 0.15s;
}

a.story-sidebar-heading:hover,
a.story-sidebar-heading:focus-visible {
  color: var(--c-brass);
  outline: none;
}

/* ── 話一覧 ── */
.story-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-sidebar-list li {
  margin: 0;
}

.story-sidebar-group + .story-sidebar-group {
  margin-top: 18px;
  padding-top: 14px;
}

.story-sidebar-group-title {
  margin: 0 0 8px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--c-muted);
}

/* ── 各話リンク / 現在話スパン ── */
.story-sidebar-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.80rem;
  color: var(--c-ink-soft, #5a4f42);
  text-decoration: none;
  border-bottom: 1px solid rgba(185, 172, 155, 0.28);
  transition: color 0.15s;
  line-height: 1.45;
}

a.story-sidebar-link:hover,
a.story-sidebar-link:focus-visible {
  color: var(--c-brass);
  outline: none;
}

.story-sidebar-link.is-current {
  color: var(--c-ink);
  font-weight: 500;
  cursor: default;
  background: rgba(62, 110, 98, 0.06);
  border-left: 2px solid var(--c-verdigris);
  padding-left: 10px;
  padding-right: 14px;
  margin-left: -10px;
}

/* ── 話番号 ── */
.story-sidebar-num {
  flex-shrink: 0;
  font-size: 0.64rem;
  color: var(--c-muted);
  min-width: 2.0em;
  letter-spacing: 0.04em;
}

.story-sidebar-link.is-current .story-sidebar-num {
  color: var(--c-verdigris);
}

.page-template-page-chronica-story .story-sidebar-group:first-of-type .story-sidebar-link {
  border-bottom: 0;
}

.page-template-page-chronica-story .story-sidebar-group + .story-sidebar-group {
  margin-top: 14px;
  padding-top: 10px;
}

.page-template-page-chronica-story .story-sidebar-group-title {
  margin-bottom: 6px;
}

.page-template-page-chronica-story .story-sidebar-group:last-of-type .story-sidebar-link {
  padding-top: 5px;
  padding-bottom: 5px;
  padding-right: 12px;
}

/* ── タイトル（ラップあり） ── */
.story-sidebar-title {
  flex: 1;
  min-width: 0;
}

/* ── NEW バッジ ── */
.story-sidebar-new {
  flex-shrink: 0;
  font-size: 0.55rem;
  color: #803820;
  border: 1px solid rgba(138, 60, 30, 0.32);
  background: rgba(138, 60, 30, 0.1);
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}

/* ── スクロールロック ── */
body.story-sidebar-open {
  overflow: hidden;
}

/* ── PC (≥1200px): sticky 左カラム ── */
@media (min-width: 1200px) {

  /* レイアウトラッパー */
  .story-section-layout.has-sidebar {
    display: flex;
    align-items: flex-start;
    max-width: 1120px;
    margin-top: 18px;
    margin-right: auto;
    margin-left: auto;
    background: transparent;
  }

  /* c-main: flex 内では margin: auto を無効化し、左に呼吸の余白 */
  .story-section-layout.has-sidebar > .c-main {
    flex: 1;
    min-width: 0;
    margin-left: 28px;
    margin-right: 0;
    max-width: 880px;
    background: var(--c-paper);
  }

  /* 目次バー（SP 専用）を隠す */
  .story-sidebar-bar {
    display: none;
  }

  /* サイドバー: overlay shell → layout shell */
  .story-sidebar {
    position: relative;
    inset: auto;
    z-index: auto;
    width: 220px;
    flex-shrink: 0;
    padding: 0;
    overflow: visible;
    pointer-events: auto;
    visibility: visible;
    transition: none;
    order: -1;
  }

  .story-sidebar__panel {
    position: sticky;
    top: 108px;
    max-height: calc(100vh - 128px);
    min-height: 0;
    padding: 12px 16px 16px;
    overflow-y: auto;
    transform: none;
    background: rgba(246, 242, 234, 0.78);
    border-right: 1px solid var(--c-line);
  }

  /* 閉じるボタンは PC 不要 */
  .story-sidebar-close {
    display: none;
  }
}

@media (min-width: 1200px) {
  .story-section-layout.has-sidebar + .c-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 48px 44px calc(220px + 28px + 48px);
    background: transparent;
    border-left: 0;
    border-right: 0;
  }
}

@media (min-width: 1200px) {
  .story-section-layout.has-sidebar > .c-main {
    padding-bottom: 28px;
  }
}

@media (min-width: 1200px) {
  .chronica-body .story-section-layout.has-sidebar {
    margin-top: 18px;
    margin-right: auto;
    margin-left: auto;
  }

  .chronica-body .story-sidebar-bar + .story-section-layout.has-sidebar {
    margin-top: 18px;
  }
}

/* ==========================================
   Chronica vertical rhythm
   - ページごとの場当たり margin を減らし、同じ紙面の呼吸に揃える
   ========================================== */
:root {
  --chronica-space-section: 36px;
  --chronica-space-block: 24px;
  --chronica-space-tight: 16px;
}

.c-divider {
  margin: var(--chronica-space-section) 0;
}

.chronica-editor--top .c-face {
  margin-bottom: 30px;
}

.chronica-editor--top .c-face-lead {
  margin-bottom: 22px;
}

.chronica-editor--top .c-divider {
  margin: 34px 0 26px;
}

.chronica-top-copy {
  margin-top: 0;
}

.chronica-editor--story .c-divider {
  margin: 34px 0;
}

.chronica-editor--story .c-heading + .chronica-story-shell {
  margin-top: -8px;
}

.chronica-editor--story .chronica-story-stage-copy + .c-heading {
  margin-top: 30px;
}

.chronica-story-stage-copy + .c-body-table {
  margin-top: 18px;
}

.c-story-hero {
  margin-bottom: 22px;
}

.c-story-continuation {
  margin-top: 22px;
}

.single-story_series .story-header,
.single-story_episode .story-header {
  margin-bottom: 20px;
}

.story-series-entry .story-body {
  margin-bottom: 14px;
}

.story-series-entry .story-episode-list {
  margin-top: 20px;
}

.single-story_episode .story-nav {
  margin-top: 26px;
  padding-top: 16px;
}

.chronica-char-group-heading {
  margin: 34px 0 14px;
}

.chronica-editor--world .c-map-section {
  margin-bottom: 30px;
}

.chronica-world-intro {
  margin-bottom: 34px;
}

.chronica-editor--world .c-body-table + .c-heading,
.chronica-editor--log .c-body-table + .c-heading {
  margin-top: var(--chronica-space-section);
}

.chronica-editor--world .c-map-section + .c-heading {
  margin-top: 30px;
}

.chronica-editor--world .c-body-table .c-note {
  margin-top: 20px;
}

/* ── SP (≤640px): 目次バーのパディング調整 ── */
@media (max-width: 640px) {
  .story-sidebar-bar {
    padding: 0 20px;
  }

  .story-sidebar-bar + .story-section-layout {
    margin-top: 0;
  }
}

.chronica-editor--story .chronica-story-stage-copy,
.chronica-editor--story .chronica-story-shell,
.story-series-entry .c-body-table {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.chronica-editor--story .chronica-story-pagehead {
  max-width: 44rem;
  margin: 0 auto 24px;
  padding-top: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(141, 117, 84, 0.14);
}

.chronica-story-pagehead__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: rgba(109, 86, 55, 0.72);
}

.chronica-story-pagehead__title {
  margin: 8px 0 0;
  font-family: var(--c-heading-font);
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #2a2218;
}

.chronica-story-pagehead__lead {
  margin-top: 12px;
  max-width: 44em;
  line-height: 1.9;
  color: var(--c-muted);
}

.chronica-editor--story .chronica-story-stage-copy + .c-heading {
  margin-top: 28px;
}

.chronica-editor--story .chronica-story-series-note {
  margin-bottom: 14px;
  line-height: 1.8;
}

.chronica-editor--short .chronica-story-stage--secondary {
  display: grid;
  gap: 18px;
}

.chronica-editor--short .chronica-story-group--short,
.chronica-editor--short .chronica-story-group--gaiden {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 115, 80, 0.18);
}

.chronica-editor--short .chronica-story-group--short:first-child,
.chronica-editor--short .chronica-story-group--gaiden:first-child {
  padding-top: 0;
  border-top: 0;
}

.chronica-editor--short .c-story-group-title {
  padding-bottom: 10px;
}

.chronica-editor--short .c-story-group-title .story-series-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.chronica-editor--short .c-story-group-title .c-story-num {
  min-width: 2.8em;
  margin-right: 0;
}

.chronica-editor--short .chronica-story-series-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.78;
}

.chronica-editor--short .chronica-story-item-note {
  margin: 6px 0 0;
  font-size: 0.74rem;
  line-height: 1.65;
  color: #8c8276;
}

.chronica-editor--short .chronica-books-heading {
  margin-top: 34px;
}

.single-story_series .story-entry,
.single-story_episode .story-entry {
  padding-bottom: 2px;
}

.single-story_series .story-nav,
.single-story_episode .story-nav {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .chronica-editor--story .chronica-story-pagehead {
    margin-bottom: 20px;
  }

  .chronica-episode-context {
    padding: 0 20px 12px;
  }

  .chronica-episode-context__lead {
    display: block;
  }
}

@media (min-width: 1200px) {
  .story-section-layout.has-sidebar {
    --chronica-story-sidebar-width: 228px;
    --chronica-story-sidebar-gap: 28px;
    max-width: 1112px;
    margin-top: 16px;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    align-items: flex-start;
    gap: var(--chronica-story-sidebar-gap);
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .story-section-layout.has-sidebar > .c-main {
    min-width: 0;
    margin-left: 0;
    max-width: none;
    border: 1px solid rgba(139, 115, 80, 0.12);
    box-shadow: 0 24px 64px rgba(39, 29, 18, 0.1);
    background: var(--c-paper);
    padding-bottom: 0;
  }

  .story-section-layout.has-sidebar > .c-main .c-page {
    padding: 38px 46px 40px;
  }

  .story-sidebar {
    width: var(--chronica-story-sidebar-width);
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border-right: 0;
  }

  .story-sidebar__panel {
    width: 100%;
    min-height: 0;
    padding: 20px 18px 18px;
    background: rgba(235, 227, 215, 0.72);
    border-right: 1px solid rgba(139, 115, 80, 0.16);
    border-radius: 0 16px 16px 0;
    box-shadow: 0 10px 24px rgba(39, 29, 18, 0.04);
  }

  .story-sidebar-heading {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .story-sidebar-group + .story-sidebar-group {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dotted rgba(139, 115, 80, 0.12);
  }

  .story-section-layout.has-sidebar + .c-footer {
    max-width: 1112px;
    margin: 0 auto 28px;
    padding: 12px 46px 20px calc(var(--chronica-story-sidebar-width) + var(--chronica-story-sidebar-gap) + 46px);
    position: relative;
    isolation: isolate;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .story-section-layout.has-sidebar + .c-footer::after {
    content: "";
    position: absolute;
    inset: 0 0 0 calc(var(--chronica-story-sidebar-width) + var(--chronica-story-sidebar-gap));
    z-index: -1;
    background: rgba(244, 240, 232, 0.96);
    border: 1px solid rgba(139, 115, 80, 0.12);
    border-top: 0;
    box-shadow: 0 14px 34px rgba(39, 29, 18, 0.05);
  }

  .story-section-layout.has-sidebar + .c-footer p + p {
    margin-top: 4px;
  }

  .story-section-layout.has-sidebar + .c-footer p {
    font-size: 0.76rem;
    color: #7f7466;
  }

  .story-sidebar-bar + .story-section-layout.has-sidebar {
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .chronica-editor--short .chronica-story-stage--secondary {
    gap: 14px;
  }

  .chronica-editor--short .c-story-group-title .story-series-link {
    flex-wrap: wrap;
    gap: 6px 0;
  }

  .chronica-editor--short .c-story-group-title .c-story-num {
    width: 100%;
  }
}
