/* ===== 教養の図解 ===== */

/* ---- 配色トークン（ライト） ---- */
:root {
  --bg: #f6f3ec;
  --surface: #fffdf9;
  --ink: #1d2126;
  --ink-soft: #5d646c;
  --line: #d9d3c6;
  --accent: #b5532a;
  --c-philosophy: #6a4fb3;
  --c-economics: #1f7a5c;
  --c-history: #b5532a;
  --c-religion: #a07a12;
  --c-japan: #a8323a;
  --c-politics: #3d5a80;
  --c-science: #2a63b5;
  --c-psychology: #0f7c86;
  --c-art: #b53a6b;
  --c-math: #4a4fb5;
  --c-statistics: #5b6b1e;
  --c-biology: #3a7d2c;
  --c-space: #2b3f8c;
  --c-earth: #6b5a2e;
  --c-medicine: #b03a48;
  --c-sociology: #6e5a9c;
  --c-geography: #a05a2c;
  --c-technology: #3b4a5e;
  --c-architecture: #6f6a2a;
  --c-music: #9c2f86;
  --c-literature: #8a3f6e;
  --c-language: #1d6f8f;
  --c-food: #7a4a2a;
  --c-asia: #9b3d2f;
  --c-law-money: #2f5f4f;
  --c-physics: #4a3d9a;
  --c-lifestyle: #a0456e;
  --on-field: #ffffff;   /* 分野色の上に載せる文字 */
  --shadow: 0 1px 2px rgba(30, 25, 15, 0.06), 0 6px 20px rgba(30, 25, 15, 0.06);
  --radius: 16px;
  --top-h: 52px;
  color-scheme: light;
}

/* ---- 配色トークン（ダーク） ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131518; --surface: #1c1f23; --ink: #ebe8e2; --ink-soft: #a2a8af; --line: #353a41;
    --accent: #e3906a; --c-philosophy: #a993ec; --c-economics: #5cc6a0; --c-history: #e3906a;
    --c-religion: #d9b24a; --c-japan: #e2767d; --c-politics: #8fa9d1; --c-science: #6f9ee8; --c-psychology: #4fc1c9; --c-art: #e57ba3;
    --c-math: #9a9ef0; --c-statistics: #b4c66a; --c-biology: #7fcf6e; --c-space: #8a9ff0; --c-earth: #c9b27a; --c-medicine: #ef8a96; --c-sociology: #b6a3e6; --c-geography: #e5a274; --c-technology: #9fb1c8; --c-architecture: #cfc77a; --c-music: #e08ad0; --c-literature: #d98bbd; --c-language: #6cc0e0; --c-food: #d39a74; --c-asia: #ee9a8a; --c-law-money: #7cc8ad; --c-physics: #ab9ff0; --c-lifestyle: #ec9bc0;
    --on-field: #15171a; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131518; --surface: #1c1f23; --ink: #ebe8e2; --ink-soft: #a2a8af; --line: #353a41;
  --accent: #e3906a; --c-philosophy: #a993ec; --c-economics: #5cc6a0; --c-history: #e3906a;
    --c-religion: #d9b24a; --c-japan: #e2767d; --c-politics: #8fa9d1; --c-science: #6f9ee8; --c-psychology: #4fc1c9; --c-art: #e57ba3;
    --c-math: #9a9ef0; --c-statistics: #b4c66a; --c-biology: #7fcf6e; --c-space: #8a9ff0; --c-earth: #c9b27a; --c-medicine: #ef8a96; --c-sociology: #b6a3e6; --c-geography: #e5a274; --c-technology: #9fb1c8; --c-architecture: #cfc77a; --c-music: #e08ad0; --c-literature: #d98bbd; --c-language: #6cc0e0; --c-food: #d39a74; --c-asia: #ee9a8a; --c-law-money: #7cc8ad; --c-physics: #ab9ff0; --c-lifestyle: #ec9bc0;
  --on-field: #15171a; --shadow: none; color-scheme: dark;
}

/* 分野ごとの色。要素に data-field を付けると --f が決まる */
[data-field="philosophy"] { --f: var(--c-philosophy); }
[data-field="economics"]  { --f: var(--c-economics); }
[data-field="history"]    { --f: var(--c-history); }
[data-field="religion"]   { --f: var(--c-religion); }
[data-field="japan"]      { --f: var(--c-japan); }
[data-field="politics"]   { --f: var(--c-politics); }
[data-field="science"]    { --f: var(--c-science); }
[data-field="psychology"] { --f: var(--c-psychology); }
[data-field="art"]        { --f: var(--c-art); }
[data-field="math"] { --f: var(--c-math); }
[data-field="statistics"] { --f: var(--c-statistics); }
[data-field="biology"] { --f: var(--c-biology); }
[data-field="space"] { --f: var(--c-space); }
[data-field="earth"] { --f: var(--c-earth); }
[data-field="medicine"] { --f: var(--c-medicine); }
[data-field="sociology"] { --f: var(--c-sociology); }
[data-field="geography"] { --f: var(--c-geography); }
[data-field="technology"] { --f: var(--c-technology); }
[data-field="architecture"] { --f: var(--c-architecture); }
[data-field="music"] { --f: var(--c-music); }
[data-field="literature"] { --f: var(--c-literature); }
[data-field="language"] { --f: var(--c-language); }
[data-field="food"] { --f: var(--c-food); }
[data-field="asia"] { --f: var(--c-asia); }
[data-field="law-money"] { --f: var(--c-law-money); }
[data-field="physics"] { --f: var(--c-physics); }
[data-field="lifestyle"] { --f: var(--c-lifestyle); }
[data-field] { --f-tint: color-mix(in srgb, var(--f) 12%, var(--surface)); }

