/* ─────────────────────────────────────────────
   for-you — cozy pink, RTL, one page
   ───────────────────────────────────────────── */

:root {
  --cream: #fffafb;
  --blush: #ffeef4;
  --pink-1: #ffdbe6;
  --pink-2: #ffc2d4;
  --rose: #ff8fb3;
  --rose-deep: #ec5f8c;
  --wine: #a83f5f;
  --ink: #4b3540;
  --ink-soft: #826773;
  --line: rgba(233, 155, 181, .28);
  --shadow-soft: 0 20px 50px -26px rgba(196, 88, 124, .55);
  --shadow-tight: 0 10px 30px -16px rgba(196, 88, 124, .45);
  --radius: 28px;
  --ease: cubic-bezier(.22, .68, .36, 1);
  --display: "Amiri", "Times New Roman", serif;
  --body: "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 80% -10%, #ffe7ef 0%, rgba(255, 231, 239, 0) 62%),
    radial-gradient(900px 620px at 5% 12%, #fff2f6 0%, rgba(255, 242, 246, 0) 60%),
    radial-gradient(760px 560px at 50% 108%, #ffe3ec 0%, rgba(255, 227, 236, 0) 66%),
    linear-gradient(180deg, #fffafb 0%, #fff6f9 45%, #fffafb 100%);
}

#petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── the name field: زوزو / زهرة drifting down the whole page ── */

.namefield {
  position: fixed;
  inset: -25vh -12vw;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  justify-content: center;
  opacity: .62;
  transform: translate3d(var(--nfx, 0px), var(--nfy, 0px), 0);
  transition: transform 1.4s cubic-bezier(.22, .68, .36, 1);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.nf-track {
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 2.4vw, 2.1rem);
  will-change: transform;
  animation: nfFall 74s linear infinite;
}

@keyframes nfFall {
  from { transform: translate3d(0, -50%, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

.nf-row {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.82rem, 1.5vw, 1.22rem);
  line-height: 1;
  color: #ffb3cb;
  letter-spacing: .01em;
}

.nf-row i {
  font-style: normal;
  opacity: .42;
}

.nf-row i:nth-child(even) {
  opacity: .26;
  color: #ff9dbb;
  font-size: .88em;
}

.nf-row:nth-child(3n) i { opacity: .34; }
.nf-row:nth-child(4n+2) i { opacity: .5; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

main {
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

svg { display: block; }

::selection {
  background: var(--pink-2);
  color: var(--wine);
}

/* ── reveal ───────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ── sound pill ───────────────────────────── */

.sound-cluster {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sound-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  font-family: var(--body);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--wine);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow-tight);
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
}

.sound-pill:hover { transform: translateY(-2px); background: #fff; }
.sound-pill:active { transform: translateY(0); }
.sound-pill:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }

.sound-pill[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  border-color: transparent;
}

.sound-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.sound-bars i {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: .85;
  height: 40%;
}

.sound-pill[aria-pressed="true"] .sound-bars i {
  animation: barPulse 1.1s ease-in-out infinite;
}

.sound-bars i:nth-child(1) { animation-delay: 0s; }
.sound-bars i:nth-child(2) { animation-delay: .18s; }
.sound-bars i:nth-child(3) { animation-delay: .36s; }
.sound-bars i:nth-child(4) { animation-delay: .12s; }

.sound-next {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--wine);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow-tight);
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s;
}

.sound-next svg { width: 16px; height: 16px; fill: currentColor; }
.sound-next:hover { transform: rotate(-90deg); background: #fff; }
.sound-next:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }

.sound-toast {
  position: fixed;
  top: 66px;
  left: 18px;
  z-index: 20;
  margin: 0;
  padding: 6px 14px;
  font-size: .74rem;
  font-weight: 500;
  color: var(--wine);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-tight);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .4s, transform .4s;
}

.sound-toast.is-on { opacity: 1; transform: none; }

@keyframes barPulse {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

/* ── hero ─────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vh, 18px);
  padding: clamp(64px, 9vh, 104px) 22px clamp(44px, 6vh, 72px);
  text-align: center;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}

.blob-a {
  width: 46vw; height: 46vw;
  max-width: 520px; max-height: 520px;
  top: -8%; right: -8%;
  background: radial-gradient(circle at 35% 35%, #ffd2e0, #ffe9f0 70%);
}

.blob-b {
  width: 40vw; height: 40vw;
  max-width: 460px; max-height: 460px;
  bottom: -12%; left: -10%;
  background: radial-gradient(circle at 60% 40%, #ffdceb, #fff0f5 70%);
  animation-duration: 27s;
  animation-delay: -6s;
}

.blob-c {
  width: 26vw; height: 26vw;
  max-width: 300px; max-height: 300px;
  top: 46%; left: 44%;
  background: radial-gradient(circle at 50% 50%, #fff0d9, #fff7ef 70%);
  opacity: .38;
  animation-duration: 31s;
  animation-delay: -12s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4%, 5%, 0) scale(1.14); }
}

.eyebrow {
  margin: 0;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .38em;
  text-indent: .38em;
  text-transform: uppercase;
  color: var(--rose-deep);
  opacity: .85;
}

.hero-name {
  position: relative;
  margin: -0.06em 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4rem, 13vw, 8.6rem);
  line-height: .95;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: .06em;
  background: linear-gradient(165deg, #ffc3d7 0%, #ff88ae 42%, #d94a7c 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 22px 38px rgba(228, 116, 155, .32));
  animation: floatName 7s ease-in-out infinite;
}

@keyframes floatName {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.name-heart {
  width: .3em;
  height: .3em;
  fill: var(--rose-deep);
  filter: drop-shadow(0 6px 14px rgba(236, 95, 140, .45));
  animation: heartBeat 1.9s ease-in-out infinite;
  transform-origin: center;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(.98); }
  42% { transform: scale(1.12); }
  62% { transform: scale(1); }
}

.hero-sub {
  max-width: 30ch;
  margin: 0;
  font-size: clamp(.98rem, 2.3vw, 1.12rem);
  color: var(--ink-soft);
  font-weight: 400;
}

.hero-sub .soft {
  display: inline-block;
  margin-top: .18em;
  font-family: var(--display);
  font-size: 1.22em;
  color: var(--wine);
  letter-spacing: .01em;
}

/* ── voice note ───────────────────────────── */

.voice {
  position: relative;
  width: min(292px, 76vw);
  aspect-ratio: 5 / 6.6;
  margin: clamp(6px, 1.2vh, 14px) 0 0;
  padding: 0;
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(178deg, #ffd9e5 0%, #ffc6d8 46%, #f4bdd0 74%, #cfa6b7 100%);
  box-shadow:
    0 30px 60px -30px rgba(196, 88, 124, .62),
    0 2px 0 rgba(255, 255, 255, .7) inset,
    0 0 0 1px rgba(255, 255, 255, .45) inset;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}

.voice:hover {
  transform: translateY(-5px);
  box-shadow:
    0 44px 80px -34px rgba(196, 88, 124, .7),
    0 2px 0 rgba(255, 255, 255, .7) inset,
    0 0 0 1px rgba(255, 255, 255, .45) inset;
}

.voice-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .68) 1.2px, transparent 1.45px);
  background-size: 11px 11px;
  background-position: 0 0;
  opacity: .95;
  animation: dotsDrift 40s linear infinite;
}

@keyframes dotsDrift {
  from { background-position: 0 0; }
  to   { background-position: 0 -420px; }
}

.voice-glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 62%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .8), transparent 68%);
  pointer-events: none;
}

