:root {
  --bg: #fff7f5;
  --rose-1: #f5d0db;
  --rose-2: #e88ba9;
  --rose-3: #b84e74;
  --gold: #f3c06b;
  --ink: #4d2f35;
  --muted: #86636d;
  --white-glass: rgba(255,255,255,0.64);
  --white-glass-strong: rgba(255,255,255,0.76);
  --shadow: 0 30px 90px rgba(184, 78, 116, 0.15);
  --shadow-soft: 0 18px 48px rgba(184, 78, 116, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,221,233,0.95) 0, transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(255,238,205,0.95) 0, transparent 24%),
    linear-gradient(140deg, #fffaf8 0%, #fff3f7 44%, #fff8eb 100%);
  overflow-x: hidden;
  min-height: 100vh;
}
.hidden { display: none !important; }

.backdrop-blur {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(0px);
  pointer-events: none;
  z-index: 0;
}

.stars::before,
.stars::after,
.petals::before,
.petals::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stars::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.95) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(243,192,107,0.45) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(232,139,169,0.35) 0 1px, transparent 2px);
  background-size: 160px 160px, 120px 120px, 90px 90px;
  opacity: .7;
  animation: driftUp 18s linear infinite;
}

.petals::before {
  background-image:
    radial-gradient(ellipse at center, rgba(239,171,193,0.34) 0 35%, transparent 38%),
    radial-gradient(ellipse at center, rgba(255,240,244,0.52) 0 35%, transparent 38%);
  background-size: 180px 180px, 240px 240px;
  opacity: .2;
  animation: floatPetals 28s linear infinite;
}

@keyframes driftUp {
  from { transform: translateY(0); }
  to { transform: translateY(-120px); }
}
@keyframes floatPetals {
  from { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-40px) translateX(18px); }
  to { transform: translateY(-90px) translateX(-16px); }
}

.welcome-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.welcome-orbit {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .6;
}
.orbit-one {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(245,208,219,0.95) 0%, rgba(245,208,219,0) 68%);
  top: -120px; left: -120px;
  animation: pulseOrbit 8s ease-in-out infinite;
}
.orbit-two {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(255,236,204,0.9) 0%, rgba(255,236,204,0) 70%);
  bottom: -180px; right: -140px;
  animation: pulseOrbit 10s ease-in-out infinite reverse;
}
@keyframes pulseOrbit {
  0%,100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.07); opacity: .72; }
}

.welcome-card {
  width: min(820px, 100%);
  text-align: center;
  padding: clamp(36px, 7vw, 82px);
  background: linear-gradient(160deg, rgba(255,255,255,0.76), rgba(255,255,255,0.52));
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: 42px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  position: relative;
  overflow: hidden;
}
.welcome-card::before,
.welcome-card::after {
  content: "";
  position: absolute;
  width: 140px; height: 140px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .95;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='%23fffdf8' stroke='%23ebcfd8' stroke-width='2'%3E%3Cellipse cx='60' cy='18' rx='12' ry='25'/%3E%3Cellipse cx='92' cy='42' rx='12' ry='25' transform='rotate(72 92 42)'/%3E%3Cellipse cx='80' cy='79' rx='12' ry='25' transform='rotate(144 80 79)'/%3E%3Cellipse cx='40' cy='79' rx='12' ry='25' transform='rotate(216 40 79)'/%3E%3Cellipse cx='28' cy='42' rx='12' ry='25' transform='rotate(288 28 42)'/%3E%3C/g%3E%3Ccircle cx='60' cy='54' r='10' fill='%23f3c06b'/%3E%3Cpath d='M60 65 C58 82 58 94 60 110' stroke='%237aad77' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.welcome-card::before { top: -12px; left: -10px; }
.welcome-card::after { right: -10px; bottom: -12px; transform: rotate(180deg) scaleX(-1); }

.tiny-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 12px;
  font-weight: 800;
  color: var(--rose-3);
}
.center { text-align: center; }

.welcome-card h1 {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(78px, 16vw, 164px);
  line-height: .9;
  color: var(--rose-3);
  font-weight: 400;
  text-shadow: 0 18px 40px rgba(232,139,169,0.18);
}
.welcome-line {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.2;
  margin: 18px auto 12px;
  max-width: 690px;
}
.welcome-note,
.welcome-foot {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  line-height: 1.75;
}
.welcome-foot { margin-top: 16px; font-size: 13px; font-weight: 700; }

.primary-btn,
.secondary-btn {
  border: 0;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--rose-2), var(--rose-3));
  box-shadow: 0 16px 36px rgba(184, 78, 116, 0.28);
}
.secondary-btn {
  color: var(--rose-3);
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(184, 78, 116, 0.18);
}
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px rgba(184, 78, 116, 0.18);
}

