:root {
  --mist: #eef3f4;
  --ink: #1e2540;
  --ink-soft: #6b7490;
  --sea: #2f7f8a;
  --tower: #f05a28;
  --lamp: #f2b85b;
  --night: #141b33;
  --night-soft: #232c4a;
  --album-ink: #f4f1ea;

  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --figure: "Bodoni Moda", "Didot", "Hiragino Mincho ProN", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;

  --sheet-w: min(100vw, 430px);
  --gutter: 26px;
  --rail: 22px;

  --fs-cover: calc(var(--sheet-w) * 0.34);
  --fs-year: calc(var(--sheet-w) * 0.4);
  --fs-h1: 27px;
  --fs-h2: 19px;
  --fs-place: 20px;
  --fs-time: 21px;
  --fs-body: 15px;
  --fs-note: 13.5px;
  --fs-small: 11.5px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--gothic);
  font-size: var(--fs-body);
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.mincho {
  font-family: var(--mincho);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* 日本語の折り返しを文節で切る。未対応のブラウザは既定の禁則のまま。 */
.cover__headline,
.stop__note,
.kit__note,
.frame__caption,
.letter__body p,
.map-section__lead {
  word-break: auto-phrase;
}

.figure {
  font-family: var(--figure);
  font-style: italic;
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.01em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 一本の線。ページ全体に1枚だけ敷き、JS が d を組み立てる。 */
.thread {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 4;
}

.thread path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

/* 線の終端。塔の輪郭を両脚から立ち上げて頂点で閉じる。 */
.tower-line {
  fill: none;
  stroke: var(--tower);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .thread path,
  .tower-line {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* メディアの浮き上がり */
.rise {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 400ms ease-out,
    transform 400ms ease-out;
}

.rise.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .rise {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
