:root {
  --ink: #fff8e8;
  --muted: rgba(255, 248, 232, 0.76);
  --paper: #fff8ec;
  --coal: #16120f;
  --gold: #d9ad55;
  --gold-light: #ffe4a2;
  --rose: #8d2935;
  --leaf: #6d1f31;
  --veil: rgba(17, 12, 8, 0.56);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-y;
}

body {
  margin: 0;
  background: #120f0c;
  color: var(--ink);
  font-family: Inter, "Noto Sans Malayalam", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
}

body[data-lang="ml"] {
  font-family: "Noto Sans Malayalam", Inter, system-ui, sans-serif;
}

button,
a {
  font: inherit;
}

.section-photo,
.cover,
.message,
.story,
.countdown,
.finale {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 92px 20px;
  isolation: isolate;
  overflow: hidden;
}

.story,
.message,
.date-section,
.countdown,
.gallery,
.locations,
.finale {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.section-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  z-index: -3;
}

.section-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 227, 156, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.18), rgba(18, 15, 12, 0.78));
  z-index: -2;
}

.language-switch {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 228, 162, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 244, 208, 0.18), transparent 42%),
    rgba(17, 12, 8, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -7px 14px rgba(0, 0, 0, 0.24),
    0 14px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.lang-btn,
.music-toggle {
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.lang-btn {
  min-width: 78px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lang-btn.active {
  color: #21160b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -5px 10px rgba(121, 73, 15, 0.22),
    0 7px 14px rgba(0, 0, 0, 0.24);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
}

.rings {
  position: fixed;
  top: 104px;
  left: 0;
  right: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  perspective: 900px;
  transition: opacity 0.9s ease;
}

body.opened .rings {
  opacity: 1;
}

.ring {
  position: absolute;
  top: 0;
  width: min(36vw, 176px);
  border-radius: 999px;
  opacity: 0.94;
  filter:
    saturate(1.18)
    contrast(1.08)
    brightness(1.04)
    drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34))
    drop-shadow(0 4px 8px rgba(255, 214, 104, 0.18));
  transform-style: preserve-3d;
  will-change: transform;
}

.ring-steve {
  left: 2vw;
}

.ring-anjana {
  right: 2vw;
}

.weather-layer {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.weathering .weather-layer {
  opacity: 1;
}

.weather-drop {
  position: absolute;
  top: -18px;
  left: var(--weather-left, 50vw);
}

.weather-drop.snow {
  width: var(--weather-size, 5px);
  height: var(--weather-size, 5px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.38);
  animation: snowFall var(--weather-duration, 22s) linear infinite;
  animation-delay: var(--weather-delay, 0s);
}

.weather-drop.rain {
  width: 1.4px;
  height: var(--weather-size, 34px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(205, 224, 246, 0.52));
  box-shadow: 0 0 8px rgba(190, 215, 255, 0.22);
  transform: rotate(13deg);
  animation: rainFall var(--weather-duration, 1.4s) linear infinite;
  animation-delay: var(--weather-delay, 0s);
}

.star-layer {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}

.image-zoom {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(10, 7, 5, 0.82);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  transition: opacity 0.28s ease;
}

.image-zoom.active {
  opacity: 1;
  pointer-events: auto;
}

.image-zoom img {
  max-width: min(92vw, 720px);
  max-height: 88svh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.image-zoom.card-zoom {
  place-items: start center;
}

.image-zoom.card-zoom img {
  width: min(138vw, 1080px);
  max-width: none;
  max-height: none;
  margin: 10px 0 24px;
}

body.opened .star-layer {
  display: none;
}

.falling-star {
  position: absolute;
  top: -28px;
  left: var(--star-left, 50vw);
  width: var(--star-size, 7px);
  height: var(--star-size, 7px);
  border-radius: 50%;
  background: #ffe59a;
  box-shadow:
    0 0 10px #ffe59a,
    0 0 22px rgba(255, 196, 76, 0.8),
    0 0 44px rgba(255, 196, 76, 0.38);
  animation: starDrop var(--star-duration, 4.6s) linear forwards;
}

.falling-star::before {
  content: "";
  position: absolute;
  right: 50%;
  top: 50%;
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 226, 145, 0), rgba(255, 226, 145, 0.82));
  transform: translateY(-50%) rotate(-18deg);
  transform-origin: right center;
}

.falling-star.burst {
  animation: starBurst 0.85s ease-out forwards;
}

.falling-star.burst::before {
  display: none;
}

.falling-star.burst::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 226, 145, 0.82);
  box-shadow:
    0 -18px 0 -15px #ffe59a,
    16px -8px 0 -15px #ffe59a,
    17px 12px 0 -15px #ffe59a,
    -16px 13px 0 -15px #ffe59a,
    -18px -7px 0 -15px #ffe59a;
}

