:root {
  --bg: #fff8fb;
  --card: rgba(255, 255, 255, 0.86);
  --ink: #351623;
  --wine: #7a173c;
  --pink: #d71f82;
  --pink-dark: #b91268;
  --muted: #806b74;
  --line: #edd8e1;
  --shadow: 0 26px 75px rgba(91, 25, 55, 0.14);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 190, 220, .25), transparent 30%),
    radial-gradient(circle at 88% 85%, rgba(255, 211, 228, .32), transparent 28%),
    var(--bg);
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px 16px;
  position: relative;
  z-index: 2;
}

.card {
  width: min(720px, 100%);
  min-height: 570px;
  padding: 26px clamp(20px, 5vw, 48px) 22px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255,255,255,.7), transparent 42%);
}

.brand, .progress, .screen, .footer-note { position: relative; z-index: 1; }

.brand {
  text-align: center;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.brand span { color: var(--pink); }

.progress {
  height: 5px;
  width: min(300px, 78%);
  margin: 18px auto 0;
  background: #f4e8ed;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  display: block;
  height: 100%;
  width: 16%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f05aa7, var(--pink));
  transition: width .45s cubic-bezier(.22,1,.36,1);
}

.screen {
  display: none;
  min-height: 450px;
  padding: 32px 0 10px;
  text-align: center;
  animation: screenIn .55s cubic-bezier(.2,.8,.2,1) both;
}
.screen.active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

h1, h2 {
  margin: 10px auto 12px;
  max-width: 620px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--wine);
  letter-spacing: -.035em;
  line-height: 1.03;
}
h1 { font-size: clamp(2.55rem, 9vw, 4.8rem); }
h2 { font-size: clamp(2.05rem, 7vw, 3.55rem); }

.eyebrow {
  margin: 0;
  color: #a46c83;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
}

.subtext {
  color: var(--muted);
  margin: 0 auto 24px;
  max-width: 530px;
  line-height: 1.6;
}

