/* 土台：トークン・書体・レイアウト。色は4値のみ。 */
:root {
  --red: #D7261E;
  --red-deep: #B81E17;
  --ink: #141110;
  --washi: #F2EEE6;
  --f-en: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --f-ja: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-body: "Noto Sans JP", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.1rem, 5vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--washi);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  font-variant-numeric: lining-nums;
  line-height: 1.95;
  overflow-wrap: break-word;
}
html:lang(en) body, html:lang(de) body { font-family: "Noto Sans", "Noto Sans JP", system-ui, sans-serif; line-height: 1.8; }
main { display: block; }
p { margin: 0 0 1.2em; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--red-deep); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------------- ヒーロー ----------------
   層（奥→手前）：z1 嵐の絵 / z2 稲妻 / z3 縦書きの名前 / z4 騎手だけ / z5 雨・閃光 / z8 黒帯 / z9 言語切替 */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  background: var(--red);
  overflow: clip;
  --bar-h: 38px;
}
.hero-stage { position: absolute; inset: 0; overflow: clip; }

/* 奥＝嵐の背景だけの絵（雲・雨・黒い地面。騎手なし）を画面いっぱいに COVER（端まで途切れなし）。
   手前＝騎手だけ（同じ騎手の絵を騎手のマスクで切り抜き）を CONTAIN で画面に収める（頭から蹄まで見える）。名前はその間。 */
.hr-plate { position: absolute; inset: 0; z-index: 1; transform-origin: 50% 60%; }
.hr-plate picture, .hr-plate img { display: block; width: 100%; height: 100%; }
.hr-plate img { object-fit: cover; object-position: 50% 100%; max-width: none; }
.hr-art { position: absolute; z-index: 4; left: 0; right: 0; top: 6%; bottom: var(--bar-h); transform-origin: 50% 50%; pointer-events: none; }
.hr-art picture, .hr-art img { display: block; width: 100%; height: 100%; }
.hr-art img { object-fit: contain; object-position: 50% 100%; max-width: none; }
.hr-front img {
  -webkit-mask: url(/assets/takasugi/svg/hero-rider-wide-mask.svg) 50% 100% / contain no-repeat;
  mask: url(/assets/takasugi/svg/hero-rider-wide-mask.svg) 50% 100% / contain no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  .hr-art { top: 0; bottom: 0; }
  .hr-front img {
    -webkit-mask-image: url(/assets/takasugi/svg/hero-rider-tall-mask.svg);
    mask-image: url(/assets/takasugi/svg/hero-rider-tall-mask.svg);
  }
}

