/* =====================================================
   style.css — mobile-first, every breakpoint intentional
===================================================== */

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── DESIGN TOKENS ──────────────────────────────────── */
:root {
  --c-bg:          #0c0a19;
  --c-bg2:         #100d20;
  --c-purple-pale: #e9d8fd;
  --c-purple:      #b794f6;
  --c-purple-deep: #6b46c1;
  --c-yellow-pale: #fefcbf;
  --c-yellow:      #f6e05e;
  --c-yellow-warm: #d69e2e;
  --c-blue-pale:   #ebf8ff;
  --c-blue:        #bee3f8;
  --c-blue-mid:    #8ecae6;
  --c-white:       #f0eaf8;
  --c-muted:       rgba(240,234,248,0.50);
  --glass-bg:      rgba(255,255,255,0.035);
  --glass-border:  rgba(255,255,255,0.08);
  --ff-serif:      'Cormorant Garamond', Georgia, serif;
  --ff-sans:       'Plus Jakarta Sans', system-ui, sans-serif;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── BASE ───────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-sans);
  background: var(--c-bg);
  color: var(--c-white);
  overflow-x: hidden;
  line-height: 1.7;
  /* smooth momentum scroll on iOS */
  -webkit-overflow-scrolling: touch;
}

/* ── SPLASH SCREEN ─────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 25, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.splash.out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: splashIn 0.9s var(--ease) both;
}

.splash__flower {
  filter: drop-shadow(0 0 28px rgba(246,224,94,0.55));
  animation: splashFloat 4s ease-in-out infinite;
}
.splash__flower img {
  width: 110px;
  height: auto;
  image-rendering: pixelated;
}

.splash__title {
  font-family: var(--ff-serif);
  font-size: clamp(2.4rem, 10vw, 4.2rem);
  font-weight: 500;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--c-yellow-pale), var(--c-yellow), var(--c-purple-pale));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash__sub {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--c-muted);
  text-transform: uppercase;
}

.splash__tap {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-top: 18px;
  animation: splashPulse 2.2s ease-in-out infinite;
  animation-delay: 0.9s;
  opacity: 0;
}

@keyframes splashIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes splashFloat {
  0%, 100% { transform: translateY(0)    rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}
@keyframes splashPulse {
  0%       { opacity: 0; }
  20%, 80% { opacity: 0.85; }
  100%     { opacity: 0; }
}

/* ── STARFIELD CANVAS ───────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── GLASS CARD ─────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

/* ── FLOATING FLOWERS (fixed) ───────────────────────── */
.flower {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  width: 56px;
  height: 70px;
  animation: floatFlower 7s ease-in-out infinite;
}

.flower img {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* hide fallback when real png loaded, hide img when not */
.flower--has-img .flower__svg  { display: none; }
.flower--no-img  img           { display: none; }
.flower--no-img  .flower__svg  { display: flex; }
.flower__svg { display: none; align-items: center; justify-content: center; width: 100%; height: 100%; }
.flower__svg svg { width: 100%; height: 100%; }

.flower--wither {
  top: 16px; left: 16px;
  animation-delay: 0s;
}
.flower--dandelion {
  bottom: 16px; right: 16px;
  animation-delay: -3.5s;
}

.flower__glow {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
  animation: glowPulse 4.5s ease-in-out infinite;
}
.flower__glow--wither    { background: radial-gradient(circle, rgba(183,148,246,0.45), transparent 70%); }
.flower__glow--dandelion { background: radial-gradient(circle, rgba(246,224,94,0.4),   transparent 70%); animation-delay: -2s; }

@keyframes floatFlower {
  0%,100% { transform: translateY(0)    rotate(-3deg); }
  50%     { transform: translateY(-9px) rotate(3deg);  }
}
@keyframes glowPulse {
  0%,100% { opacity: 0.3; transform: scale(0.92); }
  50%     { opacity: 0.6; transform: scale(1.08); }
}

/* ── SOUND BUTTON ───────────────────────────────────── */
.sound-btn {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 200;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-purple);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s, transform .2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sound-btn:active { transform: scale(0.9); }
.sound-btn.on { color: var(--c-yellow); background: rgba(246,224,94,0.08); }

/* ── SHARED CHAPTER STYLES ──────────────────────────── */
.chapter {
  position: relative;
  z-index: 10;
  min-height: 100dvh; /* dynamic viewport height for mobile browsers */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 56px;
}

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-purple);
  margin-bottom: 14px;
  opacity: 0.85;
}

