

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root{
  --plum-950:#1c0b14;
  --plum-900:#2a1220;
  --plum-800:#3a1a2c;
  --rose-500:#d97a92;
  --rose-300:#f0b6c6;
  --blush-100:#fbdde6;
  --gold-400:#cda76a;
  --gold-200:#e6cf9e;
  --cream-50:#fbf3e6;
  --cream-100:#f4e6d1;
  --ink-900:#3c1522;
  --ink-700:#5b2537;
  --white:#ffffff;

  --font-display:'Playfair Display', serif;
  --font-body:'Cormorant Garamond', serif;
  --font-script:'Alex Brush', cursive;

  --ease-soft: cubic-bezier(.22,.61,.36,1);

  --tulip-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 6c-7 3-10 10-8 17 1.5 5 5.5 8 8 8s6.5-3 8-8c2-7-1-14-8-17z' fill='%23c46a83'/%3E%3Cpath d='M32 6c-4 4-5 11-3 17-3-1-6-4-7-9-1.5-6 2-12 10-8z' fill='%23d98aa0'/%3E%3Cpath d='M32 6c4 4 5 11 3 17 3-1 6-4 7-9 1.5-6-2-12-10-8z' fill='%23b85473'/%3E%3Cpath d='M32 31v22' stroke='%237a8c5a' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3Cpath d='M32 40c-6-1-10 3-11 9 7 1 11-3 11-9z' fill='%23879c62'/%3E%3Cpath d='M32 45c6-1 10 4 11 10-7 1-11-4-11-10z' fill='%237a8c5a'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html{ -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html, body{
  margin:0; padding:0;
  min-height: 100%;
  min-height: 100dvh;
  background: radial-gradient(120% 140% at 50% -10%, var(--plum-800) 0%, var(--plum-950) 60%, #120810 100%);
  color: var(--blush-100);
  font-family: var(--font-body);
  overflow-x: hidden;
  width: 100%;
}

button{ font-family: inherit; }

/* ============================================================
   BACKGROUND SCENE — floating tulips, hearts, glow particles
   ============================================================ */
#bg-scene{
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}

.floater{
  position:absolute;
  bottom: -10vh;
  opacity: 0;
  animation-name: float-up;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}

.floater.heart{ color: var(--rose-300); filter: drop-shadow(0 0 6px rgba(217,122,146,.45)); }
.floater.spark{
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-200);
  box-shadow: 0 0 8px 2px rgba(230,207,158,.7);
}

@keyframes float-up{
  0%{ transform: translateY(0) translateX(0) rotate(0deg); opacity:0; }
  8%{ opacity: .9; }
  90%{ opacity:.7; }
  100%{ transform: translateY(-115vh) translateX(var(--drift,20px)) rotate(var(--spin,20deg)); opacity:0; }
}

/* ============================================================
   MUSIC TOGGLE
   ============================================================ */
.music-btn{
  position: fixed; top: 18px; right: 18px; z-index: 200;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(240,214,222,.35);
  background: rgba(28,11,20,.55);
  backdrop-filter: blur(6px);
  color: var(--blush-100);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .25s var(--ease-soft), transform .2s var(--ease-soft);
}
.music-btn:hover{ border-color: var(--rose-300); transform: scale(1.06); }
.music-slash{
  position:absolute; width: 1px; height: 24px; background: currentColor;
  transform: rotate(45deg); opacity: 0; transition: opacity .2s;
}
.music-btn[aria-pressed="false"] .music-slash{ opacity: .9; }

/* ============================================================
   PERSISTENT BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(28,11,20,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(240,182,198,.18);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.bottom-nav[hidden]{ display: none; }

.nav-item{
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; max-width: 100px;
  background: transparent; border: none; cursor: pointer;
  color: rgba(251,221,230,.55);
  padding: 6px 4px;
  border-radius: 10px;
  transition: color .2s var(--ease-soft), background .2s;
  min-height: 48px;
  touch-action: manipulation;
}
.nav-item:hover{ color: var(--rose-300); background: rgba(240,182,198,.08); }
.nav-item.active{ color: var(--gold-200); }
.nav-icon{ font-size: 1.2rem; line-height: 1; }
.nav-label{
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .03em;
  line-height: 1;
}

/* ============================================================
   LAYOUT / SCREENS
   ============================================================ */
#app{ position: relative; z-index: 1; min-height: 100vh; }

.screen{
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
}
/* Screens that need nav-bar clearance at the bottom */
.screen.has-nav{
  padding-bottom: calc(6vh + 72px);
}
.screen.active{ display: flex; }
.screen.leaving{ display: flex; }

.stage{
  max-width: 640px;
  width: 100%;
  text-align: center;
  animation: rise-in .9s var(--ease-soft);
}

