:root {
  color-scheme: light;
  --ivory: #fff8fb;
  --paper: #fffafd;
  --vellum: #f9e6f1;
  --rose: #ed6f8f;
  --rose-deep: #9e2f5d;
  --gold: #d7a642;
  --gold-soft: #ffe5a8;
  --sage: #5fa77d;
  --blue: #5d9fca;
  --lilac: #8f78d7;
  --peach: #ff9f7f;
  --ink: #2c2532;
  --muted: #6f6477;
  --line: rgba(158, 47, 93, 0.16);
  --shadow: 0 24px 72px rgba(158, 47, 93, 0.14);
  --soft-shadow: 0 14px 34px rgba(82, 84, 132, 0.12);
  --radius: 8px;
  --max: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 248, 251, 0.95), rgba(255, 250, 253, 0.9)),
    linear-gradient(135deg, #fff7fb 0%, #fff0d8 32%, #edf8ff 68%, #f4edff 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    linear-gradient(120deg, rgba(237, 111, 143, 0.08) 1px, transparent 1px),
    linear-gradient(60deg, rgba(93, 159, 202, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(158, 47, 93, 0.12);
  background: rgba(255, 248, 251, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 0;
  min-width: max-content;
  text-decoration: none;
}

.brand span {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.brand small {
  color: var(--rose-deep);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.2rem, 2vw, 1rem);
  overflow-x: auto;
}

.site-header nav a {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--ink);
  background: rgba(237, 111, 143, 0.12);
  outline: none;
}

main {
  overflow: clip;
}

section {
  scroll-margin-top: 88px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100svh - 74px);
  padding: clamp(2rem, 6vw, 5.4rem) clamp(1rem, 5vw, 5rem) clamp(1.6rem, 5vw, 4rem);
}

.hero::after {
  position: absolute;
  right: clamp(1rem, 5vw, 5rem);
  bottom: 0;
  left: clamp(1rem, 5vw, 5rem);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(237, 111, 143, 0.4), rgba(93, 159, 202, 0.28), transparent);
}

.hero-copy {
  width: 100%;
  min-width: 0;
  max-width: 680px;
}

.hero > * {
  min-width: 0;
}

.sender,
.section-heading p,
.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--rose-deep);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  color: var(--ink);
  font-size: clamp(4rem, 12vw, 9.8rem);
  font-weight: 700;
}

.hero-lede {
  max-width: 580px;
  margin: 1.35rem 0 0;
  color: #66586f;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.action-row,
.journey-actions,
.choice-grid,
.studio-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-actions {
  margin-top: 2rem;
}

.button,
button.button,
.choice-button,
.icon-button,
.tiny-button,
.dialog-close,
.timeline-move {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, color 170ms ease, opacity 170ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  padding: 0.78rem 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.choice-button:hover,
.icon-button:hover,
.tiny-button:hover,
.timeline-move:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.choice-button:focus-visible,
.icon-button:focus-visible,
.tiny-button:focus-visible,
.dialog-close:focus-visible,
.timeline-move:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(237, 111, 143, 0.28);
  outline-offset: 2px;
}

.button.primary,
button.primary {
  color: #fffafd;
  background: linear-gradient(135deg, var(--rose-deep), var(--rose) 48%, var(--peach));
  box-shadow: 0 14px 32px rgba(237, 111, 143, 0.24);
}

.button.ghost,
button.ghost {
  color: var(--ink);
  border-color: rgba(93, 159, 202, 0.32);
  background: rgba(255, 255, 255, 0.62);
}

.button.subtle,
button.subtle {
  color: var(--muted);
  border-color: rgba(158, 47, 93, 0.14);
  background: rgba(255, 255, 255, 0.38);
}

.button[disabled],
button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.hero-film {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 500px;
}

.video-card,
.memory-detail,
.journey-view,
.film-card,
.studio-panel,
.guide-card,
.ending-card,
.bonus-card {
  border: 1px solid rgba(237, 111, 143, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 250, 253, 0.74);
  box-shadow: var(--shadow);
}

.hero-film .video-card {
  transform: rotate(1.2deg);
}

.video-card {
  width: 100%;
  overflow: hidden;
}

.video-frame {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(158, 47, 93, 0.18), rgba(93, 159, 202, 0.16)),
    var(--vellum);
}

