@font-face {
  font-family: "Lan Noto Serif";
  src: url("assets/fonts/noto-serif-vietnamese.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Lan Noto Serif";
  src: url("assets/fonts/noto-serif-italic-vietnamese.ttf") format("truetype");
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --rose: #f377a7;
  --rose-deep: #c5457d;
  --blush: #ffe6ef;
  --cream: #fff9f3;
  --ink: #4e2941;
  --violet: #392149;
  --gold: #ffdba2;
  --shadow: 0 24px 70px rgba(45, 17, 55, .25);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #27142f;
}

body {
  margin: 0;
  color: var(--cream);
  background: #27142f;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

button { font: inherit; }
button:focus-visible { outline: 3px solid rgba(255, 226, 151, .95); outline-offset: 4px; }

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

.ambient span {
  position: absolute;
  width: 14px;
  height: 10px;
  border-radius: 80% 15% 80% 20%;
  background: linear-gradient(135deg, #ffe1ec, #f783b1);
  opacity: .65;
  filter: blur(.2px);
  animation: drift 13s linear infinite;
}

.ambient span:nth-child(1) { left: 8%; animation-delay: -4s; animation-duration: 15s; }
.ambient span:nth-child(2) { left: 27%; animation-delay: -9s; transform: scale(.65); }
.ambient span:nth-child(3) { left: 48%; animation-delay: -1s; animation-duration: 18s; }
.ambient span:nth-child(4) { left: 70%; animation-delay: -7s; transform: scale(.8); }
.ambient span:nth-child(5) { left: 86%; animation-delay: -11s; animation-duration: 16s; }
.ambient span:nth-child(6) { left: 94%; animation-delay: -2s; transform: scale(.55); }

@keyframes drift {
  0% { top: -5%; translate: 0 -20px; rotate: 0deg; }
  50% { translate: 60px 50vh; rotate: 180deg; }
  100% { top: 105%; translate: -35px 0; rotate: 390deg; }
}

.music-button {
  position: fixed;
  z-index: 80;
  top: calc(18px + var(--safe-top));
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  color: #fff8f3;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 999px;
  background: rgba(55, 25, 63, .52);
  box-shadow: 0 10px 30px rgba(31, 11, 38, .22);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  cursor: pointer;
}

.music-button[aria-pressed="true"] .music-icon { animation: pulse 1.6s ease-in-out infinite; }
.music-icon { font-size: 1.3rem; }
.music-label { font: 600 .82rem/1 system-ui, sans-serif; letter-spacing: .06em; }

.music-panel {
  position: fixed;
  z-index: 79;
  top: calc(72px + var(--safe-top));
  right: 18px;
  width: min(360px, calc(100vw - 36px));
  padding: 14px;
  color: #fff8f3;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 22px;
  background: rgba(45, 20, 54, .9);
  box-shadow: 0 22px 60px rgba(20, 7, 27, .42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .24s ease, visibility .24s ease, transform .24s ease;
}

.music-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.music-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px 4px;
}

.music-panel-heading div { min-width: 0; }
.music-panel-heading span,
.music-panel-heading strong { display: block; }
.music-panel-heading span { font: 500 .72rem/1.4 system-ui, sans-serif; opacity: .72; }
.music-panel-heading strong { margin-top: 2px; font: 600 .9rem/1.35 system-ui, sans-serif; }

.music-panel-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  cursor: pointer;
}

.spotify-embed { min-height: 152px; border-radius: 14px; overflow: hidden; }
.spotify-embed iframe { display: block; width: 100%; height: 152px; border: 0; }
.music-fallback {
  display: inline-block;
  margin: 9px 4px 0;
  color: #ffe4ef;
  font: 500 .72rem/1.4 system-ui, sans-serif;
  text-underline-offset: 3px;
}

@keyframes pulse { 50% { transform: scale(1.3) rotate(8deg); color: #ffd4e5; } }

.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  display: grid;
  place-items: center end;
  overflow: hidden;
  background: #382147 url("assets/hero.webp") 50% 50% / cover no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(27,13,34,.04) 20%, rgba(31,14,40,.1) 48%, rgba(28,12,38,.66) 100%),
    linear-gradient(0deg, rgba(24,10,32,.54), transparent 30%, rgba(40,18,51,.12));
}

.hero-content {
  width: min(670px, 48vw);
  margin: 2.5rem 6vw 4rem 0;
  padding: 2rem 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffe6ef;
  font: 600 .72rem/1.4 system-ui, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff7f2;
  font-family: "Segoe Script", "Apple Chancery", "URW Chancery L", cursive;
  font-size: clamp(2.4rem, 4.8vw, 5.2rem);
  font-weight: 500;
  line-height: .95;
  text-shadow: 0 3px 24px rgba(255, 86, 155, .82), 0 1px 2px rgba(59, 15, 48, .8);
}

.hero h1 strong {
  margin: .18em 0 .12em;
  color: #ffd8e8;
  font: italic 800 clamp(4rem, 8vw, 8.7rem)/.8 Georgia, serif;
  letter-spacing: -.05em;
}

.opening-letter {
  position: relative;
  margin: 2rem auto 1.45rem;
  padding: 1.4rem 1.7rem;
  max-width: 620px;
  color: #512b43;
  text-align: left;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,250,246,.93), rgba(255,228,239,.86));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.opening-letter::before {
  content: "✿";
  position: absolute;
  top: -15px;
  left: 28px;
  display: grid;
  place-items: center;
  width: 36px;
  aspect-ratio: 1;
  color: #d94c87;
  background: #fff8f4;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(156, 54, 101, .25);
}

.opening-letter p {
  margin: .48em 0;
  font-size: clamp(.98rem, 1.25vw, 1.16rem);
  line-height: 1.55;
}

.opening-letter p:first-child {
  margin-top: 0;
  color: #bd3f76;
  font-family: "Segoe Script", cursive;
  font-size: 1.35rem;
}
.opening-letter p:last-child { margin-bottom: 0; }

.start-button,
.next-button {
  border: 1px solid rgba(255,255,255,.5);
  color: white;
  background: linear-gradient(135deg, #ed6da0, #cf4c84);
  box-shadow: 0 15px 35px rgba(161, 44, 99, .32), inset 0 1px rgba(255,255,255,.46);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-width: min(340px, 86vw);
  min-height: 58px;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  font-size: 1.18rem;
}

.start-button:hover,
.next-button:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(161,44,99,.42); }
.start-button:active,
.next-button:active { transform: scale(.98); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.82);
  font: 500 .75rem/1 system-ui, sans-serif;
  letter-spacing: .04em;
  white-space: nowrap;
}

.scroll-hint span {
  width: 18px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 12px;
}

.scroll-hint span::after {
  content: "";
  display: block;
  width: 3px;
  height: 5px;
  margin: 5px auto 0;
  border-radius: 2px;
  background: white;
  animation: scrollDown 1.8s ease infinite;
}

@keyframes scrollDown { 70% { transform: translateY(9px); opacity: 0; } }

.gifts {
  position: relative;
  min-height: 100svh;
  padding: clamp(5rem, 9vw, 8rem) 5vw calc(4rem + var(--safe-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,146,190,.22), transparent 30%),
    radial-gradient(circle at 84% 80%, rgba(151,111,210,.22), transparent 32%),
    linear-gradient(145deg, #2b1639, #482346 48%, #24142f);
}

.gifts::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px);
  background-size: 43px 43px;
}

