﻿/* =============================================
   水滸伝 読破ガイド — カスタムCSS
   色はすべて CSS変数 (--ch-*, --PRIMARY-color 等) で指定。
   ダーク/ライト切替は theme-suikoden*.css が担う。
   ============================================= */

/* ---------- フォント ---------- */
/*
  Noto Serif JP : スクリーン向け明朝（Shippori Mincho はプリント向けで細すぎる）
  Noto Sans JP  : ゴシック
*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500&display=swap');

/*
  --font-serif  : 本文・見出し（JS の字体切替で上書きされる）
  --font-sans   : UI・ラベル
  --font-size-base : 基準サイズ（JS で上書き可）
*/
:root {
  --font-serif:     'Noto Serif JP', 'Yu Mincho', 'YuMincho', serif;
  --font-sans:      'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  --font-size-base: 1rem;
  --line-height:    1.9;
}

/* フォントレンダリング向上 */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 本文・見出しにセリフ体 */
body,
.default p,
.default li {
  font-family: var(--font-serif);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: var(--line-height);
  letter-spacing: 0.015em;
}

h1, h2, h3, h4, h5, h6,
.default h1, .default h2, .default h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ページタイトル h1 — テーマデフォルト(3.25rem)を縮小 */
h1 {
  font-size: 1.8rem !important;
  text-transform: none !important;
}

/* サイドバー・UI はサンセリフ */
#sidebar,
.topbar,
#reading-ui-bar,
.reading-nav,
button,
.btn-mark-read,
.btn-next-section,
.btn-read-and-next {
  font-family: var(--font-sans);
}

/* ---------- コンテンツエリア ---------- */
.default {
  max-width: 760px;
  padding: 0.5rem 0;
}

/* h2 セクションヘッダー — 金色の左ボーダー */
.default h2 {
  font-size: calc(var(--font-size-base) * 1.15);
  color: var(--PRIMARY-color);
  border-left: 3px solid var(--PRIMARY-color);
  padding-left: 0.75rem;
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* h3 — 小見出し */
.default h3 {
  font-size: var(--font-size-base);
  color: var(--MAIN-TEXT-color);
  border-bottom: 1px solid rgb(var(--ch-border) / 80%);
  padding-bottom: 0.3rem;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

/* 区切り線 */
.default hr {
  border: none;
  border-top: 1px solid rgb(var(--ch-border) / 80%);
  margin: 1.8rem 0;
}

/* ---------- テーブル ---------- */
.default table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: calc(var(--font-size-base) * 0.9);
  font-family: inherit;  /* 字体切替（明朝/ゴシック）に追従 */
  table-layout: auto;
}
.default table th {
  background: rgb(var(--ch-gold) / 12%);
  color: rgb(var(--ch-text-warm) / 90%);
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid rgb(var(--ch-border));
  text-align: left;
  white-space: nowrap;
  font-size: inherit; /* --font-size-base 連動のため明示継承 */
}
.default table td {
  padding: 8px 14px;
  border: 1px solid rgb(var(--ch-border));
  color: rgb(var(--ch-text-warm) / 90%);
  vertical-align: top;
  line-height: 1.7;
  font-size: inherit; /* --font-size-base 連動のため明示継承 */
}
/* 1列目・2列目は内容幅に収める（折り返し禁止）*/
.default table td:nth-child(1),
.default table td:nth-child(2),
.default table th:nth-child(1),
.default table th:nth-child(2) {
  width: 1%;
  white-space: nowrap;
}
.default table tr:hover td {
  background: rgb(var(--ch-gold) / 4%);
}

/* ---------- リスト ---------- */
.default ul li {
  margin-bottom: 0.35rem;
}
.default strong {
  color: var(--MAIN-TITLES-TEXT-color);
  font-weight: 600;
}

/* ---------- ホバーポップアップ ---------- */
.suikoden-popup {
  position: absolute;
  z-index: 9999;
  max-width: 300px;
  min-width: 180px;
  /* フォールバック値付き — テーマCSS未ロードでも表示される */
  background: rgba(22, 18, 12, 0.97);
  background: rgb(var(--ch-ink-2, 22 18 12) / 97%);
  border: 1px solid rgba(194, 154, 72, 0.5);
  border: 1px solid rgb(var(--ch-gold, 194 154 72) / 50%);
  border-radius: 6px;
  padding: 10px 14px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 40%);
  font-family: var(--font-sans);
  font-size: calc(var(--font-size-base) * 0.84);
  line-height: 1.65;
  pointer-events: auto;
}

.popup-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgb(var(--ch-border));
}
.popup-type    { font-size: 1.07em; opacity: 0.7; }
.popup-name    { font-size: 1.13em; font-weight: 600; color: rgba(194,154,72,1); color: var(--PRIMARY-color); font-family: var(--font-serif); }
.popup-reading { font-size: 0.93em; color: rgba(140,128,110,1); color: rgb(var(--ch-text-dimmer, 140 128 110)); }
.popup-alias   {
  font-size: 0.89em;
  color: var(--SECONDARY-color);
  padding: 1px 5px;
  border: 1px solid rgb(var(--ch-blue-steel) / 30%);
  border-radius: 3px;
}
.popup-body {
  color: rgba(200, 188, 170, 0.95);
  color: rgb(var(--ch-text-warm, 222 210 192) / 95%);
  font-size: 0.99em;
}

