:root {
  color-scheme: dark;
  --scene-a: #d56a5f;
  --scene-b: #f2c18d;
  --scene-c: #f5efe4;
  --ink: #fdf7ef;
  --ink-soft: rgba(253, 247, 239, 0.75);
  --paper: rgba(24, 18, 16, 0.68);
  --paper-strong: rgba(12, 9, 8, 0.78);
  --border: rgba(255, 250, 242, 0.16);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --hud-height: 76px;
  --max-width: 1220px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 214, 178, 0.22), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(255, 180, 157, 0.2), transparent 24%),
    linear-gradient(145deg, #130d0c 0%, #1d1513 40%, #090707 100%);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

body[data-scene="intro"] {
  --scene-a: #d56a5f;
  --scene-b: #f2c18d;
  --scene-c: #f5efe4;
}

body[data-scene="gallery"] {
  --scene-a: #9a7a57;
  --scene-b: #dcb78c;
  --scene-c: #efe4d3;
}

body[data-scene="play"] {
  --scene-a: #b76a84;
  --scene-b: #e3b0c5;
  --scene-c: #f5e8ef;
}

body[data-scene="wishes"] {
  --scene-a: #6a7c9d;
  --scene-b: #adc2df;
  --scene-c: #edf2f8;
}

body[data-scene="finale"] {
  --scene-a: #d08f5a;
  --scene-b: #f0c38d;
  --scene-c: #fbf0df;
}

body.unlocked {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.4;
  mix-blend-mode: screen;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb--one {
  width: 34vw;
  height: 34vw;
  left: -8vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(238, 164, 126, 0.95), rgba(238, 164, 126, 0.04) 68%);
}

.orb--two {
  width: 28vw;
  height: 28vw;
  right: -7vw;
  top: 10vh;
  background: radial-gradient(circle, rgba(158, 175, 233, 0.85), rgba(158, 175, 233, 0.02) 68%);
  animation-delay: -6s;
}

.orb--three {
  width: 24vw;
  height: 24vw;
  left: 28vw;
  bottom: -10vw;
  background: radial-gradient(circle, rgba(255, 201, 149, 0.72), rgba(255, 201, 149, 0.02) 68%);
  animation-delay: -11s;
}

.grain,
.flash {
  position: absolute;
  inset: 0;
}

.grain {
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.028) 0px,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.01) 0px,
      rgba(255, 255, 255, 0.01) 1px,
      transparent 1px,
      transparent 6px
    );
  opacity: 0.35;
  mix-blend-mode: overlay;
}

.flash {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  opacity: 0;
}

body.scene-cut .flash {
  animation: cutFlash 320ms ease-out;
}

.lockscreen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
  background:
    radial-gradient(circle at top, rgba(214, 129, 96, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(16, 12, 11, 0.92), rgba(8, 7, 6, 0.98));
  backdrop-filter: blur(14px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 240ms ease;
}

body.unlocked .lockscreen {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
}

.lock-card {
  width: min(100%, 560px);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.04) 60%, rgba(255, 220, 180, 0.06) 100%),
    rgba(12, 9, 8, 0.48);
  border: 1px solid rgba(255, 246, 237, 0.22);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 248, 240, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 60px rgba(214, 129, 96, 0.08);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  text-align: left;
  animation: cardBreathe 5s ease-in-out infinite;
}

.lock-card h1,
.frame h2,
.frame h3 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lock-card h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  margin-top: 0.2rem;
}

.lock-copy,
.lock-note,
.lede,
.section-copy p,
.wish-form,
.wish-panel,
.final-card p,
.feature-list {
  color: var(--ink-soft);
}

.eyebrow,
.stamp,
.card-kicker,
.hud__label {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: rgba(255, 246, 235, 0.78);
}

.field {
  display: grid;
  gap: 0.6rem;
  margin: 1.35rem 0;
}

