/* 人口が減った後の日本をどう作るか ― 画面の決まり
   読む面は冬の紙（冷たい灰青）、場面は夜の海（藍黒）に漁火の琥珀。 */
:root {
  color-scheme: light;
  --paper: #f1f3f5; --paper-2: #e6eaef; --ink: #1b2432; --ink-2: #5a6572; --ink-3: #6b7a8c;
  --line: #d3d9e0; --grid: #dde2e8;
  --night: #0f1a2b; --night-2: #16253c; --night-ink: #e8edf3; --night-ink-2: #a9b5c4; --night-line: rgba(232, 237, 243, .16);
  --amber: #c07a12; --amber-text: #9a5f08; --amber-night: #c98500;
  --indigo: #3b63b0; --indigo-night: #4a84dc; --violet: #6f5fc4; --violet-night: #8c7fe4;
  --mist: #8fa3b8; --dim: #aab4c0;
  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", YuMincho, "BIZ UDPMincho", "Noto Serif JP", "Noto Serif CJK JP", "Source Han Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  --measure: 38em; --wide: 58rem;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 1100ms;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.95;
  line-break: strict; overflow-wrap: anywhere; font-kerning: normal;
}
@media (max-width: 760px) { body { font-size: 1rem; line-height: 1.9; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.scene :focus-visible { outline-color: var(--amber-night); }
p { margin: 0 0 1.45em; }
ul, ol { padding-left: 1.4em; } li { margin: .35em 0; }
strong { font-weight: 600; }
small { font-size: .85em; }
.num, .stat, .chart, .tbl, .year-badge, .fig-year, .fig-cap, .fig-legend, .widget-out, .data, .steps-ladder, .meter, .grid18, .timeline-tech, .legend { font-family: var(--sans); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.visually-quiet { color: var(--ink-2); }

/* 進み具合と章の案内 */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--amber); z-index: 50; }
.chapters { position: fixed; right: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 40; display: none; }
@media (min-width: 1180px) { .chapters { display: block; } }
.chapters ol { list-style: none; margin: 0; padding: 0; }
.chapters li { margin: .35rem 0; }
.chapters a { display: block; font-family: var(--sans); font-size: .72rem; line-height: 1.3; color: var(--ink-3); text-decoration: none; padding: .15rem .5rem .15rem .9rem; position: relative; }
.chapters a::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--dim); transform: translateY(-50%); }
.chapters a.is-active { color: var(--ink); }
.chapters a.is-active::before { background: var(--amber); }
.scene-active .chapters a { color: var(--night-ink-2); } .scene-active .chapters a.is-active { color: var(--night-ink); }

