:root {
  --yellow: #ffd83d;
  --yellow-light: #fff3a6;
  --orange: #f5a623;
  --orange-dark: #d97712;
  --cream: #fffdf1;
  --ink: #493a29;
  --muted: #806f5a;
  --pink: #ef6e7e;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background: #fff5b5;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.28) 50%, transparent 50%) 0 0 / 44px 44px,
    linear-gradient(rgba(255,255,255,.28) 50%, transparent 50%) 0 0 / 44px 44px,
    #ffe688;
}

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

.page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
}

.card {
  position: relative;
  width: min(100%, 38rem);
  min-height: 42rem;
  overflow: hidden;
  padding: 2.3rem clamp(1.3rem, 6vw, 3.6rem) 2.6rem;
  background: var(--cream);
  border: 4px solid #fff;
  border-radius: 2.5rem;
  box-shadow: 0 1.5rem 0 rgba(196, 130, 26, .12), 0 2rem 4rem rgba(128, 93, 35, .2);
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 8rem;
  height: 8rem;
  border: 2px dashed #f7ca49;
  border-radius: 50%;
  opacity: .4;
}
.card::before { top: -4rem; left: -3rem; }
.card::after { right: -4rem; bottom: -3rem; }

form, .step, .progress { position: relative; z-index: 1; }

.progress {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.2rem;
}

.progress-dot {
  width: .6rem;
  height: .6rem;
  background: #eadfc6;
  border-radius: 1rem;
  transition: width 250ms ease, background 250ms ease;
}
.progress-dot.active { width: 1.8rem; background: var(--orange); }
.progress.complete .progress-dot { background: var(--pink); }

.step { display: none; text-align: center; }
.step.active { display: block; animation: pop-in 420ms cubic-bezier(.2,.8,.2,1) both; }