.field span {
  font-size: 0.95rem;
  color: rgba(255, 247, 240, 0.88);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 247, 240, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(255, 213, 176, 0.45);
  box-shadow: 0 0 0 4px rgba(226, 167, 113, 0.16);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    background 170ms ease,
    color 170ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button--primary {
  background: linear-gradient(135deg, var(--scene-a), var(--scene-b));
  color: #120d0c;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  animation: btnGlow 3s ease-in-out infinite;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lock-note {
  margin: 1rem 0 0;
}

.reel {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  z-index: 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 260ms ease, transform 260ms ease;
}

body.unlocked .reel {
  opacity: 1;
  transform: translateY(0);
}

.hud {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--hud-height);
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(12, 9, 8, 0.84), rgba(12, 9, 8, 0.4));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hud__brand {
  display: grid;
  gap: 0.2rem;
}

.hud__brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.hud__meta {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  min-width: min(42vw, 360px);
}

.progress {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--scene-a), var(--scene-b));
  border-radius: inherit;
  transition: width 170ms ease;
  position: relative;
  overflow: hidden;
}

.progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  animation: shimmer 2s ease-in-out infinite;
  background-size: 200% 100%;
}

.chapter-dots {
  position: fixed;
  right: 1rem;
  top: 50%;
  z-index: 7;
  display: grid;
  gap: 0.6rem;
  transform: translateY(-50%);
}

.chapter-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.chapter-dot:hover {
  transform: scale(1.1);
}

.chapter-dot.is-active {
  background: linear-gradient(135deg, var(--scene-a), var(--scene-b));
  opacity: 1;
  transform: scale(1.3);
}

.frame {
  position: relative;
  min-height: 100svh;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  display: grid;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  isolation: isolate;
}

.frame::before {
  content: attr(data-index);
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.06);
  z-index: -1;
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.05), transparent 25%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  opacity: 0.95;
  z-index: -2;
}

.frame__inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
}

.frame__inner--stack {
  grid-template-columns: minmax(0, 1fr);
}

.frame.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.frame:not(.is-active) {
  opacity: 0.78;
  transform: scale(0.985);
  filter: saturate(0.8) blur(0.4px);
}

.hero-copy,
.hero-card,
.section-copy,
.mood-card,
.wish-panel,
.final-card,
.photo-slot {
  border: 1px solid rgba(255, 248, 240, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(18, 13, 11, 0.45);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 248, 240, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
}

.hero-copy,
.section-copy,
.wish-panel,
.final-card {
  border-radius: var(--radius-xl);
  padding: clamp(1.35rem, 3vw, 2rem);
}

.hero-copy h2,
.section-copy h2,
.final-card h3,
.mood-card h3 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  margin-bottom: 0.6rem;
}

.hero-copy .lede,
.section-copy p,
.final-card p {
  max-width: 62ch;
  line-height: 1.7;
}

.name-slot {
  display: inline-block;
  padding: 0.08em 0.25em;
  border-radius: 0.25em;
  background: rgba(255, 255, 255, 0.08);
  color: #fff5ea;
}

.cta-row,
.wish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.2rem 0 0;
}

.feature-list {
  margin: 1.2rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
}

.feature-list li {
  opacity: 0;
  transform: translateX(-12px);
  animation: slideInLeft 400ms ease forwards;
}

.feature-list li:nth-child(1) { animation-delay: 0.2s; }
.feature-list li:nth-child(2) { animation-delay: 0.4s; }
.feature-list li:nth-child(3) { animation-delay: 0.6s; }

.hero-card {
  border-radius: var(--radius-xl);
  padding: 1.2rem;
  min-height: 100%;
}

.poster {
  position: relative;
  min-height: 420px;
  border-radius: calc(var(--radius-xl) - 10px);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top left, rgba(255, 220, 189, 0.15), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.26)),
    rgba(15, 12, 10, 0.84);
  overflow: hidden;
}