@keyframes rise-in{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: translateY(0); }
}

.screen.fade-out .stage{ animation: fade-out .5s var(--ease-soft) forwards; }
@keyframes fade-out{ to{ opacity: 0; transform: translateY(-14px); } }

/* ---- Landing ---- */
.eyebrow-note{
  font-style: italic;
  color: var(--rose-300);
  letter-spacing: .02em;
  margin: 0 0 18px;
  font-size: 1.05rem;
}
.script-heading{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--cream-50);
}
.heart-inline{ font-style: normal; }
.subtitle{
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--blush-100);
  opacity: .85;
  margin: 0 0 40px;
}

.btn{
  border: none; cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  padding: 14px 34px;
  min-height: 48px;
  border-radius: 999px;
  transition: transform .2s var(--ease-soft), box-shadow .25s var(--ease-soft), background .25s;
  touch-action: manipulation;
}
.btn-primary{
  background: linear-gradient(135deg, var(--rose-500), #b85473);
  color: var(--cream-50);
  box-shadow: 0 10px 30px -10px rgba(217,122,146,.7);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(217,122,146,.85); }
.btn-primary:active{ transform: translateY(0); }
.btn-ghost{
  background: transparent;
  color: var(--rose-300);
  border: 1px solid rgba(240,182,198,.4);
  font-size: .95rem;
  padding: 9px 20px;
  margin-top: 18px;
}
.btn-ghost:hover{ border-color: var(--rose-300); background: rgba(240,182,198,.08); }

.designer-btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 16px 42px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-500), #b85473);
  color: var(--cream-50);
  border: 1px solid var(--rose-300);
  box-shadow: 0 10px 30px -10px rgba(217,122,146,.8);
  transition: all 0.3s var(--ease-soft);
  animation: pulse-glow 2.5s infinite alternate;
}
.designer-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px -8px rgba(217,122,146,1);
  color: var(--white);
}
@keyframes pulse-glow {
  from { box-shadow: 0 0 15px rgba(217,122,146,.4); }
  to { box-shadow: 0 0 35px rgba(217,122,146,.95); }
}

/* ---- Question cards ---- */
.progress-note{
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-200);
  margin-bottom: 22px;
  letter-spacing: .03em;
}
.card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,182,198,.18);
  border-radius: 22px;
  padding: 46px 38px;
  backdrop-filter: blur(10px);
}
.card.shake{ animation: shake .5s var(--ease-soft); }
@keyframes shake{
  0%,100%{ transform: translateX(0); }
  20%{ transform: translateX(-10px); }
  40%{ transform: translateX(9px); }
  60%{ transform: translateX(-6px); }
  80%{ transform: translateX(4px); }
}

.question-heading{
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--cream-50);
  margin: 0 0 30px;
}

.selectors{
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 22px;
}
.selectors-triple .select-wrap{ min-width: 130px; }
.select-wrap{ display: flex; flex-direction: column; gap: 6px; min-width: 170px; text-align: left; }
.select-wrap label{
  font-size: .8rem; letter-spacing: .04em; color: var(--rose-300); opacity: .85;
}
select{
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(28,11,20,.55);
  border: 1px solid rgba(240,182,198,.3);
  color: var(--cream-50);
  font-family: var(--font-body);
  font-size: 16px; /* 16px minimum prevents iOS Safari from auto-zooming on focus */
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23f0b6c6' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  width: 100%;
}
select:hover, select:focus{ border-color: var(--rose-300); outline: none; }
select:active{ transform: scale(.99); }

.feedback{
  min-height: 26px;
  font-style: italic;
  color: var(--rose-300);
  margin: 0 0 14px;
  transition: opacity .2s;
}
.feedback.success{ color: var(--gold-200); }

/* ============================================================
   BIRTHDAY REVEAL
   ============================================================ */
#screen-reveal{ position: relative; background: radial-gradient(120% 120% at 50% 40%, #3a1a2c 0%, #1c0b14 70%); }
#confetti-canvas{ position: absolute; inset: 0; z-index: 0; }
.reveal-stage{ position: relative; z-index: 1; }

.reveal-heading {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  color: var(--gold-200);
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 1.15;
  margin: 0 0 18px;
  text-align: center;
  text-shadow: 0 0 26px rgba(230, 207, 158, .4);
}

.heading-line {
  display: block;
  white-space: nowrap;
}