.video-frame video,
.video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder,
.audio-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  color: #fffafd;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(158, 47, 93, 0.08), rgba(44, 37, 50, 0.66)),
    linear-gradient(135deg, var(--rose), var(--blue));
}

.video-placeholder strong,
.audio-placeholder strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
}

.video-placeholder span,
.audio-placeholder span {
  display: block;
  max-width: 34ch;
  margin: 0 auto;
  color: rgba(255, 250, 243, 0.82);
}

.video-body {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1rem, 3vw, 1.6rem);
}

.video-body h3 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.video-body p {
  margin: 0;
  color: var(--muted);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 1.25rem;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.journey-shell,
.films-section,
.album-section,
.reveal-section,
.studio-section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.journey-view {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  overflow: hidden;
}

.journey-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(249, 230, 241, 0.72), rgba(237, 248, 255, 0.62));
}

.journey-kicker {
  margin: 0 0 0.25rem;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-title {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.progress-rail {
  overflow: hidden;
  width: min(240px, 36vw);
  height: 9px;
  border-radius: 999px;
  background: rgba(158, 47, 93, 0.12);
}

.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--peach), var(--blue));
  transition: width 260ms ease;
}

.chapter-surface {
  min-height: 540px;
}

.journey-controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-top: 1px solid var(--line);
}

.memory-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 0.85fr);
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.memory-photo-wrap {
  position: relative;
  min-height: 540px;
  background: #f9e6f1;
}

.memory-photo-wrap img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.memory-photo-wrap::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(46, 41, 37, 0.02), rgba(46, 41, 37, 0.22));
}

.memory-copy {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  padding: clamp(1.1rem, 4vw, 2rem);
  background:
    linear-gradient(180deg, rgba(255, 250, 253, 0.96), rgba(246, 242, 255, 0.88)),
    var(--paper);
}