.poster::before,
.poster::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
  pointer-events: none;
}

.poster::before {
  width: 280px;
  height: 280px;
  right: -80px;
  top: 40px;
  background: radial-gradient(circle, rgba(255, 206, 164, 0.38), rgba(255, 206, 164, 0));
}

.poster::after {
  width: 180px;
  height: 180px;
  left: -60px;
  bottom: -30px;
  background: radial-gradient(circle, rgba(183, 213, 255, 0.24), rgba(183, 213, 255, 0));
}

/* ── Poster lines float ── */
.poster__line {
  display: block;
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 0.8;
  font-weight: 800;
  letter-spacing: -0.07em;
  color: rgba(255, 247, 239, 0.9);
  animation: posterFloat 4s ease-in-out infinite alternate;
}

.poster__line:nth-child(1) { animation-delay: 0s; }
.poster__line:nth-child(2) { animation-delay: 0.3s; }
.poster__line:nth-child(3) { animation-delay: 0.6s; }
.poster__line:nth-child(4) { animation-delay: 0.9s; }

.poster__caption {
  align-self: flex-end;
  margin-top: 2rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 246, 236, 0.72);
}

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

.photo-slot {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  border: 1px solid var(--border);
  background: rgba(17, 13, 12, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.photo-slot:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.26);
}

.photo-slot--wide {
  grid-column: 1 / -1;
}

.photo-slot--tall {
  grid-row: span 2;
}

.photo-slot img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  display: block;
  border-radius: calc(var(--radius-xl) - 10px);
}

.photo-slot--wide img {
  max-height: 220px;
}

.photo-slot--tall img {
  max-height: 380px;
}

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

.mood-card {
  border-radius: var(--radius-xl);
  padding: 1.2rem;
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 260px;
  animation: cardSway 6s ease-in-out infinite alternate;
}

.mood-card:nth-child(1) { animation-delay: 0s; }
.mood-card:nth-child(2) { animation-delay: 0.8s; animation-duration: 7s; }
.mood-card:nth-child(3) { animation-delay: 1.6s; animation-duration: 5.5s; }

.mood-card h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.wish-panel {
  display: grid;
  gap: 1rem;
}

.wish-form {
  display: grid;
  gap: 1rem;
}

.wish-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.wish-chip {
  min-height: 38px;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

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

.wish-card {
  position: relative;
  min-height: 132px;
  padding: 1rem 1rem 1.1rem;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(20, 15, 13, 0.38);
  border: 1px solid rgba(255, 248, 240, 0.16);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 248, 240, 0.18);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  transform: rotate(var(--tilt, 0deg));
  animation: popIn 360ms ease both, wishBob 5s ease-in-out infinite var(--bob-delay, 0s);
}

.wish-card p {
  margin: 0;
  line-height: 1.6;
}

.wish-card small {
  display: block;
  margin-top: 0.75rem;
  color: rgba(255, 247, 239, 0.66);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.final-card {
  width: min(100%, 720px);
}

.final-card h3 {
  font-size: clamp(2rem, 4.5vw, 4rem);
  margin-bottom: 0.8rem;
}

/* ── Filmstrip ── */
.filmstrip {
  width: 100%;
  overflow: hidden;
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.filmstrip__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: stripScroll 28s linear infinite;
  background: #0d0a09;
  padding: 28px 0;
  position: relative;
}

.filmstrip__track--right {
  animation-direction: reverse;
  animation-duration: 22s;
}

/* sprocket holes — top */
.filmstrip__track::before,
.filmstrip__track::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 20px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 6px,
    #1a1410 6px,
    #1a1410 10px,
    transparent 10px,
    transparent 24px,
    rgba(255,255,255,0.12) 24px,
    rgba(255,255,255,0.12) 38px,
    transparent 38px,
    transparent 52px
  );
  background-size: 52px 100%;
  border-radius: 2px;
}