@keyframes starDrop {
  to {
    transform: translate3d(var(--star-drift, 18px), var(--star-stop, 58vh), 0) rotate(18deg);
  }
}

@keyframes starBurst {
  to {
    transform: translate3d(var(--star-drift, 18px), var(--star-stop, 58vh), 0) scale(3.2);
    opacity: 0;
  }
}

@keyframes snowFall {
  to {
    transform: translate3d(var(--weather-drift, 30px), calc(100vh + 36px), 0);
  }
}

@keyframes rainFall {
  to {
    transform: translate3d(var(--weather-drift, -70px), calc(100vh + 90px), 0) rotate(13deg);
  }
}

.cover {
  padding-top: 118px;
  align-content: center;
}

.cover-glow {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255, 228, 162, 0.22);
  filter: blur(50px);
}

.envelope-stage {
  position: relative;
  z-index: 25;
  width: min(86vw, 390px);
  min-height: min(78svh, 620px);
  display: grid;
  justify-items: center;
  align-content: center;
  transform: translateY(17svh);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.envelope {
  position: relative;
  width: min(82vw, 340px);
  height: 220px;
  perspective: 900px;
  --env-purple-deep: #6f4d94;
  --env-purple: #a987cb;
  --env-purple-light: #dbc8ee;
  --env-gold: #d8ac55;
  --env-gold-light: #fff0bd;
}

.envelope::after {
  content: "";
  position: absolute;
  left: -16px;
  bottom: -18px;
  width: 56%;
  height: 62px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(26, 13, 4, 0.42), rgba(26, 13, 4, 0));
  filter: blur(8px);
  transform: rotate(-7deg);
}

.envelope::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #fff0a8, #c79331 32%, #fff5c8 52%, #a66c1f 74%, #ffe58e);
  filter: drop-shadow(0 5px 12px rgba(48, 25, 67, 0.26));
}

.envelope-back,
.envelope-front,
.envelope-flap,
.invite-card {
  position: absolute;
  inset: 0;
}

.envelope-back {
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(145deg, var(--env-purple-light), var(--env-purple) 48%, var(--env-purple-deep)),
    repeating-linear-gradient(45deg, rgba(255, 240, 189, 0.1) 0 1px, transparent 1px 18px);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(255, 235, 158, 0.62),
    inset 0 0 0 3px rgba(146, 93, 24, 0.22),
    inset 0 -18px 32px rgba(54, 31, 79, 0.28);
}