/* ポップアップOFF時 */
body.popup-disabled .tooltip-trigger {
  cursor: text;
  border-bottom: none !important;
}

/* ---------- ツールチップトリガー ---------- */
.tooltip-trigger {
  border-bottom: 1px dotted rgb(var(--ch-gold) / 50%);
  cursor: help;
}
.tooltip-trigger:hover {
  background: rgb(var(--ch-gold) / 10%);
  border-radius: 2px;
}
.tooltip-location { border-bottom-color: rgb(var(--ch-green) / 55%); }
.tooltip-term     { border-bottom-color: rgb(var(--ch-blue-steel) / 55%); }

/* ---------- 読書コントロールバー（トップバー内・右詰） ---------- */
#reading-ui-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  color: var(--INTERNAL-TOPBAR-TEXT-color);
  white-space: nowrap;
  margin-right: 4px;
}

/* 読書位置表示・ポップアップトグル共通 */
#reading-pos-display,
#popup-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* 読書位置表示 */
#reading-pos-display {
  border: 1px solid rgb(var(--ch-gold) / 35%);
  color: var(--INTERNAL-TOPBAR-TEXT-color);
  transition: background 0.15s;
  max-width: 15em;
  overflow: hidden;
  text-overflow: ellipsis;
}
#reading-pos-display:hover { background: rgb(var(--ch-gold) / 12%); }

/* ポップアップトグル */
#popup-toggle {
  border: 1px solid rgb(var(--ch-blue-steel) / 30%);
  background: transparent;
  color: var(--INTERNAL-TOPBAR-TEXT-color);
  transition: background 0.15s;
}
#popup-toggle:hover     { background: rgb(var(--ch-blue-steel) / 10%); }
#popup-toggle.popup-off { opacity: 0.5; }

/* ラベル付きドロップダウングループ（テーマ・字体・サイズ） */
.ctrl-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgb(var(--ch-border) / 55%);
  border-radius: 4px;
  padding: 2px 0 2px 7px;
  gap: 1px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ctrl-group:hover,
.ctrl-group:focus-within {
  border-color: rgb(var(--ch-gold) / 55%);
}

/* ラベル文字（「テーマ：」「字体：」「サイズ：」） */
.ctrl-label {
  font-size: 0.70rem;
  font-family: var(--font-sans);
  color: rgb(var(--ch-text-dimmer));
  user-select: none;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}

/* セレクト本体：height指定なし・auto で自然な高さ */
.ctrl-group select {
  background: transparent;
  border: none;
  color: var(--INTERNAL-TOPBAR-TEXT-color);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 1px 2px 1px 1px;
  margin: 0;
  cursor: pointer;
  outline: none;
  line-height: 1.4;
}
.ctrl-group select:focus { outline: none; }

/* ドロップダウンの option 要素（OS依存、背景だけ指定） */
.ctrl-group select option {
  background: var(--MAIN-BG-color);
  color: var(--MAIN-TEXT-color);
}

/* ---------- 読書位置 手動セレクター モーダル ---------- */
#pos-selector-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 65%);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
#pos-selector-overlay.active {
  display: flex;
}

#pos-selector-modal {
  background: rgb(var(--ch-ink-2) / 98%);
  border: 1px solid rgb(var(--ch-gold) / 45%);
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  min-width: 260px;
  max-width: 360px;
  width: 90vw;
  box-shadow: 0 14px 48px rgb(0 0 0 / 50%);
  font-family: var(--font-sans);
}

.pos-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--PRIMARY-color);
  margin-bottom: 0.35rem;
}

.pos-modal-note {
  font-size: 0.75rem;
  color: rgb(var(--ch-text-dimmer));
  margin-bottom: 1.3rem;
}

.pos-modal-selects {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.3rem;
}

.pos-modal-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: rgb(var(--ch-text-warm) / 90%);
}

.pos-sel-label {
  min-width: 1.2em;
}

.pos-modal-row input[type="number"] {
  background: rgb(var(--ch-ink-3));
  border: 1px solid rgb(var(--ch-border));
  border-radius: 4px;
  color: rgb(var(--ch-text-warm) / 90%);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 3px 8px;
  width: 4.5rem;
  text-align: center;
}
.pos-modal-row input[type="number"]:focus {
  outline: none;
  border-color: rgb(var(--ch-gold) / 55%);
}

#pos-modal-jump {
  width: 100%;
  padding: 7px 0;
  background: rgb(var(--ch-gold) / 10%);
  border: 1px solid rgb(var(--ch-gold) / 35%);
  border-radius: 5px;
  color: var(--PRIMARY-color);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.12s;
}
#pos-modal-jump:hover { background: rgb(var(--ch-gold) / 22%); }
#pos-modal-jump:disabled {
  opacity: 0.35;
  cursor: default;
}

.pos-modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 0.85rem;
}

#pos-modal-cancel {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgb(var(--ch-border));
  border-radius: 4px;
  color: rgb(var(--ch-text-dim));
  font-family: var(--font-sans);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s;
}
#pos-modal-cancel:hover { background: rgb(var(--ch-border) / 30%); }