.ch-heading {
  font-family: var(--ff-serif);
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--c-white);
  margin-bottom: 16px;
  text-align: center;
}

.ch-body {
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.85;
  text-align: center;
  max-width: 500px;
}

/* ── REVEAL ON SCROLL ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════
   CH 0 — HERO
═══════════════════════════════════════════════ */
.ch-hero {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%,   rgba(107,70,193,.16) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 100%,  rgba(142,202,230,.09) 0%, transparent 65%);
  text-align: center;
}

.hero-card {
  width: min(92vw, 540px);
  padding: 36px 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-purple);
  font-weight: 500;
}

.hero-name {
  font-family: var(--ff-serif);
  font-size: clamp(2.6rem, 11vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--c-purple-pale) 0%, var(--c-blue) 50%, var(--c-yellow-pale) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-msg {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 380px;
}

.hero-msg p {
  font-size: 0.93rem;
  color: var(--c-muted);
  line-height: 1.75;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.hero-msg p.show { opacity: 1; transform: none; }
.hero-msg p:first-child {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--c-white);
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}
.scroll-cue span:first-child {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--c-purple);
  opacity: 0.65;
}
.scroll-cue span:last-child {
  color: var(--c-purple);
  opacity: 0.55;
  font-size: 1rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(5px); }
}

/* ═══════════════════════════════════════════════
   CH 1 — FLOWER STORY
═══════════════════════════════════════════════ */
.ch-flowers {
  background:
    radial-gradient(ellipse 70% 50% at 25% 50%, rgba(107,70,193,.11) 0%, transparent 65%),
    radial-gradient(ellipse 60% 45% at 75% 50%, rgba(214,158,46,.07)  0%, transparent 60%);
}

.flower-story {
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.flower-story .ch-heading { margin-bottom: 0; }

.flower-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}
.flower-divider__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated; /* keeps Minecraft pixel art crisp */
  filter: drop-shadow(0 0 6px rgba(183,148,246,.4));
}
.flower-divider hr {
  flex: 1; max-width: 80px;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(183,148,246,.5), rgba(246,224,94,.5));
}

/* ═══════════════════════════════════════════════
   CH 2 — MEMORIES
═══════════════════════════════════════════════ */
.ch-memories {
  flex-direction: column;
  gap: 40px;
  background: radial-gradient(ellipse 65% 50% at 65% 30%, rgba(142,202,230,.07) 0%, transparent 60%);
}

