:root {
  --bg: #120f14;
  --panel: rgba(31, 24, 34, 0.82);
  --panel-strong: #241b28;
  --text: #fff9fb;
  --muted: #cdbfc8;
  --accent: #f2a9bd;
  --accent-strong: #e781a0;
  --accent-soft: rgba(242, 169, 189, 0.14);
  --gold: #e6c98f;
  --border: rgba(255, 255, 255, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, video { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid rgba(242, 169, 189, 0.72); outline-offset: 4px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 999px; filter: blur(90px); opacity: .16; }
.orb-one { width: 420px; height: 420px; background: var(--accent-strong); top: -130px; right: -80px; }
.orb-two { width: 340px; height: 340px; background: #85658d; bottom: -120px; left: -80px; }
.orb-three { width: 200px; height: 200px; background: var(--gold); top: 45%; left: 45%; opacity: .08; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: calc(14px + var(--safe-top)) clamp(18px, 4vw, 54px) 14px;
  background: linear-gradient(to bottom, rgba(18,15,20,.95), rgba(18,15,20,.5), transparent);
}
.brand-button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 6px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; font-size: 12px; letter-spacing: .02em; background: rgba(255,255,255,.06); }
.brand-mark span { color: var(--accent); margin: 0 1px; }
.brand-name { font-weight: 650; letter-spacing: .02em; }
.progress-wrap { display: flex; align-items: center; gap: 12px; width: min(43vw, 380px); color: var(--muted); font-size: 12px; }
.progress-track { flex: 1; height: 4px; border-radius: 10px; background: rgba(255,255,255,.12); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--gold)); transition: width .55s ease; }

.music-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 142px;
  padding: 7px 11px 7px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.music-toggle:hover { transform: translateY(-1px); border-color: rgba(242,169,189,.45); }
.music-toggle.is-playing { background: var(--accent-soft); border-color: rgba(242,169,189,.48); }
.music-disc {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: #2c1720;
  font-size: 17px;
  box-shadow: 0 0 0 0 rgba(242,169,189,.34);
}
.music-toggle.is-playing .music-disc { animation: musicPulse 1.8s ease-in-out infinite; }
.music-meta { display: grid; line-height: 1.05; }
.music-meta strong { font-size: 13px; font-weight: 720; }
.music-meta small { margin-top: 4px; color: var(--muted); font-size: 10px; }
@keyframes musicPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(242,169,189,.3); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 7px rgba(242,169,189,0); }
}

#storyApp { position: relative; z-index: 1; min-height: 100vh; }
.scene {
  position: absolute;
  inset: 0;
  min-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(88px + var(--safe-top)) clamp(18px, 4vw, 56px) calc(32px + var(--safe-bottom));
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.992);
  transition: opacity .52s ease, transform .52s ease, visibility .52s;
}
.scene.is-active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.scene-shell { width: min(1180px, 100%); min-height: calc(100dvh - 140px); margin: 0 auto; display: grid; align-items: center; }

