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

:root {
  --pink:   #ff8fb7;
  --pink-d: #ff5e98;
  --cream:  #fff6fb;
  --ink:    #6b4a59;
  --soft:   #ffe3ef;
  --yellow: #ffd86b;
}

html, body { height: 100%; }

body {
  min-height: 100%;
  font-family: "Quicksand", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #ffe6f1 0%, #ffd9ec 35%, #f3dcff 70%, #e7e0ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ───────────────────────── card ───────────────────────── */
.card {
  position: relative;
  width: min(560px, 94vw);
  background: var(--cream);
  border-radius: 32px;
  padding: 46px 30px 40px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(255, 94, 152, 0.28),
              0 4px 0 #ffd0e3 inset;
  border: 3px solid #ffe0ee;
  z-index: 2;
  overflow: hidden;
}

/* screens swap in/out */
.screen { display: none; animation: pop 0.45s cubic-bezier(.18,.89,.32,1.28); }
.screen.is-active { display: block; }

@keyframes pop {
  0%   { opacity: 0; transform: scale(.86) translateY(10px); }
  100% { opacity: 1; transform: scale(1)   translateY(0); }
}

/* ───────────────────────── text ───────────────────────── */
h1 {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: clamp(1.55rem, 5.4vw, 2.3rem);
  line-height: 1.15;
  color: var(--pink-d);
  margin-bottom: 8px;
  text-shadow: 0 2px 0 #fff;
}
.sub  { font-size: clamp(1rem, 3.4vw, 1.15rem); font-weight: 600; opacity: .85; }
.big  { font-family: "Baloo 2", cursive; font-weight: 700; font-size: clamp(1.2rem,4.4vw,1.55rem); color: var(--pink-d); margin: 4px 0 6px; }
.hurray { font-size: clamp(2.4rem, 9vw, 3.6rem); animation: wobble 1s ease-in-out infinite; }

/* ───────────────────────── characters ───────────────────────── */
.duo {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 14px;
}
.char { width: clamp(82px, 26vw, 120px); height: auto; filter: drop-shadow(0 8px 10px rgba(255,94,152,.25)); }
.char-a { transform: rotate(-6deg); }
.char-b { transform: rotate(6deg); }
.duo-hug { gap: 0; }
.duo-hug .char-a { margin-right: -14px; z-index: 2; }

.peek   { animation: peek 2.6s ease-in-out infinite; }
.wiggle { animation: wiggle 1.4s ease-in-out infinite; }
.bounce { animation: bounce 1s ease-in-out infinite; }
.char-b.peek   { animation-delay: .35s; }
.char-b.wiggle { animation-delay: .2s; }
.char-b.bounce { animation-delay: .15s; }

@keyframes peek   { 0%,100%{ transform: translateY(0) rotate(-6deg);} 50%{ transform: translateY(-9px) rotate(-6deg);} }
@keyframes wiggle { 0%,100%{ transform: rotate(-8deg);} 50%{ transform: rotate(8deg);} }
@keyframes bounce { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }
@keyframes wobble { 0%,100%{ transform: rotate(-4deg);} 50%{ transform: rotate(4deg);} }

/* ───────────────────────── buttons ───────────────────────── */
.btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 26px;
  flex-wrap: wrap;
}
.btn-col { flex-direction: column; }
.btn-col .btn { width: min(280px, 80%); }

.btn {
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: clamp(1rem, 4vw, 1.2rem);
  color: #fff;
  background: var(--pink);
  border: none;
  border-radius: 999px;
  padding: 14px 30px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--pink-d), 0 12px 18px rgba(255,94,152,.3);
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
  user-select: none;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--pink-d), 0 6px 10px rgba(255,94,152,.3); }

.btn-yes {
  background: linear-gradient(180deg, #ffe07a, #ffc23d);
  color: #8a5a00;
  box-shadow: 0 6px 0 #e9a521, 0 12px 18px rgba(233,165,33,.35);
  font-size: clamp(1.05rem, 4.4vw, 1.35rem);
  padding: 16px 38px;
}
.btn-yes:hover  { transform: scale(1.06) translateY(-2px); }
.btn-yes:active { box-shadow: 0 2px 0 #e9a521, 0 6px 10px rgba(233,165,33,.35); }

.btn-soft {
  background: #ffd9e9;
  color: var(--pink-d);
  box-shadow: 0 6px 0 #ffbcd7, 0 12px 18px rgba(255,94,152,.2);
}
.btn-replay {
  margin-top: 22px;
  font-size: .95rem;
  padding: 10px 22px;
}

/* the runaway NO button */
.btn-no {
  background: #d7d2e0;
  color: #7c768a;
  box-shadow: 0 6px 0 #b8b1c7, 0 12px 18px rgba(0,0,0,.12);
}
.btn-no.runaway {
  position: fixed;
  z-index: 999;
  margin: 0;
  transition: top .35s cubic-bezier(.34,1.56,.64,1), left .35s cubic-bezier(.34,1.56,.64,1);
}

/* ───────────────────────── cute calendar ───────────────────────── */
.calendar {
  margin: 18px auto 6px;
  width: min(360px, 92%);
  background: #fff;
  border: 3px solid #ffe0ee;
  border-radius: 24px;
  padding: 14px 14px 16px;
  box-shadow: 0 12px 26px rgba(255,94,152,.18);
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-title {
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--pink-d);
}
.cal-nav {
  font-family: "Baloo 2", cursive;
  font-size: 1.3rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #ffd9e9;
  color: var(--pink-d);
  cursor: pointer;
  box-shadow: 0 4px 0 #ffbcd7;
  transition: transform .12s ease, opacity .15s ease;
}
.cal-nav:active { transform: translateY(3px); box-shadow: 0 1px 0 #ffbcd7; }
.cal-nav:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  margin-bottom: 6px;
}
.cal-dow span {
  font-weight: 700;
  font-size: .8rem;
  color: #c79ab0;
  text-align: center;
  padding: 2px 0;
}

.day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: "Baloo 2", cursive;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  background: #fff4f9;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, color .15s ease;
}
.day:hover:not(:disabled):not(.is-selected) { background: #ffe0ee; transform: scale(1.08); }
.day.is-empty { background: transparent; pointer-events: none; }
.day:disabled {
  color: #d8c7d0;
  background: #faf3f6;
  cursor: not-allowed;
  text-decoration: line-through;
}
.day.is-today::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-d);
}
.day.is-selected {
  background: linear-gradient(180deg, #ff8fb7, #ff5e98);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(255,94,152,.45);
}
.day.is-selected::before {
  content: "💖";
  position: absolute;
  top: -10px;
  right: -6px;
  font-size: .85rem;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.15));
}