.ch-memories .ch-heading {
  background: linear-gradient(
    90deg,
    var(--c-yellow-pale) 0%,
    var(--c-yellow) 30%,
    #fff8c0 50%,
    var(--c-yellow) 70%,
    var(--c-yellow-pale) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 3s linear infinite;
  filter: drop-shadow(0 0 14px rgba(246,224,94,0.35));
}

@keyframes goldShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.mem-toggle {
  margin-top: 18px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid rgba(183,148,246,.35);
  background: rgba(183,148,246,.1);
  color: var(--c-purple-pale);
  font-family: var(--ff-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: .03em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background .25s, transform .2s var(--ease-spring), border-color .25s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 48px;
}
.mem-toggle:active { transform: scale(0.95); }
.mem-toggle:hover  { background: rgba(183,148,246,.2); border-color: rgba(183,148,246,.55); }
.mem-toggle.open   { background: rgba(183,148,246,.18); border-color: rgba(183,148,246,.5); }

.mem-note {
  font-size: 0.88rem;
  color: var(--c-white);
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 4px;
}

.memories-stack[hidden] { display: none; }
.memories-stack {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
  max-width: 680px;
  animation: fadeUp .55s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* Single memory block */
.mem {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Shared media base (photo & video) ── */
.mem-photo,
.mem-video {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.025);
  border: 1.5px dashed rgba(183,148,246,.22);
  transition: border-color .3s;
}
.mem-photo:hover,
.mem-video:hover { border-color: rgba(183,148,246,.48); }

/* Photo specific */
.mem-photo {
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mem-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.mem-photo.loaded .mem-ph-icon,
.mem-photo.loaded .mem-ph-label { display: none; }

/* Video specific */
.mem-video {
  aspect-ratio: 16/9; /* overridden inline by JS if aspect set in config */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mem-video iframe,
.mem-video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: 14px;
  background: #0c0a19;
}
/* Style the native video controls to feel less browser-default on WebKit */
.mem-video video::-webkit-media-controls-panel {
  background: linear-gradient(to top, rgba(13,11,24,0.85), transparent);
}

/* Shared placeholder labels */
.mem-ph-icon { font-size: 1.6rem; opacity: .2; }
.mem-ph-label {
  font-size: 0.68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-purple);
  opacity: .4;
}

.mem-num {
  font-size: 0.66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-yellow-warm);
}

.mem-caption {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--c-white);
}

.mem-date {
  font-size: 0.72rem;
  color: var(--c-purple);
  opacity: .6;
}

/* alternating layout on larger screens */
@media (min-width: 600px) {
  .mem {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 0 28px;
  }
  .mem-photo,
  .mem-video {
    grid-row: 1 / 4;
  }
  .mem:nth-child(even) .mem-photo,
  .mem:nth-child(even) .mem-video { order: 2; }
  .mem:nth-child(even) .mem-num     { order: 1; }
  .mem:nth-child(even) .mem-caption { order: 1; }
  .mem:nth-child(even) .mem-date    { order: 1; }
}

/* ═══════════════════════════════════════════════
   CH 3 — 19 THINGS
═══════════════════════════════════════════════ */
.ch-things {
  flex-direction: column;
  gap: 40px;
  background: radial-gradient(ellipse 70% 45% at 50% 5%, rgba(246,224,94,.05) 0%, transparent 60%);
}

.things-sub {
  font-size: 0.82rem;
  color: var(--c-muted);
  text-align: center;
  margin-top: -6px;
}

.things-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 740px;
}

@media (min-width: 480px) { .things-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .things-grid { grid-template-columns: repeat(4, 1fr); } }

/* flip card */
.tc {
  aspect-ratio: 1;
  perspective: 700px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tc-inner {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
  position: relative;
}
.tc.flipped .tc-inner { transform: rotateY(180deg); }

.tc-front, .tc-back {
  position: absolute; inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}

.tc-front {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  flex-direction: column; gap: 4px;
}
.tc-front-n {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}
.tc:nth-child(3n+1) .tc-front-n { color: var(--c-purple); }
.tc:nth-child(3n+2) .tc-front-n { color: var(--c-yellow); }
.tc:nth-child(3n+3) .tc-front-n { color: var(--c-blue-mid); }

.tc-back {
  transform: rotateY(180deg);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--c-white);
  padding: 12px;
}
.tc:nth-child(3n+1) .tc-back { background: rgba(183,148,246,.11); border: 1px solid rgba(183,148,246,.18); backdrop-filter: blur(10px); }
.tc:nth-child(3n+2) .tc-back { background: rgba(246,224,94,.09);  border: 1px solid rgba(246,224,94,.16);  backdrop-filter: blur(10px); }
.tc:nth-child(3n+3) .tc-back { background: rgba(142,202,230,.09); border: 1px solid rgba(142,202,230,.16); backdrop-filter: blur(10px); }

/* ═══════════════════════════════════════════════
   CH 4 — LETTER
═══════════════════════════════════════════════ */
.ch-letter {
  background: radial-gradient(ellipse 70% 55% at 40% 60%, rgba(107,70,193,.11) 0%, transparent 60%);
}

.letter-wrap {
  max-width: 580px;
  width: 100%;
  text-align: center;
}