#pos-modal-apply {
  padding: 6px 18px;
  background: rgb(var(--ch-gold) / 15%);
  border: 1px solid rgb(var(--ch-gold) / 55%);
  border-radius: 4px;
  color: var(--PRIMARY-color);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
#pos-modal-apply:hover { background: rgb(var(--ch-gold) / 28%); }

.pos-modal-footer {
  text-align: center;
  padding-top: 0.6rem;
  border-top: 1px solid rgb(var(--ch-border) / 60%);
}

#pos-modal-reset {
  background: transparent;
  border: none;
  color: rgb(var(--ch-text-dimmer));
  font-family: var(--font-sans);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 0;
  transition: color 0.12s;
}
#pos-modal-reset:hover { color: rgb(var(--ch-red-reset)); }

/* ---------- 節ナビゲーション（ページ末尾） ---------- */
.reading-nav {
  margin-top: 3rem;
  padding: 1.2rem 0 0.5rem;
  border-top: 1px solid rgb(var(--ch-border) / 80%);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
}

.btn-mark-read {
  padding: 7px 15px;
  background: transparent;
  border: 1px solid rgb(var(--ch-green-btn) / 45%);
  border-radius: 5px;
  color: rgb(var(--ch-green));
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.btn-mark-read:hover { background: rgb(var(--ch-green-btn) / 10%); }
.btn-mark-read.already-read {
  color: rgb(var(--ch-text-dimmer));
  border-color: rgb(var(--ch-border) / 90%);
  cursor: default;
}

.btn-next-section {
  padding: 7px 15px;
  background: transparent;
  border: 1px solid rgb(var(--ch-blue-steel) / 45%);
  border-radius: 5px;
  color: var(--SECONDARY-color);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.btn-next-section:hover { background: rgb(var(--ch-blue-steel) / 10%); }

.btn-read-and-next {
  padding: 7px 18px;
  background: transparent;
  border: 1px solid rgb(var(--ch-gold) / 50%);
  border-radius: 5px;
  color: var(--PRIMARY-color);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-read-and-next:hover { background: rgb(var(--ch-gold) / 10%); }

.reading-nav-note {
  margin: 0.8rem 0 0;
  font-size: 0.78em;
  color: rgb(var(--ch-text) / 55%);
  font-style: italic;
  line-height: 1.5;
}

/* ---------- サイドバー 登場人物フィルタ（フラッシュ防止） ---------- */
/*
  個別人物ページ li をデフォルト非表示にし、JS が読書位置に合わせて
  display:'block' で表示させる。グループヘッダー（index.html直下）は除外。
*/
.R-sidebarmenu li[data-nav-id^="/characters/ryozanpaku/"]:not([data-nav-id="/characters/ryozanpaku/index.html"]),
.R-sidebarmenu li[data-nav-id^="/characters/sou/"]:not([data-nav-id="/characters/sou/index.html"]),
.R-sidebarmenu li[data-nav-id^="/characters/sonota/"]:not([data-nav-id="/characters/sonota/index.html"]) {
  display: none;
}

/* ---------- R.I.P ページ ---------- */
.rip-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.rip-card {
  display: block;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--BORDER-color, #555);
  border-left: 4px solid #888;
  border-radius: 4px;
  text-decoration: none;
  background: rgba(0,0,0,0.15);
  transition: border-left-color 0.2s;
}
.rip-card:hover {
  border-left-color: #bbb;
}
.rip-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 0.3em;
}
.rip-card-number {
  font-size: 0.78em;
  font-family: monospace;
  opacity: 0.55;
  margin-right: 0.4em;
}
.rip-card-name {
  font-weight: 600;
  font-size: 1.05em;
  color: var(--MAIN-TEXT-color, #ccc);
}
.rip-card-reading {
  font-size: 0.85em;
  opacity: 0.7;
}
.rip-card-cause {
  font-size: 0.9em;
  opacity: 0.85;
  margin-bottom: 0.25em;
}
.rip-card-section {
  font-size: 0.8em;
  opacity: 0.6;
}
.rip-notice {
  padding: 1rem;
  border: 1px dashed var(--BORDER-color, #555);
  border-radius: 4px;
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 1rem;
}

/* ---------- R.I.P 詳細ページ ---------- */
.rip-detail {
  margin-top: 1rem;
}
.rip-detail-header {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 1rem;
}
.rip-detail-number {
  font-size: 0.85em;
  font-family: monospace;
  opacity: 0.5;
  margin: 0 0 0.2rem;
}
.rip-detail-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--MAIN-TEXT-color, #ccc);
}
.rip-detail-reading {
  font-size: 0.9em;
  opacity: 0.7;
}
.rip-detail-body {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 0.5em 1em;
}
.rip-detail-body dt {
  font-weight: 600;
  opacity: 0.7;
}
.rip-detail-spoiler {
  padding: 1rem;
  border: 1px dashed #888;
  border-radius: 4px;
}

/* ---------- 地名・拠点 詳細ページ ---------- */
.loc-detail-loading {
  opacity: 0.6;
}
.loc-detail-header {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 1rem;
}
.loc-detail-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--MAIN-TEXT-color, #ccc);
}
.loc-detail-reading {
  font-size: 0.9em;
  opacity: 0.7;
}
.loc-detail-body {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 0.5em 1em;
  margin: 1rem 0;
}
.loc-detail-body dt {
  font-weight: 600;
  opacity: 0.7;
}
.loc-detail-body dd {
  margin: 0;
}
.loc-detail-spoiler {
  padding: 1rem;
  border: 1px dashed #888;
  border-radius: 4px;
}
.loc-spoiler-msg {
  opacity: 0.8;
  margin: 0;
}
.loc-map-link {
  margin-top: 1.2rem;
}
.loc-detail-desc {
  margin: 0.6rem 0 1rem;
  line-height: 1.8;
}
.loc-mini-map {
  height: 600px;
  margin: 1rem 0;
  border-radius: 4px;
  overflow: hidden;
}

/* ---------- サイドバー しおりアイコン ---------- */
.sidebar-bookmark-icon {
  margin-left: 0.4em;
  font-size: 0.85em;
  opacity: 0.85;
  pointer-events: none;
  vertical-align: middle;
  line-height: 1;
}

/* ---------- 巻・章 自動ナビゲーション ---------- */
.section-nav-container {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(var(--ch-border) / 80%);
  font-family: var(--font-sans);
}

.section-nav-heading {
  font-size: 0.82em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--ch-text-dim));
  margin-bottom: 1.4rem;
}

