:root {
  --pink: #f56fa8;
  --pink-dark: #c93672;
  --rose: #fff1f6;
  --paper: #fff7e8;
  --ink: #442333;
  --shadow: 0 24px 70px rgba(120, 22, 68, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.85), transparent 24rem),
    linear-gradient(135deg, #ffe3ec 0%, #ffd1e1 45%, #fff1df 100%);
  overflow-x: hidden;
}

button {
  font: inherit;
}

.app {
  min-height: 100vh;
  position: relative;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 32px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.screen-active {
  display: flex;
}

#intro {
  flex-direction: column;
  gap: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.2rem, 7vw, 5.6rem);
  line-height: 0.95;
  text-transform: lowercase;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1;
}

p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.letter {
  width: min(72vw, 360px);
  aspect-ratio: 1.45;
  border: 0;
  position: relative;
  cursor: pointer;
  background: linear-gradient(145deg, #ff8cbd, var(--pink));
  box-shadow: var(--shadow);
  clip-path: polygon(0 18%, 50% 0, 100% 18%, 100% 100%, 0 100%);
  transition: transform 180ms ease, filter 180ms ease;
}

.letter:hover {
  transform: translateY(-6px) rotate(-1deg);
  filter: saturate(1.08);
}

.letter::before,
.letter::after {
  content: "";
  position: absolute;
  inset: 20% 0 0;
  pointer-events: none;
}

.letter::before {
  background: linear-gradient(145deg, transparent 49%, rgba(255, 255, 255, 0.38) 50% 52%, transparent 53%);
}

.letter::after {
  background: linear-gradient(215deg, transparent 49%, rgba(155, 19, 78, 0.18) 50% 52%, transparent 53%);
}

.letter-flap {
  position: absolute;
  inset: 18% 0 auto;
  height: 46%;
  background: linear-gradient(180deg, #ffa1ca, #f560a2);
  clip-path: polygon(0 0, 50% 78%, 100% 0);
  transform-origin: top center;
}

.letter-heart {
  position: absolute;
  left: 50%;
  top: 57%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 2.3rem;
  background: var(--pink-dark);
  box-shadow: 0 10px 24px rgba(111, 18, 59, 0.28);
}

.primary-button,
.choice-button,
.giant-yes {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  background: var(--pink-dark);
  box-shadow: 0 12px 28px rgba(139, 32, 81, 0.22);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1.08rem;
}

.primary-button:hover,
.choice-button:hover,
.giant-yes:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(139, 32, 81, 0.28);
}

#questions {
  padding: 24px;
}

.question-card,
.ready-panel {
  width: min(960px, 100%);
  min-height: min(680px, calc(100vh - 48px));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: clamp(24px, 5vw, 64px);
}

.question-card {
  display: none;
}

.question-card.active {
  display: flex;
}

.ready-panel {
  display: flex;
}

.step-label {
  color: var(--pink-dark);
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.choices {
  display: grid;
  gap: 16px;
  width: min(560px, 100%);
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-button {
  min-height: 74px;
  padding: 0 18px;
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  font-weight: 700;
}

.yes,
.giant-yes {
  background: linear-gradient(135deg, #d84d86, #8f2d62);
}

.no {
  background: #333;
}

.no.blocked {
  background: #cf1835;
  animation: shake 280ms linear;
}

.warning {
  min-height: 28px;
  color: #bb1832;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  opacity: 0;
}

.warning.visible {
  opacity: 1;
}

.giant-yes {
  width: min(840px, 100%);
  min-height: min(42vh, 360px);
  font-size: clamp(4rem, 16vw, 12rem);
  font-weight: 900;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
}

.runaway-zone {
  width: min(920px, 100%);
  min-height: 360px;
  position: relative;
  display: grid;
  place-items: center;
  gap: 18px;
}

.wide {
  width: min(620px, 100%);
}

.runaway {
  position: absolute;
  right: 8%;
  bottom: 12%;
  min-width: 120px;
  min-height: 58px;
  font-size: 1.1rem;
}

.letter-screen {
  align-items: flex-start;
  padding-block: clamp(28px, 6vw, 72px);
}

.paper {
  width: min(820px, 100%);
  padding: clamp(28px, 6vw, 72px);
  text-align: left;
  color: #4a3028;
  display: block;
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(150, 92, 60, 0.08) 1px, transparent 1px),
    linear-gradient(#fff9eb, var(--paper));
  background-size: 38px 38px, auto;
  border: 1px solid rgba(151, 86, 50, 0.22);
  box-shadow: 0 28px 70px rgba(95, 47, 39, 0.22);
}

.paper * {
  color: inherit;
  opacity: 1;
  visibility: visible;
}

.paper h2 {
  margin: 8px 0 22px;
  color: #9a3558;
}

.paper p + p {
  margin-top: 18px;
}

.date-line {
  color: #9a6a54;
  font-style: italic;
}

.signature {
  color: #9a3558;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@media (max-width: 620px) {
  .screen {
    padding: 20px;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .question-card,
  .ready-panel {
    min-height: calc(100vh - 40px);
    padding: 18px;
  }

  .runaway-zone {
    min-height: 420px;
    align-content: start;
    padding-top: 48px;
  }

  .runaway {
    right: 12%;
    bottom: 18%;
  }
}