.envelope-front {
  clip-path: polygon(0 28%, 50% 74%, 100% 28%, 100% 100%, 0 100%);
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(31deg, transparent 0 49%, rgba(255, 234, 128, 0.95) 49.25% 49.75%, rgba(142, 88, 16, 0.72) 49.85% 50.15%, rgba(255, 245, 186, 0.92) 50.25% 50.75%, transparent 51%),
    linear-gradient(149deg, transparent 0 49%, rgba(255, 234, 128, 0.9) 49.25% 49.75%, rgba(142, 88, 16, 0.66) 49.85% 50.15%, rgba(255, 245, 186, 0.86) 50.25% 50.75%, transparent 51%),
    linear-gradient(0deg, rgba(255, 235, 128, 0.92), rgba(255, 235, 128, 0.92)) left bottom / 100% 2px no-repeat,
    linear-gradient(90deg, rgba(255, 235, 128, 0.86), rgba(255, 235, 128, 0.86)) left bottom / 2px 72% no-repeat,
    linear-gradient(90deg, rgba(255, 235, 128, 0.86), rgba(255, 235, 128, 0.86)) right bottom / 2px 72% no-repeat,
    radial-gradient(circle at 50% 100%, rgba(255, 236, 180, 0.26), transparent 42%),
    linear-gradient(135deg, #cbb1e3, #9a72be 58%, #68488d);
  z-index: 3;
}

.envelope-front::before,
.envelope-front::after {
  content: "";
  position: absolute;
  inset: 9px;
  width: auto;
  height: auto;
  opacity: 0.78;
  border-radius: 0 0 6px 6px;
  background:
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(255, 240, 164, 0.82) calc(100% - 1px)),
    linear-gradient(90deg, rgba(255, 240, 164, 0.72), transparent 16% 84%, rgba(255, 240, 164, 0.72));
  background-size: 100% 100%;
  filter: drop-shadow(0 1px 1px rgba(70, 38, 6, 0.22));
}

.envelope-front::before {
  transform: none;
}

.envelope-front::after {
  display: none;
}

.envelope-flap {
  inset: auto 0 auto 0;
  top: -158px;
  height: 160px;
  transform-origin: bottom;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(28deg, transparent 0 49%, rgba(255, 235, 128, 0.92) 49.25% 49.75%, rgba(132, 82, 14, 0.68) 49.85% 50.15%, rgba(255, 246, 188, 0.88) 50.25% 50.75%, transparent 51%),
    linear-gradient(152deg, transparent 0 49%, rgba(255, 235, 128, 0.92) 49.25% 49.75%, rgba(132, 82, 14, 0.68) 49.85% 50.15%, rgba(255, 246, 188, 0.88) 50.25% 50.75%, transparent 51%),
    linear-gradient(0deg, rgba(255, 235, 128, 0.9), rgba(255, 235, 128, 0.9)) left bottom / 100% 2px no-repeat,
    linear-gradient(180deg, rgba(245, 236, 255, 0.98), rgba(174, 137, 209, 0.98) 58%, rgba(104, 72, 141, 0.98)),
    var(--env-purple);
  transform: none;
  transition: transform 1.05s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
}

.envelope-flap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 78%;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, #fff4ba 14%, #bd8428 50%, #fff4ba 86%, transparent);
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 1px rgba(70, 38, 6, 0.22));
}

.envelope-flap::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 31px;
  width: 74%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(33, 14, 49, 0.34), rgba(33, 14, 49, 0.16) 42%, transparent 72%);
  filter: blur(4px);
  transform: translateX(-50%);
  opacity: 0.9;
  transition: opacity 0.45s ease;
}

.invite-card {
  top: -240px;
  left: 50%;
  width: min(76vw, 316px);
  height: auto;
  aspect-ratio: 1024 / 1536;
  display: block;
  padding: 0;
  border: 1px solid rgba(255, 228, 162, 0.55);
  border-radius: 8px;
  color: #332315;
  background:
    linear-gradient(115deg, transparent 0 35%, rgba(255, 255, 255, 0.58) 45%, transparent 57%),
    var(--paper);
  background-size: 250% 100%, auto;
  box-shadow: 0 16px 42px rgba(40, 20, 5, 0.3);
  overflow: hidden;
  clip-path: inset(0 0 58% 0 round 8px);
  transform: translate(-50%, 202px) scale(1);
  transition:
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 0.7s ease,
    background-position 1.8s ease;
  z-index: 2;
  cursor: zoom-in;
}