.section-nav-empty { color: rgb(var(--ch-text-dimmer)); font-style: italic; font-size: 0.88em; }

/* 巻ページ — 章ブロック */
.chapter-list { display: flex; flex-direction: column; gap: 1.2rem; }

.chapter-block {
  border: 1px solid rgb(var(--ch-border));
  border-radius: 6px;
  padding: 1rem 1.2rem;
  background: rgb(var(--ch-ink-2) / 60%);
}

.chapter-title {
  font-size: 0.88em;
  font-weight: 600;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgb(var(--ch-border) / 70%);
  font-family: var(--font-serif);
}
.chapter-title a { color: var(--PRIMARY-color); text-decoration: none; }
.chapter-title a:hover { color: var(--PRIMARY-HOVER-color); }

.section-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }

.section-item {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.86em;
  border-radius: 4px;
  transition: background 0.12s;
}
.section-item:hover { background: rgb(var(--ch-gold) / 6%); }

.section-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  text-decoration: none;
  flex: 1;
}
.section-num                       { color: rgb(var(--ch-text-dim)); font-size: 0.78em; min-width: 2.8rem; flex-shrink: 0; }
.section-link .section-title       { color: rgb(var(--ch-text-warm)); }
.section-link:hover .section-title { color: var(--MAIN-TITLES-TEXT-color); }

.section-chars {
  margin-left: auto;
  padding-right: 8px;
  color: rgb(var(--ch-text-dimmer));
  font-size: 0.76em;
  white-space: nowrap;
}

/* 章ページ — 節カード */
.section-cards { display: flex; flex-direction: column; gap: 6px; }

.section-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: rgb(var(--ch-ink-2) / 60%);
  border: 1px solid rgb(var(--ch-border));
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.section-card:hover {
  background: rgb(var(--ch-gold) / 6%);
  border-color: rgb(var(--ch-gold) / 35%);
}

.section-card-num {
  font-size: 0.78em;
  color: rgb(var(--ch-gold) / 80%);
  font-weight: 600;
  min-width: 3.2rem;
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.section-card-body { flex: 1; min-width: 0; }
.section-card-title {
  color: rgb(var(--ch-text-warm) / 95%);
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 3px;
  font-family: var(--font-serif);
}
.section-card:hover .section-card-title { color: var(--MAIN-TITLES-TEXT-color); }

.section-card-chars,
.section-card-locs {
  font-size: 0.76em;
  color: rgb(var(--ch-text-dimmer));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-sans);
}

.section-card-arrow {
  color: rgb(var(--ch-border));
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
  font-family: var(--font-sans);
}
.section-card:hover .section-card-arrow {
  color: rgb(var(--ch-gold) / 80%);
  transform: translateX(3px);
}

/* =============================================
   登場人物一覧（characters-list shortcode）
   ============================================= */

.char-list-loading,
.char-load-error {
  color: rgb(var(--ch-text-dimmer));
  font-style: italic;
  padding: 1.2rem 0;
  font-family: var(--font-sans);
}

/* ---------- 登場人物トップ カテゴリグリッド ---------- */
.char-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.char-category-card {
  display: block;
  padding: 1.4rem 1.6rem;
  border: 1px solid rgb(var(--ch-border) / 70%);
  border-radius: 8px;
  background: rgb(var(--ch-card-bg) / 80%);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.char-category-card:hover {
  border-color: var(--PRIMARY-color);
  background: rgb(var(--ch-gold) / 8%);
  text-decoration: none;
}

.char-category-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--PRIMARY-color);
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

.char-category-desc {
  font-size: 0.85rem;
  color: rgb(var(--ch-text) / 75%);
  line-height: 1.6;
  font-family: var(--font-sans);
}