/* 稲妻：SVGの線（ベタ塗り）。ふだんは見えず、閃光のときだけ出る */
.hr-bolts { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hr-bolt { position: absolute; top: 0; height: 52svh; width: auto; opacity: 0; transform-origin: 50% 0; }
.hr-bolt--1 { left: 5%; }
.hr-bolt--2 { right: 7%; height: 60svh; transform: scaleX(-1); }
.hr-bolt--3 { left: 47%; height: 44svh; }
.hr-bolt--4 { left: 26%; height: 48svh; transform: scaleX(-1); }

/* 雨：薄い雨筋がゆっくり流れる */
.hr-rain { position: absolute; z-index: 5; left: 0; top: -320px; width: calc(100% + 116px); height: calc(100% + 320px); opacity: .3; pointer-events: none; }
html.motion .hr-rain { animation: hr-rain 1.5s linear infinite; }
@keyframes hr-rain { to { transform: translate3d(-116px, 320px, 0); } }
.hr-flash, .hr-dark { position: absolute; inset: 0; z-index: 5; opacity: 0; pointer-events: none; background: var(--washi); }
.hr-flash--red { background: var(--red); }
.hr-dark { background: var(--ink); z-index: 7; }
html.motion .hr-dark { opacity: .93; }

.lang-switch { position: absolute; z-index: 9; top: 12px; right: 12px; display: flex; gap: 4px; }
.lang-switch a {
  display: inline-block; padding: 7px 12px; min-height: 32px;
  background: var(--ink); color: var(--washi);
  font: 700 13px/1.4 var(--f-body); text-decoration: none; letter-spacing: .04em;
}
.lang-switch a[aria-current="page"] { background: var(--washi); color: var(--ink); }
.lang-switch a:focus-visible { outline-color: var(--washi); }
.lang-switch a[aria-current="page"]:focus-visible { outline-color: var(--ink); }

/* 縦書きの巨大な名前：騎手の後ろ。左に「晋作」(生成り)、右に「高杉」(黒)。ベタ塗りのみ。黒帯の上で終わる。 */
.hero-vname {
  --vn: min(35svh, 17vw);
  position: absolute; z-index: 3; margin: 0;
  writing-mode: vertical-rl; text-orientation: upright;
  font: 800 var(--vn)/1 var(--f-ja); letter-spacing: .02em; white-space: nowrap;
}
.hero-vname--l { color: var(--washi); left: 5%; top: 5svh; }
.hero-vname--r { color: var(--ink); right: 10%; top: 11svh; }
.hv-m { display: inline-block; overflow: hidden; padding: .03em .02em; }
.hv-c { display: inline-block; }

/* 細い黒帯：画面の最下端に付く。英語名と年（Cormorant Garamond 500） */
.hero-bar {
  position: absolute; z-index: 8; left: 0; right: 0; bottom: 0; min-height: var(--bar-h);
  display: flex; align-items: center; gap: 1rem; padding: 4px calc(var(--gutter) + 56px) 4px calc(var(--gutter) + 62px);
  background: var(--ink); color: var(--washi);
}
.hero-title { margin: 0; font: inherit; }
.hero-latin { font: 500 clamp(1rem, 1.5vw, 1.3rem)/1.3 var(--f-en); letter-spacing: .3em; }
.hero-years { margin: 0 0 0 auto; font: 500 clamp(.95rem, 1.4vw, 1.2rem)/1.3 var(--f-en); letter-spacing: .16em; white-space: nowrap; }

.hero-hint {
  position: absolute; z-index: 8; left: 50%; bottom: calc(var(--bar-h) + 14px); transform: translateX(-50%); margin: 0;
  padding: 2px 12px; background: var(--ink); color: var(--washi);
  font: 500 13px/1.6 var(--f-en); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
}

/* 名言：ヒーローのピンが終わったあと、黒い面に小さく置く（語がスクロールに合わせて順に濃くなる） */
.hero-quote-sec { background: var(--ink); color: var(--washi); padding: clamp(3rem, 9vw, 5.5rem) var(--gutter); }
.hero-quote { max-width: 40rem; margin: 0 auto; text-align: center; }
.hq-text { margin: 0 0 1.2em; font: 800 clamp(1.15rem, 3.4vw, 1.75rem)/1.8 var(--f-ja); letter-spacing: .08em; }
html:not(:lang(ja)) .hq-text { font: 500 clamp(1.3rem, 3.6vw, 1.9rem)/1.4 var(--f-en); letter-spacing: .03em; }
.hq-source { margin: 0; font-size: .8rem; line-height: 1.7; opacity: .85; }

/* 動きあり：初期の隠れ状態は .motion（インラインJSが付けるクラス）のときだけ。JSが無ければ全部見える。 */
html.motion .hv-c { opacity: 0; }
html.motion .hero-bar { opacity: 0; }
html.motion .hero-latin, html.motion .hero-years { opacity: 0; }

@media (max-width: 700px) {
  .hero { --bar-h: 34px; }
  .lang-switch { top: 10px; right: 10px; }
  .lang-switch a { padding: 6px 9px; font-size: 12px; }
  .hero-vname { --vn: min(34vw, 17svh); }
  .hero-vname--l { left: 4%; top: 7svh; }
  .hero-vname--r { right: 5%; top: 15svh; color: var(--washi); } /* 黒い雲に重なるので生成り */
  .hero-bar { padding: 3px calc(var(--gutter) + 24px) 3px var(--gutter); gap: .6rem; }
  .hero-latin { font-size: .95rem; letter-spacing: .18em; }
  .hero-years { font-size: .9rem; letter-spacing: .1em; }
}

/* 最終章：胸像と辞世の句 */
.death-fig { margin: 0 0 2.2em; display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 1.4rem 1.8rem; align-items: center; }
.dp-img { display: block; width: 100%; height: auto; background: var(--red); }
.dp-cap { display: flex; flex-direction: column; gap: .6em; }
.dp-label { align-self: flex-start; padding: 1px 12px; background: var(--ink); color: var(--washi); font: 500 .95rem/1.6 var(--f-en); letter-spacing: .16em; text-transform: uppercase; }
html:lang(ja) .dp-label { font: 700 .85rem/1.7 var(--f-body); letter-spacing: .2em; }
.dp-poem { display: flex; flex-direction: column; gap: .15em; font: 600 clamp(1.3rem, 3.6vw, 1.9rem)/1.5 var(--f-en); font-style: italic; }
html:lang(ja) .dp-poem { font: 800 clamp(1.25rem, 3.4vw, 1.8rem)/1.7 var(--f-ja); font-style: normal; letter-spacing: .08em; }
.dp-l { display: block; }
@media (max-width: 560px) { .death-fig { grid-template-columns: minmax(0, 11rem) 1fr; gap: 1rem; align-items: end; } }
@media (max-width: 400px) { .death-fig { grid-template-columns: 1fr; } .dp-img { max-width: 13rem; } }
html.motion .death-fig { opacity: 0; transform: translateY(16px); }

/* ---------------- 章 ---------------- */
.ch-inner { max-width: 42rem; margin: 0 auto; padding: clamp(3rem, 9vw, 5.5rem) var(--gutter) 0; }
.chapter { padding-bottom: clamp(3rem, 8vw, 5rem); }
.ch-year { margin: 0; color: var(--red); font: 600 clamp(3.4rem, 15vw, 7rem)/1 var(--f-en); letter-spacing: .02em; }
.chapter h2, .summary-timeline h2, .song h2 {
  margin: .1em 0 .5em; font: 800 clamp(1.7rem, 6vw, 3rem)/1.3 var(--f-ja); overflow-wrap: anywhere; hyphens: auto;
}
html:not(:lang(ja)) .chapter h2, html:not(:lang(ja)) .summary-timeline h2, html:not(:lang(ja)) .song h2 {
  font: 600 clamp(1.9rem, 6.4vw, 3.2rem)/1.12 var(--f-en); text-transform: uppercase; letter-spacing: .01em;
}
.ch-lead { margin: 0 0 1.8em; padding-left: 1em; border-left: 4px solid var(--red-deep); font-weight: 700; font-size: 1.1em; }
.ch-body p { margin-bottom: 1.4em; }
.ch-note { margin-top: 2em; padding-top: 1em; border-top: 1px dashed var(--ink); font-size: .9rem; line-height: 1.8; }

.episode { margin: 2.4em 0; padding-top: 1.2em; border-top: 2px solid var(--ink); }
.episode-date { margin: 0 0 .2em; color: var(--red-deep); font-weight: 700; font-size: .85rem; letter-spacing: .06em; }
.episode h3 { margin: 0 0 .7em; font: 800 clamp(1.25rem, 4vw, 1.6rem)/1.4 var(--f-ja); overflow-wrap: anywhere; hyphens: auto; }
html:not(:lang(ja)) .episode h3 { font: 600 clamp(1.3rem, 4.4vw, 1.7rem)/1.25 var(--f-en); letter-spacing: .02em; }

/* 古事記：黒地＋生成りの線のみ（赤は使わない） */
.kojiki { margin: 2.5rem 0 0; background: var(--ink); color: var(--washi); }
.kojiki-inner { max-width: 40rem; margin: 0 auto; padding: clamp(2rem, 6vw, 3.4rem) var(--gutter); }
.kojiki-label { display: inline-block; margin: 0 0 1em; padding: 2px 12px; border: 1px solid var(--washi); font-size: .8rem; letter-spacing: .12em; }
.kojiki h3 { margin: 0 0 .8em; font: 800 clamp(1.5rem, 5vw, 2.2rem)/1.35 var(--f-ja); overflow-wrap: anywhere; }
html:not(:lang(ja)) .kojiki h3 { font: 600 clamp(1.6rem, 5.4vw, 2.4rem)/1.2 var(--f-en); text-transform: uppercase; }
/* 古事記の流れ：講和の席の絵（全面）→ 色が抜けて神話（黒地＋生成り）→ 色が戻って彦島の絵。絵は場面と同じ作り（赤い地に全面の絵）。 */
.kj-pin .scene { background: var(--red); }
.kj-pin::after { content: ""; display: block; height: 14px; background: var(--ink); }
.kj-tag { position: absolute; z-index: 9; left: 12px; bottom: 14px; margin: 0; display: flex; align-items: center; gap: .6em; padding: 5px 14px 5px 8px; background: var(--ink); color: var(--washi); }
.kj-tag-a { padding: 0 .6em; border: 1px solid var(--washi); font-size: .78rem; letter-spacing: .1em; }
.kj-tag-b { font-weight: 800; letter-spacing: .04em; }
html:not(:lang(ja)) .kj-tag-b { font: 600 1.1rem/1.2 var(--f-en); }
.kj-ink { display: none; }
html.motion .kj-ink { display: block; position: absolute; inset: 0; z-index: 6; background: var(--ink); pointer-events: none; clip-path: circle(0% at 64% 24%); }
.kj-myth { max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }
.kojiki-scene { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem 2.6rem; margin: 0; padding: 2.4rem 0 3rem; border-top: 1px solid var(--washi); }
.kj-plate { position: sticky; top: 0; z-index: 2; margin: 0; padding: .7rem 0; background: var(--ink); }
.kj-frame { position: relative; width: min(100%, 46svh * 1.5); margin: 0 auto; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink); }
.kj-frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kj-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.kj-text { max-width: 40rem; }
.kojiki-scene h4 { margin: 0 0 .6em; font: 800 1.35rem/1.4 var(--f-ja); }
html:not(:lang(ja)) .kojiki-scene h4 { font: 600 1.6rem/1.2 var(--f-en); letter-spacing: .03em; }
.kojiki-scene p { margin-bottom: 1em; }
@media (min-width: 900px) {
  .kojiki-scene { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; padding: 4rem 0 5rem; }
  .kj-plate { top: 10svh; padding: 0; }
  .kj-frame { width: 100%; max-height: 74svh; }
}
.kojiki-meaning { margin: 0 0 1em; }
.kojiki-why { margin: 0; font-weight: 700; }

/* ---------------- まとめの年表 ----------------
   2列（左＝晋作、右＝日本のできごと）。種類で色とアイコンを分ける：できごと＝生成りの丸、幽閉＝黒の丸＋格子、逃亡・潜伏＝赤の丸＋足あと。 */