.reveal-heading .letter-pop {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px) scale(.8);
  animation: pop-letter .55s var(--ease-soft) forwards;
}
@keyframes pop-letter{
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.reveal-sub{
  font-style: italic;
  color: var(--rose-300);
  font-size: 1.2rem;
  opacity: 0;
  animation: fade-in-sub 1s var(--ease-soft) 1.4s forwards;
}
@keyframes fade-in-sub{ to{ opacity: .9; } }

/* ---- Read Letter Button ---- */
.reveal-letter-btn {
  margin-top: 28px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity .8s var(--ease-soft),
    transform .8s var(--ease-soft),
    box-shadow .25s var(--ease-soft);
}

.reveal-letter-btn.ready {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal-letter-btn:hover {
  transform: translateY(-2px);
}

/* ============================================================
   LOVE LETTER (paper)
   ============================================================ */
.letter-stage{ max-width: 720px; }
.paper{
  position: relative;
  background:
    radial-gradient(120% 60% at 10% 0%, rgba(205,167,106,.08), transparent 60%),
    var(--cream-50);
  color: var(--ink-900);
  border-radius: 6px 18px 8px 20px / 18px 8px 20px 6px;
  padding: 52px 44px 42px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,.55),
    0 2px 0 rgba(255,255,255,.4) inset;
  text-align: left;
  max-height: 82vh;
  overflow-y: auto;
}
.paper::before{
  content:"";
  position: absolute; inset: 10px;
  border: 1px solid rgba(60,21,34,.12);
  border-radius: 4px 14px 6px 16px / 14px 6px 16px 4px;
  pointer-events: none;
}
.paper-corner{
  position: absolute; width: 46px; height: 46px; opacity: .85; pointer-events: none;
  background-repeat: no-repeat; background-size: contain;
}
.corner-tl{ top: 8px; left: 8px; background-image: var(--tulip-svg); }
.corner-br{ bottom: 8px; right: 8px; transform: rotate(180deg); background-image: var(--tulip-svg); }

.letter-heading{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 6px 0 26px;
  color: var(--ink-700);
  text-align: center;
}

.letter-body{
  font-size: clamp(1.08rem, 2.1vw, 1.28rem);
  line-height: 1.75;
  white-space: pre-wrap;
}
.letter-body p{ margin: 0 0 1.1em; }

.cursor{
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--ink-700);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity: 0; } }

#skip-btn{ display: block; margin-left: auto; margin-right: auto; color: var(--ink-700); border-color: rgba(60,21,34,.3); }
#skip-btn:hover{ background: rgba(60,21,34,.06); border-color: var(--ink-700); }

.letter-final{
  text-align: center;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px dashed rgba(60,21,34,.25);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
}
.letter-final.visible{ opacity: 1; transform: translateY(0); pointer-events: auto; }

.forever-line{
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--ink-700);
  margin: 0 0 4px;
}
.forever-sub{
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-900);
  margin: 0 0 18px;
}
.mini-heart{
  font-size: 1.6rem;
  margin-bottom: 20px;
  animation: heartbeat 1.6s ease-in-out infinite;
}
@keyframes heartbeat{
  0%,100%{ transform: scale(1); }
  25%{ transform: scale(1.18); }
  40%{ transform: scale(1); }
}
.letter-final-actions{
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.letter-final .btn-primary{ font-size: .95rem; padding: 12px 28px; }

/* ============================================================
   SCROLL-REVEAL ANIMATION
   ============================================================ */
.reveal-on-scroll{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
}
.reveal-on-scroll.revealed{
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SCREEN 5 — WHY THIS GIFT?
   ============================================================ */
#screen-gift{
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 5vh;
  padding-bottom: calc(6vh + 72px);
}

.gift-stage{
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.gift-paper{
  position: relative;
  background:
    radial-gradient(130% 70% at 10% 0%, rgba(205,167,106,.1), transparent 55%),
    var(--cream-50);
  color: var(--ink-900);
  border-radius: 8px 20px 8px 20px / 20px 8px 20px 8px;
  padding: 52px 46px 44px;
  box-shadow:
    0 28px 56px -18px rgba(0,0,0,.5),
    0 2px 0 rgba(255,255,255,.4) inset;
  text-align: left;
}
.gift-paper::before{
  content:"";
  position: absolute; inset: 10px;
  border: 1px solid rgba(60,21,34,.1);
  border-radius: 6px 14px 6px 14px;
  pointer-events: none;
}

.gift-camera-deco{
  position: absolute;
  top: 20px; right: 24px;
  opacity: .55;
}

.gift-corner{
  position: absolute;
  font-size: 1.4rem;
  opacity: .7;
  animation: gentle-sway 4s ease-in-out infinite;
}
.gift-corner.gift-corner-tl{ top: 12px; left: 16px; animation-delay: 0s; }
.gift-corner.gift-corner-br{ bottom: 12px; right: 16px; animation-delay: 1s; transform: rotate(180deg); }

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

.gift-heading{
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--ink-700);
  margin: 0 0 8px;
  text-align: center;
  position: relative; z-index: 1;
}

.gift-rule{
  width: 100px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  margin: 0 auto 28px;
  position: relative; z-index: 1;
}

.gift-body{
  position: relative; z-index: 1;
}

.gift-paragraph{
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.85;
  color: var(--ink-900);
  margin: 0 0 1.4em;
}
.gift-paragraph.gift-closing{
  font-style: italic;
  color: var(--ink-700);
  font-size: clamp(1.08rem, 2.2vw, 1.22rem);
  margin-bottom: 0;
}

.gift-actions{
  margin-top: 32px;
  text-align: center;
  position: relative; z-index: 1;
}

/* ============================================================
   SCREEN 6 — OUR MEMORIES
   ============================================================ */
#screen-memories{
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4vh 4vw calc(4vh + 72px);
  overflow-y: auto;
}

