:root {
  --bg-top: #9f60de;
  --bg-mid: #3e0977;
  --bg-bottom: #80239f;
  --ink-strong: #2f2430;
  --ink-soft: #6f5d72;
  --yes-a: #ff4f8d;
  --yes-b: #ff6f63;
  --no-bg: #ffffffcc;
  --no-border: #f1d3e0;
  --card-border: #ffffffcf;
  --card-shadow: rgba(76, 46, 74, 0.16);
  --spot-x: 50%;
  --spot-y: 35%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink-strong);
  background:
    radial-gradient(circle at 10% 20%, #ffffffcc 0 16%, transparent 44%),
    radial-gradient(circle at 85% 12%, #fff8e499 0 14%, transparent 46%),
    linear-gradient(155deg, var(--bg-top), var(--bg-mid) 54%, var(--bg-bottom));
  overflow: hidden;
  position: relative;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.heart-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.heart {
  position: absolute;
  bottom: -32px;
  opacity: 0;
  color: #ff5d95;
  text-shadow: 0 0 18px rgba(255, 105, 155, 0.3);
  animation: heart-rise linear infinite;
  transform: translate3d(0, 0, 0);
}

.cursor-aura {
  position: fixed;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  pointer-events: none;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translate3d(-999px, -999px, 0) scale(0.85);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.52) 0, rgba(255, 216, 232, 0.34) 38%, transparent 72%);
  filter: blur(1.2px);
  z-index: 5;
  transition: opacity 220ms ease;
}

body.has-pointer .cursor-aura {
  opacity: 1;
}

.tease-popups {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 38;
}

.tease-popup {
  position: fixed;
  left: 0;
  top: 0;
  max-width: min(72vw, 320px);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #ffffffdb;
  background: linear-gradient(140deg, #ffffffef, #ffeef5f0);
  color: #8a4062;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 30px -20px rgba(135, 72, 105, 0.5);
  transform: translate3d(0, 12px, 0) scale(0.9);
  opacity: 0;
  animation: tease-float 1850ms cubic-bezier(0.2, 0.86, 0.2, 1) forwards;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.64;
}

.glow-a {
  width: min(52vw, 520px);
  aspect-ratio: 1;
  left: -8vw;
  top: -8vh;
  background: radial-gradient(circle, #ffd0de, #ff9ec17a 65%, transparent 76%);
  animation: drift-a 20s ease-in-out infinite alternate;
}

.glow-b {
  width: min(42vw, 420px);
  aspect-ratio: 1;
  right: -6vw;
  top: -11vh;
  background: radial-gradient(circle, #ffe4b7, #ffb39a6e 66%, transparent 76%);
  animation: drift-b 24s ease-in-out infinite alternate;
}

.glow-c {
  width: min(62vw, 640px);
  aspect-ratio: 1;
  left: 18vw;
  bottom: -36vh;
  background: radial-gradient(circle, #ffd0f1, #ffafd470 65%, transparent 76%);
  animation: drift-c 22s ease-in-out infinite alternate;
}

#celebrationCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 20;
}

#celebrationCanvas.active {
  opacity: 1;
}

.yes-moment {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  z-index: 24;
  transition: opacity 560ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

.yes-moment::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 56%, rgba(255, 239, 188, 0.35), transparent 50%),
    radial-gradient(circle at 20% 12%, rgba(255, 214, 233, 0.28), transparent 44%),
    radial-gradient(circle at 82% 10%, rgba(255, 235, 193, 0.24), transparent 38%),
    linear-gradient(180deg, rgba(32, 12, 35, 0.06), rgba(58, 16, 64, 0.2));
  opacity: 0;
  transition: opacity 420ms ease;
}

.yes-moment.active {
  opacity: 1;
}

.yes-moment.active::before {
  opacity: 1;
}

.yes-moment-bloom {
  position: absolute;
  width: min(84vw, 880px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0, rgba(255, 180, 206, 0.62) 26%, rgba(255, 111, 160, 0.18) 46%, transparent 72%);
  filter: blur(2px);
  transform: scale(0.44);
  opacity: 0;
}

.yes-moment.active .yes-moment-bloom {
  animation: yes-bloom 1350ms cubic-bezier(0.18, 0.82, 0.18, 1.03) forwards;
}

.yes-moment-sparkle {
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 22% 35%, rgba(255, 255, 255, 0.7) 0 2px, transparent 2.5px),
    radial-gradient(circle at 67% 25%, rgba(255, 255, 255, 0.68) 0 2px, transparent 2.5px),
    radial-gradient(circle at 74% 65%, rgba(255, 238, 208, 0.74) 0 1.7px, transparent 2.2px),
    radial-gradient(circle at 34% 73%, rgba(255, 241, 217, 0.72) 0 2px, transparent 2.5px);
  opacity: 0;
  transform: scale(0.96);
}