.filmstrip__track::before {
  top: 4px;
}

.filmstrip__track::after {
  bottom: 4px;
}

.filmstrip__track img {
  height: 140px;
  width: auto;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0 3px;
  border: none;
  box-shadow: none;
}

@keyframes stripScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.spark {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7e7, var(--scene-b));
  box-shadow: 0 0 18px rgba(255, 214, 162, 0.95);
  pointer-events: none;
  z-index: 25;
  animation: sparkBurst 820ms ease-out forwards;
}

.shake {
  animation: shake 260ms ease-in-out;
}

/* ── Music toggle button ── */
.music-toggle {
  position: fixed;
  bottom: 1.4rem;
  left: 1.4rem;
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
    rgba(18, 13, 11, 0.5);
  border: 1px solid rgba(255, 246, 235, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 246, 235, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, border-color 200ms ease, color 200ms ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.music-toggle:hover {
  transform: scale(1.1);
  border-color: rgba(255, 220, 180, 0.35);
  color: rgba(255, 246, 235, 0.9);
}

.music-icon {
  display: block;
  transition: transform 400ms ease;
}

.music-toggle.is-playing .music-icon {
  animation: musicPulse 1.4s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.25); opacity: 0.7; }
}


.lock-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.lock-hearts span {
  position: absolute;
  font-size: clamp(1.2rem, 3vw, 2rem);
  animation: floatHeart 6s ease-in-out infinite;
  opacity: 0;
}

.lock-hearts span:nth-child(1) { left: 8%;  animation-delay: 0s;    animation-duration: 7s; }
.lock-hearts span:nth-child(2) { left: 22%; animation-delay: 1.2s;  animation-duration: 5s; }
.lock-hearts span:nth-child(3) { left: 40%; animation-delay: 0.4s;  animation-duration: 8s; }
.lock-hearts span:nth-child(4) { left: 58%; animation-delay: 2s;    animation-duration: 6s; }
.lock-hearts span:nth-child(5) { left: 75%; animation-delay: 0.8s;  animation-duration: 7s; }
.lock-hearts span:nth-child(6) { left: 90%; animation-delay: 1.6s;  animation-duration: 5.5s; }

/* ── Age badge ── */
.age-badge {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.45em 1em;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--scene-a), var(--scene-b));
  color: #120d0c;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ── Name slot glow ── */
.name-slot {
  display: inline-block;
  padding: 0.08em 0.25em;
  border-radius: 0.25em;
  background: rgba(255, 255, 255, 0.08);
  color: #fff5ea;
  transition: text-shadow 300ms ease;
}

.name-slot:hover {
  text-shadow: 0 0 24px rgba(255, 220, 180, 0.8), 0 0 48px rgba(255, 190, 130, 0.4);
}

/* ── Photo captions ── */
.photo-caption {
  display: block;
  text-align: center;
  padding: 0.4rem 0 0.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(255, 247, 235, 0.7);
}

/* ── Photo slot hover glow ── */
.photo-slot:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 220, 180, 0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255, 210, 160, 0.15);
}

/* ── Wish chip hover ── */
.wish-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 220, 180, 0.3);
  transform: translateY(-2px);
  transition: all 160ms ease;
}

/* ── Emoji burst particles ── */
.spark-emoji {
  position: fixed;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 25;
  animation: sparkBurst 900ms ease-out forwards;
}



body[data-scene="intro"] .frame--hero,
body[data-scene="gallery"] .frame--gallery,
body[data-scene="play"] .frame--play,
body[data-scene="wishes"] .frame--wishes,
body[data-scene="finale"] .frame--finale {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(22px, -26px, 0) scale(1.08);
  }
}

@keyframes cutFlash {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sparkBurst {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) scale(1.8);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}

@keyframes floatHeart {
  0%   { opacity: 0; transform: translateY(100vh) scale(0.6); }
  10%  { opacity: 0.8; }
  80%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1.1); }
}