.memory-date {
  margin: 0;
  color: var(--rose-deep);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.memory-copy h3 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.caption {
  margin: 0;
  color: #66586f;
  font-size: 1.03rem;
}

.audio-card,
.trivia-card,
.game-card,
.completion-card {
  padding: 1rem;
  border: 1px solid rgba(158, 47, 93, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.audio-card {
  display: grid;
  gap: 0.75rem;
}

.audio-card audio {
  width: 100%;
}

.missing-note {
  margin: 0;
  padding: 0.85rem;
  border-radius: var(--radius);
  color: #66586f;
  background: rgba(93, 159, 202, 0.12);
  font-size: 0.92rem;
}

.missing-note code,
pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.trivia-card h4,
.game-card h4,
.completion-card h4 {
  margin-bottom: 0.65rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 900;
}

.question-block {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(158, 47, 93, 0.1);
}

.question-block:first-of-type {
  border-top: 0;
}

.question-text {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.choice-grid {
  align-items: stretch;
}

.choice-button {
  flex: 1 1 160px;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  border-color: rgba(158, 47, 93, 0.14);
  background: rgba(255, 250, 253, 0.78);
  font-weight: 800;
  text-align: left;
}

.choice-button.correct {
  color: #24533b;
  border-color: rgba(95, 167, 125, 0.45);
  background: rgba(95, 167, 125, 0.16);
}

.choice-button.wrong {
  color: #8f2d5a;
  border-color: rgba(237, 111, 143, 0.32);
  background: rgba(237, 111, 143, 0.12);
}

.love-note,
.game-status {
  margin: 0;
  color: var(--rose-deep);
  font-weight: 800;
}

.game-card {
  display: grid;
  gap: 0.9rem;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(158, 47, 93, 0.16);
  border-radius: var(--radius);
  background: var(--vellum);
}

.puzzle-tile {
  min-height: 0;
  border: 1px solid rgba(255, 250, 243, 0.7);
  border-radius: 0;
  background-repeat: no-repeat;
  background-size: 300% 300%;
}

.puzzle-tile.selected {
  outline: 4px solid rgba(93, 159, 202, 0.65);
  outline-offset: -4px;
}

.timeline-list {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(158, 47, 93, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 250, 253, 0.78);
}

.timeline-item[draggable="true"] {
  cursor: grab;
}

.timeline-item.dragging {
  opacity: 0.48;
}

.timeline-move {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  color: var(--muted);
  border-color: rgba(158, 47, 93, 0.18);
  background: rgba(255, 255, 255, 0.45);
}

.timeline-controls {
  display: flex;
  gap: 0.35rem;
}

.completion-card {
  display: grid;
  gap: 0.85rem;
}

.completion-card p {
  margin: 0;
  color: var(--muted);
}

.films-grid,
.album-grid {
  display: grid;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  gap: 1rem;
}

.films-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.film-card {
  overflow: hidden;
}

.reveal-section {
  padding-top: clamp(5rem, 10vw, 8rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
  color: #fffafd;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 229, 168, 0.24), transparent 34%),
    linear-gradient(135deg, #2c2532 0%, #5d2d48 48%, #16394a 100%);
}

.final-reveal-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
}

.final-reveal-copy {
  display: grid;
  gap: 1rem;
}

.final-reveal-copy .eyebrow {
  color: var(--gold-soft);
}

.final-reveal-copy h2 {
  max-width: 16ch;
  margin: 0;
  color: #fffafd;
  font-size: clamp(2.8rem, 8vw, 7rem);
  line-height: 0.96;
  text-align: center;
  text-wrap: balance;
}

.final-reveal-copy {
  justify-items: center;
}

.final-reveal-copy p:not(.eyebrow) {
  max-width: 34rem;
  margin: 0;
  color: rgba(255, 250, 253, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.final-reveal-video .video-card {
  border-color: rgba(255, 229, 168, 0.3);
  background: rgba(255, 250, 253, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.final-reveal-video {
  justify-self: center;
  width: 100%;
}

.final-reveal-video .video-frame {
  min-height: 0;
  aspect-ratio: 16 / 9;
  background: #0f0b10;
}

.final-reveal-video .video-frame video {
  object-fit: contain;
  background: #0f0b10;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: #fffafd;
  background:
    linear-gradient(180deg, rgba(15, 11, 16, 0.04), rgba(15, 11, 16, 0.42)),
    radial-gradient(circle at center, rgba(255, 229, 168, 0.18), transparent 42%);
  cursor: pointer;
}

.video-play-overlay span {
  display: inline-grid;
  grid-template-columns: 0.75rem auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 48px;
  padding: 0.82rem 1.1rem;
  border: 1px solid rgba(255, 250, 253, 0.55);
  border-radius: var(--radius);
  color: #fffafd;
  background: rgba(15, 11, 16, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.26);
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.video-play-overlay span::before {
  width: 0;
  height: 0;
  content: "";
  border-top: 0.38rem solid transparent;
  border-bottom: 0.38rem solid transparent;
  border-left: 0.62rem solid currentColor;
}

.video-play-overlay:hover span,
.video-play-overlay:focus-visible span {
  border-color: rgba(255, 229, 168, 0.75);
  transform: translateY(-1px);
}

.album-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.memory-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(237, 111, 143, 0.18);
  border-radius: var(--radius);
  color: inherit;
  background: rgba(255, 250, 253, 0.8);
  box-shadow: var(--soft-shadow);
  text-align: left;
}

.memory-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.memory-card:hover img {
  transform: scale(1.025);
}

.memory-card-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 0.3rem;
  padding: 4rem 0.85rem 0.9rem;
  color: #fffafd;
  background: linear-gradient(180deg, transparent, rgba(44, 37, 50, 0.76));
}

.memory-card-body h3 {
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.18;
  text-shadow: 0 1px 8px rgba(44, 37, 50, 0.36);
}

.memory-card-body p {
  margin: 0;
  color: rgba(255, 250, 253, 0.86);
  font-size: 0.86rem;
}

.game-chip {
  width: fit-content;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  color: #fffafd;
  background: rgba(237, 111, 143, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.album-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.album-tools input,
.album-tools select,
.studio-panel input,
.studio-panel select,
.studio-panel textarea {
  min-height: 44px;
  border: 1px solid rgba(158, 47, 93, 0.16);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 250, 253, 0.78);
}

.album-tools input,
.studio-panel input,
.studio-panel textarea {
  padding: 0.75rem 0.85rem;
}

.album-tools select,
.studio-panel select {
  padding: 0.75rem 2rem 0.75rem 0.85rem;
}

.studio-panel {
  display: grid;
  gap: 1rem;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 1.5rem);
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.studio-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(158, 47, 93, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.38);
}

.studio-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 900;
}

.studio-card p,
.studio-panel p {
  margin: 0;
  color: var(--muted);
}

.studio-panel textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

.studio-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.studio-stat {
  padding: 0.85rem;
  border-radius: var(--radius);
  background: rgba(249, 230, 241, 0.64);
}

.studio-stat strong {
  display: block;
  font-size: 1.4rem;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(158, 47, 93, 0.14);
  border-radius: var(--radius);
  background: rgba(44, 37, 50, 0.92);
  color: #fffafd;
  font-size: 0.84rem;
  line-height: 1.45;
}

.small-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.memory-dialog {
  width: min(1060px, calc(100vw - 1.4rem));
  max-height: min(900px, calc(100vh - 1.4rem));
  padding: 0;
  border: 1px solid rgba(237, 111, 143, 0.28);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(44, 37, 50, 0.26);
}

.memory-dialog::backdrop {
  background: rgba(44, 37, 50, 0.42);
  backdrop-filter: blur(8px);
}

.memory-dialog .memory-detail {
  max-height: calc(100vh - 1.4rem);
  overflow-y: auto;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-color: rgba(255, 250, 243, 0.55);
  color: #fffafd;
  background: rgba(158, 47, 93, 0.62);
  font-size: 1.45rem;
}

.ending-card,
.bonus-card {
  display: grid;
  align-content: center;
  min-height: 540px;
  padding: clamp(1.4rem, 6vw, 4rem);
  text-align: center;
}

.ending-card h3,
.bonus-card h3 {
  max-width: 12ch;
  margin: 0 auto;
  font-size: clamp(3rem, 8vw, 7rem);
}

.ending-card p,
.bonus-card p {
  max-width: 58ch;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.montage-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  width: min(760px, 100%);
  margin: 1.6rem auto;
}

.montage-strip img {
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--soft-shadow);
}

.empty-state,
.noscript-card {
  width: min(720px, calc(100% - 2rem));
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid rgba(158, 47, 93, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 250, 253, 0.78);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-film {
    min-height: 0;
  }

  .memory-detail {
    grid-template-columns: 1fr;
  }

  .memory-photo-wrap {
    min-height: 420px;
  }

  .films-grid,
  .album-grid,
  .studio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .final-reveal-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  section {
    scroll-margin-top: 128px;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.7rem 1rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: flex-start;
  }

  h1 {
    max-width: 8.5ch;
    font-size: clamp(3rem, 14vw, 4.35rem);
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-film .video-card {
    transform: none;
  }

  .hero-film {
    min-height: auto;
  }

  .video-card {
    max-width: 100%;
  }

  .video-frame,
  .final-reveal-video .video-frame {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .section-heading,
  .section-heading.with-actions,
  .journey-meta,
  .journey-controls {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .progress-rail {
    width: 100%;
  }

  .chapter-surface {
    min-height: auto;
  }

  .memory-photo-wrap {
    min-height: 360px;
  }

  .films-grid,
  .album-grid,
  .studio-grid,
  .studio-stat-row {
    grid-template-columns: 1fr;
  }

  .final-reveal-copy h2 {
    max-width: 10ch;
  }

  .album-tools {
    justify-content: stretch;
  }

  .album-tools input,
  .album-tools select {
    width: 100%;
  }

  .memory-dialog .memory-detail {
    max-height: none;
  }

  .memory-card img {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
