:root {
  --bg: linear-gradient(180deg, #fff8f3 0%, #ffeef4 45%, #fef7e8 100%);
  --text: #4c2c39;
  --card: #fffafc;
  --accent: #ff5d8f;
  --accent-strong: #ff3f79;
  --soft: #ffdfec;
  --line: #f8bed1;
  --shadow: 0 10px 30px rgba(120, 38, 69, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

.section {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 4rem 0 3rem;
}

.hero {
  min-height: 95vh;
  display: grid;
  align-content: center;
  gap: 1.5rem;
}

.hero-card,
.card {
  background: var(--card);
  border: 1px solid #ffe0eb;
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.hero-card {
  text-align: center;
  padding: 2rem 1.4rem;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  color: #ad5f7f;
  text-transform: uppercase;
}

h1,
h2,
.section-title {
  margin: 0.35rem 0 0.7rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.8rem, 7vw, 3rem);
}

.section-title {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  text-align: center;
}

.section-intro {
  text-align: center;
  margin: 0 auto 1.8rem;
  max-width: 60ch;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

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

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 93, 143, 0.35);
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.secondary {
  background: #ffeaf2;
  color: #8e405f;
  border: 1px solid #ffc8db;
}

.valentines-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.question-subtext,
.status-note {
  min-height: 1.6em;
  margin: 0.4rem 0;
}

.button-wrap {
  margin-top: 1rem;
  min-height: 130px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.85rem;
  flex-wrap: wrap;
}

#noBtn {
  position: relative;
}

.status-note {
  font-weight: 700;
  color: #b3486e;
}

#confettiCanvas {
  width: 100%;
  height: 0;
  display: block;
  pointer-events: none;
}

.notice {
  margin: 0 auto 1rem;
  background: #fff4d6;
  border: 1px solid #f9d58f;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  max-width: 68ch;
}

.polaroid-grid {
  columns: 2 170px;
  column-gap: 1rem;
}

.polaroid {
  break-inside: avoid;
  margin: 0 0 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #ffebf2;
  box-shadow: 0 10px 18px rgba(71, 35, 50, 0.14);
  overflow: hidden;
  transform: rotate(var(--angle, 0deg));
}

.polaroid button {
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: repeating-linear-gradient(
    -45deg,
    #ffeef4,
    #ffeef4 12px,
    #f8d5e4 12px,
    #f8d5e4 24px
  );
}

.polaroid .caption {
  padding: 0.7rem;
  min-height: 3rem;
  font-family: "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1rem;
}

.polaroid.memory {
  background: #fff9c9;
  border-color: #f3d67a;
}

.polaroid.memory .caption {
  font-family: "Segoe Print", "Bradley Hand", cursive;
  min-height: 9rem;
  display: grid;
  align-content: center;
  text-align: center;
  font-weight: 700;
  color: #7a5c1e;
}

.lightbox {
  border: none;
  border-radius: 14px;
  width: min(92vw, 720px);
  padding: 1rem;
  background: #fffdfd;
}

.lightbox::backdrop {
  background: rgba(43, 16, 28, 0.66);
}

.lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close {
  border: none;
  border-radius: 999px;
  background: #ffe6ef;
  color: #7d3859;
  padding: 0.45rem 0.8rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
}

.final-note {
  text-align: center;
}

@media (min-width: 720px) {
  .section {
    padding: 5rem 0 3.5rem;
  }

  .hero-card,
  .card {
    padding: 2rem;
  }
}
