.story-page { background: var(--blue-deep); }
.story-page .site-header { color: var(--white); background: rgb(2 8 20 / 48%); box-shadow: none; backdrop-filter: blur(12px); }
.story-page .site-header.is-scrolled { color: var(--blue); background: rgb(255 255 255 / 94%); box-shadow: 0 1px 0 rgb(11 47 107 / 10%); }
.story-page.cinema-active .site-header { color: var(--white); background: rgb(2 8 20 / 88%); box-shadow: none; }
.story-page .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }
.story-page .mobile-menu nav > a[aria-current="page"] { border-color: var(--yellow); }

.story-hero { position: relative; display: grid; min-height: 100svh; place-items: center; overflow: hidden; color: var(--white); }
.story-hero-media,
.story-hero-shade { position: absolute; inset: 0; }
.story-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.story-hero-shade { background: linear-gradient(180deg, rgb(2 8 20 / 32%), rgb(7 29 66 / 58%) 54%, rgb(2 8 20 / 88%)); }
.story-hero-copy { position: relative; z-index: 1; width: min(900px, calc(100% - 48px)); padding-top: var(--header-height); text-align: center; }
.story-hero-copy > p,
.story-eyebrow,
.answer-eyebrow { color: var(--yellow); font-family: "Manrope", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.story-hero-copy h1 { margin: 22px 0 20px; color: var(--white); font-family: "Shippori Mincho", serif; font-size: clamp(34px, 5.2vw, 68px); font-weight: 500; line-height: 1.65; }
.story-hero-copy > span { color: rgb(255 255 255 / 76%); font-family: "Shippori Mincho", serif; font-size: clamp(14px, 1.4vw, 18px); }
.story-scroll-cue { position: absolute; z-index: 2; bottom: 28px; left: 50%; width: 36px; height: 52px; transform: translateX(-50%); }
.story-scroll-cue span { position: absolute; top: 9px; left: 12px; width: 12px; height: 12px; border-right: 1px solid var(--white); border-bottom: 1px solid var(--white); animation: story-cue 1.8s ease-in-out infinite; transform: rotate(45deg); }

.film-story { display: flex; flex-direction: column; background: var(--blue-deep); }
.film-act { position: relative; order: 1; }
#film-1 { order: 1; }
#film-2 { order: 2; }
#film-3 { order: 3; }
body[data-pov="pharmacist"] #film-2 { order: 1; }
body[data-pov="pharmacist"] #film-1 { order: 2; }
.chapter-card { position: relative; display: grid; min-height: 72svh; place-content: center; padding: 80px 24px; overflow: hidden; background: #020814; color: var(--white); text-align: center; }
.chapter-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgb(11 47 107 / 38%), transparent 58%); opacity: .6; }
.chapter-card > * { position: relative; }
.chapter-card h2 { margin: 0; color: var(--white); font-family: "Shippori Mincho", serif; font-size: clamp(28px, 4vw, 50px); font-weight: 500; line-height: 1.6; opacity: .28; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.chapter-card.is-in-view h2 { opacity: 1; transform: translateY(0); }
body[data-pov="patient"] #film-1 .chapter-card::after,
body[data-pov="pharmacist"] #film-2 .chapter-card::after { content: "あなたが選んだ視点"; position: absolute; bottom: 16%; left: 50%; color: var(--yellow); font-size: 12px; transform: translateX(-50%); }

.cinema-scene { position: relative; min-height: calc(var(--subtitle-count) * 92svh); background: var(--blue-deep); }
.cinema-frame { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--blue-deep); }
.cinema-picture,
.cinema-picture img { width: 100%; height: 100%; }
.cinema-picture { position: absolute; inset: 0; }
.cinema-picture img { object-fit: cover; object-position: center; }
.cinema-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(2 8 20 / 22%), transparent 44%, rgb(2 8 20 / 66%)); }
.cinema-band { position: absolute; z-index: 2; right: 0; left: 0; height: 7vh; background: rgb(2 8 20 / 97%); transform: translateY(0); }
.cinema-band-top { top: 0; }
.cinema-band-bottom { bottom: 0; }
.cinema-subtitles { position: absolute; z-index: 3; right: 24px; bottom: 17vh; left: 24px; min-height: 110px; pointer-events: none; }
.cinema-subtitle { position: absolute; right: 0; bottom: 0; left: 0; margin: 0; color: var(--white); font-family: "Shippori Mincho", serif; font-size: clamp(20px, 2.35vw, 28px); font-weight: 500; line-height: 1.9; text-align: center; text-shadow: 0 2px 16px rgb(0 0 0 / 90%); opacity: 0; transform: translateY(8px); transition: opacity .9s ease, transform .9s ease; }
.cinema-subtitle.is-active { opacity: 1; transform: translateY(0); }