/* ---------- 登場人物 カードグリッド ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 1.2rem;
}

/* ---------- キャラクター詳細ページ ---------- */

/* 説明文エリア */
.char-desc-text {
  margin: 0 0 1rem;
  line-height: var(--line-height);
}

/* 読書位置未設定ノーティス */
.char-notice {
  padding: 0.75rem 1rem;
  border-left: 3px solid rgb(var(--ch-gold) / 55%);
  background: rgb(var(--ch-gold) / 6%);
  border-radius: 0 5px 5px 0;
  font-size: calc(var(--font-size-base) * 0.88);
  color: rgb(var(--ch-text-dim));
  margin-bottom: 1rem;
}

/* 登場節一覧ヒント/空状態 */
.char-appearances-hint,
.char-appearances-none,
.char-appearances-pending {
  font-size: calc(var(--font-size-base) * 0.88);
  color: rgb(var(--ch-text-dimmer));
  font-style: italic;
  margin: 0.5rem 0;
}

/* 登場節一覧テーブル */
.char-appearances-table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(var(--font-size-base) * 0.9);
}
.char-appearances-table th {
  text-align: left;
  font-weight: 600;
  padding: 6px 12px;
  border-bottom: 1px solid rgb(var(--ch-border) / 80%);
  color: rgb(var(--ch-text-dim));
  font-size: calc(var(--font-size-base) * 0.82);
  letter-spacing: 0.06em;
}
.char-appearances-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgb(var(--ch-border) / 40%);
  vertical-align: top;
  line-height: 1.6;
}
.char-appearances-table tr:last-child td {
  border-bottom: none;
}
.char-appearances-table td:first-child {
  white-space: nowrap;
  font-size: calc(var(--font-size-base) * 0.85);
  color: var(--PRIMARY-color);
  width: 1%;
  padding-right: 1.5rem;
}
.char-appearances-table td:first-child a {
  color: var(--PRIMARY-color);
}
.char-appearances-table tr:hover td {
  background: rgb(var(--ch-gold) / 4%);
}

/* ---------- 登場人物カード一覧 ---------- */

.char-card {
  background: rgb(var(--ch-ink-2) / 65%);
  border: 1px solid rgb(var(--ch-border));
  border-radius: 7px;
  padding: 14px 16px;
  transition: background 0.15s, border-color 0.15s;
  font-family: var(--font-sans);
}
.char-card:hover {
  background: rgb(var(--ch-gold) / 6%);
  border-color: rgb(var(--ch-gold) / 30%);
}

.char-card-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgb(var(--ch-border) / 70%);
}

.char-card-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--PRIMARY-color);
  font-family: var(--font-serif);
}

.char-card-reading {
  font-size: calc(var(--font-size-base) * 0.82);
  color: rgb(var(--ch-text-dimmer));
}

.char-card-alias {
  font-size: calc(var(--font-size-base) * 0.78);
  color: var(--SECONDARY-color);
  padding: 1px 6px;
  border: 1px solid rgb(var(--ch-blue-steel) / 30%);
  border-radius: 3px;
  white-space: nowrap;
}

.char-card-desc {
  font-size: calc(var(--font-size-base) * 0.92);
  color: rgb(var(--ch-text-warm) / 90%);
  line-height: 1.75;
}
.char-card-desc em.char-no-pos {
  font-size: calc(var(--font-size-base) * 0.84);
  color: rgb(var(--ch-text-dimmer));
  font-style: normal;
}

/* =============================================
   用語集（glossary-list shortcode）
   ============================================= */

.glossary-loading {
  color: rgb(var(--ch-text-dimmer));
  font-style: italic;
  padding: 1.2rem 0;
  font-family: var(--font-sans);
}

.glossary-container {
  margin-top: 1rem;
}

.glossary-section {
  margin-bottom: 2rem;
}

.glossary-cat-title {
  font-size: calc(var(--font-size-base) * 0.84);
  font-weight: 600;
  color: rgb(var(--ch-gold) / 85%);
  letter-spacing: 0.08em;
  text-transform: none;
  border-bottom: 1px solid rgb(var(--ch-gold) / 25%);
  padding-bottom: 4px;
  margin-bottom: 0.6rem;
  font-family: var(--font-sans);
}

.glossary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(var(--font-size-base) * 0.87);
  font-family: var(--font-sans);
}
.glossary-table th {
  background: rgb(var(--ch-gold) / 10%);
  color: rgb(var(--ch-text-warm) / 80%);
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid rgb(var(--ch-border));
  text-align: left;
  white-space: nowrap;
}
.glossary-table td {
  padding: 7px 12px;
  border: 1px solid rgb(var(--ch-border));
  vertical-align: top;
  line-height: 1.65;
}
.glossary-name {
  white-space: nowrap;
  color: var(--PRIMARY-color);
  font-weight: 600;
  font-size: calc(var(--font-size-base) * 0.92);
  width: 1%;
}
.glossary-reading {
  display: block;
  font-size: calc(var(--font-size-base) * 0.75);
  font-weight: 400;
  color: rgb(var(--ch-text-dimmer));
}
.glossary-desc {
  color: rgb(var(--ch-text-warm) / 88%);
  font-size: calc(var(--font-size-base) * 0.85);
}
/* 解説列の折り返し許可 — (0,2,1,1) で .default table td:nth-child(2)(0,1,1,2) を上書き */
.default .glossary-table td:nth-child(2) {
  white-space: normal;
  width: auto;
}
.glossary-table tr:hover td {
  background: rgb(var(--ch-gold) / 4%);
}

