:root {
  --pink: #ff5fa2;
  --pink-soft: #ffe0ee;
  --purple: #9b5de5;
  --purple-soft: #efe3ff;
  --blue: #2fa4f5;
  --blue-soft: #dff1ff;
  --yellow: #ffc94d;
  --green: #2ec4a6;
  --orange: #ff8a3d;
  --ink: #3d2350;
  --muted: #7d6a8c;
  --card: #ffffffee;
  --radius: 22px;
  --shadow: 0 10px 30px -12px rgba(155, 93, 229, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #ffd6e8 0, transparent 45%),
    radial-gradient(circle at 100% 30%, #dcd0ff 0, transparent 45%),
    radial-gradient(circle at 0% 80%, #cdeeff 0, transparent 45%),
    linear-gradient(180deg, #fff5fa 0%, #f6f0ff 50%, #eef8ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Baloo 2', 'Nunito', sans-serif; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: 1.5rem; }
img { max-width: 100%; display: block; }
a { color: var(--purple); }

main { max-width: 560px; margin: 0 auto; padding: 20px 16px 120px; position: relative; z-index: 1; }

/* ---- Floating decorations ---- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fly { position: absolute; font-size: 28px; opacity: .85; animation: float 9s ease-in-out infinite; }
.b1 { top: 8%; left: 6%; }
.b2 { top: 22%; right: 8%; animation-delay: -2s; font-size: 22px; }
.b3 { top: 55%; left: 3%; animation-delay: -4s; font-size: 34px; }
.b4 { top: 70%; right: 5%; animation-delay: -6s; }
.b5 { top: 38%; right: 2%; animation-delay: -1s; font-size: 30px; }
.b6 { top: 88%; left: 12%; animation-delay: -3s; font-size: 20px; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(12px, -26px) rotate(8deg); }
}

/* ---- Hero ---- */
.hero { text-align: center; padding-top: 8px; }
.greeting {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 18px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: pop .6s cubic-bezier(.3, 1.6, .6, 1) both;
}
.title { margin: 0; font-weight: 800; }
.title .t1 { display: block; font-size: 1.6rem; color: var(--purple); letter-spacing: .5px; }
.title .t2 {
  display: block;
  font-size: clamp(3.2rem, 15vw, 4.6rem);
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
  line-height: 1.05;
}
@keyframes shine { to { background-position: 200% center; } }
.age-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 92px; height: 92px; margin: 10px auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 19%), linear-gradient(135deg, var(--yellow), var(--orange));
  color: #fff; font-weight: 700; font-family: 'Baloo 2', sans-serif;
  box-shadow: 0 8px 20px -6px rgba(255, 138, 61, .6);
  animation: bob 3s ease-in-out infinite;
}
.age-badge .age { font-size: 2.8rem; line-height: .9; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(4deg); } }
.hero-img { margin: 0; border-radius: 28px; overflow: hidden; border: 6px solid #fff; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.hero-img img { width: 100%; height: auto; }
.invite { font-size: 1.1rem; margin: 18px 4px 0; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-top: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.muted { color: var(--muted); margin-top: -4px; }
.note { font-size: .85rem; color: var(--muted); font-style: italic; margin: 12px 0 0; text-align: center; }

.info { border-top: 6px solid var(--pink); }
.info-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.info-list li { display: flex; gap: 12px; align-items: center; }
.info-list b { display: block; font-size: 1.1rem; }
.info-list small { color: var(--muted); font-size: .9rem; }
.ico { flex: none; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; }
.ico-pink { background: var(--pink-soft); }
.ico-purple { background: var(--purple-soft); }
.ico-blue { background: var(--blue-soft); }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 140px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px;
  border: 0; border-radius: 999px;
  font: 700 1rem 'Nunito', sans-serif; color: #fff; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn-pink { background: linear-gradient(90deg, var(--pink), #ff7eb6); box-shadow: 0 6px 16px -6px var(--pink); }
.btn-purple { background: linear-gradient(90deg, var(--purple), #b388ff); box-shadow: 0 6px 16px -6px var(--purple); }
.btn-blue { background: linear-gradient(90deg, var(--blue), #5cc8ff); box-shadow: 0 6px 16px -6px var(--blue); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---- Countdown ---- */
.countdown { text-align: center; border-top: 6px solid var(--purple); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd { border-radius: 18px; padding: 10px 4px; color: #fff; }
.cd b { display: block; font-family: 'Baloo 2', sans-serif; font-size: 2rem; line-height: 1.1; }
.cd span { font-size: .8rem; font-weight: 700; opacity: .95; }
.c1 { background: linear-gradient(160deg, #ff7eb6, var(--pink)); }
.c2 { background: linear-gradient(160deg, #ffb36b, var(--orange)); }
.c3 { background: linear-gradient(160deg, #5fe0c4, var(--green)); }
.c4 { background: linear-gradient(160deg, #6fc3ff, var(--blue)); }
.cd-done { font-weight: 700; font-size: 1.2rem; }

/* ---- Menu ---- */
.menu { border-top: 6px solid var(--orange); }
.combo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.combo { border-radius: 18px; overflow: hidden; background: #fff; border: 3px solid transparent; }
.combo-joy { border-color: var(--yellow); }
.combo-wow { border-color: var(--orange); }
.combo img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; }
.combo h3 { font-size: 1.15rem; margin: 10px 10px 4px; color: var(--orange); }
.combo ul { list-style: none; margin: 0 10px 12px; padding: 0; font-size: .92rem; }

/* ---- Reminder ---- */
.reminder {
  text-align: center;
  background: linear-gradient(135deg, #fff0f7, #f3ecff 50%, #e9f6ff);
  border: 3px dashed var(--pink);
}
.reminder .big { font-size: 1.15rem; margin-top: 0; }
.contact a { font-weight: 700; }
.foot { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 28px; }

/* ---- Floating button ---- */
.fab {
  position: fixed; z-index: 20;
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  min-height: 56px; padding: 0 28px;
  border: 3px solid #fff; border-radius: 999px;
  font: 800 1.1rem 'Baloo 2', sans-serif; color: #fff; white-space: nowrap; cursor: pointer;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  background-size: 200% auto;
  box-shadow: 0 10px 25px -6px rgba(255, 95, 162, .7);
  animation: shine 4s linear infinite, pulse 2.2s ease-in-out infinite;
}
.fab.done { background: linear-gradient(90deg, var(--green), #46d6ff); box-shadow: 0 10px 25px -6px rgba(46, 196, 166, .7); animation: none; }
@keyframes pulse { 50% { box-shadow: 0 10px 35px -2px rgba(155, 93, 229, .8); } }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(61, 35, 80, .45); animation: fade .2s; }
.modal-box {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 28px 28px 0 0;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom));
  animation: up .3s cubic-bezier(.2, 1.2, .4, 1);
}
@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-box { border-radius: 28px; }
}
.modal-x {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--pink-soft); color: var(--pink);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.who { margin-top: -6px; }
.choice { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.choice[hidden] { display: none; }
.choice legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pill, .combo-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 16px; border: 3px solid #eee;
  cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s;
}
.pill input, .combo-opt input { accent-color: var(--pink); width: 20px; height: 20px; flex: none; }
.pill-yes:has(input:checked) { border-color: var(--green); background: #e4fbf5; }
.pill-no:has(input:checked) { border-color: var(--muted); background: #f4f0f7; }
.combo-opt img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.combo-opt span { display: flex; flex-direction: column; }
.combo-opt small { color: var(--muted); font-weight: 400; }
.combo-opt:has(input:checked) { border-color: var(--orange); background: #fff4ea; }
.note-field { display: grid; gap: 6px; font-weight: 700; margin-bottom: 10px; }
.note-field textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 14px;
  border: 2px solid #eee; resize: vertical;
}
.note-field textarea:focus { outline: none; border-color: var(--purple); }
.form-error { color: #d63031; font-weight: 700; min-height: 1.2em; margin: 4px 0 10px; }
[data-view="done"], [data-view="message"] { text-align: center; }
.done-emoji { font-size: 56px; animation: pop .6s cubic-bezier(.3, 1.6, .6, 1) both; }
.done-info { background: var(--purple-soft); border-radius: 16px; padding: 10px 14px; margin: 14px 0; }
.done-info p { margin: 4px 0; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