.voice-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  padding: 4px 12px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--wine);
  background: rgba(255, 255, 255, .82);
  border-radius: 999px;
  box-shadow: 0 4px 12px -6px rgba(168, 63, 95, .5);
  backdrop-filter: blur(6px);
}

.voice-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}

.voice-ring {
  position: absolute;
  width: 128px;
  height: 128px;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, .45);
  stroke-width: 2;
}

.ring-fill {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 351.86;
  stroke-dashoffset: 351.86;
  transition: stroke-dashoffset .18s linear;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9));
}

.voice-btn {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(8px) saturate(160%);
  box-shadow:
    0 10px 26px -10px rgba(180, 78, 112, .6),
    0 0 0 8px rgba(255, 255, 255, .16);
  cursor: pointer;
  transition: transform .35s var(--ease), background .35s, box-shadow .35s;
}

.voice-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, .8);
}

.voice-btn:active { transform: scale(.97); }
.voice-btn:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }

.voice-btn svg {
  position: absolute;
  fill: #d64b78;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

.ic-play { width: 30px; height: 30px; margin-inline-start: 4px; }
.ic-pause { width: 26px; height: 26px; opacity: 0; transform: scale(.7); }

.voice.is-playing .ic-play { opacity: 0; transform: scale(.7); }
.voice.is-playing .ic-pause { opacity: 1; transform: scale(1); }

.voice.is-playing .voice-btn {
  box-shadow:
    0 10px 30px -8px rgba(180, 78, 112, .7),
    0 0 0 10px rgba(255, 255, 255, .22);
  animation: btnPulse 2.2s ease-out infinite;
}

@keyframes btnPulse {
  0% { box-shadow: 0 10px 30px -8px rgba(180,78,112,.7), 0 0 0 8px rgba(255,255,255,.35); }
  70% { box-shadow: 0 10px 30px -8px rgba(180,78,112,.7), 0 0 0 22px rgba(255,255,255,0); }
  100% { box-shadow: 0 10px 30px -8px rgba(180,78,112,.7), 0 0 0 8px rgba(255,255,255,0); }
}

.voice-wave {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  z-index: 2;
  opacity: .9;
}

.voice-wave span {
  display: block;
  width: 3px;
  min-height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .85);
  height: 20%;
  transition: height .12s linear;
}