.invite-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  clip-path: inset(0 0 58% 0 round 8px);
  background:
    linear-gradient(180deg, rgba(37, 19, 52, 0.34), transparent 16%),
    linear-gradient(90deg, rgba(39, 20, 55, 0.28), transparent 12% 88%, rgba(39, 20, 55, 0.28)),
    radial-gradient(ellipse at 50% 43%, transparent 0 42%, rgba(44, 22, 62, 0.28) 54%, transparent 70%);
  opacity: 0.95;
  transition: opacity 0.45s ease, clip-path 0.7s ease;
}

.invite-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-kicker,
.eyebrow {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
  font-weight: 800;
}

.card-kicker {
  color: #9a6624;
}

.card-names,
h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.95;
}

body[data-lang="ml"] h1,
body[data-lang="ml"] h2,
body[data-lang="ml"] .card-names {
  font-family: "Cormorant Garamond", "Noto Sans Malayalam", serif;
}

body[data-lang="ml"] h1 {
  font-size: calc(clamp(4.2rem, 19vw, 8.2rem) * 0.8);
}

body[data-lang="ml"] h2 {
  font-size: calc(clamp(2.7rem, 12vw, 5.5rem) * 0.8);
}

.card-names {
  color: #452811;
  font-size: clamp(2.4rem, 12vw, 4rem);
}

.card-line {
  display: block;
  color: #5b3c1c;
  font-size: 0.9rem;
  font-weight: 700;
}

.envelope-stage.open .invite-card {
  background-position: -180% 0, 0 0;
  clip-path: inset(0 0 0 0 round 8px);
  transform: translate(-50%, 84px) scale(0.76);
  z-index: 5;
}

.envelope-stage.open .invite-card::after {
  opacity: 0;
  clip-path: inset(0 0 0 0 round 8px);
}

.envelope-stage.open .envelope-flap::before {
  opacity: 0;
}

.envelope-stage.open .envelope-front {
  z-index: 1;
}

.envelope-stage.fly {
  opacity: 0;
  transform: translate(45vw, -48vh) rotate(18deg) scale(0.75);
}

.seal-button {
  position: absolute;
  left: 50%;
  top: 112px;
  z-index: 9;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 206, 143, 0.72);
  border-radius: 50%;
  color: #32160b;
  background:
    radial-gradient(circle at 33% 28%, #ffd29c, #c06f35 42%, #7a371d 72%, #3f1a11),
    linear-gradient(145deg, #b96737, #4c1f13);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.34),
    inset 0 3px 8px rgba(255, 213, 165, 0.58),
    inset 0 -8px 16px rgba(63, 24, 12, 0.5);
  cursor: pointer;
  transform: translateX(-50%);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.seal-button span:not(.seal-slash) {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.seal-button span {
  display: inline-block;
  font-family: Georgia, "Cormorant Garamond", serif;
  font-size: 1.52rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: rgba(91, 57, 13, 0.88);
  text-shadow:
    0 1px 0 rgba(255, 198, 126, 0.78),
    0 -1px 0 rgba(55, 20, 9, 0.82),
    1px 1px 2px rgba(255, 167, 91, 0.44),
    -1px -1px 1px rgba(38, 13, 7, 0.52);
}

.seal-button .seal-slash {
  margin: 0 1px;
  transform: translateY(5px) rotate(8deg);
  font-size: 1.36rem;
}

.seal-button .seal-a {
  transform: translateY(10px);
}

.seal-button::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 195, 128, 0.42);
  border-radius: inherit;
  animation: sealPulse 1.8s ease-in-out infinite;
}

.envelope-stage.open .seal-button {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.7);
}

@keyframes sealPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.05);
  }
}

.tap-copy {
  position: absolute;
  left: 50%;
  top: 182px;
  z-index: 12;
  margin: 0;
  color: #3f2410;
  font-size: 0.92rem;
  font-weight: 900;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 238, 192, 0.78);
  box-shadow:
    0 8px 18px rgba(56, 28, 8, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.76),
    0 2px 8px rgba(0, 0, 0, 0.22);
}