.memories-stage{
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  animation: rise-in .9s var(--ease-soft);
}

.memories-heading{
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--cream-50);
  text-align: center;
  margin: 0 0 28px;
  text-shadow: 0 0 20px rgba(205,167,106,.3);
}

/* ── Memory Tabs ── */
.memories-tabs{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  background: linear-gradient(to bottom, rgba(28,11,20,.95) 0%, rgba(28,11,20,.8) 70%, transparent 100%);
  backdrop-filter: blur(8px);
  border-radius: 0 0 16px 16px;
}

.mem-tab{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  border: 1px solid rgba(240,182,198,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: rgba(251,221,230,.65);
  font-family: var(--font-display);
  font-size: clamp(.85rem, 2vw, 1rem);
  cursor: pointer;
  transition: all .25s var(--ease-soft);
  min-height: 44px;
  touch-action: manipulation;
}
.mem-tab:hover{
  border-color: var(--rose-300);
  color: var(--blush-100);
  background: rgba(240,182,198,.1);
}
.mem-tab.active{
  background: linear-gradient(135deg, var(--rose-500), #b85473);
  border-color: transparent;
  color: var(--cream-50);
  box-shadow: 0 8px 24px -8px rgba(217,122,146,.6);
}

/* ── Memory Panels ── */
.mem-panel{ display: none; }
.mem-panel.active{ display: block; animation: rise-in .5s var(--ease-soft); }

.panel-hint{
  text-align: center;
  font-style: italic;
  color: var(--rose-300);
  font-size: 1.05rem;
  margin: 0 0 24px;
}

.memories-actions{
  text-align: center;
  margin-top: 36px;
  padding-bottom: 12px;
}

/* ── Dev Upload Zone ── */
.dev-upload-zone{
  border: 1px dashed rgba(205,167,106,.4);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
  margin-bottom: 24px;
  background: rgba(205,167,106,.04);
}
.dev-upload-zone.hidden{ display: none; }
.dev-hint{
  font-size: .85rem;
  color: var(--gold-200);
  opacity: .8;
  margin: 0 0 12px;
}
.dev-hint code{ font-size: .82rem; background: rgba(205,167,106,.15); padding: 1px 5px; border-radius: 4px; }
.dev-file-label{
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid rgba(205,167,106,.4);
  border-radius: 999px;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.dev-file-label:hover{
  background: rgba(205,167,106,.1);
  border-color: var(--gold-200);
}

/* ============================================================
   PHOTO WALL — Polaroid / Instax style
   Supports up to 30 photos in a scrollable responsive grid
   ============================================================ */
.photo-wall{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px 16px;
  justify-items: center;
  padding: 10px 4px 24px;
  /* Scrollable container for many photos */
  max-height: 68vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Thin custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(240,182,198,.3) transparent;
}
.photo-wall::-webkit-scrollbar{ width: 5px; }
.photo-wall::-webkit-scrollbar-track{ background: transparent; }
.photo-wall::-webkit-scrollbar-thumb{ background: rgba(240,182,198,.3); border-radius: 10px; }

.polaroid{
  background: #fff;
  padding: 9px 9px 28px;
  box-shadow:
    0 6px 22px rgba(0,0,0,.32),
    0 1px 3px rgba(0,0,0,.18);
  border-radius: 3px;
  position: relative;
  width: 100%;
  max-width: 185px;
  cursor: pointer;
  transition: transform .3s var(--ease-soft), box-shadow .3s var(--ease-soft);
  transform-origin: center bottom;
}

/* Staggered rotation via nth-child */
.polaroid:nth-child(5n+1){ transform: rotate(-2.5deg); }
.polaroid:nth-child(5n+2){ transform: rotate(1.8deg); }
.polaroid:nth-child(5n+3){ transform: rotate(-1.2deg); }
.polaroid:nth-child(5n+4){ transform: rotate(2.6deg); }
.polaroid:nth-child(5n+5){ transform: rotate(-0.8deg); }

.polaroid:hover{
  transform: rotate(0deg) scale(1.07) translateY(-5px) !important;
  box-shadow:
    0 18px 44px rgba(0,0,0,.48),
    0 3px 8px rgba(0,0,0,.2);
  z-index: 2;
}

.polaroid-img-wrap{
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cream-100);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.polaroid-img-wrap img{
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease-soft);
}
.polaroid:hover .polaroid-img-wrap img{ transform: scale(1.05); }

.polaroid-placeholder{
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--cream-100), var(--cream-50));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: rgba(60,21,34,.35);
}
.polaroid-placeholder span{ font-size: 1.8rem; }
.polaroid-placeholder small{ font-size: .7rem; font-family: var(--font-display); font-style: italic; }

