:root {
  --ink: #5f3443;
  --rose: #d85f86;
  --rose-deep: #a63f65;
  --paper: rgba(255, 252, 249, 0.95);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: #f9dce3;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-rounded, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.love-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 42px 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.8) 0 4px, transparent 5px),
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.65) 0 3px, transparent 4px),
    linear-gradient(145deg, #ffe8ec 0%, #f9d8e2 42%, #f3cfda 100%);
}

.love-page::before {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 24px,
    rgba(169, 76, 105, 0.025) 25px 26px
  );
  content: "";
  pointer-events: none;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.5;
}

.ambient-one {
  width: 340px;
  height: 340px;
  top: -150px;
  right: -90px;
  background: #fff6dc;
}

.ambient-two {
  width: 280px;
  height: 280px;
  bottom: -145px;
  left: -70px;
  background: #edb9c9;
}

.love-card {
  position: relative;
  z-index: 2;
  width: min(670px, 100%);
  padding: clamp(30px, 5vw, 54px) clamp(22px, 6vw, 64px) 24px;
  text-align: center;
  background: linear-gradient(rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.38)),
    var(--paper);
  border: 1px solid rgba(173, 83, 111, 0.18);
  border-radius: 34px 14px 38px 18px;
  box-shadow: 0 30px 80px rgba(125, 52, 78, 0.17), 0 3px 0 rgba(255, 255, 255, 0.9) inset;
  transform: rotate(-0.35deg);
}

.love-card::after {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(180, 93, 119, 0.22);
  border-radius: 25px 10px 29px 12px;
  content: "";
  pointer-events: none;
}

.tape {
  position: absolute;
  z-index: 3;
  width: 128px;
  height: 33px;
  top: -17px;
  left: 50%;
  background: rgba(255, 234, 184, 0.76);
  box-shadow: 0 2px 8px rgba(110, 71, 35, 0.08);
  transform: translateX(-50%) rotate(2deg);
}

.card-header,
.card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #9b7080;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-label {
  padding: 7px 11px;
  border: 1px solid rgba(166, 63, 101, 0.18);
  border-radius: 999px;
  background: rgba(255, 238, 243, 0.7);
  font-weight: 700;
}

.mini-label.muted {
  background: transparent;
}

.eyebrow {
  position: relative;
  z-index: 2;
  margin: 30px 0 10px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1 {
  position: relative;
  z-index: 2;
  max-width: 580px;
  margin: 0 auto;
  color: #71384d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 7vw, 54px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h1 em {
  color: var(--rose-deep);
  font-weight: 700;
}

.intro-copy,
.success-copy {
  position: relative;
  z-index: 2;
  max-width: 500px;
  margin: 18px auto 0;
  color: #7c5b67;
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.75;
}

.nailoong-frame {
  position: relative;
  z-index: 2;
  width: min(360px, 92%);
  margin: 18px auto 2px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(175, 97, 120, 0.14);
  border-radius: 28px;
  box-shadow: 0 12px 34px rgba(137, 69, 91, 0.12);
  transform: rotate(0.8deg);
}

.nailoong-frame img {
  display: block;
  width: 100%;
  height: clamp(180px, 32vw, 236px);
  object-fit: cover;
  border-radius: 20px;
}

.doodle {
  position: absolute;
  z-index: 4;
  color: var(--rose);
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
}

.doodle-left {
  top: -13px;
  left: -21px;
  transform: rotate(-18deg);
}

.doodle-right {
  right: -23px;
  bottom: 18px;
  transform: rotate(14deg);
}

.button-area {
  position: relative;
  z-index: 5;
  min-height: 126px;
  margin-top: 12px;
}

.question-hint {
  margin: 0 0 18px;
  color: #a17b89;
  font-size: 12px;
}

.answer-buttons {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.answer-button {
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, background 0.2s;
}

.answer-button:focus-visible,
.restart-button:focus-visible {
  outline: 3px solid rgba(166, 63, 101, 0.28);
  outline-offset: 4px;
}

.yes-button {
  --yes-scale: 1;
  z-index: 2;
  color: white;
  background: linear-gradient(135deg, #db6d91, #ba496f);
  box-shadow: 0 10px 24px rgba(176, 62, 99, 0.25);
  transform: scale(var(--yes-scale));
}

.yes-button:hover {
  box-shadow: 0 13px 28px rgba(176, 62, 99, 0.34);
}

.no-button {
  position: relative;
  z-index: 3;
  color: #8a6673;
  background: #f7e7eb;
  box-shadow: 0 5px 14px rgba(124, 67, 85, 0.08);
}

.no-button:hover {
  background: #f1dce2;
}

.answer-buttons.yes-takes-over {
  width: min(440px, 100%);
  min-height: 124px;
  margin-inline: auto;
}

.answer-buttons.yes-takes-over .yes-button {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  font-size: clamp(21px, 5vw, 30px);
  transform: scale(1) !important;
  animation: take-over 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.answer-buttons.yes-takes-over .no-button {
  opacity: 0;
  pointer-events: none;
}

.card-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(166, 63, 101, 0.12);
  text-transform: none;
}

.floating-hearts span {
  position: absolute;
  z-index: 1;
  color: rgba(176, 74, 108, 0.3);
  font-family: Georgia, serif;
  font-size: 25px;
  animation: drift 5s ease-in-out infinite;
}

.floating-hearts span:nth-child(1) { top: 10%; left: 8%; animation-delay: -0.7s; }
.floating-hearts span:nth-child(2) { top: 21%; right: 9%; animation-delay: -2.4s; }
.floating-hearts span:nth-child(3) { top: 66%; left: 7%; animation-delay: -1.2s; }
.floating-hearts span:nth-child(4) { right: 7%; bottom: 14%; animation-delay: -3.1s; }
.floating-hearts span:nth-child(5) { top: 43%; left: 14%; animation-delay: -4s; }
.floating-hearts span:nth-child(6) { top: 7%; right: 28%; animation-delay: -1.8s; }
.floating-hearts span:nth-child(7) { left: 26%; bottom: 7%; animation-delay: -0.3s; }
.floating-hearts span:nth-child(8) { right: 21%; bottom: 34%; animation-delay: -2.9s; }

.success-card {
  max-width: 610px;
  padding-bottom: 32px;
  outline: none;
}

.success-card .eyebrow {
  margin-top: 12px;
}

.success-frame {
  margin-top: 24px;
  transform: rotate(-1deg);
}

.closing-note {
  position: relative;
  z-index: 2;
  margin: 18px 0 0;
  color: var(--rose-deep);
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
}

.restart-button {
  position: relative;
  z-index: 3;
  margin-top: 22px;
  padding: 9px 15px;
  color: #9a6f7f;
  background: transparent;
  border: 1px solid rgba(166, 63, 101, 0.2);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

@keyframes take-over {
  from { opacity: 0.75; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
  .love-page {
    align-items: start;
    padding: 30px 12px;
  }

  .love-card {
    padding-top: 38px;
    border-radius: 26px 12px 28px 14px;
  }

  .card-header {
    justify-content: center;
  }

  .mini-label.muted,
  .question-hint,
  .card-footer span:last-child {
    display: none;
  }

  .eyebrow {
    margin-top: 24px;
  }

  .answer-buttons {
    flex-direction: column;
  }

  .button-area {
    min-height: 150px;
    margin-top: 20px;
  }

  .yes-button {
    transform-origin: center bottom;
  }

  .no-button {
    margin-top: 6px;
  }

  .card-footer {
    justify-content: center;
  }
}

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