.top-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  width: min(1180px, calc(100% - 30px));
  margin: 14px auto 0;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(184, 78, 116, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 900; color: var(--rose-3); }
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 16px; }
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.section,
.hero-section,
.countdown-row {
  width: min(1180px, calc(100% - 30px));
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}
.hero-section { margin-top: 44px; }
.section { margin-top: 104px; }
.countdown-row { margin-top: 36px; }
.frame {
  border-radius: 36px;
  background: linear-gradient(150deg, rgba(255,255,255,0.78), rgba(255,255,255,0.54));
  border: 1px solid rgba(255,255,255,0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.frame::before {
  width: 220px; height: 220px;
  top: -120px; right: -70px;
  background: radial-gradient(circle, rgba(243,192,107,0.18) 0%, rgba(243,192,107,0) 72%);
}
.frame::after {
  width: 230px; height: 230px;
  bottom: -130px; left: -70px;
  background: radial-gradient(circle, rgba(232,139,169,0.16) 0%, rgba(232,139,169,0) 72%);
}

.hero-section {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 36px;
  padding: 28px;
  min-height: 720px;
  align-items: center;
}
.hero-copy h2,
.section-title {
  margin: 0 auto 20px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: .95;
  font-size: clamp(42px, 6vw, 82px);
}
.section-title {
  text-align: center;
  max-width: 920px;
}
.hero-text {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
  max-width: 620px;
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-quote-block {
  margin-top: 22px;
  padding: 18px 22px 18px 28px;
  border-left: 2px solid rgba(184, 78, 116, 0.24);
  background: rgba(255,255,255,0.46);
  border-radius: 20px;
  max-width: 520px;
  position: relative;
}
.quote-mark {
  position: absolute;
  top: 8px; left: 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
  color: var(--rose-2);
}
.typed-line {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 29px;
  line-height: 1.2;
  color: var(--rose-3);
}

.hero-visual { display: grid; place-items: center; }
.polaroid-stack {
  position: relative;
  width: min(470px, 100%);
  height: 520px;
}
.polaroid {
  position: absolute;
  width: 270px;
  height: 360px;
  object-fit: cover;
  background: #fff;
  border: 12px solid #fff;
  border-bottom-width: 44px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease;
}
.polaroid:hover { transform: scale(1.03) rotate(0deg) !important; }
.one { top: 68px; left: 0; transform: rotate(-9deg); }
.two { top: 0; right: 10px; transform: rotate(8deg); }
.three { bottom: 0; left: 110px; transform: rotate(4deg); }

.special-moment {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
}
.special-image-wrap {
  position: relative;
  min-height: 640px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.special-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  animation: cinematicZoom 12s ease-in-out infinite alternate;
}
@keyframes cinematicZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}
.special-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,12,13,0.64), rgba(17,12,13,0.08) 46%, rgba(17,12,13,0.04));
  display: flex;
  align-items: flex-end;
}
.special-overlay-copy {
  padding: 28px;
}
.overlay-title {
  margin: 0;
  color: white;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.02;
  max-width: 520px;
}
.special-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
}
.special-script {
  margin: 0 0 16px;
  font-family: "Great Vibes", cursive;
  color: var(--rose-3);
  font-size: clamp(40px, 4.8vw, 68px);
  line-height: .98;
}
.special-copy p,
.bouquet-copy p,
.video-note,
.final-vow-text {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}
.glass-note {
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 18px 42px rgba(184, 78, 116, 0.08);
}
.glass-note p { margin: 0; color: var(--ink); line-height: 1.85; }

.countdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.count-card { padding: 30px; }
.soft-card { background: linear-gradient(150deg, rgba(255,250,240,0.86), rgba(255,255,255,0.58)); }
.count-card h3 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  line-height: 1;
}
.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.count-grid div {
  text-align: center;
  padding: 18px 8px;
  border-radius: 22px;
  background: rgba(255,255,255,0.7);
}
.count-grid strong {
  display: block;
  font-size: 34px;
  color: var(--rose-3);
}
.count-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.story-card {
  padding: 26px;
  min-height: 236px;
}
.story-card span {
  width: 42px; height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fde5ed;
  color: var(--rose-3);
  font-weight: 900;
  margin-bottom: 14px;
}
.story-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-family: "Cormorant Garamond", serif;
}
.story-card p { margin: 0; color: var(--muted); line-height: 1.8; }
.inside-joke { font-size: 24px; color: var(--rose-3) !important; font-weight: 800; }