.tap-copy:active {
  transform: translate(-50%, 2px) scale(0.98);
}

.tap-finger {
  display: inline-block;
  margin: 0 2px;
  font-size: 1.55em;
  line-height: 0.75;
  vertical-align: -0.16em;
  filter: drop-shadow(0 2px 2px rgba(69, 36, 10, 0.28));
}

.envelope-stage.open .tap-copy {
  opacity: 0;
  transform: translate(-50%, 10px);
}

.hero-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -12px;
  z-index: 3;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease 0.45s, transform 0.8s ease 0.45s;
}

body.opened .hero-copy {
  opacity: 1;
  transform: translateY(0) scale(0.72);
  transform-origin: bottom center;
}

h1 {
  font-size: clamp(4.2rem, 19vw, 8.2rem);
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

h2 {
  font-size: clamp(2.7rem, 12vw, 5.5rem);
}

.hero-copy p:last-child,
.message-copy p,
.content-panel p,
.finale-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 228, 162, 0.48);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 38%),
    radial-gradient(circle at 50% 18%, rgba(255, 236, 176, 0.55), rgba(217, 173, 85, 0.2) 42%, rgba(17, 12, 8, 0.52));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -8px 14px rgba(64, 34, 8, 0.32),
    0 16px 28px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
  animation: fingerSlide 1.7s ease-in-out infinite;
  backdrop-filter: blur(10px);
}

.scroll-indicator svg {
  width: 35px;
  height: 35px;
  filter:
    drop-shadow(0 2px 0 rgba(118, 75, 17, 0.72))
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
}

@keyframes fingerSlide {
  0%,
  100% {
    transform: translate(-50%, -3px);
    opacity: 0.72;
  }
  50% {
    transform: translate(-50%, 10px);
    opacity: 1;
  }
}

.content-panel,
.message-copy,
.countdown-panel,
.date-card,
.finale-copy {
  width: min(100%, 680px);
  padding: 28px 22px;
  border: 1px solid rgba(255, 228, 162, 0.22);
  border-radius: 8px;
  background: rgba(18, 12, 7, 0.54);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.family-grid,
.location-grid,
.timer {
  display: grid;
  gap: 14px;
}

.family-grid {
  margin-top: 24px;
}

.family-grid article {
  padding: 18px;
  border: 1px solid rgba(255, 228, 162, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.07);
}

h3 {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.person {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.5rem;
  line-height: 1;
}

.date-section,
.gallery,
.locations {
  position: relative;
  padding: 92px 20px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 226, 151, 0.15), transparent 35%),
    linear-gradient(180deg, #150f0d, #24110f 55%, #110d0b);
  overflow: hidden;
}

.date-card {
  position: relative;
  z-index: 3;
  margin: 0 auto;
  text-align: center;
}

.butterfly-layer {
  position: fixed;
  inset: 0;
  z-index: 34;
  overflow: visible;
  pointer-events: none;
}

.butterfly {
  position: fixed;
  left: var(--butterfly-left, 50%);
  bottom: -112px;
  width: var(--butterfly-size, 92px);
  aspect-ratio: 1;
  opacity: 0;
  background: url("assets/butterfly-float.webp") center / contain no-repeat;
  filter:
    saturate(1.12)
    drop-shadow(0 12px 12px rgba(0, 0, 0, 0.28));
  transform-origin: 50% 56%;
  will-change: transform, opacity;
  animation:
    butterflyRise var(--butterfly-speed, 9s) ease-in forwards,
    butterflyWing 0.72s ease-in-out infinite;
}

@keyframes butterflyRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--butterfly-rotate, -8deg)) scale(0.72);
  }
  12% {
    opacity: 0.86;
  }
  28% {
    transform: translate3d(var(--butterfly-x1, 42px), -34vh, 0) rotate(calc(var(--butterfly-rotate, -8deg) + 16deg)) scale(0.92);
  }
  52% {
    transform: translate3d(var(--butterfly-x2, -38px), -68vh, 0) rotate(calc(var(--butterfly-rotate, -8deg) - 20deg)) scale(1);
  }
  78% {
    opacity: 0.84;
    transform: translate3d(var(--butterfly-x3, 46px), -102vh, 0) rotate(calc(var(--butterfly-rotate, -8deg) + 18deg)) scale(0.94);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--butterfly-x4, -24px), -134vh, 0) rotate(calc(var(--butterfly-rotate, -8deg) - 10deg)) scale(0.78);
  }
}