.kicker, .step-count {
  margin: 0 0 .55rem;
  color: var(--orange-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0 auto;
  font-family: "Fredoka", sans-serif;
  line-height: 1.05;
}
h1 { color: var(--orange-dark); font-size: clamp(3.6rem, 13vw, 5.5rem); }
h2 { max-width: 14ch; font-size: clamp(2rem, 7vw, 3rem); }

.intro {
  max-width: 29rem;
  margin: .8rem auto 1.35rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.date-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  max-width: 27rem;
  margin: 0 auto 1.35rem;
  padding: .85rem 1rem;
  background: #fff7cb;
  border: 2px dashed #efbd36;
  border-radius: 1.25rem;
  text-align: left;
}
.date-card strong, .date-card small { display: block; }
.date-card strong { font-family: "Fredoka"; font-size: 1rem; }
.date-card small { margin-top: .18rem; color: var(--muted); font-size: .78rem; }

.calendar-icon {
  display: grid;
  flex: 0 0 2.8rem;
  height: 2.8rem;
  place-items: center;
  color: #fff;
  background: var(--pink);
  border-radius: .8rem;
  font-family: "Fredoka";
  font-size: 1.2rem;
  box-shadow: inset 0 -.25rem rgba(0,0,0,.08);
}

.question { margin: 1.4rem 0 0; padding: 0; border: 0; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.option { cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span {
  display: grid;
  min-height: 4rem;
  place-items: center;
  padding: .75rem;
  background: #fff;
  border: 2px solid #eee2c4;
  border-radius: 1rem;
  font-size: .9rem;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.option:hover span { transform: translateY(-2px); border-color: #f4c54b; }
.option input:focus-visible + span { outline: 3px solid rgba(245,166,35,.3); outline-offset: 2px; }
.option input:checked + span {
  color: #6c4a0d;
  background: var(--yellow-light);
  border-color: var(--orange);
  box-shadow: 0 .35rem 0 rgba(245,166,35,.16);
}

textarea {
  width: 100%;
  margin-top: 1.25rem;
  padding: 1rem;
  resize: vertical;
  color: var(--ink);
  background: #fff;
  border: 2px solid #eee2c4;
  border-radius: 1rem;
  outline: none;
}
textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(245,166,35,.15); }

.answer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  max-width: 27rem;
  margin: 0 auto;
}
.answer-buttons button { transition: transform 180ms ease, box-shadow 150ms ease, background 150ms ease; }
.answer-buttons.swapped #yes-button { transform: translateX(calc(100% + .8rem)); }
.answer-buttons.swapped #no-button { transform: translateX(calc(-100% - .8rem)); }
.no-button {
  padding: .95rem 1.2rem;
  color: var(--muted);
  background: #fff;
  border: 2px solid #eee2c4;
  border-radius: 1rem;
  cursor: not-allowed;
  font-weight: 800;
}

.plan-card {
  display: grid;
  gap: .55rem;
  margin: 1.15rem 0;
  padding: 1rem;
  background: #fff7cb;
  border: 2px dashed #efbd36;
  border-radius: 1.2rem;
  text-align: left;
}
.plan-card p { display: flex; align-items: center; gap: .65rem; margin: 0; font-size: .88rem; font-weight: 700; line-height: 1.35; }
.plan-card span { font-size: 1.25rem; }
.single-option { display: block; margin: 0 0 .9rem; }
.single-option span { min-height: auto; }
.time-choice { margin-top: 1.4rem; }
.thought-label { display: block; color: var(--muted); font-size: .78rem; font-weight: 800; text-align: left; }
.thought-label + textarea { margin-top: .4rem; }

.actions { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem; margin-top: 1.3rem; }
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .95rem 1.2rem;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 .38rem 0 var(--orange-dark);
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 .5rem 0 var(--orange-dark); }
.primary-button:active { transform: translateY(.25rem); box-shadow: 0 .12rem 0 var(--orange-dark); }
.step > .primary-button { max-width: 27rem; margin: 0 auto; }
.back-button {
  padding: .8rem .25rem;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}
.back-button:hover { color: var(--orange-dark); }
.validation { min-height: 1.2rem; margin: .6rem 0 -.6rem; color: #c44754; font-size: .8rem; font-weight: 800; }

/* Original CSS-drawn mascot */
.mascot {
  position: relative;
  width: 8.2rem;
  height: 7.2rem;
  margin: .2rem auto 1rem;
  background: radial-gradient(circle at 38% 28%, #fff8a8 0 8%, var(--yellow) 45%, #efad1d 100%);
  border: 3px solid #7f5d20;
  border-radius: 54% 46% 48% 52% / 50% 53% 47% 50%;
  box-shadow: inset -.65rem -.65rem 0 rgba(224,139,13,.14), 0 .5rem 0 rgba(122,84,28,.1);
  animation: mascot-bob 2.3s ease-in-out infinite;
}
.face i {
  position: absolute;
  top: 2.65rem;
  width: .44rem;
  height: .65rem;
  background: #493a29;
  border-radius: 50%;
}
.face i:first-child { left: 2.35rem; }
.face i:nth-child(2) { right: 2.35rem; }
.face b {
  position: absolute;
  top: 3.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: sans-serif;
  font-size: 1.05rem;
}
.arm, .leg { position: absolute; display: block; background: #7f5d20; border-radius: 1rem; transform-origin: top; }
.arm { top: 4.25rem; width: .18rem; height: 1.8rem; }
.arm-left { left: -.45rem; transform: rotate(45deg); }
.arm-right { right: -.45rem; transform: rotate(-45deg); }
.leg { bottom: -1rem; width: .18rem; height: 1.15rem; }
.leg-left { left: 2.5rem; transform: rotate(8deg); }
.leg-right { right: 2.5rem; transform: rotate(-8deg); }
.mascot-wave .arm-right { top: 1.5rem; right: -.4rem; transform: rotate(-140deg); }
.mascot-excited .arm-left { top: 1.5rem; transform: rotate(135deg); }
.mascot-excited .arm-right { top: 1.5rem; transform: rotate(-135deg); }
.mascot-hungry .face b { font-size: 1.35rem; }
.mascot-love { box-shadow: inset -.65rem -.65rem 0 rgba(224,139,13,.14), 0 .5rem 0 rgba(122,84,28,.1), 1rem -1rem 0 -0.6rem #f9a4ad; }
.heart-pop { position: absolute; top: -.7rem; right: -.2rem; color: var(--pink); font-size: 1.6rem; animation: heart-pop 1.2s ease-in-out infinite; }
.mascot-celebrate { animation: celebrate .65s ease-in-out infinite alternate; }

.success { padding-top: .5rem; }
.success .back-button { margin-top: .5rem; }
.confetti { color: var(--pink); font-size: 1.2rem; letter-spacing: .45rem; }
.final-date { margin-bottom: .6rem; }
.summary-card {
  margin: 1rem 0 .75rem;
  padding: 1rem;
  background: #fff;
  border: 2px solid #eee2c4;
  border-radius: 1.25rem;
  box-shadow: 0 .45rem 0 rgba(122,84,28,.08);
}
.summary-card .date-card { margin-top: 0; }
.summary-list { display: grid; gap: .6rem; margin: .8rem 0 0; text-align: left; }
.summary-list div { padding-top: .55rem; border-top: 1px dashed #ead9b1; }
.summary-list dt { color: var(--orange-dark); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.summary-list dd { margin: .15rem 0 0; font-size: .87rem; font-weight: 700; line-height: 1.35; }
.save-note { margin: .8rem auto; color: var(--muted); font-size: .8rem; font-weight: 700; line-height: 1.4; }
.success > .primary-button { max-width: 27rem; margin: 0 auto; }
.sparkles { position: fixed; top: 7%; right: 8%; color: #e89e20; font-size: 1.5rem; transform: rotate(12deg); }
.footer-note { margin: 0; color: #7c661f; font-size: .78rem; font-weight: 700; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes pop-in { from { opacity: 0; transform: translateX(1.2rem) scale(.98); } }
@keyframes mascot-bob { 50% { transform: translateY(-.35rem) rotate(1deg); } }
@keyframes heart-pop { 50% { transform: scale(1.25) rotate(8deg); } }
@keyframes celebrate { to { transform: translateY(-.45rem) rotate(3deg); } }

@media (max-width: 520px) {
  .page { display: block; padding: 0; background: var(--cream); }
  .card { min-height: 100vh; padding: 1.4rem 1.1rem 2rem; border: 0; border-radius: 0; box-shadow: none; }
  .options { grid-template-columns: 1fr; gap: .55rem; }
  .option span { min-height: 3.4rem; }
  .footer-note, .sparkles { display: none; }
}

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