.bouquet-block {
  margin-top: 36px;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
}
.bouquet-photo img {
  width: 100%;
  display: block;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
}
.bouquet-copy { padding-right: 12px; }

.gallery-grid {
  columns: 4 230px;
  column-gap: 16px;
  margin-top: 36px;
}
.gallery-grid img {
  width: 100%;
  margin: 0 0 16px;
  display: block;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  break-inside: avoid;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.gallery-grid img:hover {
  transform: translateY(-4px) scale(1.01);
  filter: brightness(1.03);
}

.video-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.three-videos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.video-card { padding: 14px; }
.video-card video {
  display: block;
  width: 100%;
  border-radius: 24px;
  background: #000;
  max-height: 760px;
  object-fit: cover;
}
.video-note {
  text-align: center;
  margin-top: 16px;
}

.letter-card {
  max-width: 980px;
  margin: 36px auto 0;
  padding: 34px clamp(24px, 4vw, 56px) clamp(30px, 5vw, 56px);
}
.letter-topline {
  width: 180px;
  height: 2px;
  margin: 0 auto 26px;
  background: linear-gradient(90deg, transparent, rgba(184,78,116,0.56), transparent);
}
.letter-card p {
  margin: 0 0 22px;
  color: #5c3b42;
  font-size: clamp(16px, 1.95vw, 20px);
  line-height: 2;
}
.centerpiece-line {
  margin: 8px 0 26px;
  text-align: center;
  font-family: "Great Vibes", cursive;
  font-size: clamp(40px, 4.8vw, 68px);
  line-height: 1;
  color: var(--rose-3);
}
.signature {
  margin-top: 10px !important;
  font-family: "Great Vibes", cursive;
  font-size: 50px !important;
  color: var(--rose-3) !important;
}

.music-box,
.final-vow {
  padding: 32px;
  text-align: center;
}
.music-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  text-align: left;
}
.music-box h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 42px;
}
#musicStatus { color: var(--muted); margin: 0; line-height: 1.8; max-width: 560px; }
.final-note { margin: 24px auto 0; max-width: 760px; }
.final-note p { font-size: 18px; }

footer {
  padding: 70px 20px 44px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28,18,21,0.75);
  backdrop-filter: blur(12px);
}
.modal img {
  max-width: min(980px, 94vw);
  max-height: 86vh;
  display: block;
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.34);
}
.close-btn {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: white;
  color: var(--rose-3);
  font-size: 28px;
  cursor: pointer;
}

.reveal-on-scroll { opacity: 0; transform: translateY(28px); }
.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .8s ease, transform .8s ease;
}

@media (max-width: 1024px) {
  .hero-section,
  .special-moment,
  .bouquet-block,
  .video-grid,
  .three-videos,
  .countdown-row,
  .music-box {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
  .story-grid { grid-template-columns: 1fr; }
  .hero-section { min-height: auto; }
  .special-image-wrap { min-height: 480px; }
  .polaroid-stack { height: 490px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .count-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { columns: 2 160px; }
  .polaroid { width: 210px; height: 286px; }
  .one { top: 90px; }
  .three { left: 86px; }
  .music-box { text-align: center; align-items: center; }
}

@media (max-width: 520px) {
  .top-nav,
  .section,
  .hero-section,
  .countdown-row { width: calc(100% - 20px); }
  .welcome-card h1 { font-size: 84px; }
  .hero-copy h2,
  .section-title { font-size: 48px; }
  .special-script,
  .centerpiece-line { font-size: 46px; }
  .special-image-wrap { min-height: 380px; }
  .polaroid-stack { height: 410px; }
  .polaroid { width: 172px; height: 230px; border-bottom-width: 34px; }
  .one { top: 72px; left: 0; }
  .two { top: 0; right: 0; }
  .three { left: 52px; bottom: 0; }
}


/* --- Cinematic upgrade layer --- */
.cinematic-curtain {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255,240,246,0.98), rgba(255,214,229,0.90) 42%, rgba(255,246,237,0.98));
  overflow: hidden;
}
.cinematic-curtain p {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(90px, 18vw, 190px);
  color: var(--rose-3);
  transform: translateY(-10px);
  text-shadow: 0 22px 50px rgba(184,78,116,.22);
  animation: curtainName 2.2s ease both;
}
.cinematic-curtain span {
  position: absolute;
  margin-top: 130px;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 800;
  color: var(--muted);
  opacity: 0;
  animation: curtainSub 2.2s .45s ease both;
}
.curtain-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.92), rgba(243,192,107,.24) 48%, transparent 70%);
  filter: blur(5px);
  animation: curtainGlow 2.4s ease both;
}
.cinematic-curtain.fade-out {
  animation: curtainOut 1.1s ease forwards;
}
@keyframes curtainName {
  from { opacity: 0; transform: translateY(20px) scale(.92); filter: blur(10px); }
  to { opacity: 1; transform: translateY(-10px) scale(1); filter: blur(0); }
}
@keyframes curtainSub {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes curtainGlow {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: scale(1.18); }
}
@keyframes curtainOut {
  to { opacity: 0; transform: scale(1.06); visibility: hidden; }
}