.summary-timeline { padding-bottom: clamp(3rem, 8vw, 5rem); background: var(--washi); }
.tl-lead { font-size: clamp(1.15rem, 3.6vw, 1.7rem); line-height: 1.6; font-weight: 800; }
.tl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; font-size: .9rem; font-weight: 700; }
.tl-legend li { display: flex; align-items: center; gap: .5em; }
.ev-dot { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.7rem; height: 1.7rem; border: 3px solid var(--ink); border-radius: 50%; background: var(--washi); color: var(--ink); }
.ev-dot .ev-ic { width: 1rem; height: 1rem; stroke-width: 2.6; }
[data-kind="confinement"] > .ev-dot { background: var(--ink); color: var(--washi); }
[data-kind="escape"] > .ev-dot { background: var(--red); border-color: var(--red-deep); color: var(--washi); }
.timeline-wrap { position: relative; max-width: 62rem; margin: 2rem auto 0; }
.timeline { list-style: none; margin: 0; padding: 0 var(--gutter); position: relative; }
.timeline-summary__line { position: absolute; left: calc(var(--gutter) + .85rem - 2px); top: 0; height: 100%; width: 4px; background: var(--ink); }
.ev { position: relative; display: grid; grid-template-columns: 1.7rem 1fr; column-gap: 1rem; align-items: start; padding: .8rem 0; }
.ev .ev-dot { grid-column: 1; grid-row: 1 / span 3; position: relative; z-index: 1; margin-top: .15rem; }
.ev-date { grid-column: 2; font: 600 1.35rem/1.3 var(--f-en); letter-spacing: .04em; }
.ev-side { grid-column: 2; font-size: .72rem; font-weight: 700; letter-spacing: .06em; line-height: 1.5; }
.ev-text { grid-column: 2; line-height: 1.65; overflow-wrap: anywhere; }
.ev-person .ev-text { font-weight: 700; }
.ev-japan .ev-side { color: var(--red-deep); }
.ev-kind { display: inline-block; margin-right: .6em; padding: 0 .6em; font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--washi); background: var(--ink); vertical-align: .1em; }
[data-kind="escape"] > .ev-text .ev-kind { background: var(--red-deep); }
.ev--key .ev-date { color: var(--red-deep); }
.ev--key .ev-text { font-weight: 800; font-size: 1.12em; }
.ev--key > .ev-dot { background: var(--red-deep); border-color: var(--ink); }
.timeline-gap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; padding: .2rem 0 .2rem calc(.85rem - 2px); margin: .4rem 0; list-style: none; }
.tg-line { display: block; width: 0; height: 1.4rem; border-left: 4px dotted var(--red-deep); background: var(--washi); }
.tg-label { margin: .2rem 0 .2rem -.6rem; padding: .2em .9em; background: var(--red-deep); color: var(--washi); font: 800 clamp(1.3rem, 5vw, 1.9rem)/1.3 var(--f-ja); letter-spacing: .06em; }
html:not(:lang(ja)) .tg-label { font: 600 clamp(1.4rem, 5.4vw, 2rem)/1.2 var(--f-en); }
.tl-note { margin: 2rem 0 0; font-size: .85rem; line-height: 1.8; }
@media (min-width: 760px) {
  .timeline-summary__line { left: calc(50% - 2px); }
  .ev { grid-template-columns: minmax(0, 1fr) 5rem minmax(0, 1fr); column-gap: 0; padding: .6rem 0; }
  .ev .ev-dot { grid-column: 2; grid-row: 1 / span 2; justify-self: center; margin-top: .1rem; }
  .ev-side { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ev-person .ev-date, .ev-person .ev-text { grid-column: 1; text-align: right; padding-right: .4rem; }
  .ev-japan .ev-date, .ev-japan .ev-text { grid-column: 3; text-align: left; padding-left: .4rem; }
  .ev-date { grid-row: 1; font-size: 1.2rem; }
  .ev-text { grid-row: 2; }
  .timeline-gap { align-items: center; padding: .2rem 0; }
  .tg-label { margin-left: 0; }
}

/* ---------------- 曲 ---------------- */
.song { padding: clamp(3rem, 9vw, 5rem) var(--gutter); text-align: center; background: var(--ink); color: var(--washi); }
.song h2 { margin-top: 0; }
.song-coming, .song a {
  display: inline-block; margin: 0; padding: .55em 1.6em;
  background: var(--red-deep); color: var(--washi); font-weight: 700; text-decoration: none; letter-spacing: .08em;
}
.song a:focus-visible { outline-color: var(--washi); }

/* ---------------- アイコン・帯 ---------------- */
.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; display: inline-block; vertical-align: middle; }
.ch-meta { display: flex; align-items: center; gap: .4em; }
.ch-icon { width: clamp(2.4rem, 9vw, 4rem); height: clamp(2.4rem, 9vw, 4rem); color: var(--ink); }
.band { height: 24px; background: var(--ink); margin-top: 1.5rem;
  -webkit-mask: url(/assets/icons/wave.svg) repeat-x 0 50% / auto 24px; mask: url(/assets/icons/wave.svg) repeat-x 0 50% / auto 24px; }

/* ---------------- 章の場面（ピン留め） ----------------
   層（奥→手前）：地(赤) / 巨大な英単語 / 絵（赤い背景を外した版） / 幕(赤) / 漢字 / 黒い幕 / 年 */
.scene { position: relative; height: min(100svh, 76vw); min-height: 26rem; background: var(--red); overflow: clip; isolation: isolate; }
html.motion .scene { height: 100svh; }
.big-word {
  position: absolute; z-index: 1; left: 0; right: 0; top: 9svh; text-align: center; white-space: nowrap; overflow: clip;
  font: 600 min(calc(88vw / (var(--n) * .66)), 30svh)/1 var(--f-en); color: var(--ink); letter-spacing: .01em; padding-bottom: .04em;
}
.bw-c { display: inline-block; }
.scene-art { position: absolute; z-index: 2; inset: 0; overflow: hidden; }
.scene-art picture { display: contents; }
.scene-art img { position: absolute; left: 0; top: 0; height: 100%; width: auto; min-width: 100%; max-width: none; object-fit: cover; display: block; }
.scene--portrait .scene-art { display: flex; justify-content: center; }
.scene--portrait .scene-art img { position: relative; min-width: 0; flex: none; }
.scene-art--motif { display: flex; align-items: center; justify-content: center; }
.motif { width: min(60svh, 70vw); height: min(60svh, 70vw); color: var(--washi); stroke-width: 2; }
.scene-scrim, .scene-cover { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.scene-scrim { z-index: 5; background: var(--red); }
.scene-cover { z-index: 8; background: var(--ink); }
.big-glyph { --g: min(62svh, 84vw); display: none; position: absolute; z-index: 7; left: 50%; top: 50%; width: var(--g); height: var(--g); margin: calc(var(--g) / -2) 0 0 calc(var(--g) / -2); overflow: clip; align-items: center; justify-content: center; pointer-events: none; }
html.motion .big-glyph { display: flex; }
.bgl { display: block; font: 800 calc(var(--g) * .9)/1 var(--f-ja); color: var(--ink); }
html.motion .bw-c, html.motion .bgl { opacity: 0; }
.scene-year {
  position: absolute; z-index: 9; top: 12px; left: 12px; margin: 0; display: flex; align-items: center; gap: .45em;
  padding: 5px 16px 5px 10px; background: var(--ink); color: var(--washi);
  font: 600 clamp(1.5rem, 3.6vw, 2.4rem)/1.2 var(--f-en); letter-spacing: .08em;
}
.scene-year .ic { stroke-width: 2.2; }
.sy-n { font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  .big-word { top: 10svh; }
  .scene-year { top: 10px; left: 10px; }
  html.motion .scene--portrait .scene-art { bottom: auto; height: 72svh; }
}

/* ---------------- 功山寺（見せ場） ---------------- */
.scene--kozanji { --kz-cap: 3.6rem; --kz-hill: 25svh; --kz-ground: 12svh; }
.scene--kozanji .kz-lines { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem var(--gutter); background: var(--ink); color: var(--washi); z-index: 9; }
.scene--kozanji .kz-line { margin: 0 0 .3em; font-weight: 700; }
html.motion .scene--kozanji .kz-lines {
  display: grid; left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--kz-cap); align-items: center; padding: 0 calc(var(--gutter) + 40px) 0 var(--gutter); background: var(--ink); text-align: center;
}
html.motion .scene--kozanji .kz-line {
  grid-area: 1 / 1; align-self: center; margin: 0; padding: 0; background: none;
  font: 800 clamp(1.05rem, 1.7vw, 1.6rem)/1.45 var(--f-ja); letter-spacing: .08em;
}
html:not(:lang(ja)).motion .scene--kozanji .kz-line { font: 600 clamp(1.2rem, 2vw, 1.8rem)/1.3 var(--f-en); letter-spacing: .03em; }
.wr-u { display: inline; }
.kz-ground { position: absolute; z-index: 3; left: 0; right: 0; bottom: var(--kz-cap, 0px); width: 100%; height: var(--kz-ground, 26svh); display: block; }
/* 雪原の人の群れ：1人ずつの絵（<svg class="kzp"><use>）を奥行き5列に並べる。--x/--b/--h は群衆の枠に対する%（PC）、
   --xm/--bm/--hm はスマホ。左右の位置合わせは translate（transform は JS が動きに使う）。HTMLは全員そろった最後の姿。 */