/* ---- 土台 ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---- 上部バー ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  height: var(--top-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .back {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; padding: 0 10px;
  text-decoration: none; font-weight: 700; font-size: 15px;
  color: var(--f, var(--ink));
}
.top .back svg { width: 20px; height: 20px; }
.top .count { margin-left: auto; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; padding-right: 8px; }
.top .brand { font-weight: 800; font-size: 16px; padding-left: 12px; text-decoration: none; }

/* ---- ホーム ---- */
.hero {
  position: relative; overflow: hidden;
  margin: 16px 0 0; border-radius: var(--radius);
  aspect-ratio: 16 / 9; max-height: 300px; width: 100%;
  background: #333;
}
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.72) 100%);
}
.hero .ttl { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; color: #fff; }
.hero h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: 0.02em; }
.hero p { margin: 2px 0 0; font-size: 13px; opacity: 0.85; }
.credit { position: absolute; top: 8px; right: 8px; z-index: 1; max-width: 70%; padding: 1px 8px; border-radius: 999px; font-size: 10px; line-height: 1.7; color: rgba(255,255,255,0.92); background: rgba(0,0,0,0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sec-h { font-size: 13px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.08em; margin: 28px 0 10px; }

.today {
  display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center;
  padding: 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line);
  text-decoration: none;
}
.today .thumb { border-radius: 10px; background: var(--f-tint); padding: 4px; }
.today .k { font-size: 12px; font-weight: 700; color: var(--f); }
.today h3 { margin: 2px 0 4px; font-size: 18px; line-height: 1.3; }
.today p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.field-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 132px; padding: 14px; border-radius: var(--radius);
  background: var(--f); color: var(--on-field); text-decoration: none; overflow: hidden;
}
.field-tile .ico { width: 40px; height: 40px; }
.field-tile .ico * { stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.field-tile h3 { margin: 10px 0 0; font-size: 20px; line-height: 1.2; }
.field-tile p { margin: 2px 0 0; font-size: 12px; opacity: 0.85; }
.field-tile .prog { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; opacity: 0.9; font-variant-numeric: tabular-nums; }
.soon { opacity: 0.5; font-size: 13px; color: var(--ink-soft); margin: 12px 0 40px; }

/* ---- 分野の一覧 ---- */
.field-head { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; }
.field-head .ico { width: 44px; height: 44px; padding: 8px; border-radius: 12px; background: var(--f); color: var(--on-field); }
.field-head .ico * { stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.field-head h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.field-head p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding-bottom: 40px; }
.tile {
  position: relative; display: block; text-decoration: none;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tile .thumb { background: var(--f-tint); padding: 6px; }
.tile .cap { padding: 8px 10px 10px; }
.tile .no { font-size: 11px; font-weight: 700; color: var(--f); font-variant-numeric: tabular-nums; }
.tile h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.tile .read {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--f); color: var(--on-field); display: grid; place-items: center;
}
.tile .read svg { width: 14px; height: 14px; }

/* ---- カード（横スワイプ） ---- */
body.deck-mode { overflow: hidden; }
.deck {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  height: calc(100dvh - var(--top-h));
  overscroll-behavior-x: contain;
}
.deck::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  overflow-y: auto; overscroll-behavior-y: contain;
  padding: 12px 16px 72px;
}
.card {
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* カード上部：画像の帯（画像がなければ分野色の帯） */
.banner {
  position: relative; display: block; width: 100%; height: 148px; padding: 0; border: 0;
  background: var(--f); color: var(--on-field); text-align: left; overflow: hidden;
}
button.banner { cursor: zoom-in; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner.has-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.7) 100%);
}
.banner .ttl { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; }
.banner.has-img .ttl { color: #fff; }
.banner .k { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.92; font-variant-numeric: tabular-nums; }
.banner h2 { margin: 0; font-size: 26px; line-height: 1.25; }
.banner .pattern { position: absolute; right: -18px; top: -14px; width: 150px; height: 150px; opacity: 0.18; }
.banner .pattern * { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.fig { padding: 12px 12px 4px; }
.fig svg { display: block; width: 100%; height: auto; }
.line { margin: 4px 16px 0; font-size: 18px; font-weight: 800; line-height: 1.5; }
.line::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--f); margin-bottom: 8px; }