.floating-music {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  padding: 12px 17px;
  background: rgba(255,255,255,.72);
  color: var(--rose-3);
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(184,78,116,.18);
  backdrop-filter: blur(16px);
}

.cinema-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  width: min(420px, 100%);
  margin-top: 24px;
}
.cinema-strip span {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(184,78,116,.38), transparent);
  animation: stripPulse 1.8s ease-in-out infinite;
}
.cinema-strip span:nth-child(2) { animation-delay: .12s; }
.cinema-strip span:nth-child(3) { animation-delay: .24s; }
.cinema-strip span:nth-child(4) { animation-delay: .36s; }
.cinema-strip span:nth-child(5) { animation-delay: .48s; }
@keyframes stripPulse {
  0%,100% { opacity: .25; transform: scaleX(.72); }
  50% { opacity: 1; transform: scaleX(1); }
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 38px;
  padding: 2px;
  background: linear-gradient(120deg, rgba(255,255,255,.3), rgba(243,192,107,.65), rgba(232,139,169,.52), rgba(255,255,255,.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderGlow 5s linear infinite;
  pointer-events: none;
}
@keyframes borderGlow {
  0% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(18deg) brightness(1.08); }
  100% { filter: hue-rotate(0deg) brightness(1); }
}

.polaroid-stack::before {
  content: "";
  position: absolute;
  inset: 30px 40px 50px 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.85), rgba(243,192,107,.28) 44%, transparent 70%);
  filter: blur(12px);
  animation: haloBreath 5.6s ease-in-out infinite;
}
@keyframes haloBreath {
  0%,100% { transform: scale(.96); opacity: .54; }
  50% { transform: scale(1.08); opacity: .82; }
}

.special-image-wrap {
  transform-style: preserve-3d;
}
.special-image-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.16) 42%, rgba(255,255,255,.62) 50%, rgba(255,255,255,.13) 58%, transparent 100%);
  transform: translateX(-140%);
  animation: cinematicShine 5.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cinematicShine {
  0%, 52% { transform: translateX(-140%); }
  74%, 100% { transform: translateX(140%); }
}

.vow-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.vow-card {
  padding: 24px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .24s ease, box-shadow .24s ease;
}
.vow-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 90px rgba(184,78,116,.18);
}
.vow-card span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,225,237,.9);
  color: var(--rose-3);
  font-weight: 900;
}
.vow-card p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.gallery-grid img:nth-child(3n + 1) {
  transform: rotate(-.6deg);
}
.gallery-grid img:nth-child(3n + 2) {
  transform: rotate(.7deg);
}
.gallery-grid img:hover {
  transform: translateY(-8px) scale(1.025) rotate(0deg) !important;
  box-shadow: 0 30px 80px rgba(184,78,116,.22);
}

.video-card {
  position: relative;
}
.video-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: inset 0 0 42px rgba(255,255,255,.13);
  pointer-events: none;
}

.letter-card {
  background:
    linear-gradient(150deg, rgba(255,255,255,.86), rgba(255,247,236,.72)),
    radial-gradient(circle at 50% 0%, rgba(243,192,107,.2), transparent 38%);
}
.letter-card::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -30px;
  top: -24px;
  opacity: .55;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='%23fffdf8' stroke='%23ebcfd8' stroke-width='2'%3E%3Cellipse cx='60' cy='18' rx='12' ry='25'/%3E%3Cellipse cx='92' cy='42' rx='12' ry='25' transform='rotate(72 92 42)'/%3E%3Cellipse cx='80' cy='79' rx='12' ry='25' transform='rotate(144 80 79)'/%3E%3Cellipse cx='40' cy='79' rx='12' ry='25' transform='rotate(216 40 79)'/%3E%3Cellipse cx='28' cy='42' rx='12' ry='25' transform='rotate(288 28 42)'/%3E%3C/g%3E%3Ccircle cx='60' cy='54' r='10' fill='%23f3c06b'/%3E%3C/svg%3E");
}