.voice-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 22px 18px 26px;
  text-align: center;
  background: linear-gradient(to top, rgba(150, 92, 110, .45), rgba(150, 92, 110, 0));
}

.voice-line {
  margin: 0 0 5px;
  font-family: var(--display);
  font-size: 1.14rem;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 2px 14px rgba(120, 58, 78, .55);
}

.voice-meta {
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .9);
  font-variant-numeric: tabular-nums;
}

#voiceTime { direction: ltr; unicode-bidi: isolate; }

.voice-meta .dot { opacity: .6; }

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: .78rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: .04em;
  opacity: .8;
  transition: opacity .3s, transform .3s;
}

.scroll-hint svg { width: 16px; height: 16px; fill: var(--rose-deep); animation: nudge 2s ease-in-out infinite; }
.scroll-hint:hover { opacity: 1; transform: translateY(2px); }

@keyframes nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

/* ── shared section head ──────────────────── */

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(34px, 6vw, 60px);
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.25;
  color: var(--wine);
}

.section-head p {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-soft);
}

.tag {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--rose-deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 16px -12px rgba(196, 88, 124, .6);
}

/* ── letter ───────────────────────────────── */

.letter {
  padding: clamp(40px, 9vw, 110px) 22px;
}

.letter-card {
  position: relative;
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(30px, 5.5vw, 58px) clamp(24px, 5vw, 54px);
  text-align: center;
  background: linear-gradient(170deg, rgba(255, 255, 255, .92), rgba(255, 248, 251, .8));
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 34px;
  box-shadow:
    0 40px 80px -46px rgba(190, 84, 120, .55),
    0 0 0 1px rgba(255, 203, 220, .55);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.letter-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  width: 120%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 224, 235, .85), transparent 62%);
  pointer-events: none;
}

.letter-title {
  position: relative;
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  color: var(--wine);
  line-height: 1.3;
}

.letter-text {
  position: relative;
  min-height: 4.6em;
  margin: 0 auto;
  max-width: 46ch;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.7vw, 1.36rem);
  line-height: 2;
  color: #5d4250;
  text-align: center;
}

.letter-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline-start: 3px;
  vertical-align: -0.16em;
  background: var(--rose-deep);
  opacity: 0;
}

.letter-text.is-typing::after {
  opacity: 1;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.letter-sign {
  position: relative;
  margin: 22px 0 0;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

.letter-seal {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 26px auto 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffc9dc, #ff9dba);
  box-shadow: 0 10px 22px -12px rgba(196, 88, 124, .8), 0 0 0 6px rgba(255, 233, 241, .8);
}

.letter-seal svg { width: 20px; height: 20px; fill: #fff; }

/* ── whispers ─────────────────────────────── */

.whispers {
  padding: clamp(30px, 6vw, 70px) 22px clamp(50px, 9vw, 110px);
}

.whisper-list {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(34px, 6vw, 64px);
}

.whisper {
  position: relative;
  margin: 0;
  padding-inline-start: clamp(0px, 4vw, 34px);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
}

.whisper.is-in {
  opacity: 1;
  transform: none;
}

.whisper-to {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--rose-deep);
}

.whisper-to::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

.whisper p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4.2vw, 2.5rem);
  line-height: 1.5;
  color: #4d3642;
  text-wrap: balance;
}