.letter-paper {
  margin-top: 28px;
  padding: 36px 28px;
  text-align: left;
  position: relative;
}

/* soft warm top-left accent */
.letter-paper::before {
  content: '';
  position: absolute;
  top: -30px; left: -30px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(214,158,46,.1), transparent 70%);
  pointer-events: none;
}

.letter-greeting {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--c-yellow);
  margin-bottom: 28px;
}

.letter-body p {
  font-size: 1.08rem;
  color: var(--c-muted);
  line-height: 2.05;
  margin-bottom: 20px;
}

.letter-sign {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--c-purple);
  margin-top: 28px;
}

/* ═══════════════════════════════════════════════
   CH 5 — WISH
═══════════════════════════════════════════════ */
.ch-wish {
  background:
    radial-gradient(ellipse 60% 50% at 50% 35%, rgba(246,224,94,.07) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 50% 95%, rgba(183,148,246,.09) 0%, transparent 55%);
  text-align: center;
}

.wish-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 440px;
}

/* Cake */
.cake-wrap {
  filter: drop-shadow(0 0 22px rgba(246,224,94,.22));
}
.cake-svg {
  width: clamp(150px, 38vw, 220px);
  height: auto;
}

.flame { animation: flicker 1s ease-in-out infinite alternate; transform-origin: center bottom; }
#f2 { animation-delay: .35s; }
#f3 { animation-delay: .7s; }
.flame.out { opacity: 0; transition: opacity .5s ease; animation: none; }

@keyframes flicker {
  0%   { opacity: 1;    transform: scaleY(1)    scaleX(1); }
  100% { opacity: .65;  transform: scaleY(.85)  scaleX(.9) translateY(-1px); }
}

/* Wish button */
.wish-btn {
  background: linear-gradient(135deg, rgba(183,148,246,.18), rgba(246,224,94,.13));
  border: 1px solid rgba(183,148,246,.3);
  border-radius: 999px;
  color: var(--c-white);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 14px 28px;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .25s, transform .2s var(--ease-spring), border-color .25s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 48px; /* accessible tap target */
}
.wish-btn:active { transform: scale(0.95); }
.wish-btn:hover  { background: linear-gradient(135deg, rgba(183,148,246,.28), rgba(246,224,94,.2)); border-color: rgba(183,148,246,.5); }
.wish-btn:disabled { opacity: .4; }

/* Final wish text */
.wish-msg {
  padding: 24px 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--c-muted);
  line-height: 1.75;
  max-width: 380px;
}
.wish-msg.show { opacity: 1; transform: none; }

/* Confetti */
#confetti-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 999;
}

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 10;
  text-align: center;
  padding: 24px 20px 44px;
  font-size: 0.72rem;
  color: var(--c-muted);
  letter-spacing: .1em;
  opacity: .4;
}

/* ── LIGHTBOX ───────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 6, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  /* safe area for notched phones */
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(183, 148, 246, 0.18);
  transform: scale(0.92);
  transition: transform 0.35s var(--ease-spring);
  /* prevent iOS long-press save prompt interfering */
  -webkit-user-select: none;
  user-select: none;
}
.lightbox.open .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-white);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* always reachable */
  z-index: 9001;
}
.lightbox__close:active { transform: scale(0.88); }

/* make photo thumbnails look tappable */
.mem-photo img {
  cursor: zoom-in;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.mem-photo:hover img,
.mem-photo:active img {
  transform: scale(1.025);
  filter: brightness(1.06);
}

/* tap hint badge on photo containers */
.mem-photo::after {
  content: '⊕';
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.35);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 30px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.mem-photo.loaded::after { opacity: 1; }

/* ── DESKTOP UPSCALES ───────────────────────────────── */
@media (min-width: 768px) {
  .flower { width: 80px; height: 100px; }
  .flower--wither   { top: 24px; left: 24px; }
  .flower--dandelion{ bottom: 24px; right: 24px; }
  .hero-card { padding: 52px 48px; }
  .hero-msg p { font-size: 1rem; }
  .letter-paper { padding: 48px 52px; }
}