.ending-scene {
  min-height: 740px;
  border-radius: 42px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.ending-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.ending-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.58) saturate(1.08);
  transform: scale(1.03);
}
.ending-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.1), transparent 30%),
    linear-gradient(to top, rgba(25,12,17,.88), rgba(25,12,17,.35), rgba(25,12,17,.72));
}
.ending-words {
  width: min(850px, calc(100% - 38px));
  text-align: center;
  color: white;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 34px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(14px);
}
.ending-words .tiny-label {
  color: rgba(255,255,255,.82);
}
.ending-words h2 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 7vw, 92px);
  line-height: .94;
  font-weight: 600;
}
.ending-words p {
  margin: 0 auto;
  max-width: 680px;
  color: rgba(255,255,255,.9);
  font-size: 18px;
  line-height: 1.9;
}

@media (max-width: 1024px) {
  .vow-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .vow-grid { grid-template-columns: 1fr; }
  .floating-music { right: 12px; bottom: 12px; padding: 10px 14px; font-size: 13px; }
  .ending-scene { min-height: 600px; }
}




/* --- Digital flower rebuilt effect --- */
.digital-flower-stage {
  margin-top: 36px;
  min-height: 720px;
  display: grid;
  grid-template-columns: 1fr .95fr;
  gap: 30px;
  align-items: center;
  padding: clamp(18px, 3vw, 34px);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 50%, rgba(255,255,255,.76), transparent 30%),
    radial-gradient(circle at 70% 40%, rgba(243,192,107,.18), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,232,240,.54));
}
.digital-flower-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(243,192,107,.26) 38%, rgba(232,139,169,.16) 56%, transparent 72%);
  filter: blur(12px);
  animation: digitalBloomGlow 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes digitalBloomGlow {
  0%,100% { transform: translateY(-50%) scale(.92); opacity: .58; }
  50% { transform: translateY(-50%) scale(1.06); opacity: .94; }
}
.digital-flower-art-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.digital-flower-art {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  background: radial-gradient(circle at center, rgba(255,255,255,.74), rgba(255,255,255,.18) 58%, transparent 80%);
  filter: drop-shadow(0 26px 60px rgba(184,78,116,.14));
}
.flower-stem {
  position: absolute;
  width: 10px;
  height: 170px;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #8dcb89, #4d925e);
}
.flower-leaf {
  position: absolute;
  width: 96px;
  height: 44px;
  bottom: 115px;
  border-radius: 100px 0 100px 0;
  background: linear-gradient(135deg, #95d996, #5da066);
  box-shadow: inset 0 0 14px rgba(255,255,255,.22);
}
.leaf-left { left: 50%; transform: translateX(-92px) rotate(-28deg); }
.leaf-right { left: 50%; transform: translateX(6px) scaleX(-1) rotate(-28deg); }
.flower-base {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  margin-top: -29px;
  border-radius: 50%;
  background: radial-gradient(circle, #cbf2bf, #78b874 75%);
  opacity: 0;
}
.petal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 50% 88%;
  opacity: 0;
  border-radius: 60% 60% 52% 52% / 88% 88% 34% 34%;
  background: linear-gradient(180deg, rgba(255,247,250,.95) 0%, rgba(255,190,214,.98) 48%, rgba(236,126,165,.96) 100%);
  box-shadow: inset 0 0 18px rgba(255,255,255,.48), 0 0 20px rgba(255,188,216,.24);
}
.petal.outer {
  width: 90px;
  height: 158px;
  margin-left: -45px;
  margin-top: -120px;
}
.petal.inner {
  width: 68px;
  height: 118px;
  margin-left: -34px;
  margin-top: -88px;
  background: linear-gradient(180deg, rgba(255,251,252,.96) 0%, rgba(255,211,226,.98) 42%, rgba(244,149,183,.96) 100%);
}
.digital-flower-art.is-blooming .flower-base {
  animation: baseBloom 1s ease forwards;
}
.digital-flower-art.is-blooming .petal.outer {
  animation: bloomOuter 1.35s cubic-bezier(.22,.9,.2,1) forwards, petalBreath 4.4s ease-in-out infinite 1.5s;
  animation-delay: var(--delay), calc(1.5s + var(--delay));
}
.digital-flower-art.is-blooming .petal.inner {
  animation: bloomInner 1.2s cubic-bezier(.22,.9,.2,1) forwards, petalBreath 4.8s ease-in-out infinite 1.7s;
  animation-delay: var(--delay), calc(1.7s + var(--delay));
}
@keyframes baseBloom {
  from { opacity: 0; transform: scale(.2); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes bloomOuter {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(.06) translateY(54px); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1) translateY(0); }
}
@keyframes bloomInner {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(.06) translateY(36px); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1) translateY(0); }
}
@keyframes petalBreath {
  0%,100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(calc(var(--r) + 2deg)) scale(1.03); }
}
.flower-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -27px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6bf 0%, #ffd36a 44%, #f3ad3f 100%);
  box-shadow: 0 0 24px rgba(243,192,107,.48);
  opacity: 0;
}
.digital-flower-art.is-blooming .flower-core {
  animation: corePop 1.1s ease forwards 1.1s, corePulse 4s ease-in-out infinite 2.2s;
}
@keyframes corePop {
  from { opacity: 0; transform: scale(.2); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes corePulse {
  0%,100% { box-shadow: 0 0 16px rgba(243,192,107,.38); }
  50% { box-shadow: 0 0 34px rgba(243,192,107,.72); }
}
.flower-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  opacity: 0;
  filter: blur(.4px);
}
.s1 { left: 18%; top: 34%; }
.s2 { right: 18%; top: 24%; }
.s3 { left: 28%; bottom: 25%; }
.s4 { right: 25%; bottom: 20%; }
.s5 { left: 50%; top: 16%; margin-left: -5px; }
.digital-flower-art.is-blooming .flower-spark {
  animation: sparkleDrift 2.8s ease-out forwards;
}
.s1 { animation-delay: 1.0s; }
.s2 { animation-delay: 1.2s; }
.s3 { animation-delay: 1.5s; }
.s4 { animation-delay: 1.8s; }
.s5 { animation-delay: 2.0s; }
@keyframes sparkleDrift {
  0% { opacity: 0; transform: scale(.1) translateY(12px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2) translateY(-18px); }
}
.digital-flower-copy {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
}
.digital-flower-copy p:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}
.memory-video {
  display: block;
  width: 100%;
  border-radius: 24px;
  background: #000;
  max-height: 760px;
  object-fit: cover;
}
.video-card { padding: 14px; min-height: 260px; display: flex; align-items: center; justify-content: center; }
.video-placeholder { color: var(--muted); font-weight: 700; font-size: 14px; }
@media (max-width: 1024px) {
  .digital-flower-stage { grid-template-columns: 1fr; min-height: auto; }
  .digital-flower-glow { left: 50%; top: 30%; transform: translateX(-50%); }
}
@media (max-width: 760px) {
  .three-videos { grid-template-columns: 1fr; }
  .digital-flower-art { width: min(360px, 100%); }
  .digital-flower-stage { padding: 22px 18px; }
}