.section-heading {
  position: relative;
  max-width: 700px;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  text-align: center;
}

.section-heading h2,
.dialog-header h2,
.garden-copy h2 {
  margin: 0;
  font-family: "Segoe Script", "Apple Chancery", cursive;
  font-weight: 500;
}

.section-heading h2 {
  color: #ffe4ef;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  text-shadow: 0 4px 28px rgba(241,94,154,.4);
}

.section-heading > p:last-child {
  margin: .8rem auto 0;
  color: rgba(255,244,246,.78);
  font-size: 1.05rem;
  line-height: 1.7;
}

.gift-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  max-width: 1320px;
  margin: 0 auto;
}

.gift-card {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  padding: 2rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  overflow: hidden;
  color: #592c45;
  text-align: center;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(255,252,248,.96), rgba(255,217,232,.92));
  box-shadow: 0 24px 45px rgba(15,5,24,.24), inset 0 1px rgba(255,255,255,.9);
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}

.gift-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .23;
  background: radial-gradient(circle at 70% 15%, #ff69a5, transparent 28%), radial-gradient(circle at 16% 95%, #9369d7, transparent 35%);
}

.gift-card::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 66px;
  height: 13px;
  translate: -50% 0;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(90deg, #e85691, #ff9ebf, #d74781);
  box-shadow: 0 6px 12px rgba(190,56,111,.28);
}

.gift-card:hover { transform: translateY(-10px) rotate(-.7deg); box-shadow: 0 34px 60px rgba(12,4,20,.34); }
.gift-card:active { transform: translateY(-3px) scale(.98); }
.gift-card:nth-child(even):hover { rotate: .7deg; }
.gift-card:nth-child(2) { margin-top: 24px; }
.gift-card:nth-child(4) { margin-top: 24px; }

