@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Poppins:wght@400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at 20% 10%, #fff3b0 0%, transparent 40%), linear-gradient(170deg, #c8ecb4 0%, #8fd18b 55%, #5fae6b 100%);
  color: #3b2414;
  overflow-x: hidden;
}

.card {
  background: #fff;
  border-radius: 24px;
  padding: 36px 24px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(40, 90, 40, 0.3);
  border: 4px solid #f2c318;
  animation: pop 0.5s ease;
}

@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.emoji { font-size: 56px; margin-bottom: 12px; }
.monkeys { width: 190px; max-width: 70%; margin: -4px auto 16px; display: block; border-radius: 20px; box-shadow: 0 8px 20px rgba(120,80,0,.25); animation: bob 2.4s ease-in-out infinite; }
.monkeys.bed { width: 280px; max-width: 90%; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.sub { font-size: 14px; color: #7a5a3a; margin: -14px 0 20px; }

h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 24px;
}

p { font-size: 15px; line-height: 1.5; }

.btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  min-height: 70px;
}

.btn {
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, background 0.2s ease;
}

.yes { background: #e8436f; color: #fff; }
.yes:hover { background: #d12f5b; }

.no {
  background: #f3ead8;
  color: #7a5a3a;
  transition: left 0.25s ease, top 0.25s ease;
  z-index: 10;
}

.next { background: #e8436f; color: #fff; margin-top: 24px; }
.next[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }

.msg { margin-top: 18px; min-height: 22px; font-weight: 500; color: #c2335b; }

/* Date dropdown */
.picker-toggle {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border: 2px solid #e9d38a;
  border-radius: 14px;
  background: #fffbea;
  color: #3b2414;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.calendar {
  display: none;
  margin-top: 10px;
  border: 2px solid #e9d38a;
  border-radius: 14px;
  padding: 14px;
}
.calendar.open { display: block; }
.cal-title { font-weight: 600; margin-bottom: 10px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-head { font-size: 12px; font-weight: 600; color: #8a6a3a; padding: 4px 0; }

.day {
  font-family: inherit;
  font-size: 14px;
  aspect-ratio: 1;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #c9b1b9;
  text-decoration: line-through;
  cursor: pointer;
}

.day.available {
  background: #e8436f;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  animation: pulse 1.4s infinite;
}

.day.selected { animation: none; box-shadow: 0 0 0 3px #3b2414; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Place dropdown */
select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border: 2px solid #e9d38a;
  border-radius: 14px;
  background: #fffbea;
  color: #3b2414;
}

.surprise {
  display: none;
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  background: #fff6cc;
  font-weight: 600;
  font-size: 17px;
}
.surprise.show { display: block; animation: pop 0.4s ease; }

.dots::after {
  content: '';
  animation: dots 1.2s steps(4) infinite;
}
@keyframes dots {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; }
}

.heart {
  position: fixed;
  top: -40px;
  font-size: 26px;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.7; }
}

/* ---------- Coco & Mochi scenes ---------- */
.scene { position: relative; width: 200px; margin: -4px auto 18px; }
.scene img { width: 100%; display: block; border-radius: 20px; box-shadow: 0 8px 20px rgba(120,80,0,.25); }

/* Page 1: Coco sways holding flowers */
.scene.coco { width: 170px; animation: sway 3s ease-in-out infinite; transform-origin: bottom center; }
@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.bouquet {
  position: absolute; left: -26px; bottom: 6px; font-size: 64px;
  transform-origin: bottom right; animation: offer 1.6s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.2));
}
@keyframes offer { 0%,100% { transform: rotate(-12deg) translateX(0); } 50% { transform: rotate(4deg) translateX(-6px); } }
.float-heart {
  position: absolute; left: 0; bottom: 60px; font-size: 18px; opacity: 0;
  animation: rise 3s ease-in infinite;
}
.float-heart:nth-of-type(2) { left: 18px; animation-delay: 1s; }
.float-heart:nth-of-type(3) { left: -14px; animation-delay: 2s; }
@keyframes rise {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-120px) scale(1.1); opacity: 0; }
}
.scene.sad { animation: sadshake .5s ease; }
@keyframes sadshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px) rotate(-4deg); } 75% { transform: translateX(8px) rotate(4deg); } }

/* Page 2: confused Mochi */
.scene.mochi { width: 260px; max-width: 90%; }
.scene.mochi img { animation: tilt 3.2s ease-in-out infinite; transform-origin: bottom center; }
@keyframes tilt { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
.qm {
  position: absolute; font-size: 30px; font-weight: 700; color: #e8436f; opacity: 0;
  animation: pop-q 2.4s ease-in-out infinite;
  font-family: 'Fredoka', sans-serif;
}
.qm.a { top: -16px; left: 32%; }
.qm.b { top: -6px; left: 52%; animation-delay: .6s; font-size: 22px; }
.qm.c { top: -22px; left: 66%; animation-delay: 1.2s; }
@keyframes pop-q {
  0% { transform: translateY(10px) scale(.4); opacity: 0; }
  25% { transform: translateY(0) scale(1.15); opacity: 1; }
  70% { opacity: 1; transform: translateY(-6px) rotate(10deg); }
  100% { opacity: 0; transform: translateY(-14px) rotate(-6deg); }
}
.thought {
  position: absolute; top: 8px; right: -10px; background: #fff; border: 2px solid #f2c318;
  border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 600;
  animation: bob 2.4s ease-in-out infinite;
}

/* Page 3: shush */
.shush { position: absolute; right: -14px; top: -14px; font-size: 40px; animation: wiggle 1.2s ease-in-out infinite; }
.gift { position: absolute; left: -14px; bottom: -10px; font-size: 38px; animation: wiggle 1.5s ease-in-out infinite reverse; }
@keyframes wiggle { 0%,100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(12deg) scale(1.12); } }

/* Page 4 */
.scene.bed { width: 280px; max-width: 90%; animation: bob 3s ease-in-out infinite; }
.zzz { position: absolute; right: 8px; top: -18px; font-size: 22px; font-weight: 700; color: #7a5a3a; opacity: 0; animation: rise 3s ease-in infinite; }
.zzz.two { right: 26px; animation-delay: 1.5s; font-size: 16px; }

/* ---------- Phone tuning ---------- */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
.btn, .day, .picker-toggle { touch-action: manipulation; }
.no { user-select: none; -webkit-user-select: none; }
@media (max-width: 420px) {
  body { padding: 12px; }
  .card { padding: 26px 18px; border-radius: 20px; }
  h1 { font-size: 24px; margin-bottom: 18px; }
  .sub { font-size: 13px; }
  .scene.coco { width: 140px; }
  .bouquet { font-size: 50px; left: -18px; }
  .scene.mochi, .scene.bed { width: 100%; max-width: 280px; }
  .scene { width: 170px; }
  .btn { font-size: 16px; padding: 12px 26px; }
  .next { margin-top: 18px; }
  .calendar { padding: 10px; }
  .day { font-size: 13px; }
}
@media (max-height: 680px) {
  .scene.coco { width: 120px; }
  .scene { margin-bottom: 12px; }
  .scene.mochi, .scene.bed { max-width: 230px; }
}