/* --- Fullscreen bloom upgrade --- */
#digital-flower.section {
  width: min(1380px, calc(100% - 12px));
}
#digital-flower .section-title {
  max-width: 1100px;
}
.digital-flower-stage {
  min-height: 1080px;
  grid-template-columns: 1fr;
  gap: 12px;
  justify-items: center;
  align-content: center;
  padding: 64px 28px 48px;
  background:
    radial-gradient(circle at 50% 43%, rgba(255,255,255,.88) 0, rgba(255,246,251,.68) 22%, rgba(255,231,240,.36) 42%, transparent 68%),
    radial-gradient(circle at 20% 24%, rgba(243,192,107,.15), transparent 22%),
    radial-gradient(circle at 80% 22%, rgba(232,139,169,.16), transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(255,238,244,.56));
}
.digital-flower-glow {
  width: 980px;
  height: 980px;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,.98), rgba(255,232,191,.42) 27%, rgba(255,188,216,.30) 48%, rgba(232,139,169,.14) 60%, transparent 76%);
  filter: blur(20px);
}
@keyframes digitalBloomGlow {
  0%,100% { transform: translate(-50%, -50%) scale(.94); opacity: .64; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: .98; }
}
.digital-flower-art-wrap {
  width: 100%;
  max-width: 1280px;
  gap: 28px;
}
.digital-flower-art {
  width: min(980px, 92vw);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 44px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.92) 0, rgba(255,255,255,.72) 16%, rgba(255,255,255,.34) 32%, rgba(255,255,255,.10) 52%, transparent 76%);
  filter: drop-shadow(0 34px 90px rgba(184,78,116,.12));
}
.flower-stem {
  width: 16px;
  height: 300px;
  bottom: 110px;
}
.flower-leaf {
  width: 160px;
  height: 72px;
  bottom: 188px;
  box-shadow: inset 0 0 22px rgba(255,255,255,.25);
}
.leaf-left { transform: translateX(-150px) rotate(-28deg); }
.leaf-right { transform: translateX(6px) scaleX(-1) rotate(-28deg); }
.flower-base {
  top: 52%;
  width: 88px;
  height: 88px;
  margin-left: -44px;
  margin-top: -44px;
}
.petal.outer {
  width: 178px;
  height: 310px;
  margin-left: -89px;
  margin-top: -230px;
  box-shadow: inset 0 0 28px rgba(255,255,255,.55), 0 0 34px rgba(255,188,216,.26);
}
.petal.inner {
  width: 132px;
  height: 226px;
  margin-left: -66px;
  margin-top: -168px;
  box-shadow: inset 0 0 22px rgba(255,255,255,.45), 0 0 26px rgba(255,188,216,.20);
}
.flower-core {
  width: 86px;
  height: 86px;
  margin-left: -43px;
  margin-top: -43px;
}
.flower-spark {
  width: 14px;
  height: 14px;
}
.s1 { left: 14%; top: 28%; }
.s2 { right: 14%; top: 18%; }
.s3 { left: 20%; bottom: 24%; }
.s4 { right: 20%; bottom: 20%; }
.s5 { left: 50%; top: 10%; margin-left: -7px; }
.digital-flower-copy {
  max-width: 920px;
  margin: -10px auto 0;
  padding: 0 18px 8px;
  text-align: center;
}
.digital-flower-copy .special-script {
  font-size: clamp(50px, 6vw, 88px);
  line-height: .98;
  margin-bottom: 18px;
}
.digital-flower-copy p:last-child {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.85;
  max-width: 860px;
  margin: 0 auto;
}
#rebloomBtn {
  min-height: 56px;
  padding: 0 28px;
  font-size: 16px;
  box-shadow: 0 18px 40px rgba(184,78,116,.12);
}
@media (max-width: 1024px) {
  #digital-flower.section {
    width: calc(100% - 12px);
  }
  .digital-flower-stage {
    min-height: 920px;
    padding-top: 46px;
  }
  .digital-flower-glow {
    width: 760px;
    height: 760px;
    top: 36%;
  }
  .digital-flower-art {
    width: min(760px, 94vw);
  }
  .petal.outer {
    width: 144px;
    height: 252px;
    margin-left: -72px;
    margin-top: -186px;
  }
  .petal.inner {
    width: 106px;
    height: 184px;
    margin-left: -53px;
    margin-top: -138px;
  }
  .flower-stem { height: 240px; bottom: 92px; }
  .flower-leaf { width: 130px; height: 58px; bottom: 154px; }
  .leaf-left { transform: translateX(-124px) rotate(-28deg); }
  .flower-base { width: 74px; height: 74px; margin-left: -37px; margin-top: -37px; }
  .flower-core { width: 72px; height: 72px; margin-left: -36px; margin-top: -36px; }
}
@media (max-width: 640px) {
  .digital-flower-stage {
    min-height: 760px;
    padding: 32px 12px 28px;
  }
  .digital-flower-glow {
    width: 560px;
    height: 560px;
    top: 32%;
  }
  .digital-flower-art {
    width: min(520px, 100vw);
    border-radius: 28px;
  }
  .petal.outer {
    width: 102px;
    height: 182px;
    margin-left: -51px;
    margin-top: -138px;
  }
  .petal.inner {
    width: 78px;
    height: 134px;
    margin-left: -39px;
    margin-top: -102px;
  }
  .flower-stem { width: 12px; height: 180px; bottom: 72px; }
  .flower-leaf { width: 96px; height: 44px; bottom: 120px; }
  .leaf-left { transform: translateX(-92px) rotate(-28deg); }
  .flower-base { width: 58px; height: 58px; margin-left: -29px; margin-top: -29px; }
  .flower-core { width: 56px; height: 56px; margin-left: -28px; margin-top: -28px; }
  .digital-flower-copy .special-script {
    font-size: 42px;
  }
  .digital-flower-copy p:last-child {
    font-size: 18px;
  }
}