/* 要点①②③ */
.points { list-style: none; counter-reset: pt; margin: 14px 16px 0; padding: 0; display: grid; gap: 8px; }
.points li { counter-increment: pt; position: relative; padding-left: 32px; font-size: 15px; line-height: 1.6; }
.points li::before {
  content: counter(pt); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--f); color: var(--on-field); font-size: 12px; font-weight: 800;
}
/* 例・なぜ大事 */
.facts { margin: 14px 16px 0; display: grid; gap: 8px; }
.facts > div { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.facts dt { font-size: 12px; font-weight: 800; color: var(--f); padding-top: 2px; white-space: nowrap; }
.facts dd { margin: 0; font-size: 14px; line-height: 1.6; }
.facts .why { background: var(--f-tint); }
/* もっと詳しく */
.more { margin: 14px 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.more summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px; color: var(--f);
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "＋"; font-weight: 800; }
.more[open] summary::after { content: "－"; }
.more p { margin: 0; padding: 0 14px 14px; font-size: 14px; line-height: 1.85; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 16px 0; }
.chip {
  min-height: 36px; padding: 4px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--f); background: transparent; color: var(--f); font-weight: 700; font-size: 14px;
}
.chip[aria-expanded="true"] { background: var(--f); color: var(--on-field); }
.note {
  margin: 10px 16px 0; padding: 10px 12px; border-radius: 10px;
  background: var(--f-tint); font-size: 14px; line-height: 1.6;
}
.note b { color: var(--f); margin-right: 6px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 16px 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.links span { font-size: 12px; color: var(--ink-soft); width: 100%; }
.links a {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 12px;
  border-radius: 10px; background: var(--bg); text-decoration: none; font-size: 14px; font-weight: 600;
}
.links a i { font-style: normal; font-size: 11px; color: var(--f); font-weight: 700; }

/* 下部：前後ボタンと位置の点 */
.pager {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.pager button {
  pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.pager button:disabled { opacity: 0.3; cursor: default; }
.pager button svg { width: 20px; height: 20px; }
.dots { display: flex; gap: 6px; pointer-events: auto; padding: 8px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--f); width: 18px; border-radius: 4px; }

/* 画像の拡大表示 */
dialog.viewer {
  border: 0; padding: 0; max-width: min(92vw, 900px); background: transparent; color: #fff;
}
dialog.viewer::backdrop { background: rgba(0, 0, 0, 0.88); }
dialog.viewer img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 8px; }
dialog.viewer p { margin: 10px 4px 0; font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.85); }
dialog.viewer a { color: #fff; }
dialog.viewer .close {
  position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.15); color: #fff; font-size: 22px; cursor: pointer;
}