@keyframes posterFloat {
  0%   { transform: translateY(0px); }
  100% { transform: translateY(-6px); }
}

@keyframes cardBreathe {
  0%, 100% { box-shadow: 0 30px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,246,237,0.14); }
  50%       { box-shadow: 0 30px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,220,180,0.32), 0 0 32px rgba(255,200,140,0.1); }
}

@keyframes cardSway {
  0%   { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-5px) rotate(0.4deg); }
}

@keyframes wishBob {
  0%, 100% { transform: rotate(var(--tilt, 0deg)) translateY(0px); }
  50%       { transform: rotate(var(--tilt, 0deg)) translateY(-4px); }
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 16px 34px rgba(0,0,0,0.24); }
  50%       { box-shadow: 0 16px 34px rgba(0,0,0,0.24), 0 0 20px rgba(var(--scene-b), 0.3); }
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes slideInLeft {
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1100px) {
  .frame__inner,
  .mood-grid,
  .wish-wall {
    grid-template-columns: 1fr;
  }

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

  .photo-slot--wide {
    grid-column: auto;
  }

  .photo-slot--tall {
    grid-row: auto;
  }
}

/* ── Tablet ── */
@media (max-width: 860px) {
  .frame__inner {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none; /* hide the poster card on tablet, not enough room */
  }

  .mood-grid {
    grid-template-columns: 1fr;
  }

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

  .wish-wall {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  :root {
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
  }

  .hud {
    flex-direction: row;
    align-items: center;
    min-height: 54px;
    padding: 0.6rem 1rem;
    gap: 0.6rem;
  }

  .hud__brand strong {
    font-size: 0.85rem;
  }

  .hud__label {
    display: none;
  }

  .hud__meta {
    min-width: 0;
    flex: 1;
    justify-items: end;
  }

  #scene-count {
    font-size: 0.75rem;
  }

  /* dots move to bottom center */
  .chapter-dots {
    right: 50%;
    top: auto;
    bottom: 0.75rem;
    transform: translateX(50%);
    grid-auto-flow: column;
    gap: 0.5rem;
  }

  .chapter-dot {
    width: 8px;
    height: 8px;
  }

  .frame {
    padding: 0.75rem 0.75rem 5rem;
    min-height: 100svh;
    align-items: start;
    padding-top: calc(54px + 1rem);
  }

  .frame__inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* hide poster on mobile, just show the copy */
  .hero-card {
    display: none;
  }

  .hero-copy h2,
  .section-copy h2 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  .hero-copy .lede {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .button,
  .wish-actions .button {
    width: 100%;
    justify-content: center;
  }

  .feature-list {
    font-size: 0.88rem;
  }

  /* gallery: single column on mobile */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .photo-slot img {
    max-height: 220px;
  }

  /* mood cards: single column */
  .mood-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .mood-card {
    min-height: auto;
    padding: 1rem;
    animation: none; /* disable sway on mobile for perf */
  }

  .mood-card h3 {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  /* wishes: single column */
  .wish-wall {
    grid-template-columns: 1fr;
  }

  .wish-card {
    transform: none; /* no tilt on mobile, looks off */
    animation: popIn 360ms ease both; /* no bob either */
    min-height: auto;
  }

  .wish-tags {
    gap: 0.5rem;
  }

  .wish-chip {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    min-height: 34px;
  }

  /* finale */
  .final-card h3 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .filmstrip__track img {
    height: 100px;
  }

  /* lock screen */
  .lock-card {
    border-radius: var(--radius-xl);
  }

  .lock-card h1 {
    font-size: clamp(2rem, 9vw, 3.5rem);
  }

  /* music button — move up a bit so it clears the nav dots */
  .music-toggle {
    bottom: 3.5rem;
    left: 1rem;
    width: 40px;
    height: 40px;
  }

  /* section headings */
  .section-copy h2 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }

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