/* --- Crazy bloom / interaction upgrades --- */
.bloom-flash {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,.98) 0%, rgba(255,240,245,.84) 24%, rgba(255,209,227,.44) 46%, rgba(255,255,255,0) 72%);
}
.bloom-flash.active { animation: bloomFlash 1s ease-out forwards; }
@keyframes bloomFlash {
  0% { opacity: 0; }
  18% { opacity: .96; }
  100% { opacity: 0; }
}
.bloom-petals-layer {
  position: fixed;
  inset: 0;
  z-index: 121;
  pointer-events: none;
  overflow: hidden;
}
.bloom-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: calc(var(--size) * 1.6);
  border-radius: 60% 60% 52% 52% / 88% 88% 34% 34%;
  background: linear-gradient(180deg, rgba(255,250,252,.98), rgba(255,204,223,.96) 55%, rgba(233,124,163,.92));
  box-shadow: inset 0 0 10px rgba(255,255,255,.55), 0 0 10px rgba(255,188,216,.18);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rot));
  animation: petalBurst var(--dur) cubic-bezier(.12,.86,.2,1) forwards;
}
.bloom-particle.spark {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.98), rgba(243,192,107,.78) 58%, rgba(255,255,255,0) 72%);
  box-shadow: 0 0 14px rgba(243,192,107,.45);
}
@keyframes petalBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(.15); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(calc(var(--rot) + 180deg)) scale(1); }
}
.touch-hint {
  margin: 2px 0 0;
  color: var(--rose-3);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: .84;
  animation: hintPulse 1.8s ease-in-out infinite;
}
@keyframes hintPulse {
  0%,100% { transform: scale(1); opacity: .65; }
  50% { transform: scale(1.05); opacity: 1; }
}
.secret-bloom-message {
  max-width: 720px;
  padding: 20px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.84);
  box-shadow: 0 18px 44px rgba(184,78,116,.10);
}
.secret-bloom-message p {
  margin: 0;
  color: var(--rose-3);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  text-align: center;
}
.digital-flower-art {
  cursor: pointer;
  transition: transform .24s ease, filter .24s ease;
}
.digital-flower-art:hover,
.digital-flower-art:focus-visible {
  transform: scale(1.015);
  filter: drop-shadow(0 34px 90px rgba(184,78,116,.18));
  outline: none;
}
.digital-flower-copy .special-script { max-width: 980px; margin-left: auto; margin-right: auto; }