.film-dawn { background: var(--blue-deep); }
.dawn-scene { min-height: 220svh; --dawn-progress: 0; --dawn-answer: 0; }
.dawn-frame { position: sticky; top: 0; display: grid; height: 100svh; place-items: center; overflow: hidden; background: #020814; }
.dawn-light { position: absolute; inset: 0; background: url("../assets/img/story-answer-sunrise-v1.png") center / cover no-repeat; opacity: var(--dawn-progress); }
.dawn-copy { position: relative; z-index: 1; width: min(950px, calc(100% - 48px)); min-height: 360px; text-align: center; }
.dawn-monologue { position: absolute; top: 50%; right: 0; left: 0; margin: 0; color: var(--white); font-family: "Shippori Mincho", serif; font-size: clamp(30px, 4.8vw, 62px); line-height: 1.8; text-shadow: 0 2px 18px rgb(0 0 0 / 36%); opacity: calc(1 - var(--dawn-answer)); transform: translateY(-50%); }
.dawn-answer { position: absolute; top: 50%; right: 0; left: 0; opacity: var(--dawn-answer); transform: translateY(-45%); }
.answer-eyebrow { margin-bottom: 16px; color: var(--yellow-ink); }
.dawn-answer h2 { margin: 0 0 22px; color: var(--blue); font-family: "Shippori Mincho", serif; font-size: clamp(34px, 5vw, 68px); font-weight: 500; line-height: 1.55; }
.dawn-answer > p:last-child { max-width: 760px; margin: 0 auto; color: var(--blue); font-size: clamp(16px, 1.5vw, 20px); font-weight: 500; line-height: 2; }

.epilogue { background: var(--blue-deep); }
.epilogue-scenes { display: flex; flex-direction: column; }
.epilogue-scene { order: 1; }
body[data-pov="patient"] [data-epilogue-pov="patient"],
body[data-pov="pharmacist"] [data-epilogue-pov="pharmacist"] { order: 0; }
body[data-pov="patient"] [data-epilogue-pov="patient"] .cinema-frame,
body[data-pov="pharmacist"] [data-epilogue-pov="pharmacist"] .cinema-frame { box-shadow: inset 0 0 0 2px rgb(246 199 47 / 72%); }

.story-closing { display: grid; min-height: 92svh; place-items: center; padding: 100px 24px; background: var(--blue-deep); color: var(--white); text-align: center; }
.story-closing-inner h2 { margin: 22px 0; color: var(--white); font-family: "Shippori Mincho", serif; font-size: clamp(34px, 5vw, 66px); font-weight: 500; line-height: 1.65; }
.story-closing-inner > p:not(.story-eyebrow) { color: rgb(255 255 255 / 74%); font-family: "Shippori Mincho", serif; font-size: 18px; }
.story-closing-actions { display: flex; justify-content: center; gap: 12px; margin-top: 42px; }
.story-page .site-footer { background: #020814; }

@keyframes story-cue { 0%, 100% { opacity: .35; transform: translateY(-4px) rotate(45deg); } 50% { opacity: 1; transform: translateY(6px) rotate(45deg); } }

@media (max-width: 767px) {
  .story-hero-copy { width: calc(100% - 36px); }
  .story-hero-copy h1 { font-size: clamp(28px, 8.5vw, 40px); }
  .story-hero-copy > span { display: block; font-size: 13px; line-height: 1.8; }
  .chapter-card { min-height: 60svh; padding-inline: 18px; }
  .chapter-card h2 { font-size: clamp(27px, 8vw, 38px); }
  .cinema-scene { min-height: calc(var(--subtitle-count) * 88svh); }
  .cinema-band { height: 5vh; }
  .cinema-subtitles { right: 18px; bottom: 14vh; left: 18px; min-height: 96px; }
  .cinema-subtitle { font-size: 18px; line-height: 1.85; }
  .dawn-copy { width: calc(100% - 36px); }
  .dawn-monologue { font-size: clamp(29px, 8.7vw, 42px); }
  .dawn-answer h2 { font-size: min(6.95vw, 30px); }
  .dawn-answer h2 span,
  .story-closing-inner h2 span { display: inline-block; white-space: nowrap; }
  .dawn-answer > p:last-child { font-size: 14px; line-height: 1.9; }
  .story-closing-inner h2 { font-size: min(7.8vw, 31px); }
  .story-closing-actions { flex-direction: column; width: min(300px, 100%); margin-inline: auto; }
  .story-closing-actions .button { width: 100%; }
  .story-page.cinema-active .sticky-cta { transform: translateY(110%); }
}

@media (prefers-reduced-motion: reduce) {
  .story-scroll-cue span { animation: none; }
  .chapter-card h2 { opacity: 1; transform: none; }
  .cinema-scene { min-height: auto; }
  .cinema-frame { position: relative; display: flex; min-height: 100svh; height: auto; align-items: flex-end; padding: 16vh 0 10vh; }
  .cinema-subtitles { position: relative; right: auto; bottom: auto; left: auto; display: grid; width: 100%; min-height: 0; gap: 24px; padding-inline: 24px; }
  .cinema-subtitle { position: static; opacity: 1; transform: none; }
  .dawn-scene { min-height: auto; }
  .dawn-frame { position: relative; min-height: 100svh; height: auto; padding: 100px 24px; }
  .dawn-light { opacity: 1; }
  .dawn-copy { min-height: 0; }
  .dawn-monologue { display: none; }
  .dawn-answer { position: static; opacity: 1; transform: none; }
}