/* 場面（夜の海） */
.scene { background: var(--night); color: var(--night-ink); position: relative; }
.scene-grid { display: grid; grid-template-columns: 58% 42%; }
.scene-fig { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 0 1rem; }
.scene-fig svg { width: 100%; height: auto; max-height: 100dvh; display: block; }
.steps { padding: 0 2.5rem 0 1rem; }
.step { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 3rem 0; max-width: 30em; opacity: .32; transition: opacity .5s var(--ease); }
.step.is-active { opacity: 1; }
.step p { font-size: 1.125rem; line-height: 2; }
.step .note { font-size: .85rem; color: var(--night-ink-2); margin-top: .25rem; }
.step h3 { font-size: 1.15rem; font-weight: 500; margin: 0 0 .9em; letter-spacing: .04em; }
.step-mark { font-family: var(--sans); font-size: .8rem; color: var(--night-ink-2); margin-bottom: 1.2em; letter-spacing: .06em; }
@media (max-width: 760px) {
  .scene-grid { display: block; }
  .scene-fig { height: auto; max-height: 44dvh; z-index: 2; background: var(--night); padding: .5rem .75rem .25rem; align-items: flex-start; }
  .scene-fig svg { max-height: calc(44dvh - .75rem); }
  .steps { padding: 0 1.25rem; }
  .step { min-height: 62dvh; padding: 2rem 0 2.5rem; justify-content: center; }
  .step p { font-size: 1.05rem; line-height: 1.9; }
}
/* 点 */
.dots-svg .dot { transition: transform var(--dur) var(--ease), opacity 800ms var(--ease); will-change: transform; }
.dots-svg .dot .core { fill: var(--mist); transition: fill 700ms var(--ease), transform 800ms var(--ease); transform-origin: 0 0; }
.dots-svg .dot .halo { fill: var(--mist); opacity: 0; transition: opacity 700ms var(--ease), fill 700ms var(--ease); }
.dots-svg .dot.cat-old75 .core { fill: var(--amber-night); }
.dots-svg .dot.cat-old75 .halo { fill: var(--amber-night); opacity: .14; }
.dots-svg .dot.is-work .core { fill: var(--indigo-night); }
.dots-svg .dot.is-work .halo { fill: var(--indigo-night); opacity: .12; }
.dots-svg .dot.is-hidden .core { transform: scale(.15); }
.dots-svg .dot.is-tech .core { fill: var(--night-ink); }
.dots-svg text { fill: var(--night-ink-2); font-size: 15px; }
.dots-svg .fig-year { font-size: 34px; fill: var(--night-ink); font-weight: 600; letter-spacing: .02em; }
.dots-svg .fig-cap { font-size: 16px; fill: var(--night-ink-2); }
.dots-svg .fig-legend text { font-size: 14px; }
.dots-svg .lg-mist { fill: var(--mist); } .dots-svg .lg-amber { fill: var(--amber-night); } .dots-svg .lg-work { fill: var(--indigo-night); }
.dots-svg .zone { fill: rgba(232, 237, 243, .028); }
.dots-svg .zone.sea { fill: rgba(74, 132, 220, .10); }
.dots-svg .zone-label { font-size: 15px; fill: var(--night-ink-2); text-anchor: middle; transition: fill .5s; }
.dots-svg .zone-label.is-on { fill: var(--night-ink); }
.dots-svg .ground { stroke: var(--night-line); stroke-width: 1; }
.dots-svg .road { stroke: var(--night-ink-2); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .6s, stroke-width .6s, opacity .6s; }
.dots-svg .road.is-thin { stroke-width: 1.5; stroke-dasharray: 6 8; opacity: .7; }
.dots-svg .glyph { stroke: var(--mist); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dots-svg .fade { opacity: 0; transition: opacity 800ms var(--ease); } .dots-svg .fade.is-on { opacity: 1; }
.dots-svg .route { stroke: var(--night-ink-2); stroke-width: 1.5; stroke-dasharray: 4 7; fill: none; }
.dots-svg .band { fill: var(--violet-night); opacity: .38; }
.dots-svg .band-label { fill: var(--night-ink); font-size: 14px; text-anchor: middle; }
.dots-svg .leader { stroke: var(--violet-night); stroke-width: 1.5; stroke-dasharray: 3 6; }
.dots-svg .center { fill: none; stroke: var(--violet-night); stroke-width: 2; }
.dots-svg .tag { font-size: 13px; fill: var(--night-ink-2); text-anchor: middle; }

/* 題字（場面 A の最初の段） */
.hero-step { max-width: none; }
.hero-wrap { display: flex; gap: 2.5rem; align-items: stretch; justify-content: flex-start; }
.hero-title { margin: 0; writing-mode: vertical-rl; text-orientation: mixed; font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 500; line-height: 1.55; letter-spacing: .1em; font-feature-settings: "palt"; height: min(66dvh, 21em); color: var(--night-ink); }
.hero-side { max-width: 21em; align-self: flex-end; padding-bottom: 1rem; }
.hero-side p { font-size: 1.05rem; line-height: 2; }
.hero-side .lede { color: var(--night-ink); }
.hero-side .key { color: var(--night-ink-2); font-size: .95rem; }
.hero-meta { font-family: var(--sans); font-size: .8rem; color: var(--night-ink-2); letter-spacing: .04em; margin-top: 1.5rem; }
.hero-cue { display: inline-block; margin-top: 1rem; font-family: var(--sans); font-size: .8rem; color: var(--night-ink-2); text-decoration: none; letter-spacing: .08em; }
.hero-cue::after { content: ""; display: block; width: 1px; height: 2.2rem; background: var(--night-ink-2); margin: .6rem 0 0 .4rem; }
@media (max-width: 760px) {
  .hero-wrap { flex-direction: column; gap: 1.2rem; }
  .hero-title { writing-mode: horizontal-tb; height: auto; font-size: clamp(1.7rem, 7.5vw, 2.4rem); line-height: 1.45; }
  .hero-side { align-self: auto; }
}

/* 読む面 */
.part { padding: 6rem 1.25rem 5rem; }
.part + .part { border-top: 1px solid var(--line); }
.reading { max-width: var(--measure); margin-inline: auto; }
.wide { max-width: var(--wide); margin-inline: auto; }
.part-head { max-width: var(--measure); margin: 0 auto 3rem; }
.part-no { display: block; font-family: var(--sans); font-size: .85rem; color: var(--ink-2); letter-spacing: .1em; margin-bottom: .6rem; }
.part-title { font-size: clamp(1.55rem, 2.5vw, 2.05rem); font-weight: 500; line-height: 1.5; letter-spacing: .04em; font-feature-settings: "palt"; margin: 0 0 1rem; }
.part-lead { font-size: 1.1rem; color: var(--ink-2); margin: 0; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: .03em; margin: 2.8em 0 .9em; }
h4 { font-size: 1.02rem; font-weight: 600; margin: 2em 0 .6em; }
.reading h3:first-child { margin-top: 0; }
.quiet { max-width: 34em; margin: 5rem auto; padding: 0 .5rem; }
.quiet h3 { font-weight: 500; letter-spacing: .08em; }
.quiet p { line-height: 2.15; }
.toc { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.toc li { margin: 0; border-bottom: 1px solid var(--line); }
.toc a { display: flex; gap: 1.2rem; padding: .85rem .2rem; text-decoration: none; }
.toc a:hover { background: var(--paper-2); }
.toc .toc-no { font-family: var(--sans); font-size: .85rem; color: var(--ink-2); min-width: 3.2em; padding-top: .15em; }
.toc .toc-sub { display: block; font-size: .9rem; color: var(--ink-2); }
dl.terms { margin: 1.5rem 0; }
dl.terms dt { font-weight: 600; margin-top: 1.3em; }
dl.terms dd { margin: .3em 0 0; }
.compare { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: .95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: .8rem .6rem; border-bottom: 1px solid var(--line); }
.compare th { font-family: var(--sans); font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.compare td:first-child { font-family: var(--sans); font-size: .9rem; color: var(--ink-2); width: 8em; }

/* 大きな数字 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem 2.5rem; margin: 2.5rem auto; max-width: var(--wide); }
.stat { border-top: 1px solid var(--ink); padding-top: .9rem; }
.stat .v { font-size: 2.1rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.stat .v small { font-size: .95rem; font-weight: 500; margin-left: .15em; color: var(--ink-2); }
.stat .l { margin-top: .4rem; font-size: .92rem; color: var(--ink); }
.stat .d { font-size: .82rem; color: var(--ink-2); margin-top: .25rem; line-height: 1.6; }
.stat.hero-stat .v { font-size: 2.9rem; }
.src { font-family: var(--sans); font-size: .76rem; color: var(--ink-3); line-height: 1.7; margin: .8rem 0 0; }
.src a { color: var(--ink-3); }
.src .grade { display: inline-block; border: 1px solid var(--line); border-radius: 3px; padding: 0 .4em; margin-left: .5em; }

/* 図（HTML で描く） */
.chart { margin: 3rem auto; max-width: var(--wide); font-size: .9rem; }
.chart > figcaption { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 1rem; color: var(--ink); }
.chart > figcaption .sub { display: block; font-size: .9rem; color: var(--ink-2); margin-top: .2rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: .8rem; color: var(--ink-2); margin: 0 0 .9rem; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .45em; vertical-align: -1px; background: var(--c, var(--indigo)); }
.rows { display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: var(--labw, 8.5em) 1fr; gap: .9rem; align-items: center; min-height: 2.1rem; }
.row .lab { font-size: .86rem; color: var(--ink); text-align: right; line-height: 1.4; }
.row .lab small { display: block; color: var(--ink-2); font-size: .75rem; }
.track { position: relative; height: 2rem; }
.bar { position: absolute; top: 50%; height: 18px; transform: translateY(-50%); background: var(--indigo); border-radius: 0 4px 4px 0; }
.bar.emph { background: var(--amber); } .bar.dim { background: var(--dim); } .bar.violet { background: var(--violet); }
.bar.range { border-radius: 4px; }
.bar.neg { border-radius: 4px 0 0 4px; }
.val { position: absolute; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.pt { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--paper); background: var(--c, var(--indigo)); }
.conn { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); background: var(--dim); }
.zero { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink-3); }
.axis { display: flex; justify-content: space-between; margin-left: calc(var(--labw, 8.5em) + .9rem); border-top: 1px solid var(--grid); padding-top: .3rem; font-size: .74rem; color: var(--ink-3); }
.axis.center { position: relative; }
.chart .tbl { margin-top: 1rem; font-size: .82rem; }
.tbl summary { cursor: pointer; color: var(--ink-2); font-size: .82rem; padding: .3rem 0; width: max-content; }
.tbl table { border-collapse: collapse; margin-top: .4rem; min-width: 18rem; }
.tbl th, .tbl td { text-align: left; padding: .35rem .8rem .35rem 0; border-bottom: 1px solid var(--grid); font-weight: 400; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { font-size: 12px; fill: var(--ink-2); }
.chart-svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-svg .base { stroke: var(--dim); stroke-width: 1; }
.chart-svg .obs { stroke: var(--indigo); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .proj { stroke: var(--indigo); stroke-width: 2; fill: none; stroke-dasharray: 5 6; stroke-linecap: round; }
.chart-svg .mark { fill: var(--indigo); stroke: var(--paper); stroke-width: 2; }
.chart-svg .mark.emph { fill: var(--amber); }
.chart-svg .range { stroke: var(--dim); stroke-width: 6; stroke-linecap: round; opacity: .9; }
.chart-svg .lbl { fill: var(--ink); font-weight: 500; }
.chart-svg .lbl.sub { fill: var(--ink-2); font-size: 11px; font-weight: 400; }
@media (max-width: 760px) {
  .row { grid-template-columns: var(--labw-s, 6.5em) 1fr; gap: .6rem; }
  .axis { margin-left: calc(var(--labw-s, 6.5em) + .6rem); }
  .stats { gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
  .stat .v { font-size: 1.7rem; } .stat.hero-stat .v { font-size: 2.2rem; }
}

/* 移行の年表 */
.year-badge { position: sticky; top: 1rem; float: right; margin: 0 0 0 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .9rem; font-size: .9rem; font-weight: 600; letter-spacing: .04em; z-index: 5; }
.year-badge small { font-weight: 400; color: var(--ink-2); margin-left: .5em; font-size: .72rem; }
.phases { position: relative; margin: 2rem 0 3rem; padding-left: 2.4rem; }
.phases::before { content: ""; position: absolute; left: .55rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); }
.phase { position: relative; padding: .2rem 0 2.6rem; }
.phase::before { content: ""; position: absolute; left: -2.4rem; top: .55rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--dim); transition: border-color .4s, background .4s; }
.phase.is-now::before { border-color: var(--amber); background: var(--amber); }
.phase .ph-years { font-family: var(--sans); font-size: .85rem; color: var(--ink-2); letter-spacing: .04em; }
.phase h3 { margin: .2em 0 .7em; }
.steps-ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; align-items: end; margin: 2.5rem auto 1rem; max-width: var(--wide); }
.ladder-step { background: var(--paper-2); padding: 1rem .9rem 1.1rem; border-top: 3px solid var(--indigo); display: flex; flex-direction: column; justify-content: flex-end; }
.ladder-step:nth-child(1) { min-height: 11rem; } .ladder-step:nth-child(2) { min-height: 13.5rem; } .ladder-step:nth-child(3) { min-height: 16rem; } .ladder-step:nth-child(4) { min-height: 18.5rem; }
.ladder-step .no { font-size: .75rem; color: var(--ink-2); letter-spacing: .08em; }
.ladder-step .nm { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; margin: .2rem 0 .5rem; }
.ladder-step .ex { font-size: .78rem; color: var(--ink-2); line-height: 1.6; }
.ladder-step .now { margin-top: .9rem; font-size: .8rem; }
.ladder-step .now b { display: block; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.ladder-step .now span { color: var(--ink-2); }
.ladder-step .rate { margin-top: .7rem; font-size: .76rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: .5rem; }
@media (max-width: 760px) { .steps-ladder { grid-template-columns: 1fr 1fr; align-items: stretch; } .ladder-step { min-height: 0 !important; justify-content: flex-start; } }

/* 道南の道具 */
.widget { margin: 2.5rem auto; max-width: var(--wide); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 1.6rem 0 1.8rem; }
.widget form { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; font-family: var(--sans); }
.widget label { font-size: .95rem; }
.widget select { font: inherit; font-size: 1rem; padding: .45rem .7rem; border: 1px solid var(--ink-3); border-radius: 4px; background: #fff; color: var(--ink); min-width: 9em; }
.widget-out { margin: 1.2rem 0 0; font-size: 1rem; line-height: 1.9; }
.widget-out b { font-size: 1.35rem; font-weight: 600; }
.widget-out .muted { color: var(--ink-2); font-size: .88rem; }
.meter { margin: 1rem 0 .3rem; }
.meter .track-m { position: relative; height: 12px; background: #d9c9a7; border-radius: 6px; overflow: hidden; }
.meter .fill-m { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); border-radius: 6px 0 0 6px; }
.meter .m-lab { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-2); margin-top: .35rem; }
.grid18 { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: 2px; margin: 1.5rem 0 .8rem; }
.grid18 span { background: var(--paper-2); padding: .55rem .5rem; font-size: .85rem; text-align: center; border-top: 3px solid var(--amber); }
.grid18 span.not { border-top-color: var(--dim); }
.grid18-legend { font-size: .8rem; color: var(--ink-2); font-family: var(--sans); }
.grid18-legend i { display: inline-block; width: 1.1em; height: 3px; vertical-align: middle; margin-right: .4em; background: var(--amber); }
.grid18-legend i.not { background: var(--dim); }

/* 弱点の一覧（飾らない） */
.plain-list { list-style: none; padding: 0; margin: 2rem 0; }
.plain-list li { padding: 1rem 0; border-top: 1px solid var(--line); margin: 0; }
.plain-list li:last-child { border-bottom: 1px solid var(--line); }
.plain-list b { display: block; font-weight: 600; margin-bottom: .2em; }

/* 付録 */
.appendix { background: var(--paper-2); }
.appendix .part-head { max-width: var(--wide); }
.data { width: 100%; border-collapse: collapse; font-size: .83rem; margin: 1.5rem 0 2.5rem; }
.data th, .data td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--line); line-height: 1.6; }
.data th { font-weight: 600; color: var(--ink-2); font-size: .78rem; }
.data td:first-child, .data th:first-child { white-space: nowrap; color: var(--ink-2); }
.data-fold > summary { cursor: pointer; font-family: var(--sans); font-size: .9rem; color: var(--ink-2); padding: .4rem 0; }
.data .g { white-space: nowrap; }
.data a { word-break: break-all; }
.timeline-tech { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 2px solid var(--line); }
.timeline-tech li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.timeline-tech li::before { content: ""; position: absolute; left: -7px; top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--indigo); }
.timeline-tech time { display: block; font-size: .82rem; color: var(--ink-2); }
.timeline-tech b { display: block; font-family: var(--serif); font-size: 1rem; margin: .15rem 0 .3rem; }
.timeline-tech p { font-family: var(--serif); font-size: .92rem; margin: 0; }
.about { font-size: .95rem; }
footer.site-foot { padding: 3rem 1.25rem 4rem; font-family: var(--sans); font-size: .8rem; color: var(--ink-2); text-align: center; border-top: 1px solid var(--line); }
noscript .nojs { background: var(--paper-2); padding: 1rem 1.25rem; margin: 0; font-size: .9rem; }