@keyframes butterflyWing {
  0%,
  100% {
    background-size: 100% 100%;
  }
  50% {
    background-size: 84% 108%;
  }
}

.scratch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0 14px;
}

.scratch-pill {
  position: relative;
  min-height: 108px;
  padding: 16px 8px;
  border: 1px solid rgba(255, 228, 162, 0.42);
  border-radius: 999px;
  color: #2d1d0d;
  background: linear-gradient(150deg, var(--gold-light), var(--gold) 52%, #8f5e22);
  box-shadow: inset 0 2px 12px rgba(255, 255, 255, 0.34), 0 18px 34px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  overscroll-behavior: contain;
}

.scratch-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.58), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0 4px, rgba(116, 72, 18, 0.18) 4px 8px);
  opacity: var(--scratch-opacity, 1);
  transform: translateX(var(--scratch-shift, 0));
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.scratch-pill.revealed::after {
  opacity: 0;
  transform: translateX(110%);
}

.scratch-pill span,
.scratch-pill strong {
  display: block;
  position: relative;
  z-index: 1;
}

.scratch-pill span {
  margin-bottom: 8px;
  color: rgba(45, 29, 13, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.scratch-pill strong {
  color: #27180a;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.scratch-pill.revealed strong {
  opacity: 1;
  transform: translateY(0);
}

.hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.petal,
.leaf {
  position: fixed;
  top: -56px;
  z-index: 35;
  width: 34px;
  height: 58px;
  pointer-events: none;
  opacity: 0.92;
  will-change: transform, opacity;
  animation: fall var(--fall, 6s) linear forwards;
}

.petal {
  border-radius: 70% 0 70% 0;
  background: linear-gradient(135deg, #fff3f7, #e46d91 62%, #b9355c);
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.22));
}

.leaf {
  width: 40px;
  height: 66px;
  background: none;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.24));
}

.leaf svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--leaf-color, #4b8a3a);
}

@keyframes fall {
  to {
    transform: translate3d(var(--drift, 40px), 118vh, 0) rotate(540deg);
    opacity: 0;
  }
}

.timer {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 26px;
}

.timer div {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 12px 6px;
  border: 1px solid rgba(255, 228, 162, 0.2);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.08);
}

.timer strong {
  color: var(--gold-light);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  line-height: 1;
}