.cat-badge {
  width: 94px;
  height: 94px;
  margin: 2px auto 22px;
  display: grid;
  place-items: center;
  font-size: 3.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 16px 36px rgba(70, 24, 43, .12);
  animation: floaty 3s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

.primary {
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #e43495, var(--pink-dark));
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(215, 31, 130, .25);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 18px 34px rgba(215,31,130,.31);
}
.primary:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.primary.big { padding: 16px 34px; font-size: 1.06rem; min-width: 170px; }

.answer-actions {
  min-height: 72px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.no-button {
  border: 1px solid #ffdbe9;
  border-radius: 999px;
  padding: 12px 22px;
  background: #ffdbe9;
  color: #a83c68;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(74,31,48,.08);
  transition: left .16s cubic-bezier(.2,.8,.2,1), top .16s cubic-bezier(.2,.8,.2,1), transform .12s ease;
  touch-action: none;
  z-index: 4;
}
.no-button.escaping {
  position: absolute;
  margin: 0;
}
.no-button:hover { transform: rotate(-5deg) scale(.98); }

.yes-reaction {
  display: none;
  place-items: center;
  align-content: center;
}
.yes-reaction.active { display: grid; }
.reaction-mark {
  color: var(--pink);
  font-size: 2rem;
  margin-bottom: 2px;
  animation: reactionPulse .8s ease-out both;
}
.reaction-title {
  font-size: clamp(2.45rem, 8vw, 4.7rem);
  line-height: .96;
  animation: dramaticYes .75s cubic-bezier(.2,.9,.2,1) both;
}
.reaction-copy {
  margin-top: 6px;
  animation: fadeUp .55s .38s ease both;
}
.yes-reaction .primary { animation: fadeUp .55s .52s ease both; }

@keyframes dramaticYes {
  0% { opacity: 0; transform: scale(.72) rotate(-3deg); filter: blur(5px); }
  62% { opacity: 1; transform: scale(1.07) rotate(1deg); filter: blur(0); }
  82% { transform: scale(.98) rotate(-.5deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes reactionPulse {
  0% { opacity: 0; transform: scale(.2); }
  70% { opacity: 1; transform: scale(1.35) rotate(12deg); }
  100% { transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0 24px;
}

.choice {
  min-height: 112px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 7px;
  place-items: center;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.choice span { font-size: 2.05rem; }
.choice:hover { transform: translateY(-3px); border-color: #e9a2c4; }
.choice.selected {
  border-color: #dc378b;
  background: #fff0f7;
  box-shadow: 0 9px 24px rgba(215,31,130,.13);
  transform: translateY(-3px) scale(1.01);
}

.form-stack {
  display: grid;
  gap: 16px;
  max-width: 520px;
  margin: 28px auto 24px;
  text-align: left;
}

label span {
  display: block;
  margin: 0 0 7px 4px;
  font-weight: 750;
  color: #5f3949;
  font-size: .9rem;
}

input, textarea {
  width: 100%;
  border: 1px solid #e6cdd8;
  border-radius: 16px;
  padding: 14px 15px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus {
  border-color: #d63b88;
  box-shadow: 0 0 0 4px rgba(214,59,136,.10);
}

.summary {
  max-width: 530px;
  margin: 20px auto;
  display: grid;
  gap: 10px;
  text-align: left;
}
.summary-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.summary-row .icon { width: 28px; font-size: 1.2rem; }
.summary-row strong { display: block; color: #5c2940; }
.summary-row small { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }

.consent-box {
  max-width: 550px;
  margin: 18px auto 20px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #fff5f9;
  border: 1px dashed #e4a5c3;
  color: #6d4757;
  font-size: .82rem;
  line-height: 1.55;
}

.text-button {
  display: block;
  margin: 15px auto 0;
  background: transparent;
  border: 0;
  color: #8b6172;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sparkle-mark, .success-icon { font-size: 3.4rem; animation: pop .7s cubic-bezier(.2,.9,.2,1) both; }
@keyframes pop { 0% { transform: scale(.2) rotate(-30deg); opacity:0; } 70% { transform: scale(1.15) rotate(6deg); } 100% { transform: scale(1) rotate(0); opacity:1; } }

.final-hearts {
  margin: 26px 0 0;
  color: var(--pink);
  font-size: 1.7rem;
  letter-spacing: .22em;
  animation: heartbeat 1.3s ease-in-out infinite;
}
@keyframes heartbeat { 0%,100%{transform:scale(1)} 15%{transform:scale(1.06)} 30%{transform:scale(1)} }

.footer-note {
  text-align: center;
  margin: 12px 0 0;
  color: #a28390;
  font-size: .72rem;
}

.hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.heart {
  position: absolute;
  bottom: -30px;
  color: rgba(215,31,130,.75);
  animation: rise linear forwards;
  filter: drop-shadow(0 4px 6px rgba(215,31,130,.12));
}
@keyframes rise {
  to { transform: translateY(-115vh) translateX(var(--drift)) rotate(25deg); opacity: 0; }
}

.ambient-glow {
  position: fixed;
  width: 330px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: .22;
}
.glow-a { background: #ff9dca; left: -120px; top: 9%; }
.glow-b { background: #ffc4db; right: -120px; bottom: 5%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 18px);
  background: #3f1c2b;
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(30,7,16,.24);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity .22s ease, transform .22s ease;
  max-width: calc(100vw - 30px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.confetti {
  position: fixed;
  width: 9px;
  height: 14px;
  top: -20px;
  border-radius: 3px;
  z-index: 30;
  pointer-events: none;
  animation: confettiFall 2.6s cubic-bezier(.15,.65,.2,1) forwards;
}
@keyframes confettiFall {
  to { transform: translate3d(var(--x), 110vh, 0) rotate(720deg); opacity: .9; }
}

@media (max-width: 600px) {
  .app-shell { padding: 12px; }
  .card { min-height: 620px; border-radius: 24px; padding-inline: 18px; }
  .screen { padding-top: 28px; }
  .food-grid { grid-template-columns: repeat(2, 1fr); }
  .choice { min-height: 100px; }
}

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