:root {
  color-scheme: light;
  --pink: #ff5e9d;
  --hot-pink: #ec2e77;
  --purple: #8965b5;
  --gold: #f5bd50;
  --ink: #60334f;
  --muted: #80536f;
  --page-background: linear-gradient(145deg, #fffafd 0%, #fff1f7 52%, #f4edff 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background: var(--page-background);
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.sky,
.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background-glow {
  z-index: -2;
  background:
    radial-gradient(circle at 8% 7%, #ff8dbb4d 0 5%, transparent 24%),
    radial-gradient(circle at 91% 32%, #c993ff38 0 7%, transparent 25%),
    radial-gradient(circle at 45% 95%, #ffd78538 0 4%, transparent 22%);
}

.sky {
  z-index: -1;
  overflow: hidden;
}

.sky-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 5px 2px #fff9, 0 0 14px 4px #ff83b588;
  animation:
    twinkle var(--twinkle-time) ease-in-out infinite alternate,
    drift var(--drift-time) ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.topbar {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 20px clamp(18px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  color: var(--ink);
  font-style: italic;
  letter-spacing: .06em;
  text-decoration: none;
}

.brand span {
  color: var(--hot-pink);
  font-size: 1.4rem;
}

.music-control {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.music-toggle {
  min-width: 120px;
  padding: 10px 15px;
  border: 1px solid #f5a6c5;
  border-radius: 999px;
  color: var(--hot-pink);
  background: #ffffffed;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.music-toggle:hover {
  transform: translateY(-2px);
  background: #fff;
}

.music-status {
  min-height: 1em;
  color: #9a5d7d;
  font: .7rem Arial, sans-serif;
  text-align: right;
}

.hero {
  padding: clamp(25px, 5vw, 55px) 18px 48px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--hot-pink);
  font: 700 .68rem Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #79375f;
  font-size: clamp(2.6rem, 9vw, 5.8rem);
  line-height: .98;
  text-shadow: 0 4px #fff;
}

h1 em {
  display: block;
  color: var(--hot-pink);
  font-weight: normal;
}

h2 {
  color: #813e67;
  font-size: clamp(1.5rem, 4vw, 2.35rem);
}

.subtitle {
  margin: 18px auto;
  color: #70405e;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.heart-button {
  position: relative;
  display: block;
  width: min(440px, 88vw);
  aspect-ratio: 1;
  margin: 12px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.heart-button:focus-visible {
  border-radius: 50%;
}

.heart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  /* The heart stays still; only the words travel along its outline. */
}

.heart-core {
  fill: none;
  stroke: #ff78a8;
  stroke-width: 11;
  stroke-linejoin: round;
  opacity: .72;
  filter:
    drop-shadow(0 2px 0 #ffc0d6)
    drop-shadow(0 7px 0 #c84979)
    drop-shadow(0 13px 12px #a91f5870);
}

.heart-outline-text {
  fill: #ffd6e5;
  stroke: #8e3156;
  stroke-width: 2px;
  stroke-linejoin: round;
  paint-order: stroke;
  font: 800 38px Arial, sans-serif;
  letter-spacing: 2px;
  filter:
    drop-shadow(0 2px 0 #8e3156)
    drop-shadow(0 0 5px #ff8eb8);
}

.word-ring-one { opacity: 1; }
.word-ring-two { opacity: .94; }
.word-ring-three { opacity: .88; }
.word-ring-four { opacity: .82; }
.word-ring-five { opacity: .76; }

.heart-hint {
  position: absolute;
  right: 0;
  bottom: 5%;
  left: 0;
  color: #a34a77;
  font: italic .95rem Arial, sans-serif;
  pointer-events: none;
}

.hero-note {
  margin: 0;
  color: #a05079;
  font-style: italic;
}

.surprises {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 45px) 72px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.surprise-card {
  padding: 28px 20px 24px;
  border: 1px solid #fff;
  border-radius: 27px;
  color: var(--ink);
  background: #ffffffd9;
  box-shadow: 0 16px 42px #a72b6933;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform .25s ease, box-shadow .25s ease;
}

.surprise-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px #a72b6942;
}

.card-icon {
  display: grid;
  width: 57px;
  height: 57px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ffc4da, #ee4f8b);
  box-shadow: 0 7px 14px #ed57904f;
  font-size: 1.65rem;
}

.surprise-card h2 {
  margin: .25em 0 .4em;
  font-size: 1.35rem;
}

.surprise-card > p {
  min-height: 44px;
  color: var(--muted);
  line-height: 1.5;
}

.pink-button {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, var(--hot-pink), #ff77a9);
  box-shadow: 0 8px 16px #e8357947;
  cursor: pointer;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}

.pink-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px #e8357960;
}

.reveal-message {
  margin: 16px 0 0;
  padding: 11px;
  border-radius: 13px;
  color: #91406c;
  background: #fff0f6;
  line-height: 1.5;
  animation: reveal .5s ease both;
}

.wish-card.is-wishing .card-icon {
  animation: wish-sparkle .8s ease-in-out 3;
}

.bouquet-stage {
  display: grid;
  min-height: 84px;
  margin-top: 12px;
  place-items: center;
}

.bouquet {
  display: inline-block;
  opacity: 0;
  font-size: 3.7rem;
  filter: drop-shadow(0 8px 8px #9a3e6550);
  transform: translateY(22px) scale(.3) rotate(-12deg);
  transform-origin: center bottom;
}

.bouquet.open {
  animation: bouquet-emerge .9s cubic-bezier(.2, .9, .3, 1.25) forwards;
}

.cake-section {
  padding: 58px 18px 76px;
  background: linear-gradient(transparent, #fff8fc);
  text-align: center;
}

.cake-section > p:not(.eyebrow):not(.cake-message) {
  color: #7b5269;
}

.cake {
  position: relative;
  display: block;
  width: 250px;
  height: 235px;
  margin: 12px auto 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cake-base {
  position: absolute;
  bottom: 18px;
  left: 25px;
  width: 200px;
  height: 88px;
  border-radius: 18px 18px 33px 33px;
  background: linear-gradient(90deg, #f54189, #ff80af 42%, #ec3e81);
  box-shadow: inset 0 -13px #ca2466, 0 10px 15px #b8285840;
}

.cake-base i {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 18px 16px;
  border-radius: 0 0 50% 50%;
  background: var(--gold);
}

.cake-frosting {
  position: absolute;
  bottom: 91px;
  left: 21px;
  width: 208px;
  height: 43px;
  border-radius: 24px 24px 10px 10px;
  background: #fff4fa;
  box-shadow: inset 0 -8px #ffb7d3;
}

.cake-top {
  position: absolute;
  bottom: 120px;
  left: 37px;
  width: 176px;
  height: 26px;
  border-radius: 50%;
  background: #ffd2e3;
  box-shadow: 0 4px #f18ab5;
}

.candle {
  position: absolute;
  z-index: 2;
  bottom: 142px;
  width: 11px;
  height: 55px;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, #fdf5ff 0 6px, #9873c3 6px 12px);
}

.candle-one { left: 69px; }
.candle-two { left: 119px; height: 68px; }
.candle-three { right: 69px; }

.candle i {
  position: absolute;
  top: -17px;
  left: -4px;
  width: 19px;
  height: 26px;
  border-radius: 60% 40% 60% 40%;
  background: linear-gradient(#fff9a7, #ffae38 45%, #ed5a3e);
  box-shadow: 0 0 14px #ffc842;
  transform: rotate(45deg);
  animation: flame .55s ease-in-out infinite alternate;
}

.cake.blown .candle i {
  opacity: 0;
  transform: translateY(-12px) scale(.25);
  animation: none;
  transition: .35s;
}

.cake-message {
  max-width: 400px;
  margin: 12px auto 0;
  color: var(--hot-pink);
  font-size: 1.1rem;
  font-weight: 700;
  animation: reveal .5s ease both;
}

footer {
  padding: 24px 16px;
  color: #914d72;
  font-size: .9rem;
  font-style: italic;
  text-align: center;
}

.falling-layer {
  position: fixed;
  z-index: 30;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.falling-heart,
.falling-flower {
  position: absolute;
  top: -60px;
  left: var(--x);
  opacity: 0;
  animation: fall-down var(--duration) linear var(--delay) forwards;
  will-change: transform, opacity;
}

.falling-heart {
  color: var(--blue);
  font-family: Arial, sans-serif;
  font-size: var(--size);
  text-shadow: 0 0 12px #65c8ffb3, 0 2px 4px #175a9a66;
}

.falling-flower {
  font-size: var(--size);
  filter: drop-shadow(0 3px 5px #9b477350);
}

.modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: #63204770;
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  width: min(510px, 100%);
  padding: 48px 30px 34px;
  border-radius: 30px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #fff4f8);
  box-shadow: 0 25px 90px #44102699;
  text-align: center;
  animation: modal-enter .35s ease both;
}

.modal-card h2 {
  margin: .2em 0;
}

.modal-card > p:not(.eyebrow) {
  font-size: 1.08rem;
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 14px;
  border: 0;
  color: var(--hot-pink);
  background: transparent;
  cursor: pointer;
  font-size: 2rem;
}

.modal-star {
  display: block;
  color: var(--gold);
  font-size: 2.3rem;
}

@keyframes twinkle {
  from { opacity: .18; scale: .65; }
  to { opacity: 1; scale: 1.35; }
}

@keyframes drift {
  from { translate: 0 0; }
  to { translate: var(--move-x) var(--move-y); }
}

@keyframes fall-down {
  0% {
    opacity: 0;
    transform: translate3d(0, -5vh, 0) rotate(0deg);
  }
  8% { opacity: 1; }
  100% {
    opacity: .9;
    transform: translate3d(var(--sway), 115vh, 0) rotate(var(--spin));
  }
}

@keyframes flame {
  to { transform: rotate(38deg) scale(.82); }
}

@keyframes wish-sparkle {
  50% { transform: rotate(25deg) scale(1.18); box-shadow: 0 0 25px #ffd46c; }
}

@keyframes bouquet-emerge {
  0% { opacity: 0; transform: translateY(22px) scale(.3) rotate(-12deg); }
  60% { opacity: 1; transform: translateY(-5px) scale(1.14) rotate(5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes reveal {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .surprises {
    width: min(480px, 100%);
    padding-bottom: 42px;
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  .cake-section {
    padding-top: 42px;
  }
}

/* Keep the pink palette when the device or browser uses dark mode. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
  }

  body {
    color: var(--ink);
    background: var(--page-background);
  }

  .surprise-card,
  .modal-card,
  .music-toggle {
    color: var(--ink);
    background-color: #fff;
  }

  .subtitle,
  .hero-note,
  .surprise-card > p {
    color: #70405e;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .sky-star {
    animation: none;
    opacity: .75;
  }

  .heart-outline-text {
    animation: none;
  }
}