/* =============================================
   Pagefind 全文検索 UI
   ============================================= */

/* ローカル未ビルド時のメッセージ */
.pagefind-unavailable {
  background: rgb(var(--ch-ink-2) / 70%);
  border: 1px solid rgb(var(--ch-border));
  border-left: 3px solid rgb(var(--ch-gold) / 60%);
  border-radius: 5px;
  padding: 1rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgb(var(--ch-text-warm) / 85%);
  line-height: 1.7;
  margin: 1rem 0;
}
.pagefind-unavailable code {
  background: rgb(var(--ch-ink-3));
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.85em;
}

/* Pagefind UI カラー上書き */
#pagefind-ui-container {
  --pagefind-ui-scale:           0.9;
  --pagefind-ui-primary:         rgba(194, 154, 72, 1);
  --pagefind-ui-text:            rgba(222, 210, 192, 0.95);
  --pagefind-ui-background:      rgba(22, 18, 12, 0.97);
  --pagefind-ui-border:          rgba(52, 44, 32, 1);
  --pagefind-ui-tag:             rgba(32, 26, 18, 1);
  --pagefind-ui-border-width:    1px;
  --pagefind-ui-border-radius:   5px;
  --pagefind-ui-image-border-radius: 4px;
  --pagefind-ui-image-box-ratio: 3/2;
  --pagefind-ui-font:            var(--font-sans);
  margin-top: 1rem;
}

/* ライトテーマ対応 */
[data-r-theme-variant="suikoden-light"] #pagefind-ui-container {
  --pagefind-ui-primary:    rgba(148, 112, 28, 1);
  --pagefind-ui-text:       rgba(42, 30, 16, 0.95);
  --pagefind-ui-background: rgba(252, 248, 238, 0.97);
  --pagefind-ui-border:     rgba(148, 112, 28, 0.35);
  --pagefind-ui-tag:        rgba(240, 232, 216, 1);
}

[data-r-theme-variant="suikoden-light"] .glossary-cat-title {
  color: rgba(148, 112, 28, 0.9);
  border-bottom-color: rgba(148, 112, 28, 0.25);
}

[data-r-theme-variant="suikoden-light"] .char-card {
  background: rgba(248, 244, 234, 0.8);
  border-color: rgba(148, 112, 28, 0.25);
}
[data-r-theme-variant="suikoden-light"] .char-card:hover {
  background: rgba(148, 112, 28, 0.06);
  border-color: rgba(148, 112, 28, 0.35);
}

/* ---------- アコーディオン ---------- */
.accordion-heading {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 0.2rem;
}
.accordion-heading::after {
  content: '▾';
  font-size: 0.85em;
  color: rgb(var(--ch-gold) / 65%);
  transition: transform 0.22s ease;
  flex-shrink: 0;
  margin-left: 0.6rem;
  font-style: normal;
  font-family: var(--font-sans);
}
.accordion-heading.collapsed::after { transform: rotate(-90deg); }
.accordion-heading:hover { color: var(--PRIMARY-HOVER-color); }

/* max-height アニメーション — 全子要素（地図含む）がまとめて折りたたまれる */
.accordion-body {
  overflow: hidden;
  max-height: 9000px;
  transition: max-height 0.35s ease-out;
}
.accordion-body.collapsed {
  max-height: 0;
  transition: max-height 0.25s ease-in;
}
/* accordion-inner : overflow 管理は accordion-body に委譲 */
.accordion-inner { }

/* ---------- Back to Top ボタン ---------- */
#back-to-top {
  position: fixed;
  bottom: 1.8rem;
  right: 1.5rem;
  z-index: 9000;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgb(var(--ch-ink-2) / 92%);
  border: 1px solid rgb(var(--ch-gold) / 45%);
  color: var(--PRIMARY-color);
  font-family: var(--font-sans);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, background 0.15s;
  backdrop-filter: blur(4px);
  line-height: 1;
  padding: 0;
}
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover   { background: rgb(var(--ch-gold) / 20%); }

[data-r-theme-variant="suikoden-light"] #back-to-top {
  background: rgba(240, 232, 216, 0.92);
  border-color: rgba(148, 112, 28, 0.5);
}

/* ---------- 節内ミニ地図（srcdoc iframe 方式） ---------- */
.section-map-wrap {
  margin: 1rem 0 1.2rem;
  border: 1px solid rgb(var(--ch-border) / 60%);
  border-radius: 6px;
  overflow: hidden;   /* iframe 要素は GPU 合成の問題なし → 角丸クリップ OK */
  line-height: 0;     /* inline-block の隙間を消す */
}
.section-map-iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: none;
}
@media (max-width: 600px) {
  .section-map-iframe {
    height: 260px; /* スマホは高さを抑える */
  }
}

/* =============================================
   節ページ — メイン画像（section-image partial）
   ============================================= */