.kz-crowd { position: absolute; z-index: 4; left: 0; right: 0; bottom: var(--kz-cap, 0px); height: var(--kz-hill); pointer-events: none; }
.kzp { position: absolute; left: calc(var(--x) * 1%); bottom: calc(var(--b) * 1%); height: calc(var(--h) * 1%); width: auto; aspect-ratio: var(--ar); translate: -50% 0; overflow: visible; display: block; }
.kz-crowd.is-moving .kzp { will-change: transform, opacity; }
.kz-snow { position: absolute; z-index: 6; inset: 0; overflow: clip; pointer-events: none; }
.kz-flake { position: absolute; top: -3%; background: var(--washi); border-radius: 50%; animation: kzfall var(--d, 10s) linear var(--dl, 0s) infinite; }
.kz-flake--crystal { background: none; border-radius: 0; color: var(--washi); }
.kz-flake .ic { width: 100%; height: 100%; stroke-width: 2.4; }
@keyframes kzfall {
  from { transform: translate3d(0, -10svh, 0) rotate(var(--r, 0deg)); }
  to { transform: translate3d(var(--sway, 0px), 118svh, 0) rotate(calc(var(--r, 0deg) * -1)); }
}
.kz-count {
  position: absolute; z-index: 9; top: 12px; right: 56px; display: flex; align-items: baseline; gap: .3em;
  padding: 4px 16px; background: var(--ink); color: var(--washi);
}
.kzc-n { font: 600 clamp(2.4rem, 6vw, 4.4rem)/1.1 var(--f-en); letter-spacing: .04em; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.kzc-u { font: 800 clamp(1rem, 2vw, 1.5rem)/1 var(--f-ja); letter-spacing: .1em; }
/* スマホ（縦長）：PCと同じ構図を小さくしたもの。絵は幅いっぱいに全体を見せ（縦横比そのまま、下端に付ける）、
   上の余白に年・KOZANJI・短文、絵の下の雪原にPCと同じ割合で小さな人影が集まって増える。短文は絵（晋作の顔・体）に重ならない。 */
@media (max-aspect-ratio: 9/10) {
  .scene--kozanji { --kz-hill: 19svh; --kz-ground: 20svh; --kz-cap: 3.2rem; }
  .kzp { left: calc(var(--xm) * 1%); bottom: calc(var(--bm) * 1%); height: calc(var(--hm) * 1%); }
  .kzp[data-m="0"] { display: none; }
  .kz-count { right: 28px; top: 10px; padding: 2px 10px; }
  .kzc-n { font-size: 2rem; }
  html.motion .scene--kozanji .scene-art { top: auto; bottom: calc(14svh + var(--kz-cap)); height: auto; aspect-ratio: 1536 / 2304; display: block; }
  html.motion .scene--kozanji .scene-art img { position: static; width: 100%; height: 100%; min-width: 0; }
  html.motion .scene--kozanji .big-word { top: 9svh; }
    html.motion .scene--kozanji .kz-line, html:not(:lang(ja)).motion .scene--kozanji .kz-line { font-size: clamp(.9rem, 3.8vw, 1.15rem); line-height: 1.4; }
  html.motion .scene--kozanji .kz-lines { padding: 0 26px 0 12px; }
}

/* ---------------- 刀の一閃（章の切り替え） ---------------- */
.slash-gate { display: none; position: relative; height: 100svh; background: var(--washi); overflow: clip; }
html.motion .slash-gate { display: block; }
.sg-under { position: absolute; inset: 0; background: var(--red); }
.sg-rot { position: absolute; left: 50%; top: 50%; width: 300vmax; height: 300vmax; margin: -150vmax 0 0 -150vmax; }
.sg-half { position: absolute; left: 0; width: 100%; height: 50%; background: var(--washi); will-change: transform; }
.sg-a { top: 0; }
.sg-b { top: 50%; }
.sg-line { position: absolute; left: 0; top: 50%; width: 100%; height: 5px; margin-top: -2.5px; background: var(--ink); }

/* ---------------- 文字の演出 ---------------- */
.cr-m { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.cr-c { display: inline-block; }
.cr-w { display: inline-block; white-space: nowrap; }
.cr-long { max-width: 100%; }
.cr-long .cr-c { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }

/* ---------------- 年表バー・進捗リング・カーソル（画面に固定） ---------------- */
.timeline-bar {
  position: fixed; z-index: 50; right: 10px; top: 76px; bottom: 96px; width: 32px; background: var(--ink);
  border-radius: 16px;
}
html:not(.js) .timeline-bar, html:not(.js) .progress-ring { display: none; }
.timeline-bar__track, .timeline-bar__fill { position: absolute; left: 50%; top: 18px; bottom: 18px; width: 3px; margin-left: -1.5px; }
.timeline-bar__track { background: var(--washi); opacity: .35; }
.timeline-bar__fill { background: var(--red); transform-origin: 50% 0; transform: scaleY(0); }
.timeline-bar__marks { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: 18px; bottom: 18px; }
.timeline-bar__item { position: absolute; left: 0; right: 0; top: calc(var(--i) / 6 * 100%); height: 0; }
.timeline-bar__mark {
  position: absolute; left: 50%; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center;
  color: var(--washi); background: var(--ink); border-radius: 50%; text-decoration: none;
}
.timeline-bar__mark:focus-visible { outline: 3px solid var(--washi); outline-offset: 0; box-shadow: 0 0 0 6px var(--ink); } /* どの背景の上でも見える二重の輪 */
.timeline-bar__mark .ic { width: 17px; height: 17px; stroke-width: 3; }
.timeline-bar__mark.is-active { color: var(--ink); background: var(--washi); }
.timeline-bar__yr {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 1px 8px; white-space: nowrap;
  background: var(--ink); color: var(--washi); font: 500 .9rem/1.5 var(--f-en); letter-spacing: .08em; opacity: 0; pointer-events: none;
}
.timeline-bar__mark.is-active .timeline-bar__yr, .timeline-bar__mark:hover .timeline-bar__yr, .timeline-bar__mark:focus-visible .timeline-bar__yr { opacity: 1; }
.timeline-bar__marker {
  position: absolute; left: 50%; top: 18px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--red); pointer-events: none;
}
.progress-ring { position: fixed; z-index: 50; left: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); pointer-events: none; }
.progress-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.pr-bg, .pr-fg { fill: none; stroke-width: 4; }
.pr-bg { stroke: var(--washi); opacity: .28; }
.pr-fg { stroke: var(--washi); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.cursor {
  position: fixed; z-index: 200; left: 0; top: 0; width: 26px; height: 26px; border: 2px solid var(--washi); border-radius: 50%;
  mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: opacity .25s;
}
@media (max-width: 900px) {
  .ch-inner, .kojiki-inner, .kj-myth, .timeline, .hero-quote-sec, .song { padding-right: calc(var(--gutter) + 38px); }
}
@media (max-width: 700px) {
  .ch-inner, .kojiki-inner, .kj-myth, .timeline, .hero-quote-sec, .song { padding-right: calc(var(--gutter) + 28px); }
}
@media (max-width: 700px) {
  .timeline-bar { right: 0; top: 64px; bottom: 70px; width: 20px; border-radius: 10px 0 0 10px; transition: opacity .3s; }
  .timeline-bar.is-hero { opacity: 0; pointer-events: none; visibility: hidden; } /* ヒーローの間は隠す */
  .timeline-bar__track, .timeline-bar__fill { width: 2px; margin-left: -1px; }
  .timeline-bar__mark { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
  .timeline-bar__mark .ic { width: 11px; height: 11px; }
  .timeline-bar__marker { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-width: 1.5px; }
  .timeline-bar__yr { display: none; }
  .progress-ring { left: auto; right: 2px; bottom: 12px; width: 26px; height: 26px; }
}

/* ---------------- エピソード・曲 ---------------- */
.episode-date { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.ep-icon { width: 1.9em; height: 1.9em; color: var(--ink); }
.episode-kind { padding: 1px 10px; background: var(--ink); color: var(--washi); letter-spacing: .1em; }
.ep-art { display: block; width: 100%; height: auto; margin: 0 0 1.4em; background: var(--red); border-block: clamp(8px, 1.4vw, 14px) solid var(--ink); }
.song-coming, .song a { display: inline-flex; align-items: center; gap: .6em; }
.song-icon { width: 1.6em; height: 1.6em; }
.song .ic { stroke-width: 2.6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* スマホ：年表バーは細い線＋小さな点だけ。いまの章の印だけ大きく（アイコンつき）。本文には重ならない */
@media (max-width: 700px) {
  .ch-inner, .kojiki-inner, .kj-myth, .timeline, .hero-quote-sec, .song { padding-right: calc(var(--gutter) + 14px); }
  .timeline-bar { width: 14px; right: 1px; top: 72px; bottom: 74px; background: none; outline: 0; border-radius: 0; }
  .timeline-bar__track, .timeline-bar__fill { width: 2px; margin-left: -1px; top: 10px; bottom: 10px; }
  .timeline-bar__track { background: var(--ink); opacity: .55; box-shadow: 0 0 0 1px rgba(242, 238, 230, .7); }
  .timeline-bar__marks { top: 10px; bottom: 10px; }
  .timeline-bar__mark { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--washi); }
  .timeline-bar__mark::before { content: ""; position: absolute; inset: -9px -6px; }
  .timeline-bar__mark .ic { display: none; }
  .timeline-bar__mark.is-active { width: 20px; height: 20px; margin: -10px 0 0 -10px; background: var(--ink); color: var(--washi); box-shadow: 0 0 0 1.5px var(--washi); }
  .timeline-bar__mark.is-active .ic { display: block; width: 12px; height: 12px; stroke-width: 3; }
  .timeline-bar__marker { top: 10px; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-width: 1.5px; }
  .progress-ring { display: none; }
}

/* ---- 地図（章の窓・四境戦争の場面）。色は4値のみ。 ---- */
.map-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.map-slot { position: relative; margin: 1.8rem 0; height: 100svh; background: var(--red); overflow: hidden; } /* 枠の帯なし：左右いっぱい（bleed.js）、地図は窓いっぱいに映す */
/* JSなし：地図は中身が作られないので出さない（本文はそのまま読める） */
html:not(.js) .map-slot, html:not(.js) .scene-art--map, html:not(.js) .shikyo-legend { display: none; }
.map-host { position: relative; overflow: hidden; background: var(--red); }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.m-choshu { fill: var(--washi); stroke: none; }
.m-choshu.is-hl { fill: var(--washi); }
.m-route { fill: none; stroke: var(--washi); stroke-width: calc(3.4px * var(--u, 1)); stroke-linecap: round; stroke-linejoin: round; }
.m-dot { fill: var(--washi); stroke: var(--ink); stroke-width: calc(2px * var(--u, 1)); opacity: 0; transition: opacity .3s; }
.m-dot.is-on { opacity: 1; }
/* 四境戦争：幕府軍＝黒い太い矢印（縁なし）＋根もとの葵の紋。長州軍の反撃＝生成りの矢印。陸は濃い赤にして、黒い矢印が読める */
.scene--map .map-svg { --land: var(--red-deep); }
.m-land { fill: var(--land, #141110); stroke: none; }
.front-arrow { fill: var(--ink); stroke: none; }
.front[data-state="idle"], .front-counter[data-state="idle"] { visibility: hidden; }
.front-counter { fill: var(--washi); stroke: none; visibility: hidden; }
.front-counter[data-state="out"] { visibility: visible; }
.front-crest .crest-s { transform: scale(calc(var(--u, 1) * 1.35)); transform-origin: 0 0; }
@media (max-aspect-ratio: 9/10) { .front-crest .crest-s { transform: scale(calc(var(--u, 1) * 1.05)); } }
.map-label[data-point="shogunate"] { font-weight: 800; letter-spacing: .08em; }
.shikyo-legend {
  position: absolute; z-index: 6; right: 56px; bottom: 14px; padding: 8px 14px 9px; background: var(--red-deep); border: 2px solid var(--washi); color: var(--washi); pointer-events: none;
  font: 700 clamp(.78rem, 1.6vw, .95rem)/1.5 var(--f-body);
}
html:lang(en) .shikyo-legend, html:lang(de) .shikyo-legend { font: 600 clamp(.95rem, 1.9vw, 1.1rem)/1.4 var(--f-en); }
.shikyo-legend .sl-title { display: none; }
.shikyo-legend ul { list-style: none; margin: 0; padding: 0; }
.shikyo-legend li { display: flex; align-items: center; gap: .7em; margin: .15em 0; }
.sl-arrow { width: 2.6em; height: auto; flex: none; }
.sl-arrow--shogun { fill: var(--ink); stroke: none; }
.sl-arrow--choshu { fill: var(--washi); stroke: none; }
@media (max-aspect-ratio: 9/10) { .shikyo-legend { right: auto; left: 8px; bottom: 10px; padding: 6px 10px 7px; } }
.map-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label {
  position: absolute; left: var(--lx, 0); top: var(--ly, 0); margin: 0; padding: 1px 8px; white-space: nowrap;
  background: var(--ink); color: var(--washi); font: 700 clamp(.8rem, 2.2vw, .95rem)/1.5 var(--f-body); letter-spacing: .04em;
  opacity: 0; transition: opacity .35s; transform: translate(9px, -50%);
}
html:lang(en) .map-label, html:lang(de) .map-label { font: 600 clamp(.95rem, 2.4vw, 1.1rem)/1.4 var(--f-en); letter-spacing: .05em; }
.map-label.is-on { opacity: 1; }
.map-label[data-pos="l"] { transform: translate(calc(-100% - 9px), -50%); }
.map-label[data-pos="t"] { transform: translate(-50%, calc(-100% - 8px)); }
.map-label[data-pos="b"] { transform: translate(-50%, 9px); }
.map-label[data-pos="c"] { transform: translate(-50%, -50%); }
.scene--map .scene-art--map { inset: 0; top: 0 !important; height: 100% !important; bottom: auto !important; }
.scene-cross, .map-slash { display: none; }
html.motion .scene-cross { display: block; position: absolute; inset: 0; z-index: 6; background: var(--red); pointer-events: none; }
.scene-cross img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (min-aspect-ratio: 9/10) { .scene-cross img { object-fit: cover; } }
html.motion .map-slash { display: block; position: absolute; inset: 0; z-index: 7; background: var(--ink); pointer-events: none; clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
.shikyo-cross-fig { margin: 1.6rem 0; background: var(--red); border-block: clamp(8px, 1.4vw, 14px) solid var(--ink); }
.shikyo-cross-fig img { width: 100%; height: auto; display: block; }
html.motion .shikyo-cross-fig { display: none; }
html.motion .scene--map .big-word { display: none; }
.cross-word { display: none; }
@media (max-aspect-ratio: 9/10) {
  /* 縦長の画面：他の章と同じ構図（上に巨大な英単語、下に絵を場面の高さの62%で大きく） */
  html.motion .scene-cross .cross-word { display: block; position: absolute; left: 0; right: 0; top: 9svh; text-align: center; white-space: nowrap; overflow: clip; font: 600 min(calc(88vw / (var(--n, 6) * .66)), 30svh)/1 var(--f-en); color: var(--ink); letter-spacing: .01em; }
  html.motion .scene-cross img { position: absolute; left: 0; bottom: 0; width: auto; height: 62svh; max-width: none; object-fit: cover; }
}

/* ---------------- 本文のあいだの絵（長い文章を区切る） ---------------- */
.ch-plate { margin: 1.8rem 0; }
.ch-plate img { display: block; width: 100%; height: auto; background: var(--red); border-block: clamp(8px, 1.4vw, 14px) solid var(--ink); }
.vignette { margin: 1.6rem auto; width: min(78%, 17rem); }
.vignette img { display: block; width: 100%; height: auto; }
.vignette--red img { border: 8px solid var(--ink); }
@media (min-width: 900px) {
  .vignette { float: right; clear: right; width: 15rem; margin: .4rem 0 1rem 1.6rem; }
  .ch-plate { clear: both; }
  /* 同じ所に続く挿絵／横に本文が来ない挿絵：浮かせず本文の幅の中で横に並べる（片側だけ大きく空くのを防ぐ） */
  .vignette-row { clear: both; display: flex; justify-content: center; align-items: flex-start; gap: 2.4rem; margin: 1.8rem 0; }
  .vignette-row .vignette { float: none; clear: none; flex: 0 1 15rem; width: auto; margin: 0; }
}
.ch-body::after { content: ""; display: block; clear: both; }

/* ---- 功山寺の挙兵〜終焉の地図：晋作の動き＝生成りの実線（黒い縁）／藩の軍勢＝黒い点線（生成りの縁）。線の縁は地図の罫線ではなく、どの地色でも読めるための縁取り ---- */
.m-route-case { fill: none; stroke-width: calc(7px * var(--u, 1)); stroke-linecap: round; stroke-linejoin: round; }
.m-route-g--self .m-route-case { stroke: var(--ink); }
.m-route-g--forces .m-route-case { stroke: var(--washi); }
.m-route--forces { stroke: var(--ink); stroke-linecap: butt; stroke-dasharray: calc(11px * var(--u, 1)) calc(7px * var(--u, 1)); }
.m-route-mask { stroke-width: calc(16px * var(--u, 1)); stroke-linecap: butt; }
.m-route-g.is-prev { opacity: .42; }
.map-label small { display: block; margin-top: -1px; font-weight: 500; font-size: .82em; line-height: 1.45; letter-spacing: .02em; opacity: .92; white-space: normal; max-width: 15em; }
html:lang(en) .map-label small, html:lang(de) .map-label small { font-weight: 500; }
.map-label:has(small) { padding-block: 3px 4px; }
.map-legend {
  position: absolute; z-index: 5; left: 72px; bottom: 10px; padding: 5px 10px 6px; background: var(--ink); color: var(--washi); pointer-events: none;
  font: 600 clamp(.68rem, 1.5vw, .82rem)/1.5 var(--f-body);
}
html:lang(en) .map-legend, html:lang(de) .map-legend { font: 500 clamp(.74rem, 1.6vw, .86rem)/1.4 var(--f-en); }
.map-legend ul { list-style: none; margin: 0; padding: 0; }
.map-legend li { display: flex; align-items: center; gap: .6em; }
.map-legend svg { width: 2.4em; height: .7em; flex: none; overflow: visible; }
.map-legend path { fill: none; }
.lg-self-case, .lg-forces-case { stroke-width: 7; stroke-linecap: round; }
.lg-self-case { stroke: var(--ink); } .lg-self { stroke: var(--washi); stroke-width: 3.4; stroke-linecap: round; }
.lg-forces-case { stroke: var(--washi); } .lg-forces { stroke: var(--ink); stroke-width: 3.4; stroke-dasharray: 8 5; }
.map-legend p { margin: .1em 0 0; opacity: .8; font-size: .92em; }
.map-endnote {
  position: absolute; z-index: 5; right: 64px; bottom: 12px; margin: 0; padding: 4px 12px 5px; background: var(--ink); color: var(--washi);
  font: 700 clamp(.85rem, 2.1vw, 1.05rem)/1.5 var(--f-body); letter-spacing: .08em; opacity: 0; transition: opacity 1.2s ease;
}
html:lang(en) .map-endnote, html:lang(de) .map-endnote { font: 600 clamp(.9rem, 2.2vw, 1.1rem)/1.4 var(--f-en); letter-spacing: .04em; }
.map-endnote.is-on { opacity: 1; }
.map-slot[data-map-death] .m-route-g.is-prev { opacity: .55; }
.map-slot[data-map-death] .m-dot[data-point="death-site"] { fill: var(--red); }
@media (max-aspect-ratio: 9/10) {
  .map-legend { left: 6px; bottom: 6px; padding: 4px 8px 5px; }
  .map-endnote { right: 44px; bottom: 6px; }
  .map-slot { height: min(100svh, 150vw); } /* 縦長でも、地図データの高さ内に収まる縦横比にする */
}

/* 辞世の句の下の句：少し小さく、間をおいて現れる */
.dp-lower { display: flex; flex-direction: column; gap: .5em; margin-top: 1.6em; padding-top: 1.1em; border-top: 1px solid var(--ink); }
.dp-label--lower { font-size: .78rem; letter-spacing: .1em; text-transform: none; }
html:lang(ja) .dp-label--lower { font-size: .78rem; letter-spacing: .1em; }
.dp-poem--lower { font-size: clamp(1.05rem, 2.8vw, 1.5rem); font-weight: 600; }
html:lang(ja) .dp-poem--lower { font-size: clamp(1.05rem, 2.8vw, 1.45rem); font-weight: 700; }
.dp-gloss { font: 500 .95rem/1.6 var(--f-en); font-style: italic; }
.song-gloss { margin: .2em 0 1em; font: 500 1rem/1.6 var(--f-en); font-style: italic; }

/* ---------------- 出口：辞世の句の再掲 → 曲 ---------------- */
.exit-poem {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: clamp(5rem, 16vh, 9rem) var(--gutter); background: var(--ink); color: var(--washi);
}
.ex-wrap { display: flex; flex-direction: column; align-items: center; gap: clamp(3.5rem, 14vh, 7rem); max-width: 60rem; }
.ex-upper, .ex-lower { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.ex-label { margin: 0; font: 500 .95rem/1.6 var(--f-en); letter-spacing: .24em; text-transform: uppercase; opacity: .85; }
html:lang(ja) .ex-label { font: 700 .85rem/1.7 var(--f-body); letter-spacing: .3em; }
.ex-label--lower { text-transform: none; letter-spacing: .1em; font-size: .85rem; }
.ex-verse { margin: 0; display: flex; flex-direction: column; gap: .2em; font: 600 clamp(2rem, 8.5vw, 4.6rem)/1.35 var(--f-en); font-style: italic; }
html:lang(ja) .ex-verse { font: 800 clamp(2rem, 8vw, 4.4rem)/1.55 var(--f-ja); font-style: normal; letter-spacing: .1em; }
.ex-verse--lower { font-size: clamp(1.6rem, 6.4vw, 3.4rem); }
html:lang(ja) .ex-verse--lower { font-size: clamp(1.6rem, 6.2vw, 3.2rem); }
.ex-l { display: block; }
.ex-gloss { margin: .2rem 0 0; font: 500 1.05rem/1.6 var(--f-en); font-style: italic; opacity: .9; }
html.motion .ex-upper, html.motion .ex-lower { opacity: 0; transform: translateY(14px); transition: opacity 1.8s ease, transform 1.8s ease; }
html.motion .exit-poem.is-in .ex-upper { opacity: 1; transform: none; }
html.motion .exit-poem.is-in .ex-lower { opacity: 1; transform: none; transition-delay: 2.4s; }

.song { padding: clamp(5rem, 14vh, 8rem) var(--gutter) clamp(5rem, 14vh, 8rem); }
.song-inner { max-width: 40rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.song-shamisen { width: 2.4rem; height: 2.4rem; stroke-width: 2.4; margin-bottom: 1.4rem; }
.song-brand { --logo-w: 180px; --logo-h: calc(var(--logo-w) * 225.25 / 823.46); padding: calc(var(--logo-h) / 2); }
.song-logo { display: block; width: var(--logo-w); height: auto; min-width: 70px; }
.song-lead { margin: 0 0 .8rem; font-weight: 700; letter-spacing: .06em; }
.song-listen {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.2rem; padding: .7em 2.2em; border-radius: 999px;
  background: var(--washi); color: var(--ink); font: 700 1rem/1.2 "Noto Sans", var(--f-body); letter-spacing: .14em; text-decoration: none;
}
.song-listen:hover { background: var(--red-deep); color: var(--washi); }
.song-listen:focus-visible, .song-float:focus-visible, .consent-btn:focus-visible { outline: 3px solid var(--washi); outline-offset: 3px; }
.song-helper { margin: .9rem 0 0; font-size: .9rem; opacity: .85; }
.song-coming { margin: 0; font-size: 1.3rem; padding: .55em 1.8em; border: 2px solid var(--washi); border-radius: 999px; background: none; display: inline-block; }

/* 常時「聴く」ボタン：ヒーローの下から。右下（年表バーの下）／スマホは左下 */
.song-float {
  position: fixed; z-index: 50; right: 10px; bottom: 24px; display: inline-flex; align-items: center; gap: .55em; max-width: calc(100vw - 80px);
  min-height: 44px; padding: 6px 16px 6px 10px; border-radius: 999px; background: var(--ink); color: var(--washi); text-decoration: none;
  box-shadow: 0 0 0 2px var(--washi); font: 700 .9rem/1.2 var(--f-body); letter-spacing: .06em;
  transition: opacity .3s, transform .3s;
}
.sf-mark { display: block; width: 24px; height: auto; flex: none; }
.sf-label { white-space: nowrap; }
html.js .song-float { opacity: 0; visibility: hidden; transform: translateY(10px); pointer-events: none; }
html.js .song-float.is-on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
@media (max-width: 700px) {
  .song-float { right: 36px; left: auto; bottom: 12px; width: 44px; height: 44px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; }
  .song-float .sf-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sf-mark { width: 26px; }
}
html.js .song-float.is-off { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------------- ゆかりの地 ---------------- */
.spots { padding-bottom: clamp(3rem, 8vw, 5rem); }
.spots .ch-inner { padding-bottom: 0; }
.spots h2 { margin: .1em 0 .5em; font: 800 clamp(1.7rem, 6vw, 3rem)/1.3 var(--f-ja); }
html:not(:lang(ja)) .spots h2 { font: 600 clamp(1.9rem, 6.4vw, 3.2rem)/1.12 var(--f-en); text-transform: uppercase; }
.spots-body { max-width: 64rem; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 2.2rem 3rem; }
.spots-city h3 { margin: 0 0 .8rem; font: 800 1.5rem/1.3 var(--f-ja); color: var(--red-deep); }
html:not(:lang(ja)) .spots-city h3 { font: 600 1.8rem/1.2 var(--f-en); text-transform: uppercase; letter-spacing: .06em; }
.spots-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.spot-name { margin: 0 0 .25rem; font: 700 1.1rem/1.5 var(--f-body); overflow-wrap: anywhere; }
.spot-desc { margin: 0 0 .5rem; font-size: .98rem; line-height: 1.8; }
.spot-link { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: 0 .2rem; font-weight: 700; color: var(--red-deep); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.spot-pin { width: 1.2em; height: 1.2em; }
.spot-approx { display: block; font-size: .82rem; opacity: .8; }

/* ---------------- もっと知る（書籍・映画/ドラマ・記念館） ---------------- */
.learn-more { padding-bottom: clamp(3rem, 8vw, 5rem); border-top: 6px solid var(--ink); }
.learn-more .ch-inner { padding-bottom: 0; }
.learn-more h2 { margin: .1em 0 .5em; font: 800 clamp(1.7rem, 6vw, 3rem)/1.3 var(--f-ja); }
html:not(:lang(ja)) .learn-more h2 { font: 600 clamp(1.9rem, 6.4vw, 3.2rem)/1.12 var(--f-en); text-transform: uppercase; }
.lm-draft { display: inline-block; margin: -.6rem 0 1.6rem; padding: .3em .8em; background: var(--red-deep); color: var(--washi); font-weight: 700; font-size: .85rem; line-height: 1.6; }
.lm-body { max-width: 64rem; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 3rem; }
.lm-group-title { display: flex; align-items: center; gap: .5em; margin: 0 0 1rem; font: 800 1.5rem/1.3 var(--f-ja); color: var(--red-deep); }
html:not(:lang(ja)) .lm-group-title { font: 600 1.8rem/1.2 var(--f-en); text-transform: uppercase; letter-spacing: .06em; }
.lm-ic { width: 1.3em; height: 1.3em; stroke-width: 2.6; }
.lm-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 2rem 2.4rem; }
.lm-item { display: flex; flex-direction: column; align-items: flex-start; padding-top: .9rem; border-top: 2px solid var(--ink); min-width: 0; }
.lm-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; }
.lm-kind { display: inline-block; padding: 0 .6em; border: 1px solid var(--ink); font-size: .75rem; line-height: 1.7; letter-spacing: .1em; }
.lm-group-note { margin: -.4rem 0 1.2rem; font-size: .9rem; line-height: 1.7; }
.lm-facts { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .8rem; margin: 0 0 .4rem; font-size: .85rem; line-height: 1.6; }
.lm-facts dt { font-weight: 700; }
.lm-facts dd { margin: 0; overflow-wrap: anywhere; }
.lm-asof { margin: 0; font-size: .82rem; }
/* 欧文（ō などの長音記号）は Noto Sans で組む。Noto Sans JP の太字だと記号の位置がずれる */
html:not(:lang(ja)) .lm-body, .lm-body [lang="en"], .lm-body [lang="de"] { font-family: "Noto Sans", var(--f-body); }
.lm-body [lang="ja"] { font-family: var(--f-body); }
.lm-title { margin: 0 0 .3rem; font-weight: 700; font-size: 1.1rem; line-height: 1.5; overflow-wrap: anywhere; }
.lm-sub { display: block; font-weight: 500; font-size: .85rem; }
.lm-meta { margin: 0 0 .5rem; font-size: .88rem; line-height: 1.6; overflow-wrap: anywhere; }
.lm-note { margin: 0 0 .5rem; font-size: .95rem; line-height: 1.8; }
.lm-small { margin: 0 0 .4rem; font-size: .85rem; line-height: 1.6; }
.lm-notice { margin: .2rem 0 .4rem; padding-left: .7em; border-left: 3px solid var(--red-deep); font-size: .82rem; line-height: 1.6; }
.lm-checked { display: block; }
.lm-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35em; min-height: 44px; margin-top: auto; padding: 0 .2rem; font-weight: 700; color: var(--red-deep); text-decoration: none; }
.lm-link-text { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lm-link:hover .lm-link-text { text-decoration-thickness: 3px; }
.lm-out { width: .95em; height: .95em; }
.lm-ad { display: inline-block; margin-left: .2em; padding: 0 .45em; background: var(--ink); color: var(--washi); font-size: .72rem; font-weight: 700; line-height: 1.6; letter-spacing: .06em; }
.lm-disclosure { margin: 0 0 1.4rem; padding: .7rem 1rem; border: 1px solid var(--ink); font-size: .85rem; line-height: 1.7; }
.lm-disclosure p { margin: 0; }
@media (max-width: 700px) { .lm-body { padding-right: calc(var(--gutter) + 14px); } }

/* ---------------- フッター・同意バナー・法的ページ ---------------- */
.site-footer { background: var(--ink); color: var(--washi); padding: 2rem var(--gutter) 6rem; text-align: center; }
.sf-pub { margin: 0 0 .6rem; font: 500 1.05rem/1.6 var(--f-en); letter-spacing: .12em; }
.sf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; font-size: .9rem; }
.sf-links a, .consent-open { color: inherit; font: inherit; background: none; border: 0; padding: .6rem .2rem; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.sf-links a:focus-visible, .consent-open:focus-visible { outline: 3px solid var(--washi); outline-offset: 2px; }
.consent {
  position: fixed; z-index: 70; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(46rem, calc(100vw - 16px));
  display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; padding: .55rem .8rem; background: var(--ink); color: var(--washi);
  box-shadow: 0 0 0 2px var(--washi); border-radius: 6px; font-size: .8rem; line-height: 1.55;
}
.consent[hidden] { display: none; }
.consent-text { margin: 0; flex: 1 1 16rem; }
.consent-title { margin-right: .3em; }
.consent-text a { color: inherit; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: .5rem; flex: 0 0 auto; margin-left: auto; }
.consent-btn { min-height: 44px; padding: .3rem .9rem; border: 2px solid var(--washi); background: none; color: var(--washi); font: 700 .85rem/1.2 var(--f-body); cursor: pointer; border-radius: 4px; }
.consent-btn:hover { background: var(--washi); color: var(--ink); }
@media (max-width: 700px) { .consent { bottom: 4px; padding: .4rem .6rem; font-size: .75rem; line-height: 1.45; } .consent-actions { width: 100%; } .consent-btn { flex: 1; } }
.legal { max-width: 42rem; margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.legal h1 { font: 800 clamp(1.7rem, 6vw, 2.6rem)/1.3 var(--f-ja); margin: 1.5rem 0; }
html:not(:lang(ja)) .legal h1 { font: 600 clamp(1.9rem, 6vw, 2.8rem)/1.15 var(--f-en); }
.legal h2 { font: 700 1.2rem/1.5 var(--f-body); margin: 2rem 0 .4rem; }
.legal-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.legal-nav a { display: inline-block; padding: .5rem 0; }
.legal-langs { display: flex; gap: 1rem; }
.legal-langs a[aria-current] { font-weight: 700; text-decoration: none; }
.legal-dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.4rem; }
.legal-dl dt { font-weight: 700; }
.legal-dl dd { margin: 0; }
.legal-todo { padding: 0 .3em; background: var(--red-deep); color: var(--washi); }
@media (max-width: 700px) {
  .site-footer, .spots-body { padding-right: calc(var(--gutter) + 14px); }
  .legal-dl { grid-template-columns: 1fr; gap: .1rem; }
  .legal-dl dd { margin-bottom: .8rem; }
}
.vignette figcaption, .ch-plate figcaption { margin: .5rem 0 0; font-size: .85rem; line-height: 1.6; }
.ch-plate figcaption { padding: 0 var(--gutter); max-width: 42rem; margin-inline: auto; }
@media (min-width: 900px) { .episode .vignette { float: right; clear: right; width: 13rem; margin: .4rem 0 1rem 1.6rem; } }

.song h2 { hyphens: none; }

@media (min-aspect-ratio: 9/10) {
  html.motion .scene--kozanji .big-word { z-index: 3; top: 1.5svh; font-size: min(calc(88vw / (var(--n) * .66)), 10.5svh); }
  /* PC：晋作を約1.15倍にして中央に。上（空）を基準に置き、下（雪）を切る → 顔〜膝と、刀に手をかける手元が群衆の上に見える */
  html.motion .scene--kozanji .scene-art img { left: 0; top: 3svh; width: 100%; height: 115%; min-width: 0; object-fit: cover; object-position: 50% 0; }
}
.kzc-n { font-family: "Noto Sans", var(--f-body); font-weight: 700; }

/* ---------------- 折り返し：日本語は句の切れ目（<wbr>）でだけ折る／禁則／バランス ---------------- */
html:lang(ja) body { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.cr-p { display: inline-block; }
:is(h1, h2, h3, h4, .ch-lead, figcaption, .song-gloss, .kz-line) { text-wrap: balance; }
:is(p, li, dd) { text-wrap: pretty; }
html:lang(de) :is(p, li, dd, figcaption) { hyphens: auto; }
html:lang(en) :is(p, li, dd) { hyphens: manual; }
[tabindex="-1"]:focus { outline: none; } /* アンカー移動で受け取るだけの要素に枠を出さない */
.kzc-a { font: 800 clamp(1rem, 2vw, 1.5rem)/1 var(--f-ja); letter-spacing: .1em; }
html:not(:lang(ja)) .kzc-a, html:not(:lang(ja)) .kzc-u { font-family: var(--f-en); font-weight: 600; letter-spacing: .03em; }

/* ---- 訪ねる地図：番号つきの丸（地図）とリストの番号（同じ番号で対応） ---- */
.map-num {
  position: absolute; left: 0; top: 0; width: 27px; height: 27px; margin: -13.5px 0 0 -13.5px; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--washi); color: var(--ink); font: 800 14px/23px "Noto Sans", var(--f-body); text-align: center;
  transform: translate(var(--lx, 0), var(--ly, 0)); opacity: 0; transition: opacity .35s;
}
.map-num.is-on { opacity: 1; }
.m-spot-dot { fill: var(--washi); stroke: var(--ink); stroke-width: calc(1.2px * var(--u, 1)); opacity: 0; transition: opacity .35s; }
.m-spot-lead { stroke: var(--washi); stroke-width: calc(2px * var(--u, 1)); opacity: 0; transition: opacity .35s; }
.m-spot-dot.is-on, .m-spot-lead.is-on.is-long { opacity: 1; }
.spot-no {
  display: inline-block; flex: none; width: 1.7em; height: 1.7em; margin-right: .5em; border-radius: 50%; vertical-align: .1em;
  background: var(--ink); color: var(--washi); font: 800 .82em/1.7em "Noto Sans", var(--f-body); text-align: center;
}
.spots-map-static { margin: 1.8rem 0; background: var(--red); overflow: hidden; }
.spots-static { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; }
.spots-static use[href$="#land"] { fill: var(--ink); }
.spots-static .sn-city { fill: var(--washi); font-weight: 800; font-family: var(--f-body); }
.spots-static .sn-mark text { font-weight: 800; font-family: "Noto Sans", var(--f-body); }
.spots-static--tall { display: none; aspect-ratio: 3 / 4; }
@media (max-aspect-ratio: 9/10) { .spots-static--wide { display: none; } .spots-static--tall { display: block; } }
/* 番号の丸の外側に大きな地名（萩は上、下関は下） */
.map-slot--spots .map-label[data-pos="t"] { transform: translate(-50%, calc(-100% - 30px)); }
.map-slot--spots .map-label[data-pos="b"] { transform: translate(-50%, 32px); }