.whisper.flip {
  text-align: left;
  padding-inline-start: 0;
  padding-inline-end: clamp(0px, 4vw, 34px);
}

.whisper.flip .whisper-to {
  flex-direction: row-reverse;
}

.whisper.flip p { color: var(--wine); }

/* ── envelope scene ───────────────────────── */

.scene {
  position: relative;
  padding: clamp(30px, 7vw, 90px) 22px clamp(50px, 9vw, 100px);
  text-align: center;
}

.scene-title {
  margin: 0 0 clamp(34px, 7vw, 70px);
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--wine);
  font-weight: 700;
}

.envelope-wrap {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(230px, 46vw, 340px);
  margin-bottom: clamp(26px, 5vw, 44px);
}

.envelope {
  position: relative;
  width: clamp(220px, 62vw, 300px);
  aspect-ratio: 300 / 196;
  perspective: 900px;
  transform-style: preserve-3d;
  filter: drop-shadow(0 26px 34px rgba(190, 90, 128, .3));
  animation: envelopeFloat 6s ease-in-out infinite;
}

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.env-body {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 16px;
  background: linear-gradient(165deg, #ffe6ee 0%, #ffcfdf 60%, #ffbdd2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.env-note {
  position: absolute;
  z-index: 3;
  left: 12%;
  right: 12%;
  bottom: 14%;
  height: 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 18px 16px;
  border-radius: 10px;
  background: #fffdfe;
  box-shadow: 0 10px 24px -14px rgba(150, 70, 95, .55);
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: transform 1.3s var(--ease), opacity .8s var(--ease);
}

.env-note span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to left, #ffd3e2, #ffe9f1);
}

.env-note span:nth-child(1) { width: 78%; }
.env-note span:nth-child(2) { width: 100%; }
.env-note span:nth-child(3) { width: 54%; }

.envelope-wrap.open .env-note {
  opacity: 1;
  transform: translateY(-115%) scale(1);
}

.envelope-wrap.open .env-body {
  box-shadow: inset 0 2px 10px rgba(150, 70, 95, .18);
}

.env-pocket {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffd7e4, #ffbed3);
  clip-path: polygon(0 100%, 0 16%, 50% 66%, 100% 16%, 100% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.env-flap {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 66%;
  background: linear-gradient(180deg, #ffc9da, #ffb0c9);
  clip-path: polygon(0 0, 100% 0, 50% 88%);
  transform-origin: top center;
  border-radius: 16px 16px 0 0;
  transition: transform 1.1s var(--ease);
  backface-visibility: hidden;
}

.envelope-wrap.open .env-flap {
  transform: rotateX(-172deg);
}

.env-heart {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 42%;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  display: grid;
  place-items: center;
  transition: transform 1.4s var(--ease), opacity 1s var(--ease);
}

.env-heart svg {
  width: 100%;
  height: 100%;
  fill: var(--rose-deep);
  filter: drop-shadow(0 8px 16px rgba(214, 75, 120, .5));
}

.envelope-wrap.open .env-heart {
  transform: translateY(-118px) scale(1.15) rotate(-8deg);
  animation: heartBob 3.4s ease-in-out infinite 1.2s;
}

@keyframes heartBob {
  0%, 100% { transform: translateY(-118px) scale(1.15) rotate(-8deg); }
  50% { transform: translateY(-132px) scale(1.08) rotate(6deg); }
}

.sparkles { position: absolute; inset: 0; pointer-events: none; }

.sparkles i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(255, 175, 205, .9);
  opacity: 0;
}

.envelope-wrap.open .sparkles i { animation: sparkle 2.6s ease-out infinite; }

.sparkles i:nth-child(1) { top: 22%; left: 18%; animation-delay: .1s; }
.sparkles i:nth-child(2) { top: 12%; left: 62%; animation-delay: .5s; width: 4px; height: 4px; }
.sparkles i:nth-child(3) { top: 46%; left: 82%; animation-delay: .9s; }
.sparkles i:nth-child(4) { top: 66%; left: 26%; animation-delay: 1.3s; width: 5px; height: 5px; }
.sparkles i:nth-child(5) { top: 30%; left: 42%; animation-delay: 1.7s; width: 3px; height: 3px; }
.sparkles i:nth-child(6) { top: 58%; left: 70%; animation-delay: 2.1s; }

@keyframes sparkle {
  0% { opacity: 0; transform: scale(.4) translateY(0); }
  25% { opacity: 1; transform: scale(1) translateY(-6px); }
  100% { opacity: 0; transform: scale(.3) translateY(-30px); }
}

.scene-line {
  margin: 0 auto;
  max-width: 40ch;
  font-family: var(--display);
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  line-height: 1.9;
  color: #5b4150;
}

.scene-line span { color: var(--rose-deep); }

/* ── write ────────────────────────────────── */

.write {
  padding: clamp(30px, 7vw, 90px) 22px;
}

.write-card {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  background: #fff;
  border: 1px solid #ffe5ee;
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}

.write-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4.6vw, 2.3rem);
  color: var(--wine);
}