/* --- Memory constellation --- */
.constellation-wrap {
  margin-top: 36px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: center;
}
.constellation-map {
  min-height: 440px;
  position: relative;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.28), transparent 34%),
    linear-gradient(145deg, rgba(70,40,53,.95), rgba(48,29,39,.92));
  box-shadow: inset 0 0 80px rgba(255,255,255,.05);
  overflow: hidden;
}
.constellation-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(243,192,107,.7) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(232,139,169,.45) 0 1px, transparent 2px);
  background-size: 100px 100px, 140px 140px, 180px 180px;
  opacity: .55;
}
.memory-star {
  position: absolute;
  border: 0;
  cursor: pointer;
  color: white;
  font-weight: 800;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 24px rgba(255,216,165,.14);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.memory-star::before {
  content: "✦";
  color: #ffd580;
  margin-right: 8px;
}
.memory-star:hover,
.memory-star.active {
  transform: translateY(-3px) scale(1.04);
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 34px rgba(255,216,165,.24);
}
.memory-star:nth-child(1) { left: 10%; top: 18%; }
.memory-star:nth-child(2) { left: 58%; top: 12%; }
.memory-star:nth-child(3) { left: 24%; top: 58%; }
.memory-star:nth-child(4) { left: 72%; top: 44%; }
.memory-star:nth-child(5) { left: 14%; top: 78%; }
.memory-star:nth-child(6) { left: 58%; top: 74%; }
.memory-panel {
  min-height: 360px;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.82);
  box-shadow: 0 20px 54px rgba(184,78,116,.10);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.memory-panel h3 {
  margin: 4px 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(34px, 4vw, 52px);
  line-height: .95;
}
.memory-panel p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

/* --- Ending scene upgrade --- */
.ending-lines { margin: 0 auto 20px; max-width: 720px; }
.line-reveal {
  opacity: 0;
  transform: translateY(22px);
  margin: 0 0 10px;
  color: rgba(255,255,255,.92);
}
.revealed .line-reveal:nth-child(1) { animation: lineReveal .9s ease forwards .25s; }
.revealed .line-reveal:nth-child(2) { animation: lineReveal .9s ease forwards .70s; }
.revealed .line-reveal:nth-child(3) { animation: lineReveal .9s ease forwards 1.15s; }
@keyframes lineReveal {
  to { opacity: 1; transform: translateY(0); }
}
#foreverBtn { margin-top: 6px; }

@media (max-width: 980px) {
  .constellation-wrap { grid-template-columns: 1fr; }
  .memory-panel { min-height: auto; }
}
@media (max-width: 640px) {
  .constellation-wrap { padding: 16px; }
  .constellation-map { min-height: 520px; }
  .memory-star { font-size: 12px; padding: 10px 12px; }
  .memory-star:nth-child(2) { left: 52%; top: 10%; }
  .memory-star:nth-child(4) { left: 56%; top: 46%; }
  .memory-star:nth-child(6) { left: 44%; top: 78%; }
  .secret-bloom-message { padding: 16px 18px; }
}