.section-image-wrap {
  width: 100%;
  margin: 0 0 2rem;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgb(var(--ch-border) / 70%);
  box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
  background: rgb(var(--ch-ink-2) / 80%);
  line-height: 0;   /* img下の余白を消す */
  position: relative;  /* キャプション絶対配置の基点 */
}

.section-main-img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.93;
  transition: opacity 0.3s;
}
.section-main-img:hover {
  opacity: 1;
}

/* ---------- 画像キャプション（image_caption） ---------- */
.section-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.55rem 1rem;
  background: linear-gradient(to top,
    rgb(0 0 0 / 72%) 0%,
    rgb(0 0 0 / 40%) 60%,
    transparent 100%);
  color: rgba(240, 228, 200, 0.96);
  font-family: var(--font-serif);
  font-size: calc(var(--font-size-base, 17px) * 0.88);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 1px 6px rgb(0 0 0 / 70%);
}

/* ライトテーマ対応 */
[data-r-theme-variant="suikoden-light"] .section-image-wrap {
  border-color: rgba(148, 112, 28, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
  background: rgba(240, 232, 216, 0.8);
}
[data-r-theme-variant="suikoden-light"] .section-image-caption {
  /* ライトテーマでも画像上は暗いグラデを維持（読みやすさ優先） */
  color: rgba(255, 248, 230, 0.97);
}

/* =============================================
   地図（Leaflet.js）
   ============================================= */

.map-wrapper {
  margin: 1.2rem 0 2rem;
  font-family: var(--font-sans);
}

/* =============================================
   節専用地図（section-map shortcode）
   ============================================= */

.section-map-wrap {
  margin: 1.2rem 0 1.6rem;
}

.section-map-el {
  width: 100%;
  height: 600px;
  border-radius: 6px;
  border: 1px solid rgb(var(--ch-border) / 60%);
}

/* 地図内帰属コントロールを最小化（完全削除はOSM利用規約上不可） */
.section-map-el .leaflet-control-attribution {
  font-size: 0.6rem !important;
  opacity: 0.6;
  background: rgba(255,255,255,0.7) !important;
  padding: 1px 4px !important;
}

/* マーカーラベル（Leaflet tooltip permanent） */
.section-map-label {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #222 !important;
  font-size: 0.75rem !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  border: 1px solid rgba(0, 0, 0, 0.25) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap !important;
}
/* Leaflet tooltip の矢印を非表示 */
.section-map-label::before {
  display: none !important;
}

/* コントロールバー */
.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.2rem;
  padding: 0.55rem 0.9rem;
  background: rgb(var(--ch-ink-3, 32 26 18) / 80%);
  border: 1px solid rgb(var(--ch-border, 52 44 32) / 60%);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 0.82rem;
  color: rgb(var(--ch-text-dim, 140 128 110));
}

.map-ctrl-label {
  font-size: 0.78rem;
  color: rgb(var(--ch-text-dimmer, 100 92 78));
  margin-right: 0.2rem;
}

.map-filter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.map-filter-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  color: rgb(var(--ch-text-warm, 222 210 192));
  transition: color 0.15s;
}
.map-filter-label:hover { color: rgb(var(--ch-gold, 194 154 72)); }

.map-pos-toggle {
  margin-left: auto;
}

/* 地図本体 */
#suikoden-map {
  height: 500px;
  border: 1px solid rgb(var(--ch-border, 52 44 32) / 60%);
  border-top: none;
  border-bottom: none;
  touch-action: none; /* Leaflet がホイール・タッチイベントを自前で処理できるようにする */
}

/* Leaflet ポップアップの上書き
   NOTE: Leaflet CSSはショートコード内（body）で読み込まれるため
   custom.css（head）より後に適用される。!important で確実に上書きする。 */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(22, 18, 12, 0.97) !important;
  color: rgb(var(--ch-text-warm, 222 210 192)) !important;
  border: 1px solid rgb(var(--ch-gold, 194 154 72) / 40%) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip-container { display: none; }
.leaflet-popup-content {
  margin: 10px 14px;
  font-family: var(--font-sans);
  /* rem → --font-size-base 変数に追従させる（サイズ変更UIに対応） */
  font-size: calc(var(--font-size-base, 17px) * 0.88) !important;
  line-height: 1.6;
  color: rgb(var(--ch-text-warm, 222 210 192));
}
.leaflet-popup-close-button {
  color: rgb(var(--ch-text-dim, 140 128 110)) !important;
}
.leaflet-popup-close-button:hover {
  color: rgb(var(--ch-gold, 194 154 72)) !important;
}
.map-popup-name {
  font-size: 1.05em;
  font-weight: 600;
  color: rgb(var(--ch-gold, 194 154 72));
}
.map-popup-reading {
  font-size: 0.85em;
  color: rgb(var(--ch-text-dim, 140 128 110));
}
.map-popup-meta {
  font-size: 0.78em;
  color: rgb(var(--ch-text-dim, 140 128 110));
  margin-top: 2px;
}
.map-popup-desc {
  margin-top: 6px;
  font-size: 0.88em;
  line-height: 1.55;
  color: rgb(var(--ch-text-warm, 222 210 192));
}