.write-sub {
  margin: 0 0 22px;
  font-size: .88rem;
  color: var(--ink-soft);
}

.write textarea {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: #fff8fb;
  border: 1.5px solid #ffe0ea;
  border-radius: 18px;
  resize: vertical;
  min-height: 96px;
  transition: border-color .3s, background .3s, box-shadow .3s;
}

.write textarea::placeholder { color: #c9a5b3; }

.write textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--pink-2);
  box-shadow: 0 0 0 4px rgba(255, 194, 212, .32);
}

.write-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.counter {
  font-size: .75rem;
  color: #b995a3;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  font-family: var(--body);
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 24px -14px rgba(214, 75, 120, .9);
  transition: transform .3s var(--ease), box-shadow .3s, filter .3s;
}

.btn svg { width: 15px; height: 15px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); filter: saturate(115%); box-shadow: 0 18px 30px -14px rgba(214, 75, 120, .9); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
  text-align: right;
}

.note {
  position: relative;
  padding: 14px 16px 14px 44px;
  background: linear-gradient(170deg, #fff4f8, #ffe9f1);
  border: 1px solid #ffe0ea;
  border-radius: 16px;
  font-family: var(--display);
  font-size: 1.06rem;
  line-height: 1.7;
  color: #5d4250;
  animation: noteIn .5s var(--ease) both;
}

.note .del {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  color: #c9869d;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .25s, color .25s;
}

.note .del:hover { background: #fff; color: var(--rose-deep); }

.note.is-new { animation: noteIn .5s var(--ease) both, noteGlow 1.6s ease-out; }

@keyframes noteIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes noteGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 143, 179, .55); }
  100% { box-shadow: 0 0 0 18px rgba(255, 143, 179, 0); }
}

/* ── gallery ──────────────────────────────── */

.gallery {
  padding: clamp(40px, 8vw, 100px) 22px clamp(20px, 4vw, 40px);
}

.grid {
  max-width: 1080px;
  margin: 0 auto;
  columns: 3;
  column-gap: 16px;
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  break-inside: avoid;
  background: #ffeaf1;
  cursor: zoom-in;
  box-shadow: 0 16px 34px -24px rgba(190, 84, 120, .6);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  font-family: var(--body);
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .9s var(--ease), filter .5s;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(120, 60, 80, .35), transparent 46%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.tile-label {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 2;
  padding: 3px 10px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--wine);
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s, transform .4s;
}

.tile:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -26px rgba(190, 84, 120, .7); }
.tile:hover img { transform: scale(1.045); }
.tile:hover::after,
.tile:hover .tile-label { opacity: 1; transform: none; }
.tile:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 4px; }

/* placeholder tiles — shown until real photos land in assets/gallery */
.tile.ph {
  display: grid;
  place-items: center;
  cursor: default;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .8), transparent 55%),
    linear-gradient(160deg, #ffe4ee, #ffd0e0 60%, #ffc0d5);
  color: #d76d92;
  overflow: hidden;
}

.tile.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1.3px, transparent 1.5px);
  background-size: 13px 13px;
  opacity: .8;
}

.tile.ph .ph-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 18px;
  text-align: center;
}