.cal-picked {
  min-height: 1.4em;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pink-d);
  margin: 8px 0 4px;
}
#btn-date-confirm:disabled {
  filter: grayscale(.35);
  opacity: .65;
  cursor: not-allowed;
  font-size: 1rem;
}

/* ───────────────────────── toast bubble ───────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 30px);
  background: #fff;
  color: var(--pink-d);
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  padding: 14px 24px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(255,94,152,.35);
  border: 3px solid #ffd9e9;
  opacity: 0;
  pointer-events: none;
  z-index: 3000;
  max-width: 90vw;
}
.toast.show { animation: toastPop 2.4s ease forwards; }
@keyframes toastPop {
  0%   { opacity: 0; transform: translate(-50%, 30px) scale(.9); }
  12%  { opacity: 1; transform: translate(-50%, 0)    scale(1); }
  82%  { opacity: 1; transform: translate(-50%, 0)    scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(.96); }
}

/* ───────────────────────── WhatsApp share ───────────────────────── */
.share-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  background: linear-gradient(180deg, #ff9ec1, #ff6fa1);
  border: 3px solid #fff;
  border-radius: 999px;
  padding: 10px 16px 10px 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255,94,152,.4);
  transition: transform .12s ease;
}
.share-fab:hover  { transform: translateY(-2px) scale(1.03); }
.share-fab:active { transform: translateY(1px); }
.share-fab-emoji  { font-size: 1.2rem; }

.share-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(120, 60, 90, .35);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.share-modal {
  position: fixed;
  z-index: 1500;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--cream);
  border: 3px solid #ffe0ee;
  border-radius: 28px;
  padding: 26px 22px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(255,94,152,.4);
  animation: pop .35s cubic-bezier(.18,.89,.32,1.28);
}
.share-modal[hidden], .share-backdrop[hidden] { display: none; }

.share-close {
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 1.7rem;
  line-height: 1;
  background: none;
  border: none;
  color: #d79ab0;
  cursor: pointer;
}
.share-duo { display: flex; justify-content: center; gap: 2px; margin-bottom: 4px; }
.share-duo img { width: 58px; height: auto; }
.share-modal h2 {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--pink-d);
}
.share-sub { font-size: .95rem; font-weight: 600; opacity: .85; margin: 6px 6px 14px; }

.wa-input {
  width: 100%;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  color: var(--ink);
  background: #fff;
  border: 2.5px solid #ffd0e3;
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s ease;
}
.wa-input:focus { border-color: var(--pink-d); }
.wa-hint { font-size: .8rem; opacity: .72; margin: 8px 0 16px; }

.btn-wa {
  width: 100%;
  background: linear-gradient(180deg, #4be07a, #22bd55);
  color: #fff;
  box-shadow: 0 6px 0 #1aa648, 0 12px 18px rgba(34,189,85,.35);
}
.btn-wa:active { box-shadow: 0 2px 0 #1aa648, 0 6px 10px rgba(34,189,85,.35); }

.share-or {
  display: flex;
  align-items: center;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: #c79ab0;
  margin: 16px 0 12px;
}
.share-or::before, .share-or::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #ffe0ee;
}
.share-or span { padding: 0 12px; }

.btn-email {
  width: 100%;
  margin-top: 4px;
  background: linear-gradient(180deg, #b79cff, #8e6bff);
  color: #fff;
  box-shadow: 0 6px 0 #7355db, 0 12px 18px rgba(142,107,255,.35);
}
.btn-email:active { box-shadow: 0 2px 0 #7355db, 0 6px 10px rgba(142,107,255,.35); }

@media (max-width: 420px) {
  .share-fab-text { display: none; }
  .share-fab { padding: 12px; }
  .share-fab-emoji { font-size: 1.35rem; }
}

/* ───────────────────────── floating bg hearts ───────────────────────── */
.floating-hearts { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.floating-hearts span {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: .7;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  10%  { opacity: .7; }
  100% { transform: translateY(-112vh) rotate(360deg); opacity: 0; }
}

/* ───────────────────────── confetti / heart rain ───────────────────────── */
.confetti-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.confetti-layer span {
  position: absolute;
  top: -30px;
  font-size: 20px;
  animation: fall linear forwards;
}
@keyframes fall {
  0%   { transform: translateY(-30px) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: .9; }
}

/* gentle screen flourish */
.screen-final h1 { margin-top: 4px; }

@media (max-width: 380px) {
  .card { padding: 36px 20px 32px; border-radius: 26px; }
  .btn  { padding: 13px 24px; }
}

/* respect folks who dislike motion */
@media (prefers-reduced-motion: reduce) {
  .peek, .wiggle, .bounce, .hurray, .floating-hearts span { animation: none !important; }
}