/* ライトテーマ：ポップアップ文字色を上書き（!important でLeaflet CSSに勝つ） */
[data-r-theme-variant="suikoden-light"] .leaflet-popup-content-wrapper,
[data-r-theme-variant="suikoden-light"] .leaflet-popup-tip {
  background: rgba(252, 248, 238, 0.97) !important;
  color: rgba(42, 30, 16, 1) !important;
  border-color: rgba(148, 112, 28, 0.5) !important;
}
[data-r-theme-variant="suikoden-light"] .leaflet-popup-content {
  color: rgba(42, 30, 16, 1);
}
[data-r-theme-variant="suikoden-light"] .map-popup-name {
  color: rgba(120, 88, 10, 1);
}
[data-r-theme-variant="suikoden-light"] .map-popup-reading {
  color: rgba(90, 68, 40, 0.85);
}
[data-r-theme-variant="suikoden-light"] .map-popup-meta {
  color: rgba(90, 68, 40, 0.7);
}
[data-r-theme-variant="suikoden-light"] .map-popup-desc {
  color: rgba(42, 30, 16, 0.9);
}

/* 凡例 */
.map-legend {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.9rem;
  background: rgb(var(--ch-ink-3, 32 26 18) / 80%);
  border: 1px solid rgb(var(--ch-border, 52 44 32) / 60%);
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 0.78rem;
  color: rgb(var(--ch-text-dim, 140 128 110));
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.legend-dot.city       { background: #5b9bd5; }
.legend-dot.stronghold { background: #d55b5b; }
.legend-dot.mountain   { background: #5bd58c; }
.legend-dot.region     { background: #d5a85b; }

/* ライトテーマ対応 */
[data-r-theme-variant="suikoden-light"] .map-controls,
[data-r-theme-variant="suikoden-light"] .map-legend {
  background: rgba(240, 232, 216, 0.9);
  border-color: rgba(148, 112, 28, 0.3);
}

/* ---------- 登場人物 個別ページ ---------- */
.char-detail-loading {
  color: rgb(var(--ch-text-dim));
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.char-detail {
  margin-top: 1rem;
}

.char-detail-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(var(--ch-border) / 60%);
}

.char-detail-name-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.char-detail-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--PRIMARY-color);
}

.char-detail-reading {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: rgb(var(--ch-text-dim));
}

.char-detail-alias {
  display: inline-block;
  padding: 2px 10px;
  background: rgb(var(--ch-gold) / 12%);
  border: 1px solid rgb(var(--ch-gold) / 30%);
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--PRIMARY-color);
  font-family: var(--font-sans);
  margin-left: 0.2rem;
}

.char-detail-section {
  margin-bottom: 1.8rem;
}

.char-detail-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(var(--ch-text-dim));
  margin-bottom: 0.8rem;
  font-family: var(--font-sans);
}

.char-detail-desc {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.9;
  color: rgb(var(--ch-text-warm) / 92%);
}

.char-appearances {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.char-appearance-item {
  font-size: 0.88rem;
  font-family: var(--font-sans);
  padding: 6px 10px;
  border-radius: 4px;
  background: rgb(var(--ch-ink-2) / 50%);
  border-left: 3px solid rgb(var(--ch-gold) / 40%);
}

.char-appearance-link {
  color: var(--SECONDARY-color);
  text-decoration: none;
  font-weight: 500;
}
.char-appearance-link:hover { text-decoration: underline; }

.char-appearance-role {
  color: rgb(var(--ch-text-dim));
}

/* ---------- Amazon アソシエイトリンク ---------- */
.amazon-link-block {
  margin-top: 2rem;
  padding: 1.2rem 1.4rem;
  background: rgb(var(--ch-ink-2) / 60%);
  border: 1px solid rgb(var(--ch-gold) / 25%);
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-sans);
}

.btn-amazon {
  display: inline-block;
  padding: 10px 24px;
  background: rgb(var(--ch-gold) / 15%);
  border: 1px solid rgb(var(--ch-gold) / 50%);
  border-radius: 6px;
  color: var(--PRIMARY-color);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-amazon:hover {
  background: rgb(var(--ch-gold) / 28%);
  text-decoration: none;
}

.amazon-disclosure {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  color: rgb(var(--ch-text-dimmer));
}

/* ---------- サイドバー フッター ---------- */
/* 著作権表示のため表示。Hugo帰属テキストは menu-footer.html で管理 */
#R-footer { display: block; }
/* サイドバー内のテーマ切替セレクト（トップバーに移設済み） */
.R-shortcutmenu-footercontrols { display: none; }
#R-footer-margin { display: block; }

/* ---------- トップバー 前後ページボタン非表示 ---------- */
.topbar-button-prev,
.topbar-button-next { display: none; }

/* ---------- 節ページ 死亡者リスト ---------- */
.death-list { list-style: none; padding: 0; }
.death-list li { margin-bottom: 0.5em; }
.rip-number {
  font-family: monospace;
  font-size: 0.85em;
  opacity: 0.55;
  margin-right: 0.4em;
}
.rip-inline-link { text-decoration: none; }
.rip-inline-link:hover { text-decoration: underline; }