.card-number {
  position: absolute;
  top: 20px;
  right: 18px;
  color: rgba(118,51,83,.36);
  font: italic 600 .8rem/1 Georgia, serif;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: auto 0 .35rem;
  color: #dc4f88;
  font-size: 2.55rem;
  border: 1px solid rgba(224,80,139,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  box-shadow: 0 12px 25px rgba(151,57,96,.15);
}

.card-title {
  min-height: 3.4em;
  display: grid;
  place-items: center;
  font-size: 1.18rem;
  line-height: 1.4;
}

.card-action {
  color: #b64575;
  font: 650 .72rem/1 system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.card-action b { font-size: 1rem; }

.card-special {
  color: #fff5ee;
  background: linear-gradient(165deg, rgba(105,45,91,.92), rgba(54,25,76,.96));
}
.card-special::before { opacity: .8; background: radial-gradient(circle at 50% 25%, rgba(255,142,184,.72), transparent 32%), url("assets/secret-garden.webp") center/cover; mix-blend-mode: soft-light; }
.card-special .card-icon { color: #fff0d2; border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.1); }
.card-special .card-action { color: #ffd0e1; }
.card-special .card-number { color: rgba(255,255,255,.44); }

.signature {
  position: relative;
  margin: 4rem 0 0;
  color: rgba(255,237,244,.62);
  text-align: center;
  font-style: italic;
}

.wish-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(20px, var(--safe-top)) 20px max(20px, var(--safe-bottom));
  overflow: hidden;
  color: var(--cream);
  border: 0;
  background: #2f1c3a;
}

.wish-dialog::backdrop { background: #1f1029; }
.wish-dialog[open] { display: grid; place-items: center; animation: dialogIn .45s ease both; }

@keyframes dialogIn { from { opacity: 0; } }

.dialog-backdrop {
  position: absolute;
  inset: -3%;
  background-position: center;
  background-size: cover;
  filter: brightness(.52) saturate(.88);
  transform: scale(1.04);
}

.scene-flowers .dialog-backdrop { background-image: url("assets/hero.webp"); }
.scene-lake .dialog-backdrop { background-image: url("assets/lake-sunset.webp"); }
.scene-autumn .dialog-backdrop { background-image: url("assets/autumn.webp"); }
.scene-heart .dialog-backdrop { background-image: url("assets/starry-heart.webp"); }

.wish-dialog::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 10%, rgba(29,12,37,.46) 100%), linear-gradient(0deg, rgba(27,11,34,.5), transparent 50%);
}

.dialog-shell {
  position: relative;
  z-index: 1;
  width: min(660px, 94vw);
  max-height: calc(100dvh - max(40px, var(--safe-top)) - max(40px, var(--safe-bottom)));
  padding: clamp(1.55rem, 4vw, 2.8rem);
  display: flex;
  flex-direction: column;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 34px;
  background: linear-gradient(150deg, rgba(255,253,249,.95), rgba(255,231,240,.91));
  box-shadow: 0 30px 90px rgba(17,5,27,.46), inset 0 1px rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.close-button {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
  width: 44px;
  height: 44px;
  color: #743b58;
  font: 300 1.8rem/1 system-ui, sans-serif;
  border: 1px solid rgba(146,66,103,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  cursor: pointer;
}

.dialog-header {
  padding: .15rem 2.7rem 1.35rem 0;
  color: #743452;
}

.dialog-kicker {
  color: #ad5f7f;
  font: 600 .66rem/1.2 system-ui, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.dialog-header h2 {
  margin-top: .58rem;
  color: #7e3e5c;
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-size: clamp(2rem, 5.5vw, 3.35rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.sequence { position: relative; min-height: 230px; display: grid; align-items: center; }

.wish-box {
  position: relative;
  display: none;
  margin: 0;
  padding: clamp(1.75rem, 5vw, 2.65rem);
  color: #4d3140;
  text-align: center;
  border: 1px solid rgba(186,105,137,.28);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,247,243,.72)),
    rgba(255,255,255,.68);
  box-shadow: 0 16px 34px rgba(123,52,86,.1), inset 0 1px rgba(255,255,255,.96);
}

.wish-box::before,
.wish-box::after {
  position: absolute;
  color: rgba(190,91,130,.48);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  line-height: 1;
}

.wish-box::before { content: "❦"; top: 13px; left: 16px; }
.wish-box::after { content: "❧"; right: 16px; bottom: 13px; }

.long-wish {
  text-align: left;
}

.wish-box.is-visible { display: block; animation: wishReveal .6s cubic-bezier(.2,.85,.2,1) both; }

@keyframes wishReveal {
  from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}

.wish-index {
  display: inline-block;
  margin-bottom: .9rem;
  color: #a95878;
  font: 600 .65rem/1.2 system-ui, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.wish-box p {
  margin: 0;
  color: inherit;
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-size: clamp(1.28rem, 3.6vw, 1.82rem);
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: -.012em;
  text-wrap: pretty;
  text-shadow: none;
}

.highlight-wish {
  color: #984b6b;
  border-color: rgba(197,85,129,.34);
  background: linear-gradient(140deg, rgba(255,255,255,.88), rgba(255,225,235,.8));
  box-shadow: 0 18px 42px rgba(171,72,112,.14), inset 0 0 30px rgba(255,255,255,.54);
}

.highlight-wish p {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.dialog-footer { padding-top: 1.15rem; text-align: center; }

.progress-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 1rem; }
.progress-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(151,64,104,.22); transition: width .3s, background .3s; }
.progress-dots i.active { width: 24px; border-radius: 5px; background: #d8558d; }

.next-button {
  min-height: 50px;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-size: .98rem;
}
.next-button span { margin-left: .65rem; font-size: 1.25rem; }

.complete-note {
  margin: .7rem 0 0;
  color: #81425f;
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
}

.dialog-single { text-align: center; }
.single-wish { display: block; margin: 1.2rem 0 .5rem; }

.special-gift {
  position: fixed;
  inset: 0;
  z-index: 120;
  min-height: 100dvh;
  overflow: hidden;
  color: #fff8f1;
  background: #261936;
}

.special-gift[hidden] { display: none; }
.special-gift.is-open { display: block; animation: gardenOpen .9s ease both; }

@keyframes gardenOpen { from { opacity: 0; clip-path: circle(0 at 50% 50%); } to { opacity: 1; clip-path: circle(150% at 50% 50%); } }

.garden-image {
  position: absolute;
  inset: -2%;
  background: url("assets/secret-garden.webp") center 45% / cover no-repeat;
  animation: gardenBreathe 18s ease-in-out infinite alternate;
}

@keyframes gardenBreathe { to { transform: scale(1.045) translateY(-.5%); } }

.garden-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,15,48,.55) 0%, transparent 26%, transparent 62%, rgba(37,14,38,.65) 100%), radial-gradient(circle at center, transparent 40%, rgba(18,9,35,.34) 100%);
}

.garden-close {
  position: absolute;
  z-index: 4;
  top: calc(18px + var(--safe-top));
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  color: white;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  background: rgba(34,20,55,.48);
  box-shadow: 0 10px 28px rgba(12,4,26,.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}
.garden-close > span { font: 600 .8rem/1 system-ui, sans-serif; }

.garden-copy {
  position: absolute;
  z-index: 3;
  top: max(9vh, calc(80px + var(--safe-top)));
  left: 50%;
  width: min(90vw, 780px);
  translate: -50% 0;
  text-align: center;
  text-shadow: 0 4px 30px rgba(26,9,41,.9), 0 1px 2px #34153d;
}

.garden-copy p {
  margin: 0 0 .5rem;
  color: #ffe1ed;
  font: 650 .72rem/1.4 system-ui, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.garden-copy h2 { font-size: clamp(2.7rem, 7vw, 6rem); line-height: 1.05; }
.garden-copy span { display: block; margin-top: .65rem; font-size: clamp(1rem, 2vw, 1.25rem); font-style: italic; }
.garden-copy i { display: block; width: 54px; height: 1px; margin: 1rem auto 0; background: linear-gradient(90deg, transparent, #ffd4e3, transparent); }

.garden-petals i {
  position: absolute;
  z-index: 2;
  top: -8%;
  width: var(--size, 12px);
  height: calc(var(--size, 12px) * .7);
  border-radius: 80% 15% 80% 20%;
  background: linear-gradient(135deg, #fff1f6, #ff7ead);
  opacity: .8;
  animation: gardenPetal var(--duration, 11s) linear var(--delay, 0s) infinite;
}

@keyframes gardenPetal {
  0% { transform: translate3d(0,-10vh,0) rotate(0); }
  50% { transform: translate3d(80px,52vh,0) rotate(250deg); }
  100% { transform: translate3d(-35px,112vh,0) rotate(520deg); }
}

.garden-glow b {
  position: absolute;
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff6b7;
  box-shadow: 0 0 8px 3px rgba(255,240,132,.65);
  animation: firefly 5s ease-in-out infinite;
}
.garden-glow b:nth-child(1) { left: 12%; top: 64%; }
.garden-glow b:nth-child(2) { left: 27%; top: 42%; animation-delay: -3s; }
.garden-glow b:nth-child(3) { left: 66%; top: 68%; animation-delay: -1s; }
.garden-glow b:nth-child(4) { left: 83%; top: 35%; animation-delay: -4s; }
.garden-glow b:nth-child(5) { left: 72%; top: 82%; animation-delay: -2s; }

@keyframes firefly { 50% { opacity: .25; transform: translate(25px,-35px) scale(.55); } }

/* Khu vườn ngàn hoa — trải nghiệm món quà đặc biệt */
.special-gift {
  perspective: 1200px;
  font-family: "Lan Noto Serif", "Times New Roman", serif;
}

.special-gift.is-open {
  animation: gardenArrival .85s ease both;
}

@keyframes gardenArrival {
  from { opacity: 0; transform: scale(1.035); }
  to { opacity: 1; transform: none; }
}

.garden-image {
  inset: -4%;
  background-position: center 44%;
  filter: saturate(.82) brightness(.68);
  transform: scale(1.02);
  animation: none;
  transition: filter 2.4s ease, transform 9s cubic-bezier(.2,.65,.2,1), background-position 9s ease;
  will-change: transform, filter;
}

.phase-tour .garden-image,
.phase-flower .garden-image {
  filter: saturate(1.04) brightness(.9);
  transform: scale(1.13) translate3d(-1.5%, -1%, 0);
  background-position: 52% 48%;
}

.is-blooming .garden-image,
.is-bloomed .garden-image {
  filter: saturate(1.18) brightness(1.02);
  transform: scale(1.075) translate3d(0, 0, 0);
  transition-duration: 5.5s;
}

.garden-depth {
  position: absolute;
  inset: -5%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease, transform 10s ease;
}

.garden-depth-back {
  background: radial-gradient(ellipse at 65% 28%, rgba(255,186,218,.24), transparent 28%), radial-gradient(circle at 24% 60%, rgba(148,120,255,.16), transparent 24%);
  transform: translate3d(-2%, 1%, 0) scale(1.05);
}

.garden-depth-front {
  background: linear-gradient(112deg, transparent 34%, rgba(255,235,188,.12) 47%, transparent 59%);
  filter: blur(7px);
  transform: translate3d(2%, 0, 0) scale(1.08);
}

.phase-tour .garden-depth,
.phase-flower .garden-depth,
.is-blooming .garden-depth,
.is-bloomed .garden-depth { opacity: 1; }

.phase-tour .garden-depth-back { transform: translate3d(2%, -1%, 0) scale(1.12); }
.phase-tour .garden-depth-front { transform: translate3d(-3%, 1%, 0) scale(1.15); }

.garden-vignette {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(12,12,42,.64) 0%, rgba(20,12,40,.04) 31%, rgba(22,10,34,.08) 64%, rgba(27,10,34,.64) 100%),
    radial-gradient(circle at 61% 58%, transparent 26%, rgba(17,8,31,.4) 100%);
  transition: opacity 3s ease;
}

.is-bloomed .garden-vignette { opacity: .62; }

.garden-close { z-index: 20; }

.garden-gate {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(255,221,164,.32), rgba(25,13,43,.76) 70%);
  transition: opacity 1.1s ease, visibility 1.1s;
  transform-style: preserve-3d;
}

.gate-light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(56vw, 380px);
  height: 72vh;
  translate: -50% -50%;
  background: radial-gradient(ellipse, rgba(255,239,184,.9), rgba(255,174,196,.28) 48%, transparent 72%);
  filter: blur(14px);
  opacity: .75;
  animation: gateGlow 2.6s ease-in-out infinite alternate;
}

@keyframes gateGlow { to { opacity: 1; transform: scale(1.08); } }

.gate-half {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(91vw, 690px);
  height: min(94vh, 1040px);
  object-fit: contain;
  pointer-events: none;
  backface-visibility: hidden;
  filter: drop-shadow(0 24px 35px rgba(14,5,25,.42));
  transition: transform 2.8s cubic-bezier(.2,.7,.2,1), opacity 2.4s ease;
  will-change: transform, opacity;
}

.gate-left {
  clip-path: inset(0 50% 0 0);
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.gate-right {
  clip-path: inset(0 0 0 50%);
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.gate-opening .gate-left { transform: translate(-88%, -50%) rotateY(34deg); opacity: .25; }
.gate-opening .gate-right { transform: translate(-12%, -50%) rotateY(-34deg); opacity: .25; }
.phase-tour .garden-gate,
.phase-flower .garden-gate,
.is-blooming .garden-gate,
.is-bloomed .garden-gate { opacity: 0; visibility: hidden; }

.garden-copy {
  z-index: 12;
  top: max(8vh, calc(72px + var(--safe-top)));
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.garden-copy p {
  font-family: system-ui, sans-serif;
  font-weight: 600;
}

.garden-copy h2 {
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.garden-copy span {
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.phase-tour .garden-copy { opacity: .72; transform: translateY(-8px) scale(.97); }
.phase-flower .garden-copy,
.is-blooming .garden-copy,
.is-bloomed .garden-copy { opacity: 0; transform: translateY(-22px); pointer-events: none; }

.garden-tour {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
}

.phase-tour .garden-tour { opacity: 1; }

.garden-tour span {
  position: absolute;
  top: -10%;
  width: 8vw;
  min-width: 55px;
  height: 120%;
  background: linear-gradient(180deg, rgba(255,242,191,.26), transparent 72%);
  filter: blur(12px);
  transform: rotate(10deg);
  animation: tourRay 4.8s ease-in-out infinite alternate;
}
.garden-tour span:nth-child(1) { left: 16%; }
.garden-tour span:nth-child(2) { left: 52%; animation-delay: -2.5s; }
.garden-tour span:nth-child(3) { right: 9%; animation-delay: -1.2s; }

@keyframes tourRay { to { translate: 42px 0; opacity: .35; } }

.rose-stage {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.4s ease, visibility 1.4s;
}

.phase-flower .rose-stage,
.is-blooming .rose-stage,
.is-bloomed .rose-stage {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rose-aura {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  width: min(74vw, 560px);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,218,157,.46), rgba(255,102,168,.22) 36%, transparent 68%);
  filter: blur(18px);
  animation: roseAura 2.6s ease-in-out infinite alternate;
  transition: transform 5s ease, opacity 5s ease;
}

@keyframes roseAura { to { transform: scale(1.09); opacity: .72; } }

.crystal-rose {
  position: absolute;
  left: 50%;
  bottom: max(1vh, var(--safe-bottom));
  width: min(47vw, 360px);
  height: min(63vh, 650px);
  translate: -50% 0;
  padding: 0;
  border: 0;
  background: none;
  filter: drop-shadow(0 25px 30px rgba(21,7,31,.48));
  cursor: pointer;
  transform: translateY(22px) scale(.93);
  transition: transform 1.5s cubic-bezier(.2,.8,.2,1), filter 2s ease;
  animation: roseFloat 3.4s ease-in-out infinite alternate;
  -webkit-tap-highlight-color: transparent;
}

.phase-flower .crystal-rose { transform: none; }

@keyframes roseFloat { to { translate: -50% -8px; } }

.crystal-rose:focus-visible { outline: 2px solid #ffe8aa; outline-offset: 8px; border-radius: 50%; }

.rose-state {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 2.2s ease, transform 5.8s cubic-bezier(.17,.74,.18,1), filter 4s ease;
}

.rose-bloom { opacity: 0; transform: scale(.55) translateY(13%); filter: brightness(.7); }

.rose-instruction {
  position: absolute;
  left: 50%;
  bottom: calc(max(2.5vh, var(--safe-bottom)) + min(61vh, 620px));
  translate: -50% 0;
  width: max-content;
  max-width: 88vw;
  margin: 0;
  padding: .72rem 1.15rem;
  color: #fff4ef;
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-size: clamp(.95rem, 2.6vw, 1.15rem);
  font-style: italic;
  line-height: 1.4;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(57,24,66,.58);
  box-shadow: 0 10px 34px rgba(18,6,29,.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: instructionPulse 2s ease-in-out infinite;
  transition: opacity .7s ease, transform .7s ease;
}

@keyframes instructionPulse { 50% { transform: translateY(-5px); box-shadow: 0 14px 38px rgba(240,112,166,.36); } }

.is-blooming .rose-instruction,
.is-bloomed .rose-instruction { opacity: 0; transform: translateY(-14px); pointer-events: none; }

.is-blooming .crystal-rose,
.is-bloomed .crystal-rose {
  animation: none;
  transform: scale(1.08) translateY(-1.5vh);
  filter: drop-shadow(0 0 30px rgba(255,189,137,.72)) drop-shadow(0 30px 40px rgba(27,7,37,.42));
  pointer-events: none;
}

.is-blooming .rose-bud,
.is-bloomed .rose-bud { opacity: 0; transform: scale(1.12); filter: brightness(1.35); }

.is-blooming .rose-bloom,
.is-bloomed .rose-bloom { opacity: 1; transform: scale(1) translateY(0); filter: brightness(1.1); }

.bloom-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bloom-petals span {
  position: absolute;
  left: 50%;
  top: 58%;
  width: var(--petal-size, 10px);
  height: calc(var(--petal-size, 10px) * .68);
  border-radius: 90% 12% 82% 18%;
  background: linear-gradient(135deg, rgba(255,247,249,.96), rgba(247,102,153,.88));
  box-shadow: 0 0 9px rgba(255,185,211,.56);
  opacity: 0;
}

.is-blooming .bloom-petals span,
.is-bloomed .bloom-petals span {
  animation: bloomPetalBurst var(--burst-time, 5.2s) cubic-bezier(.15,.6,.25,1) var(--burst-delay, 0s) both;
}

@keyframes bloomPetalBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(.4); }
  16% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) rotate(var(--burst-r)) scale(1.12); }
}

.bloom-butterflies i {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 53%;
  width: 19px;
  height: 15px;
  opacity: 0;
  pointer-events: none;
}

.bloom-butterflies i::before,
.bloom-butterflies i::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 11px;
  height: 14px;
  background: linear-gradient(135deg, rgba(255,245,186,.95), rgba(238,119,199,.75));
  box-shadow: 0 0 10px rgba(255,235,161,.8);
}
.bloom-butterflies i::before { left: 0; border-radius: 90% 20% 70% 30%; transform-origin: right center; }
.bloom-butterflies i::after { right: 0; border-radius: 20% 90% 30% 70%; transform-origin: left center; }

.is-blooming .bloom-butterflies i,
.is-bloomed .bloom-butterflies i { animation: butterflyRise 5.6s ease-out var(--butterfly-delay, .4s) both; }
.bloom-butterflies i:nth-child(1) { --butterfly-x: -34vw; --butterfly-y: -38vh; }
.bloom-butterflies i:nth-child(2) { --butterfly-delay: .8s; --butterfly-x: 28vw; --butterfly-y: -44vh; }
.bloom-butterflies i:nth-child(3) { --butterfly-delay: 1.1s; --butterfly-x: -18vw; --butterfly-y: -52vh; }
.bloom-butterflies i:nth-child(4) { --butterfly-delay: 1.45s; --butterfly-x: 38vw; --butterfly-y: -34vh; }

@keyframes butterflyRise {
  0% { opacity: 0; transform: translate(0,0) scale(.5); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--butterfly-x, 30vw), var(--butterfly-y, -43vh)) scale(1.18) rotate(14deg); }
}

.dedication-card {
  position: absolute;
  z-index: 16;
  left: 50%;
  top: max(12vh, calc(80px + var(--safe-top)));
  translate: -50% 18px;
  width: min(86vw, 470px);
  padding: 1.15rem 2rem 1.25rem;
  color: #8d365e;
  text-align: center;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(255,254,250,.93), rgba(255,223,236,.9));
  box-shadow: 0 22px 70px rgba(40,10,47,.36), inset 0 1px rgba(255,255,255,.95);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 1.5s ease, translate 1.5s ease, visibility 1.5s;
}

.dedication-card::before,
.dedication-card::after {
  content: "❦";
  position: absolute;
  top: 50%;
  color: rgba(180,72,120,.42);
  font-size: 1.1rem;
}
.dedication-card::before { left: 18px; transform: translateY(-50%); }
.dedication-card::after { right: 18px; transform: translateY(-50%) scaleX(-1); }

.dedication-card > span { color: #d1769d; font-size: .8rem; }
.dedication-card p {
  margin: .2rem 0;
  font-family: "Lan Noto Serif", "Times New Roman", serif;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.dedication-card > i { display: block; width: 55px; height: 1px; margin: .55rem auto 0; background: linear-gradient(90deg, transparent, #c96c95, transparent); }

.is-bloomed .dedication-card {
  opacity: 1;
  visibility: visible;
  translate: -50% 0;
}

.is-bloomed .rose-aura { transform: scale(1.32); opacity: .9; }

@media (max-width: 680px) {
  .gate-half { width: min(112vw, 610px); height: 92vh; }
  .garden-copy { top: max(10vh, calc(76px + var(--safe-top))); width: 88vw; }
  .garden-copy h2 { font-size: clamp(2.3rem, 11vw, 3.7rem); line-height: 1.15; }
  .garden-copy span { font-size: 1rem; }
  .crystal-rose { width: min(67vw, 325px); height: min(60vh, 590px); }
  .rose-instruction { bottom: calc(max(2vh, var(--safe-bottom)) + min(57vh, 560px)); }
  .dedication-card { top: max(10vh, calc(72px + var(--safe-top))); padding-inline: 1.65rem; }
}

@media (max-height: 740px) and (max-width: 680px) {
  .crystal-rose { width: min(55vw, 265px); height: 55vh; }
  .rose-instruction { bottom: calc(max(1vh, var(--safe-bottom)) + 52vh); }
  .dedication-card { top: max(8vh, calc(64px + var(--safe-top))); }
}

@media (prefers-reduced-motion: reduce) {
  .garden-image,
  .garden-depth,
  .gate-half,
  .rose-state,
  .dedication-card { transition-duration: .25s !important; }
  .garden-tour,
  .garden-petals,
  .bloom-petals,
  .bloom-butterflies { display: none; }
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  translate: -50% 20px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: .9rem 1.2rem;
  color: white;
  text-align: center;
  font: 500 .85rem/1.4 system-ui, sans-serif;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(42,20,51,.86);
  box-shadow: 0 12px 34px rgba(14,5,22,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, translate .3s;
  backdrop-filter: blur(12px);
}
.toast.is-visible { opacity: 1; translate: -50% 0; }

@media (max-width: 1000px) {
  .hero { place-items: end center; background-position: 34% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(25,10,34,.88) 0%, rgba(28,12,36,.22) 58%, rgba(28,12,36,.12)); }
  .hero-content { width: min(92vw, 680px); margin: 0 0 3.7rem; padding: 13rem 0 1rem; }
  .gift-grid { grid-template-columns: repeat(6, 1fr); }
  .gift-card { grid-column: span 2; }
  .gift-card:nth-child(4) { grid-column: 2 / span 2; }
  .gift-card:nth-child(5) { grid-column: 4 / span 2; }
}

@media (max-width: 680px) {
  .music-button { top: calc(12px + var(--safe-top)); right: 12px; min-height: 42px; padding: 0 13px; }
  .music-panel { top: calc(62px + var(--safe-top)); right: 12px; width: min(360px, calc(100vw - 24px)); }
  .hero { min-height: 100svh; background-position: 37% center; }
  .hero-content { width: calc(100% - 28px); margin-bottom: calc(3.4rem + var(--safe-bottom)); padding-top: clamp(10rem, 38vh, 19rem); }
  .eyebrow { font-size: .62rem; letter-spacing: .14em; }
  .hero h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
  .hero h1 strong { font-size: clamp(4rem, 21vw, 6rem); }
  .opening-letter { margin-top: 1.2rem; padding: 1.2rem 1.1rem; border-radius: 20px; }
  .opening-letter p { font-size: .93rem; line-height: 1.48; }
  .opening-letter p:first-child { font-size: 1.15rem; }
  .start-button { min-height: 54px; font-size: 1.02rem; }
  .scroll-hint { display: none; }

  .gifts { padding-inline: 16px; }
  .section-heading { margin-bottom: 2.2rem; }
  .section-heading h2 { font-size: 2.9rem; }
  .gift-grid { grid-template-columns: 1fr; gap: 14px; }
  .gift-card,
  .gift-card:nth-child(4),
  .gift-card:nth-child(5) {
    grid-column: auto;
    min-height: 154px;
    margin-top: 0;
    padding: 1.25rem 1.2rem 1.2rem 8.7rem;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }
  .gift-card::after { top: 0; left: 32px; width: 13px; height: 45px; translate: 0 0; border-radius: 0 0 12px 12px; }
  .card-number { top: 14px; right: 14px; }
  .card-icon { position: absolute; left: 25px; top: 50%; width: 86px; height: 86px; margin: 0; transform: translateY(-50%); }
  .card-title { min-height: 0; font-size: 1.17rem; }

  .wish-dialog { padding: max(10px, var(--safe-top)) 10px max(10px, var(--safe-bottom)); }
  .dialog-shell { width: 100%; max-height: calc(100dvh - max(20px, var(--safe-top)) - max(20px, var(--safe-bottom))); border-radius: 27px; }
  .dialog-header { padding-top: .35rem; }
  .dialog-header h2 { font-size: clamp(1.95rem, 8.6vw, 2.65rem); line-height: 1.22; }
  .sequence { min-height: 238px; }
  .wish-box { padding: 1.75rem 1.45rem; }
  .wish-box p { font-size: clamp(1.18rem, 5.25vw, 1.42rem); line-height: 1.7; }
  .next-button { width: 100%; }

  .garden-copy { top: max(10vh, calc(76px + var(--safe-top))); }
  .garden-copy h2 { font-size: clamp(2.3rem, 11vw, 3.7rem); }
  .garden-image { background-position: center 46%; }
  .garden-close { top: calc(12px + var(--safe-top)); left: 12px; }
}

@media (max-height: 740px) and (max-width: 680px) {
  .hero-content { padding-top: 7rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero h1 strong { font-size: 3.8rem; }
  .opening-letter { margin: .85rem auto; padding-block: 1rem; }
  .opening-letter p { margin: .32em 0; font-size: .82rem; }
  .start-button { min-height: 48px; }
  .dialog-header h2 { font-size: 1.85rem; }
  .sequence { min-height: 198px; }
  .wish-box { padding: 1.35rem 1.2rem; }
  .wish-box p { font-size: 1.08rem; line-height: 1.62; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .hero { min-height: 760px; }
  .hero-content { padding-top: 7rem; }
  .dialog-shell { width: min(780px, 92vw); }
  .sequence { min-height: 150px; }
  .wish-box { padding: 1.25rem 1.35rem; }
  .dialog-header h2 { font-size: 1.95rem; }
  .garden-copy { top: 68px; }
}

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