@media print {
  .progress, .chapters, .hero-cue, .year-badge { display: none !important; }
  .scene { background: #fff; color: #000; }
  .scene-fig { position: static; height: auto; }
  .step { min-height: 0; opacity: 1; }
  .tbl details { display: block; } .tbl details > * { display: block; }
  a { text-decoration: none; }
}

/* 図のラベルの追記 */
.val { background: var(--paper); padding: 0 .25em; border-radius: 2px; }
.val.up { top: 2px; transform: none; font-size: .72rem; }
.val.inside { color: #fff; background: transparent; }
.val.inside.on-emph, .val.inside.on-dim { color: var(--ink); }
.svg-wrap { margin: .5rem 0 0; }
.chart .legend span::before { background: var(--c, var(--indigo)); }
.chart .legend span[style*="var(--dim)"]::before { background: var(--dim); }

/* 広い画面：右端の章の案内と場面の文章を重ねない。題字の列は少し広くとる */
@media (min-width: 1180px) {
  .scene .steps { padding-right: 4.5rem; }
  .scene-grid { grid-template-columns: 55% 45%; }
  .chapters { right: .9rem; }
}
.hero-wrap { gap: 1.75rem; }
.hero-side { max-width: 19em; min-width: 0; flex: 0 1 auto; }
.hero-title { flex: 0 0 auto; }
@media (max-width: 760px) { .hero-title { order: -1; margin-bottom: .5rem; } }