/* ---- 図解SVGの共通クラス（図の色はここでだけ決める） ---- */
.fig svg text, .thumb svg text { font-family: inherit; }
/* 線のクラスは塗りを消す。塗りのクラスを後に書き、両方付けたとき（例: tint st-f）は塗りが勝つようにする */
.st     { stroke: var(--ink); fill: none; }
.st-soft { stroke: var(--ink-soft); fill: none; }
.st-f   { stroke: var(--f); fill: none; }
.st-line { stroke: var(--line); fill: none; }
.ink    { fill: var(--ink); }
.soft   { fill: var(--ink-soft); }
.fl     { fill: var(--f); }
.on     { fill: var(--on-field); }
.tint   { fill: var(--f-tint); }
.paper  { fill: var(--surface); }
.bgc    { fill: var(--bg); }
.no-fill { fill: none; }
.dash   { stroke-dasharray: 5 4; }
.t-xl { font-size: 22px; font-weight: 800; }
.t-l  { font-size: 17px; font-weight: 800; }
.t-m  { font-size: 14px; font-weight: 700; }
.t-s  { font-size: 12px; }
.t-xs { font-size: 10.5px; }
.mid  { text-anchor: middle; }
.halo { paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.end  { text-anchor: end; }

/* 一覧のサムネイルでは図の文字を消す（小さすぎて読めないため） */
.thumb svg text { display: none; }

@media (min-width: 768px) {
  .slide { padding-top: 24px; }
  .hero h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: no-preference) {
  .deck { scroll-behavior: smooth; }
}

/* ===== 章・まとめカード ===== */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-size: 13px; font-weight: 700;
}
.toc a b { color: var(--f); }
.chapter { padding-top: 12px; scroll-margin-top: calc(var(--top-h) + 8px); }
.ch-h { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 4px; font-size: 20px; line-height: 1.3; }
.ch-h span { font-size: 13px; color: var(--f); white-space: nowrap; }
.ch-desc { margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); }
.sum-tile {
  display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: center; margin-bottom: 12px;
  padding: 10px; border-radius: var(--radius); text-decoration: none;
  background: var(--f-tint); border: 1.5px solid var(--f);
}
.sum-tile .thumb { border-radius: 10px; background: var(--surface); padding: 4px; }
.sum-tile .no { font-size: 11px; font-weight: 800; color: var(--f); }
.sum-tile h3 { margin: 2px 0 4px; font-size: 16px; line-height: 1.35; }
.sum-tile p { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.chapter .grid { padding-bottom: 8px; }
.card.summary { border: 2px solid var(--f); }
.ch-list { margin: 16px 16px 0; display: grid; gap: 6px; }
.ch-list > span { font-size: 12px; color: var(--ink-soft); }
.ch-list a {
  display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: start;
  padding: 10px 12px; border-radius: 10px; background: var(--bg); text-decoration: none;
}
.ch-list b { font-size: 12px; color: var(--f); padding-top: 2px; }
.ch-list strong { display: block; font-size: 14px; }
.ch-list a > span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

/* ===== つながりマップ ===== */
.linkmap {
  display: grid; grid-template-columns: 1fr 76px 1fr; gap: 0; align-items: center;
  margin: 16px 12px 16px; padding: 12px 4px; border-top: 1px dashed var(--line);
}
.lm-col { display: grid; gap: 6px; position: relative; }
.lm-h { font-size: 11px; color: var(--ink-soft); text-align: center; }
.lm-col a {
  position: relative; display: block; padding: 6px 8px; border-radius: 10px;
  background: var(--bg); text-decoration: none; font-size: 12.5px; font-weight: 600; line-height: 1.4;
  border: 1px solid var(--line);
}
.lm-col a i { display: block; font-style: normal; font-size: 10px; color: var(--f); font-weight: 700; }
.lm-col em { text-align: center; color: var(--ink-soft); font-style: normal; font-size: 12px; }
/* カードと中央をつなぐ線 */
.lm-in a::after, .lm-out a::before {
  content: ""; position: absolute; top: 50%; width: 10px; border-top: 2px solid var(--line);
}
.lm-in a::after { right: -11px; }
.lm-out a::before { left: -11px; }
.lm-center {
  margin: 0 10px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: var(--f); color: var(--on-field); font-size: 10.5px; font-weight: 800; line-height: 1.3; padding: 6px;
}
.lm-center span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 人物 ===== */
button.person {
  display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--f); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto;
  border: 0; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface); color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog.sheet .close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg); font-size: 20px; cursor: pointer; }