.polaroid-caption{
  font-family: var(--font-script);
  font-size: .92rem;
  color: var(--ink-700);
  text-align: center;
  padding: 7px 4px 2px;
  line-height: 1.25;
}
.polaroid-date{
  font-family: var(--font-body);
  font-size: .68rem;
  color: rgba(60,21,34,.45);
  text-align: center;
  letter-spacing: .03em;
}

/* Polaroid entrance animation */
@keyframes polaroid-drop{
  from{ opacity: 0; transform: rotate(var(--rot,0deg)) translateY(24px) scale(.9); }
  to{ opacity: 1; transform: rotate(var(--rot,0deg)) translateY(0) scale(1); }
}

/* ============================================================
   PHOTO LIGHTBOX — Full-size photo viewer
   ============================================================ */
.lightbox-overlay{
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10,0,8,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-soft);
}
.lightbox-overlay.open{
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner{
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 70px 80px;
}

/* Full-size image — fills available space, never cropped */
.lightbox-img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 30px 90px rgba(0,0,0,.8);
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity .2s ease;
}
.lightbox-img.fading{ opacity: 0; }

/* Caption at bottom */
.lightbox-caption{
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 24px 20px;
  background: linear-gradient(to top, rgba(10,0,8,.88) 60%, transparent);
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--cream-50);
  pointer-events: none;
}
.lightbox-date-label{
  font-family: var(--font-body);
  font-size: .78rem;
  color: var(--gold-200);
  opacity: .75;
  display: block;
  margin-top: 3px;
}

/* ✕ Close button */
.lightbox-close{
  position: absolute;
  top: 14px; right: 16px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--cream-50);
  font-size: 1.3rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  z-index: 10;
}
.lightbox-close:hover{ background: rgba(255,255,255,.24); transform: scale(1.1); }

/* ‹ Prev / Next › arrows */
.lightbox-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--cream-50);
  font-size: 1.4rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}
.lightbox-arrow:hover{ background: rgba(255,255,255,.22); }
.lightbox-arrow:active{ transform: translateY(-50%) scale(.9); }
.lightbox-arrow.prev{ left: 12px; }
.lightbox-arrow.next{ right: 12px; }

/* Photo counter "3 / 10" */
.lightbox-counter{
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px 16px;
  font-family: var(--font-display);
  font-size: .8rem;
  color: rgba(251,221,230,.85);
  white-space: nowrap;
  pointer-events: none;
}

/* ============================================================
   VIDEO SECTION
   Supports up to 15 videos in a scrollable responsive grid
   ============================================================ */
.video-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  padding: 0 0 24px;
  max-height: 68vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(240,182,198,.3) transparent;
}
.video-grid::-webkit-scrollbar{ width: 5px; }
.video-grid::-webkit-scrollbar-track{ background: transparent; }
.video-grid::-webkit-scrollbar-thumb{ background: rgba(240,182,198,.3); border-radius: 10px; }

.video-card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,182,198,.15);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--ease-soft), box-shadow .3s var(--ease-soft);
}
.video-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,.38);
}

/* Thumbnail — click opens modal */
.video-thumb-wrap{
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0008;
  overflow: hidden;
}
.video-thumb-wrap video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
/* Play button overlay */
.video-play-btn{
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,0,8,.35);
  transition: background .2s;
}
.video-card:hover .video-play-btn{ background: rgba(10,0,8,.15); }
.video-play-circle{
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  transition: transform .2s, background .2s;
  padding-left: 4px; /* optical center for ▶ */
}
.video-card:hover .video-play-circle{
  transform: scale(1.12);
  background: rgba(217,122,146,.55);
  border-color: rgba(240,182,198,.8);
}

.video-placeholder-card{
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(58,26,44,.6), rgba(28,11,20,.8));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  color: rgba(251,221,230,.4);
  font-style: italic;
  font-size: .9rem;
}
.video-placeholder-card span{ font-size: 2.4rem; }

.video-info{
  padding: 13px 16px 15px;
}
.video-title{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--cream-50);
  margin: 0 0 3px;
}
.video-caption{
  font-size: .88rem;
  color: var(--rose-300);
  opacity: .8;
  margin: 0;
  font-style: italic;
}