.yes-moment.active .yes-moment-sparkle {
  animation: yes-sparkle 2600ms ease-out forwards;
}

.yes-moment-content {
  width: min(88vw, 760px);
  text-align: center;
  color: #fff;
  padding: 0 22px;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.92);
  filter: blur(4px);
  text-shadow:
    0 22px 44px rgba(45, 10, 47, 0.38),
    0 3px 14px rgba(82, 26, 85, 0.48);
}

.yes-moment.active .yes-moment-content {
  animation: yes-copy-in 860ms cubic-bezier(0.2, 0.86, 0.2, 1) 280ms forwards;
}

.yes-moment-tag {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: clamp(0.76rem, 1.7vw, 0.9rem);
  font-weight: 700;
  color: #ffe2ef;
}

.yes-moment-title {
  margin: 14px 0 0;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  letter-spacing: -0.02em;
  line-height: 1.03;
}

.yes-moment-name {
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: 1.14em;
  margin-right: 0.06em;
  color: #ffd8eb;
}

.yes-moment-subtitle {
  margin: 14px 0 0;
  font-size: clamp(1rem, 2.2vw, 1.36rem);
  letter-spacing: 0.01em;
  color: #ffecf4;
}

body.celebration-live .glow {
  opacity: 0.88;
  filter: blur(15px) saturate(1.1);
}

body.celebration-live .scene {
  transform: scale(1.012);
  transition: transform 520ms ease;
}

body.celebration-live .card {
  animation: card-hero 850ms cubic-bezier(0.2, 0.86, 0.2, 1) forwards;
}

body.celebration-live .card::after {
  opacity: 0.92;
}

.scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 4;
}

.card {
  width: min(92vw, 660px);
  border-radius: 30px;
  border: 1px solid var(--card-border);
  background: linear-gradient(170deg, #ffffffc7, #ffffff9e);
  backdrop-filter: blur(10px);
  box-shadow:
    0 36px 68px -34px var(--card-shadow),
    0 0 0 1px #ffffff61 inset;
  text-align: center;
  padding: clamp(26px, 4vw, 44px);
  position: relative;
  overflow: hidden;
  animation:
    card-in 620ms cubic-bezier(0.2, 0.86, 0.2, 1) both,
    card-float 7.5s ease-in-out infinite 0.9s;
  transition: box-shadow 280ms ease, transform 280ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: -140% auto -140% -28%;
  width: 38%;
  background: linear-gradient(
    118deg,
    transparent 20%,
    rgba(255, 255, 255, 0.15) 42%,
    rgba(255, 255, 255, 0.68) 50%,
    rgba(255, 255, 255, 0.18) 58%,
    transparent 82%
  );
  transform: rotate(14deg);
  animation: sheen-sweep 6.8s linear infinite;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(340px circle at var(--spot-x) var(--spot-y), rgba(255, 255, 255, 0.48), transparent 62%);
  opacity: 0.62;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.card.interactive {
  box-shadow:
    0 42px 78px -36px rgba(76, 46, 74, 0.24),
    0 0 0 1px #ffffff70 inset;
}

.card.interactive::after {
  opacity: 0.82;
}

.card.celebrate {
  box-shadow:
    0 48px 84px -34px rgba(255, 92, 150, 0.34),
    0 0 0 1px #ffffff8a inset;
}

.card.celebrate::before {
  animation-duration: 2.5s;
}

.card.celebrate .icon {
  animation-duration: 1.1s;
}

.card > * {
  position: relative;
  z-index: 1;
}

.icon {
  margin: 0;
  font-size: 1.3rem;
  color: #ff4f8c;
  opacity: 0.9;
  animation:
    rise-up 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both 80ms,
    pulse-heart 2.8s ease-in-out infinite 760ms;
}

.tag {
  margin: 10px 0 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
  color: #8f7a97;
  animation: rise-up 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both 140ms;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.1vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  animation: rise-up 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both 220ms;
}

.hely-name {
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: 1.22em;
  display: inline-block;
  margin-left: 0.04em;
  color: #cc2f69;
  text-shadow: 0 4px 14px rgba(196, 45, 98, 0.28);
}

.subtext {
  margin: 16px auto 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 2.1vw, 1.1rem);
  animation: rise-up 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both 300ms;
}

.response {
  min-height: 1.6em;
  margin: 14px 0 30px;
  color: #765f77;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  transition: color 180ms ease;
  animation: rise-up 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both 360ms;
}

.response.tease {
  color: #b63e70;
}

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  flex-wrap: wrap;
  animation: rise-up 660ms cubic-bezier(0.2, 0.8, 0.2, 1) both 430ms;
}

.btn {
  border: 0;
  border-radius: 999px;
  min-width: 120px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease;
}

.btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.yes {
  --yes-scale: 1;
  color: #fff;
  background: linear-gradient(132deg, var(--yes-a), var(--yes-b));
  background-size: 180% 180%;
  box-shadow:
    0 14px 30px -14px rgba(255, 82, 142, 0.82),
    0 1px 0 #ffffff4d inset;
  animation:
    yes-shift 3s ease-in-out infinite,
    yes-bob 2.9s ease-in-out infinite 1.2s;
}

.yes:hover {
  transform: translateY(-2px) scale(var(--yes-scale));
  filter: brightness(1.02);
}

.yes.done {
  filter: brightness(1.06);
}

.no {
  position: relative;
  color: #7f556a;
  background: var(--no-bg);
  border: 1px solid var(--no-border);
  box-shadow:
    0 12px 22px -16px rgba(112, 79, 102, 0.48),
    0 1px 0 #ffffffdb inset;
  animation: no-glint 5.4s ease-in-out infinite;
}

.no::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 2px solid rgba(255, 101, 157, 0);
  opacity: 0;
  pointer-events: none;
}

.no.floating {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 32;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: box-shadow 180ms ease, filter 180ms ease;
}

.no.floating:hover {
  filter: brightness(1.01);
  box-shadow:
    0 14px 26px -16px rgba(112, 79, 102, 0.56),
    0 1px 0 #ffffffdb inset;
}

.no.floating.relocated {
  animation:
    no-pop 460ms cubic-bezier(0.2, 0.86, 0.2, 1),
    no-glint 5.4s ease-in-out infinite;
}

.no.floating.relocated::after {
  animation: no-ring 460ms cubic-bezier(0.2, 0.86, 0.2, 1);
}

@keyframes drift-a {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(5vw, 4vh, 0) scale(1.12);
  }
}

@keyframes drift-b {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-6vw, 5vh, 0) scale(1.08);
  }
}

@keyframes drift-c {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-4vw, -6vh, 0) scale(1.08);
  }
}

@keyframes card-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.988);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rise-up {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes pulse-heart {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes yes-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes yes-bob {
  0%,
  100% {
    transform: translateY(0) scale(var(--yes-scale));
  }
  50% {
    transform: translateY(-2px) scale(calc(var(--yes-scale) + 0.004));
  }
}

@keyframes sheen-sweep {
  0% {
    transform: translate3d(0, 0, 0) rotate(14deg);
  }
  100% {
    transform: translate3d(300%, 0, 0) rotate(14deg);
  }
}

@keyframes heart-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.92);
  }
  8% {
    opacity: 0.65;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), calc(-1 * (100vh + 140px)), 0) scale(1.25);
  }
}

@keyframes no-glint {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.05);
  }
}

@keyframes no-pop {
  0% {
    box-shadow:
      0 12px 22px -16px rgba(112, 79, 102, 0.48),
      0 1px 0 #ffffffdb inset;
    filter: brightness(1);
  }
  35% {
    box-shadow:
      0 18px 30px -14px rgba(255, 108, 166, 0.58),
      0 1px 0 #ffffffdb inset;
    filter: brightness(1.12);
  }
  100% {
    box-shadow:
      0 12px 22px -16px rgba(112, 79, 102, 0.48),
      0 1px 0 #ffffffdb inset;
    filter: brightness(1);
  }
}

@keyframes no-ring {
  0% {
    opacity: 0;
    border-color: rgba(255, 101, 157, 0.75);
    transform: scale(0.75);
  }
  45% {
    opacity: 0.95;
    border-color: rgba(255, 101, 157, 0.7);
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    border-color: rgba(255, 101, 157, 0);
    transform: scale(1.3);
  }
}

@keyframes tease-float {
  0% {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.9);
  }
  14% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  85% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift-x, 0px), -54px, 0) scale(1.04);
  }
}

@keyframes yes-bloom {
  0% {
    opacity: 0;
    transform: scale(0.42);
  }
  35% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 0.26;
    transform: scale(1.4);
  }
}

@keyframes yes-sparkle {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  20% {
    opacity: 0.92;
    transform: scale(1);
  }
  100% {
    opacity: 0.3;
    transform: scale(1.03);
  }
}

@keyframes yes-copy-in {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.92);
    filter: blur(4px);
  }
  70% {
    opacity: 1;
    transform: translate3d(0, -3px, 0) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes card-hero {
  0% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  38% {
    transform: translateY(-8px) scale(1.04);
    filter: saturate(1.22);
  }
  100% {
    transform: translateY(-4px) scale(1.02);
    filter: saturate(1.1);
  }
}

@media (max-width: 680px) {
  .card {
    border-radius: 24px;
    padding: 24px 20px 30px;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }
}

@media (pointer: coarse) {
  .cursor-aura {
    display: none;
  }
}