.sh-head { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.sh-head img, .sh-ico { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--f-tint); color: var(--f); display: grid; place-items: center; }
.sh-ico svg { width: 36px; height: 36px; }
.sh-head h3 { margin: 0; font-size: 20px; }
.sh-head p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.sh-line { margin: 12px 0 0; font-weight: 800; font-size: 16px; }
dialog.sheet .points { margin: 12px 0 0; }
.sh-more {
  display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 14px; min-height: 44px;
  border-radius: 12px; background: var(--f); color: var(--on-field); text-decoration: none; font-weight: 700;
}
.sh-more svg { width: 18px; height: 18px; }
.field-head.plain .ico { display: grid; place-items: center; background: var(--accent); color: #fff; }
.field-head.plain .ico svg { width: 28px; height: 28px; }
.people-list { display: grid; gap: 8px; padding-bottom: 12px; }
.person-row {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
.person-row img, .pr-ico { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--f-tint); color: var(--f); display: grid; place-items: center; }
.pr-ico svg { width: 30px; height: 30px; }
.person-row b { font-size: 16px; }
.person-row small { margin-left: 8px; font-size: 12px; color: var(--ink-soft); }
.person-row em { display: block; font-style: normal; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.person-page { padding-top: 12px; padding-bottom: 40px; }
.person-page .card { max-width: 560px; margin: 0 auto; }
.events { list-style: none; margin: 14px 16px 0; padding: 0 0 0 4px; border-left: 2px solid var(--f); }
.events li { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 6px 0 6px 14px; font-size: 14px; line-height: 1.5; }
.events li::before { content: ""; position: absolute; left: -7px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--f); }
.events b { color: var(--f); font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-h { margin: 18px 16px 0; font-size: 13px; color: var(--f); }

/* ===== ホームの入口 ===== */
.views { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.view-tile {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow);
}
.view-tile svg { width: 34px; height: 34px; flex: none; color: var(--accent); }
.view-tile h3 { margin: 0; font-size: 15px; }
.view-tile p { margin: 0; font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }

/* ===== 年表 ===== */
.tl-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tl-filter button {
  min-height: 34px; padding: 4px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: var(--surface);
}
.tl-filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.timeline { position: relative; padding-bottom: 40px; }
.tl-era {
  position: sticky; top: var(--top-h); z-index: 2; margin: 18px 0 4px; padding: 6px 0;
  font-size: 18px; background: var(--bg); border-bottom: 2px solid var(--ink);
}
.tl-cent { margin: 12px 0 4px 84px; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.tl-item { display: grid; grid-template-columns: 72px 12px 1fr; gap: 8px; align-items: center; padding: 3px 0; text-decoration: none; }
.tl-y { text-align: right; font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--f); }
.tl-item.tl-person .tl-dot { border-radius: 3px; transform: rotate(45deg) scale(0.85); }
.tl-t { padding: 6px 10px; border-radius: 10px; background: var(--surface); border-left: 4px solid var(--f); }
.tl-t b { font-size: 14px; }
.tl-t small { margin-left: 8px; font-size: 11px; color: var(--f); font-weight: 700; }