.intro-scene { padding: 0; display: grid; place-items: center; overflow: hidden; }
.intro-photo-wrap { position: absolute; inset: 0; }
.intro-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; filter: saturate(.9) contrast(1.03); transform: scale(1.02); }
.intro-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,11,17,.92) 0%, rgba(15,11,17,.65) 48%, rgba(15,11,17,.42) 100%), linear-gradient(to top, rgba(15,11,17,.84), transparent 55%); }
.intro-content { position: relative; z-index: 2; width: min(760px, calc(100% - 36px)); margin-right: auto; margin-left: clamp(18px, 9vw, 140px); padding: 38px 0 calc(34px + var(--safe-bottom)); }
.eyebrow, .chapter-number { margin: 0 0 14px; color: var(--accent); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .22em; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(68px, 12vw, 150px); font-weight: 500; line-height: .88; letter-spacing: -.055em; }
.intro-names { margin: 24px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 3vw, 34px); }
.intro-names span { color: var(--accent); padding: 0 8px; }
.intro-copy { max-width: 510px; margin: 0 0 30px; color: #eee2e8; font-size: clamp(17px, 2vw, 21px); line-height: 1.65; }
.signature { margin: 16px 0 0; color: rgba(255,255,255,.64); font-size: 13px; }

.primary-button, .secondary-button {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 22px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.primary-button { border: 1px solid transparent; background: var(--accent); color: #2c1720; font-weight: 760; box-shadow: 0 12px 34px rgba(231,129,160,.22); }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); background: #ffc0d2; }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.secondary-button { border: 1px solid var(--border); background: rgba(255,255,255,.05); color: var(--text); font-weight: 650; }
.secondary-button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.next-button { justify-self: start; margin-top: 24px; }
.primary-button span { margin-left: 8px; }

.split-layout { grid-template-columns: minmax(270px, .85fr) 1.15fr; gap: clamp(34px, 7vw, 90px); }
.photo-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--panel-strong); box-shadow: var(--shadow); }
.portrait-frame { aspect-ratio: 4/5; width: min(100%, 470px); justify-self: center; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-label { position: absolute; left: 18px; bottom: 18px; padding: 9px 13px; border-radius: 999px; background: rgba(18,15,20,.68); backdrop-filter: blur(16px); border: 1px solid var(--border); font-size: 13px; }
.story-copy h2, .center-heading h2, .memory-card h2, .final-content h2, .gallery-head h2 { margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 76px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.lead { margin: 0; color: var(--muted); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.65; }
.date-card { display: grid; gap: 7px; margin-top: 28px; padding: 22px 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); }
.date-card span { color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .13em; }
.date-card strong { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }

.journey-layout { grid-template-columns: 1fr .9fr; gap: 50px; align-content: center; }
.journey-layout .story-copy { align-self: center; }
.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 30px 0; color: var(--text); font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.route-line { position: relative; height: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.route-line i { position: absolute; inset: 0; width: 44%; background: linear-gradient(90deg, var(--accent), var(--gold)); animation: travel 2.8s ease-in-out infinite alternate; }
@keyframes travel { from { transform: translateX(-10%); } to { transform: translateX(140%); } }
blockquote { margin: 0; padding: 22px 24px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: #f7e8ee; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.5; }
.photo-stack { position: relative; min-height: 560px; }
.tilted-photo { position: absolute; margin: 0; width: min(75%, 380px); aspect-ratio: 3/4; border: 10px solid #f6eef1; box-shadow: var(--shadow); background: #f6eef1; overflow: hidden; cursor: pointer; transition: transform .58s cubic-bezier(.22, .8, .22, 1), box-shadow .45s ease, z-index 0s linear .2s, opacity .45s ease; will-change: transform; }
.tilted-photo img { width: 100%; height: 100%; object-fit: cover; }
.tilted-photo:hover { box-shadow: 0 28px 78px rgba(0,0,0,.42); }
.tilted-photo:focus-visible { outline: 3px solid rgba(242, 169, 189, 0.72); outline-offset: 4px; }
.photo-a { top: 0; left: 0; }
.photo-b { right: 0; bottom: 0; }
.tilted-photo.is-front { z-index: 3; transform: translate3d(0,0,0) rotate(4deg) scale(1.02); }
.tilted-photo.is-back { z-index: 1; transform: translate3d(-18px,-18px,0) rotate(-6deg) scale(.96); opacity: .98; }
.tilted-photo.is-swapping { animation: photoSwapPulse .62s cubic-bezier(.2,.82,.22,1); }
@keyframes photoSwapPulse {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.06); }
  100% { filter: brightness(1); }
}
.stack-hint { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); margin: 0; padding: 10px 14px; border-radius: 999px; background: rgba(18,15,20,.7); backdrop-filter: blur(12px); border: 1px solid var(--border); color: var(--muted); font-size: 12px; letter-spacing: .02em; text-align: center; white-space: nowrap; }
.wide-next { grid-column: 1/-1; justify-self: center; }

.memory-layout { grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 70px); }
.memory-image { position: relative; min-height: 610px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.memory-image img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.memory-glow { position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,15,20,.72), transparent 55%); }
.memory-card { padding: clamp(26px, 4vw, 48px); border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(18px); }
.memory-card p { color: #e4d8df; line-height: 1.78; font-size: 17px; }
.memory-tag { margin-top: 24px; display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: 14px; }

.qualities-layout, .quiz-layout, .faith-layout, .fun-layout { align-content: center; gap: 28px; }
.center-heading { text-align: center; max-width: 800px; margin: 0 auto; }
.center-heading p:last-child { margin: -10px 0 0; color: var(--muted); }
.quality-grid, .verse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quality-card, .verse-card { border: 1px solid var(--border); border-radius: 22px; background: rgba(255,255,255,.045); color: var(--text); cursor: pointer; text-align: left; transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.quality-card { min-height: 180px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.quality-card:hover, .verse-card:hover { transform: translateY(-4px); border-color: rgba(242,169,189,.46); }
.quality-card.is-open { background: var(--accent-soft); border-color: rgba(242,169,189,.5); }
.quality-index { color: var(--accent); font-size: 12px; letter-spacing: .12em; }
.quality-card strong { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.quality-card small { color: var(--muted); }
.quality-result { min-height: 28px; text-align: center; color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 21px; }
.qualities-photo { width: min(100%, 820px); height: 220px; margin: 0 auto; overflow: hidden; border-radius: 24px; border: 1px solid var(--border); }
.qualities-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.qualities-layout > .next-button, .faith-layout > .next-button, .fun-layout > .next-button { justify-self: center; margin-top: 0; }

.quiz-card { width: min(760px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 42px); border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow); }
.quiz-status { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; }
.quiz-card h3 { margin: 28px 0 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 4vw, 42px); font-weight: 500; }
.answers { display: grid; gap: 10px; }
.answer-button { width: 100%; min-height: 54px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.04); color: var(--text); text-align: left; padding: 14px 18px; cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.answer-button:hover:not(:disabled) { transform: translateX(3px); border-color: rgba(242,169,189,.45); }
.answer-button.correct { background: rgba(149,218,177,.13); border-color: rgba(149,218,177,.6); }
.answer-button.wrong { background: rgba(242,169,189,.1); border-color: rgba(242,169,189,.45); }
.quiz-feedback { min-height: 24px; margin: 18px 0 12px; color: var(--accent); }
.quiz-finish { width: min(600px, 100%); margin: 0 auto; text-align: center; }
.finish-heart { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 30px; }
.quiz-finish h3 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; }
.quiz-finish p { color: var(--muted); }
.quiz-finish .next-button { justify-self: auto; }

.verse-card { min-height: 250px; padding: 22px; position: relative; overflow: hidden; }
.verse-card::after { content: "+"; position: absolute; right: 18px; bottom: 14px; color: var(--accent); font-size: 28px; transition: transform .25s ease; }
.verse-card span { color: var(--accent); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.verse-card strong { display: block; margin-top: 36px; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.verse-card p { max-height: 0; margin: 0; opacity: 0; overflow: hidden; color: #e2d6dd; line-height: 1.6; transition: max-height .35s ease, opacity .3s ease, margin .3s ease; }
.verse-card.is-open { background: var(--accent-soft); }
.verse-card.is-open::after { transform: rotate(45deg); }
.verse-card.is-open p { max-height: 160px; opacity: 1; margin-top: 18px; }
.faith-summary { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.faith-summary span { padding: 9px 13px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 13px; transition: background .3s ease, color .3s ease, border-color .3s ease; }
.faith-summary span.is-lit { color: #2a171f; background: var(--accent); border-color: var(--accent); }

.fun-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: stretch; }
.fun-photo, .video-card { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
.fun-photo img { width: 100%; height: 390px; object-fit: cover; }
.fun-photo-collage img { object-fit: contain; background: #171118; }
.fun-photo-collage { align-self: start; }
.fun-photo figcaption, .video-label { padding: 14px 16px; color: var(--muted); font-size: 13px; }
.video-card { display: flex; flex-direction: column; }
.video-card video { width: 100%; height: 390px; object-fit: cover; background: #000; }

.final-scene { padding: 0; overflow-y: auto; }
.final-background { position: fixed; inset: 0; }
.final-background img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.final-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,15,20,.95) 0%, rgba(18,15,20,.82) 48%, rgba(18,15,20,.58) 100%), linear-gradient(to top, rgba(18,15,20,.96), transparent 60%); }
.final-content { position: relative; z-index: 2; width: min(760px, calc(100% - 36px)); margin-left: clamp(18px, 7vw, 110px); padding: calc(100px + var(--safe-top)) 0 calc(50px + var(--safe-bottom)); }
.final-content h2 { font-size: clamp(46px, 7vw, 88px); }
.letter { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); border: 1px solid var(--border); background: rgba(25,19,28,.78); backdrop-filter: blur(22px); box-shadow: var(--shadow); }
.letter p { margin: 0 0 16px; color: #eee4e9; line-height: 1.75; }
.letter .final-message { margin: 26px 0; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.55; }
.letter-signature { margin-bottom: 0 !important; color: var(--accent) !important; font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.confetti-piece { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 3px; background: var(--accent); opacity: .78; animation: fall linear forwards; }
.confetti-piece:nth-child(3n) { background: var(--gold); }
.confetti-piece:nth-child(4n) { background: #fff; }
@keyframes fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(720deg); opacity: 0; } }

.gallery-modal, .lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,8,11,.92); backdrop-filter: blur(16px); }
.gallery-modal { overflow-y: auto; padding: 24px; }
.gallery-panel { width: min(1100px, 100%); margin: 0 auto; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: #171219; }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.gallery-head h2 { font-size: clamp(36px, 5vw, 62px); margin-bottom: 12px; }
.icon-button { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%; background: rgba(255,255,255,.05); color: var(--text); font-size: 28px; cursor: pointer; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item { padding: 0; border: 0; border-radius: 17px; overflow: hidden; background: #211a24; cursor: zoom-in; aspect-ratio: 3/4; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.035); }
.lightbox { display: grid; place-items: center; padding: 26px; }
.lightbox img { max-width: min(1100px, 94vw); max-height: 90vh; object-fit: contain; border-radius: 14px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; z-index: 2; }

.reveal-item { opacity: 0; transform: translateY(18px); }
.scene.is-active .reveal-item { animation: reveal .65s ease forwards; }
.scene.is-active .reveal-item:nth-child(2) { animation-delay: .08s; }
.scene.is-active .reveal-item:nth-child(3) { animation-delay: .16s; }
.scene.is-active .reveal-item:nth-child(4) { animation-delay: .24s; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .split-layout, .journey-layout, .memory-layout { grid-template-columns: 1fr; }
  .scene-shell { align-content: start; padding-top: 24px; }
  .portrait-frame { width: min(100%, 420px); }
  .journey-layout { gap: 30px; }
  .photo-stack { min-height: 500px; width: min(100%, 570px); margin: 0 auto; }
  .memory-image { min-height: 520px; }
  .quality-grid, .verse-grid { grid-template-columns: repeat(2, 1fr); }
  .fun-grid { grid-template-columns: 1fr 1fr; }
  .video-card { grid-column: 1/-1; width: min(100%, 520px); justify-self: center; }
  .video-card video { height: 520px; }
}

@media (max-width: 620px) {
  .topbar { gap: 12px; padding-left: 14px; padding-right: 14px; }
  .brand-name { display: none; }
  .progress-wrap { width: min(42vw, 220px); }
  .music-toggle { min-width: 44px; padding: 5px; }
  .music-meta { display: none; }
  .scene { padding-left: 16px; padding-right: 16px; padding-top: calc(80px + var(--safe-top)); }
  .intro-scene { padding: 0; }
  .intro-photo { object-position: 56% 45%; }
  .intro-overlay { background: linear-gradient(to top, rgba(15,11,17,.97) 0%, rgba(15,11,17,.65) 65%, rgba(15,11,17,.38) 100%); }
  .intro-content { align-self: end; width: calc(100% - 32px); margin: 0 16px; padding-bottom: calc(28px + var(--safe-bottom)); }
  h1 { font-size: clamp(62px, 22vw, 98px); }
  .intro-copy { font-size: 16px; }
  .story-copy h2, .center-heading h2, .memory-card h2, .final-content h2 { font-size: clamp(37px, 12vw, 56px); }
  .lead { font-size: 17px; }
  .photo-stack { min-height: 430px; }
  .stack-hint { bottom: -2px; max-width: calc(100% - 24px); white-space: normal; }
  .tilted-photo { border-width: 7px; }
  .memory-image { min-height: 450px; }
  .memory-card { padding: 24px; }
  .quality-grid, .verse-grid { grid-template-columns: 1fr; }
  .quality-card { min-height: 135px; }
  .qualities-photo { height: 170px; }
  .quiz-status { flex-direction: column; gap: 5px; }
  .fun-grid { grid-template-columns: 1fr; }
  .fun-photo img, .video-card video { height: auto; max-height: 580px; }
  .video-card { grid-column: auto; width: 100%; }
  .final-content { width: calc(100% - 32px); margin: 0 16px; padding-top: calc(88px + var(--safe-top)); }
  .final-background img { object-position: 58% center; }
  .final-overlay { background: linear-gradient(to top, rgba(18,15,20,.98) 0%, rgba(18,15,20,.8) 70%, rgba(18,15,20,.6) 100%); }
  .letter { padding: 22px; }
  .letter .final-message { font-size: 21px; }
  .final-actions { display: grid; }
  .gallery-modal { padding: 10px; }
  .gallery-panel { padding: 18px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .progress-wrap { width: 39vw; gap: 7px; }
  .brand-mark { width: 38px; height: 38px; }
  .music-disc { width: 32px; height: 32px; }
}

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