/* ============================================================
   VIDEO MODAL — Full-size video player
   ============================================================ */
.video-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10,0,8,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-soft);
  padding: 60px 16px 24px;
}
.video-modal-overlay.open{
  opacity: 1;
  pointer-events: all;
}

/* The actual <video> element inside the modal */
.video-modal-player{
  width: 100%;
  max-width: 960px;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,.8);
  display: block;
  background: #000;
  outline: none;
}

.video-modal-info{
  margin-top: 14px;
  text-align: center;
}
.video-modal-title{
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  color: var(--cream-50);
  margin: 0 0 3px;
}
.video-modal-caption{
  font-size: .88rem;
  color: var(--rose-300);
  font-style: italic;
  margin: 0;
}

/* Close button (shared style with lightbox) */
.video-modal-close{
  position: absolute;
  top: 14px; right: 16px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--cream-50);
  font-size: 1.3rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  z-index: 10;
}
.video-modal-close:hover{ background: rgba(255,255,255,.24); transform: scale(1.1); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline{
  position: relative;
  padding: 8px 0 24px;
  max-width: 640px;
  margin: 0 auto;
}

/* Vertical center line */
.timeline::before{
  content:"";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(205,167,106,.5) 10%, rgba(205,167,106,.5) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item{
  display: flex;
  gap: 0;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease-soft), transform .6s var(--ease-soft);
}
.timeline-item.revealed{
  opacity: 1;
  transform: translateY(0);
}

/* Dot on the center line */
.timeline-dot{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 16px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 3px solid var(--plum-950);
  box-shadow: 0 0 10px rgba(205,167,106,.6);
  z-index: 1;
  flex-shrink: 0;
}

/* Alternating sides */
.timeline-content{
  width: 44%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,182,198,.15);
  border-radius: 14px;
  padding: 16px 18px;
  backdrop-filter: blur(8px);
  text-align: left;
}
.timeline-item:nth-child(odd) .timeline-content{
  margin-left: 56%;   /* push to right side */
  text-align: left;
}
.timeline-item:nth-child(even) .timeline-content{
  margin-right: 56%;  /* push to left side */
  text-align: right;
}

.timeline-date{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.85rem, 1.8vw, 1rem);
  color: var(--gold-200);
  margin: 0 0 2px;
}
.timeline-nepali{
  font-family: var(--font-body);
  font-style: italic;
  font-size: .85rem;
  color: var(--rose-300);
  margin: 0 0 8px;
  opacity: .85;
}
.timeline-desc{
  font-family: var(--font-body);
  font-size: clamp(.95rem, 1.8vw, 1.05rem);
  color: var(--blush-100);
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   SCREEN 7 — COMMENTS / MESSAGE WALL
   ============================================================ */
#screen-comments{
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 5vh;
  padding-bottom: calc(6vh + 72px);
  overflow-y: auto;
}

.comments-stage{
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
}

.comments-paper{
  background:
    radial-gradient(120% 60% at 90% 0%, rgba(205,167,106,.07), transparent 55%),
    var(--cream-50);
  color: var(--ink-900);
  border-radius: 8px 20px 8px 20px;
  padding: 40px 38px 36px;
  box-shadow: 0 28px 56px -18px rgba(0,0,0,.5);
}

.comments-header{
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-bottom: 20px;
}
.comments-icon{ font-size: 1.6rem; }
.comments-heading{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--ink-700);
  margin: 0;
}

/* ── Comment Wall ── */
.comment-wall{
  min-height: 60px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.no-comments-hint{
  font-style: italic;
  color: rgba(60,21,34,.45);
  font-size: .95rem;
  text-align: center;
  margin: 0;
}

.comment-bubble{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: bubble-in .4s var(--ease-soft);
}
@keyframes bubble-in{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

.comment-avatar{
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), #b85473);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--cream-50);
  box-shadow: 0 3px 10px rgba(217,122,146,.4);
}

.comment-body{
  flex: 1;
}
.comment-initial{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  color: var(--ink-700);
  margin-bottom: 3px;
  opacity: .7;
}
.comment-text{
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-900);
  background: rgba(60,21,34,.05);
  border-radius: 0 12px 12px 12px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}

.comment-divider{
  border: none;
  border-top: 1px dashed rgba(60,21,34,.2);
  margin: 4px 0;
}

/* ── Comment Form ── */
.comment-form-wrap{ margin-top: 4px; }