.timer span {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading {
  width: min(100%, 720px);
  margin: 0 auto 28px;
  text-align: center;
}

.gallery-grid {
  width: min(100%, 920px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.location-grid {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  margin: 0 auto;
}

.locations .section-heading {
  position: relative;
  z-index: 1;
}

.rose-breeze {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.rose-float {
  position: absolute;
  width: clamp(112px, 34vw, 230px);
  aspect-ratio: 1;
  opacity: 0.3;
  filter:
    saturate(1.08)
    drop-shadow(0 18px 20px rgba(0, 0, 0, 0.28));
  background: url("assets/red-rose-float.webp") center / contain no-repeat;
  transform: translate3d(0, 0, 0) rotate(var(--rose-rotate, 0deg));
  animation: roseBreeze var(--rose-speed, 16s) ease-in-out infinite alternate;
}

.rose-float.r1 {
  left: -8%;
  top: 9%;
  --rose-speed: 17s;
  --rose-rotate: -18deg;
}

.rose-float.r2 {
  right: -9%;
  top: 20%;
  width: clamp(138px, 42vw, 280px);
  --rose-speed: 19s;
  --rose-rotate: 22deg;
  animation-delay: -4s;
}

.rose-float.r3 {
  left: -6%;
  bottom: 10%;
  --rose-speed: 18s;
  --rose-rotate: 34deg;
  animation-delay: -7s;
}

.rose-float.r4 {
  right: -4%;
  bottom: 4%;
  opacity: 0.24;
  --rose-speed: 21s;
  --rose-rotate: -28deg;
  animation-delay: -10s;
}

.rose-float.r5 {
  left: 34%;
  top: 4%;
  width: clamp(86px, 26vw, 156px);
  opacity: 0.18;
  --rose-speed: 20s;
  --rose-rotate: 12deg;
  animation-delay: -12s;
}

.rose-float.r6 {
  right: 34%;
  bottom: 19%;
  width: clamp(92px, 28vw, 168px);
  opacity: 0.16;
  --rose-speed: 22s;
  --rose-rotate: -8deg;
  animation-delay: -5s;
}

@keyframes roseBreeze {
  0% {
    transform: translate3d(-12px, 10px, 0) rotate(calc(var(--rose-rotate, 0deg) - 9deg)) scale(0.96);
  }
  50% {
    transform: translate3d(18px, -16px, 0) rotate(calc(var(--rose-rotate, 0deg) + 8deg)) scale(1.04);
  }
  100% {
    transform: translate3d(34px, 12px, 0) rotate(calc(var(--rose-rotate, 0deg) + 18deg)) scale(1);
  }
}

.location-card {
  position: relative;
  z-index: 1;
  padding: 22px;
  border: 1px solid rgba(255, 228, 162, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.08);
  box-shadow: var(--shadow);
}

.location-card h3 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
}

.time {
  color: var(--gold-light);
  font-weight: 800;
}

.map-btn {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  margin: 8px 0 18px;
  padding: 0 20px;
  border-radius: 999px;
  color: #21160b;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.qr {
  display: block;
  width: 150px;
  height: 150px;
  padding: 8px;
  border-radius: 8px;
  background: var(--paper);
}

.finale {
  min-height: 100svh;
  padding-bottom: 150px;
}

.finale-copy {
  text-align: center;
}

.guest-wishes {
  position: relative;
  z-index: 3;
  width: min(100%, 680px);
  margin: 26px auto 0;
  padding: 22px;
  border: 1px solid rgba(255, 228, 162, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 244, 208, 0.1), transparent 34%),
    rgba(18, 12, 7, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.guest-wishes h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.1rem, 9vw, 3.6rem);
  line-height: 0.95;
  text-transform: none;
  letter-spacing: 0;
}

.wish-form {
  display: grid;
  gap: 10px;
  text-align: left;
  -webkit-user-select: text;
  user-select: text;
}

.wish-form label {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.wish-form input,
.wish-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 228, 162, 0.28);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  background: rgba(255, 248, 232, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 16px rgba(0, 0, 0, 0.18);
  -webkit-user-select: text;
  user-select: text;
}

.wish-form input {
  min-height: 46px;
  padding: 0 14px;
}

.wish-form textarea {
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

.wish-form input:focus,
.wish-form textarea:focus {
  outline: 2px solid rgba(255, 228, 162, 0.42);
  outline-offset: 2px;
}

.wish-submit {
  justify-self: center;
  min-height: 48px;
  margin-top: 6px;
  padding: 0 22px;
  border: 1px solid rgba(255, 228, 162, 0.42);
  border-radius: 999px;
  color: #21160b;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 34%),
    linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -7px 13px rgba(121, 73, 15, 0.26),
    0 14px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.wish-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  text-align: left;
}

.wish-card {
  padding: 14px;
  border: 1px solid rgba(255, 228, 162, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.08);
}

.wish-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  color: var(--gold-light);
  font-weight: 800;
}

.wish-time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.wish-message {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.6;
}

.visitor-counter {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 2;
  width: fit-content;
  padding: 8px;
  border: 1px solid rgba(255, 228, 162, 0.4);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 244, 208, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(62, 37, 12, 0.92), rgba(15, 10, 7, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -8px 16px rgba(0, 0, 0, 0.4),
    0 18px 32px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%) perspective(440px) rotateX(5deg);
}

.visitor-counter strong {
  position: relative;
  display: inline-flex;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.visitor-counter strong::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.counter-wheel {
  position: relative;
  width: 28px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 142, 0.34);
  border-radius: 6px;
  color: #fff7d9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 24%, rgba(0, 0, 0, 0.2) 51%, transparent 54%, rgba(255, 217, 120, 0.12)),
    linear-gradient(90deg, #21150b, #8d6428 17%, #1c1209 48%, #a27732 78%, #24170b);
  box-shadow:
    inset 0 8px 10px rgba(255, 255, 255, 0.12),
    inset 0 -10px 12px rgba(0, 0, 0, 0.42),
    inset 5px 0 7px rgba(0, 0, 0, 0.34),
    inset -5px 0 7px rgba(255, 225, 141, 0.12);
  text-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.8),
    0 1px 0 rgba(255, 238, 181, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.55);
}

.counter-wheel::before,
.counter-wheel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
}

.counter-wheel::before {
  top: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
}

.counter-wheel::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent);
}