.tile.ph svg { width: 30px; height: 30px; fill: rgba(214, 75, 120, .55); }
.tile.ph span { font-size: .78rem; font-weight: 500; letter-spacing: .04em; color: rgba(160, 62, 92, .8); }

.tile.ph:nth-child(3n+1) { aspect-ratio: 4 / 5; }
.tile.ph:nth-child(3n+2) { aspect-ratio: 1 / 1; }
.tile.ph:nth-child(3n+3) { aspect-ratio: 4 / 4.6; }

.gallery-hint {
  max-width: 640px;
  margin: 26px auto 0;
  text-align: center;
  font-size: .82rem;
  line-height: 1.9;
  color: #b08f9c;
}

.gallery-hint code {
  padding: 2px 7px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: .78rem;
  color: var(--wine);
  background: #fff;
  border: 1px solid #ffe1ea;
  border-radius: 7px;
  direction: ltr;
  display: inline-block;
}

/* ── closing ──────────────────────────────── */

.closing {
  padding: clamp(40px, 8vw, 100px) 22px clamp(40px, 7vw, 80px);
}

.closing-inner {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) 24px;
  text-align: center;
  border-radius: 40px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #fff5f9 0%, rgba(255, 245, 249, 0) 60%),
    linear-gradient(165deg, #ffe1eb, #ffcede 55%, #ffc1d6);
  box-shadow: 0 40px 90px -50px rgba(190, 84, 120, .7);
}

.closing-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1.4px, transparent 1.6px);
  background-size: 16px 16px;
  opacity: .5;
}

.closing h2 {
  position: relative;
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 12px 32px rgba(170, 60, 95, .35);
}

.closing-line {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  color: #7d3f56;
}

.closing-heart {
  position: relative;
  width: 40px;
  margin: 26px auto 0;
}

.closing-heart svg {
  width: 100%;
  fill: var(--rose-deep);
  filter: drop-shadow(0 8px 18px rgba(190, 84, 120, .45));
  animation: heartBeat 2.4s ease-in-out infinite;
}

.footer-note {
  position: relative;
  margin: 26px 0 0;
  font-size: .74rem;
  letter-spacing: .18em;
  color: rgba(125, 63, 86, .7);
}

/* ── lightbox ─────────────────────────────── */

.lightbox {
  max-width: min(1000px, 94vw);
  max-height: 92svh;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(72, 32, 46, .55);
  backdrop-filter: blur(10px) saturate(120%);
}

.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-figure img {
  display: block;
  max-width: 100%;
  max-height: 78svh;
  width: auto;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
}

.lb-figure figcaption {
  text-align: center;
  font-size: .82rem;
  color: rgba(255, 255, 255, .85);
}

.lb-close,
.lb-nav {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  transition: background .3s, transform .3s;
}

.lb-close svg, .lb-nav svg { width: 20px; height: 20px; fill: currentColor; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .3); transform: scale(1.06); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.lb-close { top: 18px; left: 18px; }
.lb-prev { top: 50%; right: 14px; transform: translateY(-50%); }
.lb-next { top: 50%; left: 14px; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }

/* ── responsive ───────────────────────────── */

@media (max-width: 900px) {
  .grid { columns: 2; }
}

@media (max-width: 640px) {
  .hero { padding-top: 70px; gap: 12px; }
  .hero-name { font-size: clamp(4rem, 22vw, 6.5rem); }
  .voice { width: min(300px, 84vw); }
  .voice-line { font-size: 1.12rem; }
  .voice-wave { bottom: 96px; }
  .grid { columns: 2; column-gap: 10px; }
  .tile { border-radius: 16px; margin-bottom: 10px; }
  .whisper p { font-size: clamp(1.32rem, 6vw, 1.9rem); }
  .whisper::after { display: none; }
  .letter-text { min-height: 12em; }
  .lb-nav { width: 38px; height: 38px; }
  .lb-next { left: 8px; }
  .lb-prev { right: 8px; }
}

@media (max-width: 380px) {
  .grid { columns: 1; }
}

/* ── motion off ───────────────────────────── */

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

  .reveal, .whisper { opacity: 1; transform: none; }
  #petals { display: none; }

  /* the drifting name field is the point of the page — keep it moving */
  .nf-track { animation: nfFall 74s linear infinite !important; }
}
