:root {
  color-scheme: light;
  --ink: #3d2c2d;
  --rose: #d58e9e;
  --rose-dark: #a6566b;
  --cream: #fffaf5;
}

* { box-sizing: border-box; }

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

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background: #493536;
  font-family: ui-rounded, "Avenir Next", Avenir, system-ui, sans-serif;
}

.photo-wall {
  position: fixed;
  inset: -5px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 7px;
  overflow: hidden;
  transform: scale(1.015);
}

.photo-tile {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 246, 239, .3);
  border-radius: 12px;
  background: #594548;
  box-shadow: 0 3px 14px rgba(27, 16, 17, .18);
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) brightness(.83);
}

.photo-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(35, 20, 23, .19), rgba(38, 21, 24, .38));
  backdrop-filter: blur(1px);
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}

.question-card {
  position: relative;
  width: min(100%, 470px);
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 48px 34px 42px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 30px;
  background: rgba(255, 250, 245, .94);
  box-shadow: 0 24px 80px rgba(32, 18, 19, .28), 0 4px 14px rgba(32, 18, 19, .12);
  text-align: center;
  animation: card-arrives .7s cubic-bezier(.2, .8, .2, 1) both;
}

.card-sparkle {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--rose);
  font-size: 23px;
  animation: twinkle 3s ease-in-out infinite;
}

.card-content { width: 100%; }

.eyebrow {
  margin: 0 0 12px;
  color: #94777a;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .19em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 30px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 58px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.answers {
  position: relative;
  width: min(100%, 300px);
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
}

.button {
  min-width: 112px;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.button-no {
  position: relative;
  z-index: 1;
  color: #5e4d4e;
  border-color: #e8d9d3;
  background: #fffdfb;
  box-shadow: 0 3px 8px rgba(72, 47, 49, .08);
}

.button-no:hover { background: #f7eee9; transform: translateY(-2px); }

.button-yes {
  position: relative;
  z-index: 2;
  color: #fffaf7;
  background: var(--rose-dark);
  box-shadow: 0 7px 17px rgba(166, 86, 107, .24);
}

.button-yes:hover { background: #8e465b; }
.button-yes.is-running {
  position: fixed;
  z-index: 20;
  margin: 0;
  transition: none;
}

.second-stage .card-content { animation: fade-in .35s ease both; }
.second-stage .eyebrow { margin-bottom: 0; }
.second-stage .answers { width: 100%; height: auto; flex-wrap: wrap; margin-top: 23px; }
.second-stage .button { min-width: 112px; }
.second-stage .button:last-child { min-width: min(100%, 228px); }

.thank-you .card-content { animation: fade-in .35s ease both; }
.thank-you .eyebrow { margin-bottom: 13px; }
.thank-you h1 { margin-bottom: 0; font-size: clamp(34px, 7vw, 46px); }

@keyframes card-arrives {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes twinkle {
  0%, 100% { transform: rotate(0) scale(1); opacity: .8; }
  50% { transform: rotate(20deg) scale(1.13); opacity: 1; }
}

@media (max-width: 700px) {
  .photo-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(7, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
  }
  .photo-tile { border-radius: 8px; }
  .page { padding: 20px; }
  .question-card { min-height: 245px; padding: 44px 23px 34px; border-radius: 25px; }
  .answers { gap: 10px; }
  .button { min-width: 104px; min-height: 46px; padding-inline: 18px; }
  .second-stage .answers { gap: 9px; }
}

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