.initial-picker-wrap{ margin-bottom: 16px; }
.initial-question{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-700);
  margin: 0 0 2px;
  text-align: center;
}
.initial-sub{
  font-style: italic;
  font-size: .88rem;
  color: rgba(60,21,34,.6);
  text-align: center;
  margin: 0 0 12px;
}
.initial-btns{
  display: flex; gap: 12px; justify-content: center;
}
.initial-btn{
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(60,21,34,.25);
  background: rgba(60,21,34,.04);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink-700);
  cursor: pointer;
  transition: all .25s var(--ease-soft);
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px;
}
.initial-btn:hover{
  border-color: var(--rose-500);
  background: rgba(217,122,146,.1);
  color: var(--ink-700);
  transform: scale(1.06);
}
.initial-btn[aria-pressed="true"]{
  background: linear-gradient(135deg, var(--rose-500), #b85473);
  border-color: transparent;
  color: var(--cream-50);
  box-shadow: 0 6px 18px rgba(217,122,146,.5);
}

.selected-initial-badge{
  font-family: var(--font-display);
  font-style: italic;
  font-size: .88rem;
  color: var(--ink-700);
  margin-bottom: 8px;
  min-height: 20px;
  text-align: center;
  opacity: .7;
}

.comment-textarea{
  width: 100%;
  border: 1px solid rgba(60,21,34,.2);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-900);
  background: rgba(255,255,255,.7);
  resize: vertical;
  min-height: 80px;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.comment-textarea:focus{
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 3px rgba(217,122,146,.18);
}

.comment-form-footer{
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}
.char-count{
  font-size: .8rem;
  color: rgba(60,21,34,.45);
  font-family: var(--font-display);
}
.comment-submit-btn{ padding: 10px 26px; font-size: .95rem; margin-top: 0; }
.comment-feedback{
  font-style: italic;
  font-size: .9rem;
  color: var(--rose-500);
  text-align: center;
  margin-top: 6px;
  min-height: 20px;
}
.comment-feedback.success{ color: #6b8c5a; }

/* Delete button on own comments */
.comment-delete-btn{
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  font-size: .75rem;
  font-family: var(--font-body);
  color: rgba(160,60,60,.7);
  background: rgba(160,60,60,.07);
  border: 1px solid rgba(160,60,60,.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.comment-delete-btn:hover{
  color: #a03c3c;
  background: rgba(160,60,60,.14);
  border-color: rgba(160,60,60,.35);
}
.comment-delete-btn:disabled{
  opacity: .5;
  cursor: not-allowed;
}

/* ── Privacy / Consent Banner ── */
.consent-banner{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(28,11,20,.95);
  backdrop-filter: blur(10px);
  color: var(--blush-100);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: .85rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,.4);
  animation: slide-up .4s var(--ease-soft);
}
@keyframes slide-up{
  from{ transform: translateY(100%); }
  to{ transform: translateY(0); }
}
.consent-banner p{ margin: 0; flex: 1; max-width: 600px; line-height: 1.5; }
.consent-banner a{ color: var(--gold-200); text-decoration: underline; }
.consent-btn{
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--gold-400);
  background: rgba(205,167,106,.15);
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.consent-btn:hover{ background: rgba(205,167,106,.3); }
.consent-banner.hidden{ display: none; }

.comments-actions{
  text-align: center;
  margin-top: 24px;
}

/* ============================================================
   SCREEN 8 — FINAL CLOSING
   ============================================================ */
#screen-closing{
  background: radial-gradient(120% 120% at 50% 40%, #3a1a2c 0%, #1c0b14 70%);
}

.closing-stage{ max-width: 640px; }

.closing-paper{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,182,198,.18);
  border-radius: 22px;
  padding: 52px 44px;
  backdrop-filter: blur(12px);
  text-align: center;
}

.closing-emoji-row{
  font-size: 2.4rem;
  margin-bottom: 18px;
  animation: heartbeat 2s ease-in-out infinite;
}

.closing-heading{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  color: var(--cream-50);
  margin: 0 0 10px;
  text-shadow: 0 0 20px rgba(240,182,198,.25);
}

.closing-sub{
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--gold-200);
  margin: 0 0 24px;
}

.closing-body{
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.75;
  color: var(--blush-100);
  opacity: .9;
  margin: 0 0 28px;
  font-style: italic;
}

.closing-hearts{
  display: flex; gap: 8px; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}
.closing-hearts span{
  display: inline-block;
  animation: heartbeat 1.8s ease-in-out infinite;
}
.closing-hearts span:nth-child(2){ animation-delay: .2s; }
.closing-hearts span:nth-child(3){ animation-delay: .4s; }
.closing-hearts span:nth-child(4){ animation-delay: .6s; }
.closing-hearts span:nth-child(5){ animation-delay: .8s; }

.closing-signature{
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--rose-300);
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ---- Tablets (portrait & landscape) ---- */
@media (min-width: 561px) and (max-width: 900px){
  .stage{ max-width: 560px; }
  .card{ padding: 40px 34px; }
  .letter-stage{ max-width: 620px; }
  .paper{ padding: 46px 38px 36px; }
  .gift-paper{ padding: 44px 36px 38px; }
  .comments-paper{ padding: 36px 30px 30px; }
  .photo-wall{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---- Phones ---- */
@media (max-width: 560px){
  .screen{ padding: 6vh 5vw; }
  .screen.has-nav{ padding-bottom: calc(6vh + 72px); }
  .stage{ max-width: 100%; }
  .card{ padding: 30px 20px; border-radius: 18px; }
  .selectors{ flex-direction: column; align-items: stretch; gap: 12px; }
  .select-wrap{ min-width: 0; width: 100%; }
  .paper{ padding: 34px 18px 26px; max-height: 78dvh; border-radius: 10px; }
  .paper-corner{ width: 32px; height: 32px; }
  .music-btn{ top: 12px; right: 12px; width: 40px; height: 40px; }
  .btn{ width: 100%; }
  .letter-final .btn-primary{ width: auto; padding: 12px 24px; }
  .letter-final-actions{ flex-direction: column; align-items: center; }

  /* Gift screen */
  .gift-paper{ padding: 36px 20px 30px; }
  .gift-camera-deco{ top: 12px; right: 12px; }
  .gift-camera-deco svg{ width: 40px; height: 30px; }

  /* Memories */
  #screen-memories{ padding: 4vh 4vw calc(4vh + 72px); }
  .memories-tabs{ gap: 6px; }
  .mem-tab{ padding: 8px 14px; font-size: .82rem; }
  .photo-wall{
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px 12px;
    max-height: 65vh;
  }
  .polaroid{ padding: 7px 7px 26px; }
  .polaroid-caption{ font-size: .85rem; }

  /* Video grid on phones — single column */
  .video-grid{
    grid-template-columns: 1fr;
    max-height: 65vh;
  }

  /* Timeline — single column on mobile */
  .timeline::before{ left: 20px; transform: none; }
  .timeline-dot{ left: 20px; transform: translateX(-50%); }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content{
    margin-left: 44px;
    margin-right: 0;
    width: calc(100% - 44px);
    text-align: left;
  }

  /* Comments */
  #screen-comments{ padding-top: 4vh; }
  .comments-paper{ padding: 30px 18px 24px; }
  .initial-btns{ gap: 16px; }
  .comment-form-footer{ flex-wrap: wrap; justify-content: flex-end; }
  .comment-submit-btn{ width: auto; }

  /* Bottom nav */
  .nav-label{ font-size: .58rem; }
  .nav-icon{ font-size: 1.1rem; }

  /* Lightbox — tighter padding on phones */
  .lightbox-inner{ padding: 56px 52px 72px; }
  .lightbox-arrow{ width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-arrow.prev{ left: 6px; }
  .lightbox-arrow.next{ right: 6px; }
  .lightbox-close,
  .video-modal-close{ top: 10px; right: 10px; width: 40px; height: 40px; }

  /* Video modal on phones */
  .video-modal-overlay{ padding: 52px 8px 20px; }
  .video-modal-player{ border-radius: 8px; }
}

/* ---- Very small phones ---- */
@media (max-width: 360px){
  .script-heading{ font-size: 1.8rem; }
  .question-heading{ font-size: 1.25rem; }
  .card{ padding: 24px 16px; }
  .gift-paper{ padding: 28px 14px 24px; }
  .comments-paper{ padding: 24px 14px 20px; }
  .closing-paper{ padding: 36px 18px; }
  .photo-wall{ grid-template-columns: repeat(2, 1fr); gap: 12px 10px; }
  .lightbox-inner{ padding: 52px 44px 68px; }
}

/* ---- Short / landscape screens (phones rotated) ---- */
@media (max-height: 480px) and (orientation: landscape){
  .screen{ padding: 4vh 6vw; align-items: flex-start; }
  .stage{ padding-top: 2vh; }
  .paper{ max-height: 88dvh; padding: 26px 24px 20px; }
  .card{ padding: 22px 26px; }
  .reveal-heading{ font-size: clamp(1.8rem, 6vw, 3rem); }
  .gift-paper{ padding: 28px 30px; }
  /* Overlay safe areas on landscape */
  .lightbox-inner{ padding: 48px 64px 60px; }
  .video-modal-overlay{ padding: 48px 16px 16px; }
  .video-modal-player{ max-height: calc(100dvh - 100px); }
}

/* ---- Large desktop screens ---- */
@media (min-width: 1400px){
  .stage{ max-width: 720px; }
  .letter-stage{ max-width: 800px; }
  .gift-stage{ max-width: 780px; }
  .comments-stage{ max-width: 680px; }
  .memories-stage{ max-width: 1060px; }
  .photo-wall{ grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); }
  .video-grid{ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