.music-toggle {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 228, 162, 0.35);
  border-radius: 50%;
  color: var(--gold-light);
  background:
    linear-gradient(180deg, rgba(255, 244, 208, 0.2), transparent 38%),
    rgba(17, 12, 8, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -8px 14px rgba(0, 0, 0, 0.34),
    0 14px 28px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.weather-toggle {
  position: fixed;
  left: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  min-width: 66px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 228, 162, 0.35);
  border-radius: 999px;
  color: #21160b;
  font-weight: 800;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 34%),
    linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -7px 13px rgba(121, 73, 15, 0.26),
    0 14px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.close-toggle {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  min-width: 76px;
  height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 228, 162, 0.42);
  border-radius: 999px;
  color: #fff8e8;
  font-weight: 800;
  background:
    linear-gradient(180deg, rgba(255, 244, 208, 0.2), transparent 38%),
    rgba(17, 12, 8, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -8px 14px rgba(0, 0, 0, 0.32),
    0 14px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px) scale(0.92);
  transition: opacity 0.35s ease, transform 0.35s ease;
  backdrop-filter: blur(14px);
}

body.at-bottom .close-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.music-toggle.playing {
  color: #21160b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 34%),
    linear-gradient(135deg, var(--gold-light), var(--gold));
}

.lang-btn:active,
.weather-toggle:active,
.music-toggle:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.24),
    0 7px 16px rgba(0, 0, 0, 0.22);
}

body.at-bottom .close-toggle:active {
  transform: translate(-50%, 2px) scale(1);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.24),
    0 7px 16px rgba(0, 0, 0, 0.22);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .section-photo,
  .cover,
  .message,
  .story,
  .countdown,
  .finale {
    padding-inline: 48px;
  }

  .family-grid,
  .location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-panel,
  .message-copy,
  .countdown-panel,
  .date-card,
  .finale-copy {
    padding: 42px;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .envelope-stage {
    min-height: 670px;
    transform: translateY(10svh);
  }

  .invite-card {
    width: min(72vw, 326px);
    top: -220px;
    transform: translate(-50%, 220px) scale(1);
  }

  .envelope-stage.open .invite-card {
    transform: translate(-50%, 30px) scale(0.8);
  }
}

@media (max-width: 380px) {
  .scratch-row,
  .timer {
    gap: 7px;
  }

  .timer div {
    min-height: 78px;
  }

  .scratch-pill {
    min-height: 98px;
  }
}

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