:root {
  --paper: #f4efe4;
  --ink: #1f2927;
  --muted: #66706b;
  --line: #c9c2b3;
  --red: #b64a39;
  --red-dark: #893527;
  --yellow: #e0b04a;
  --green: #3f685e;
  --white: #fffdf7;
  --shadow: 0 18px 50px rgba(52, 47, 38, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans JP", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 10px max(18px, env(safe-area-inset-left)); border-bottom: 1px solid rgba(31,41,39,.15); background: rgba(244,239,228,.92); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; width: 40px; aspect-ratio: 1; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: "Noto Serif JP", serif; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Noto Serif JP", serif; font-size: 15px; letter-spacing: .08em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.about-button { min-height: 44px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 11px; font-weight: 700; }
.about-panel { position: fixed; z-index: 50; top: 0; right: 0; width: min(430px, 100%); height: 100dvh; padding: 84px 30px 30px; background: var(--green); color: var(--white); box-shadow: -20px 0 60px rgba(0,0,0,.25); }
.about-panel h2 { font: 700 28px/1.55 "Noto Serif JP", serif; }
.about-panel p:last-child { line-height: 1.9; }
.about-panel .eyebrow { color: #f4c978; }
.close-button { position: absolute; top: 18px; right: 20px; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: transparent; color: white; font-size: 28px; }
main { overflow: hidden; }
.hero { position: relative; display: grid; min-height: 440px; padding: 62px 22px 36px; isolation: isolate; }
.hero::before { content: "1853"; position: absolute; z-index: -1; top: 12px; left: -20px; color: rgba(31,41,39,.045); font: 900 clamp(120px, 38vw, 380px)/1 "Noto Serif JP", serif; letter-spacing: -.08em; }
.hero-copy { align-self: center; max-width: 850px; }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font: 700 clamp(30px, 8.2vw, 76px)/1.32 "Noto Serif JP", serif; letter-spacing: -.04em; }
h1 em { position: relative; color: var(--red); font-style: normal; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; right: 0; bottom: -3px; left: 0; height: 3px; background: var(--red); transform: rotate(-1deg); }
.lead { max-width: 650px; margin: 22px 0 0; color: #4f5955; font-size: 14px; line-height: 1.9; }
.lead strong { color: var(--ink); }
.hero-stamp { display: none; }
.hero-stamp span, .hero-stamp small { font-size: 10px; letter-spacing: .2em; }
.hero-stamp strong { font: 900 32px/1.2 "Noto Serif JP", serif; }
.era-nav { position: sticky; top: 68px; z-index: 15; padding: 12px 0 12px 18px; border-block: 1px solid var(--line); background: rgba(244,239,228,.96); }
.era-nav > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.era-scroller { display: flex; gap: 8px; overflow-x: auto; padding-right: 18px; scrollbar-width: none; }
.era-scroller::-webkit-scrollbar, .timeline-track::-webkit-scrollbar { display: none; }
.era-scroller button { flex: 0 0 auto; min-width: 76px; min-height: 44px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font-size: 12px; }
.era-scroller button small { display: block; font-size: 8px; line-height: 1; }
.era-scroller button.active { border-color: var(--ink); background: var(--ink); color: white; font-weight: 700; }
.era-scroller button:disabled { opacity: .45; }
.timeline-section, .connections, .howto { padding: 68px 0; }
.section-heading { display: grid; gap: 12px; padding: 0 20px 28px; }
.section-heading h2, .howto h2 { margin: 0; font: 700 clamp(28px, 7vw, 46px)/1.3 "Noto Serif JP", serif; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.timeline-shell { position: relative; }
.timeline-years { display: flex; justify-content: space-between; padding: 0 24px 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
.timeline-shell::before { content: ""; position: absolute; top: 28px; right: 0; left: 0; border-top: 1px solid var(--line); }
.timeline-track { display: flex; gap: 13px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 22px 20px 28px; scrollbar-width: none; }
.story-card { position: relative; flex: 0 0 min(78vw, 330px); min-height: 270px; padding: 24px; overflow: hidden; scroll-snap-align: center; text-align: left; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,253,247,.65); color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.story-card::before { content: ""; position: absolute; top: -70px; right: -70px; width: 180px; height: 180px; border: 1px solid currentColor; border-radius: 50%; opacity: .09; }
.story-card.active { border-color: var(--red); background: var(--white); box-shadow: var(--shadow); transform: translateY(-5px); }
.story-year { display: block; margin-bottom: 52px; color: var(--red); font: 700 14px "Noto Serif JP", serif; }
.story-person { display: block; margin-bottom: 8px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.story-card strong { display: block; max-width: 235px; font: 700 20px/1.55 "Noto Serif JP", serif; }
.story-meta { display: block; margin-top: 16px; color: var(--muted); font-size: 10px; }
.card-status { position: absolute; right: 18px; bottom: 16px; min-height: 30px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; font-weight: 700; }
.story-card.active .card-status { border-color: var(--red); background: var(--red); color: white; }
.track-progress { display: flex; justify-content: center; gap: 12px; margin: -8px 0 8px; color: var(--red); font-size: 12px; letter-spacing: .16em; }
.track-progress strong { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.swipe-hint { margin: 0; color: #4f5955; text-align: center; font-size: 12px; letter-spacing: .04em; }
.detail-section { position: relative; display: grid; min-height: 550px; padding: 72px 22px; overflow: hidden; background: var(--green); color: var(--white); }
.detail-section::after { content: ""; position: absolute; top: 40px; right: -120px; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.detail-intro { position: relative; z-index: 2; align-self: center; max-width: 660px; }
.detail-intro .eyebrow { color: #f4c978; }
.detail-intro h2 { margin: 0; font: 700 clamp(30px, 8vw, 54px)/1.45 "Noto Serif JP", serif; }
.detail-intro > p:not(.eyebrow) { margin: 24px 0 30px; color: rgba(255,255,255,.8); font-size: 14px; line-height: 2; }
.detail-intro .episode-meta { margin: 0 0 14px !important; color: white !important; font-size: 14px !important; font-weight: 700; }
.detail-intro .external-note { margin: 10px 0 0 !important; color: rgba(255,255,255,.72) !important; font-size: 12px !important; }
.listen-actions { display: grid; gap: 10px; max-width: 360px; }
.spotify-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 1px solid var(--white); border-radius: 3px; background: var(--white); color: var(--green); text-decoration: none; font-size: 13px; font-weight: 800; }
.spotify-button.secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.spotify-button:hover { filter: brightness(.96); }
.spotify-button.secondary:hover { background: rgba(255,255,255,.08); filter: none; }
.detail-number { position: absolute; right: 12px; bottom: 4px; color: rgba(255,255,255,.09); font: 900 120px/1 "Noto Serif JP", serif; }
.connections { background: #eae2d3; }
.relation-axis { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; max-width: 520px; margin: 0 20px 20px; color: var(--red); font-size: 11px; text-align: center; }
.relation-axis::before, .relation-axis::after { content: ""; grid-row: 1; border-top: 1px solid var(--red); opacity: .45; }
.relation-axis::before { grid-column: 1 / 2; }
.relation-axis::after { grid-column: 3 / 4; }
.relation-axis > :first-child { grid-column: 1; grid-row: 1; }
.relation-axis strong { grid-column: 2; grid-row: 1; padding: 7px 12px; border: 1px solid var(--red); border-radius: 99px; background: #eae2d3; font-size: 11px; white-space: nowrap; }
.relation-axis > :last-child { grid-column: 3; grid-row: 1; }
.connection-list { display: grid; padding: 0 20px; }
.connection-card { display: grid; grid-template-columns: 52px 1fr 36px; gap: 14px; align-items: center; min-height: 126px; padding: 20px 0; border-top: 1px solid var(--line); text-decoration: none; }
.connection-card:last-child { border-bottom: 1px solid var(--line); }
.connection-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font: 700 18px "Noto Serif JP", serif; }
.connection-label { display: block; margin-bottom: 5px; color: var(--red-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.connection-card strong { display: block; font: 700 16px/1.55 "Noto Serif JP", serif; }
.connection-card p { margin: 5px 0 0; color: #4f5955; font-size: 13px; line-height: 1.65; }
.connection-arrow { justify-self: end; font-size: 22px; }
.howto { padding-inline: 20px; }
.howto-grid { display: grid; gap: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.howto article { position: relative; padding: 30px 0 26px 58px; border-bottom: 1px solid var(--line); }
.howto article > span { position: absolute; top: 31px; left: 0; color: var(--red); font: 700 16px "Noto Serif JP", serif; }
.howto h3 { margin: 0; font: 700 17px "Noto Serif JP", serif; }
.howto article p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
footer { padding: 42px 20px max(42px, env(safe-area-inset-bottom)); background: var(--ink); color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.8; }
footer strong { color: white; font: 700 17px "Noto Serif JP", serif; }
footer a { display: inline-block; min-height: 44px; margin-top: 18px; color: white; font-weight: 700; line-height: 44px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
@media (min-width: 760px) {
  .site-header { padding-inline: 34px; }
  .hero { grid-template-columns: minmax(0, 1fr) 180px; min-height: 680px; padding: 110px max(7vw, 50px) 70px; }
  .hero-stamp { display: grid; width: 160px; height: 160px; align-self: center; justify-self: end; place-content: center; text-align: center; border: 1px solid var(--red); border-radius: 50%; color: var(--red); transform: rotate(5deg); }
  .section-heading { grid-template-columns: 1fr 320px; align-items: end; padding-inline: max(7vw, 50px); }
  .timeline-years { padding-inline: max(7vw, 50px); }
  .timeline-track { padding-inline: max(7vw, 50px); }
  .story-card { flex-basis: 320px; }
  .detail-section { grid-template-columns: 1fr 1fr; padding-inline: max(9vw, 70px); }
  .connection-list, .howto { padding-inline: max(7vw, 50px); }
  .relation-axis { margin-inline: max(7vw, 50px); }
  .howto-grid { grid-template-columns: repeat(3, 1fr); }
  .howto article { min-height: 190px; padding: 64px 30px 30px; border-right: 1px solid var(--line); }
  .howto article > span { top: 24px; left: 30px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
