/* =========================================================
   Lalyn's 6th Birthday — "Dreamy Sky" (design 1a)
   Pastel gradient · clouds · rainbow arc · Fredoka + Mali
   Theme is driven by CSS variables → easy to reskin.
   ========================================================= */
:root {
  --bg: linear-gradient(180deg,#fde5ee 0%,#f8dcee 26%,#ecdcf6 52%,#dcecfb 78%,#cfeaf8 100%);
  --accent:      #f38ab7;
  --accent2:     #7cc4ef;
  --ink:         #6b4a63;
  --muted:       #a98aa0;
  --card:        rgba(255,255,255,0.8);
  --card-border: rgba(255,255,255,0.95);
  --field-bg:    #ffffff;
  --radius:      26px;
  --deco-op:     0.95;
  --display: 'Fredoka', system-ui, sans-serif;
  --body: 'Mali', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: #f4eef4;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.muted { color: var(--muted); }
.req { color: var(--accent); }

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

/* ---------- phone frame ---------- */
.frame {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
@media (min-width: 500px) {
  body { padding: 24px 0; }
  .frame {
    min-height: auto;
    margin: 24px auto;
    border-radius: 34px;
    box-shadow: 0 24px 60px rgba(150,120,160,.22);
  }
}

/* ---------- decorations ---------- */
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cloud {
  position: absolute;
  width: 84px; height: 30px;
  background: #fff; border-radius: 30px;
  opacity: var(--deco-op);
  box-shadow: 0 10px 22px rgba(150,120,160,.14);
  animation: floaty 8s ease-in-out infinite;
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; background: #fff; border-radius: 50%;
}
.cloud::before { width: 44px; height: 44px; top: -22px; left: 10px; }
.cloud::after  { width: 32px; height: 32px; top: -14px; left: 44px; }
.cloud--1 { top: 70px;  left: -10px; transform: scale(.8);  animation-duration: 7s; }
.cloud--2 { top: 150px; right: -6px; transform: scale(1);   animation-duration: 9s; animation-delay: -2s; }
.cloud--3 { bottom: 120px; left: 14px; transform: scale(.62); animation-duration: 8s; animation-delay: -4s; }

/* ---------- views ---------- */
.view { position: relative; z-index: 1; }
.view[hidden] { display: none; }

/* ---------- hero ---------- */
.hero { padding: 30px 24px 12px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  font-size: 36px; line-height: 1.05; color: var(--accent);
}
.hero__name { display: block; color: var(--ink); }
.eyebrow .th { display: block; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 500; color: var(--muted); }

.hero__crest {
  position: relative; min-height: 150px;
  display: flex; justify-content: center; align-items: flex-end;
}
.rainbow { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 230px; height: 120px; overflow: hidden; }
.rainbow__band { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border-radius: 50%; border-style: solid; border-width: 15px; }
.rainbow__band:nth-child(1) { width: 230px; height: 230px; border-color: #ff9ac0; }
.rainbow__band:nth-child(2) { width: 200px; height: 200px; border-color: #ffbe86; }
.rainbow__band:nth-child(3) { width: 170px; height: 170px; border-color: #ffe08a; }
.rainbow__band:nth-child(4) { width: 140px; height: 140px; border-color: #9fe0b0; }
.rainbow__band:nth-child(5) { width: 110px; height: 110px; border-color: #8fc6f2; }
.hero__uni { position: absolute; right: 30px; top: -2px; font-size: 36px; z-index: 2; animation: floaty 5s ease-in-out infinite; }
.hero__bow { position: absolute; left: 24px; top: 64px; font-size: 24px; z-index: 2; animation: floaty 6s ease-in-out infinite; animation-delay: -1.5s; }
.age-badge {
  position: relative; z-index: 2;
  width: 88px; height: 88px; border-radius: 50%;
  background: #fff; border: 3px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(150,120,160,.22);
  font-family: var(--display); font-weight: 700; font-size: 52px; color: var(--accent); line-height: 1;
}

.hero__title { margin: 14px 0 2px; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--ink); }
.hero__turning { margin: 0 0 2px; font-family: var(--display); font-weight: 500; font-size: 18px; color: var(--accent); }
.hero__sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.chips { display: flex; justify-content: center; gap: 10px; margin: 16px 0 4px; flex-wrap: wrap; }
.chip { background: var(--card); border: 2px solid var(--card-border); border-radius: 16px; padding: 9px 14px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink); }

.hero__gift { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--display); font-weight: 600; cursor: pointer; border: none;
  border-radius: 999px; transition: transform .1s ease, filter .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  margin: 14px 0 6px; padding: 14px 30px; font-size: 16px;
  background: var(--accent); color: #fff;
  box-shadow: 0 8px 18px rgba(200,120,160,.28);
}
.btn--primary:hover { filter: brightness(1.04); }
.btn--full { width: 100%; margin: 4px 0 0; padding: 15px; font-size: 17px; }
.btn--soft { margin-top: 20px; padding: 12px 26px; font-size: 14px; background: var(--accent); color: #fff; }

/* ---------- details ---------- */
.details { padding: 18px 22px 6px; display: flex; flex-direction: column; gap: 12px; }
.info { background: var(--card); border: 2px solid var(--card-border); border-radius: var(--radius); padding: 15px 17px; display: flex; gap: 14px; align-items: flex-start; }
.info__icon { font-size: 26px; line-height: 1; }
.info h3 { margin: 0 0 3px; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); }
.info p { margin: 0; font-size: 14px; }
.info p.muted { margin-top: 2px; font-size: 13px; }
.info__link { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.info__link:hover { opacity: .85; }

/* ---------- form ---------- */
.formwrap { padding: 26px 22px 34px; }
.back { background: none; border: none; cursor: pointer; font-family: var(--body); font-size: 14px; color: var(--accent); padding: 0 0 12px; }
.formwrap__title { margin: 0 0 4px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--ink); }
.formwrap__lead { margin: 0 0 16px; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.4; }
#rsvpForm { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--ink); }
.field > .field__label { font-weight: 500; font-size: 13px; }
.field input {
  font-family: var(--body); font-size: 14.5px; padding: 11px 13px;
  border: 2px solid var(--card-border); border-radius: 13px;
  background: var(--field-bg); color: var(--ink); outline: none; width: 100%;
}
.field input:focus { border-color: var(--accent); }
input::placeholder { color: #c9b5c4; }

.hi { margin: 0; padding: 13px 15px; background: rgba(255,255,255,.55); border: 2px solid var(--card-border); border-radius: 14px; font-size: 15px; color: var(--ink); }
.hi strong { font-family: var(--display); color: var(--accent); }

.attend { display: flex; flex-direction: column; gap: 9px; }
.attend__opt {
  position: relative; text-align: left; padding: 13px 15px;
  border: 2px solid var(--card-border); background: var(--field-bg); border-radius: 14px;
  cursor: pointer; font-family: var(--body); font-size: 14px; color: var(--ink);
}
.attend__opt.is-on { border-color: var(--accent); background: rgba(243,138,183,.08); }

.pizzas { display: flex; flex-direction: column; gap: 8px; }
.pizzas__hint { font-size: 12px; line-height: 1.35; }
.pizza-scroll { max-height: 460px; overflow-y: auto; margin-top: 4px; padding: 4px; border: 2px solid var(--card-border); border-radius: 18px; background: rgba(255,255,255,.35); }
.pizza-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pizza-card {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0;
  border: 2px solid var(--card-border); background: #fff; border-radius: 15px;
  overflow: hidden; cursor: pointer; font-family: inherit; color: var(--ink);
}
.pizza-card input { position: absolute; opacity: 0; pointer-events: none; }
.pizza-card__media { position: relative; display: block; aspect-ratio: 1/1; background: #f3ecf0; }
.pizza-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pizza-card__badge { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 600; padding: 3px 7px; border-radius: 999px; font-family: var(--display); }
.pizza-card__body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 2px; }
.pizza-card__name { font-family: var(--display); font-weight: 600; font-size: 12.5px; line-height: 1.15; }
.pizza-card__desc { font-size: 10px; color: var(--muted); line-height: 1.25; }
.pizza-card__check {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; opacity: 0; transform: scale(.6); transition: .12s;
}
.pizza-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pizza-card:has(input:checked) .pizza-card__check { opacity: 1; transform: scale(1); }

.error { margin: 0; padding: 11px 14px; background: #ffe6ef; color: #d1477f; border-radius: 12px; font-size: 13px; text-align: center; }

/* ---------- thank you ---------- */
.thanks { padding: 56px 22px 40px; display: flex; flex-direction: column; justify-content: center; min-height: 560px; }
.thanks__card { text-align: center; background: var(--card); border: 2px solid var(--card-border); border-radius: var(--radius); padding: 26px 22px; }
.thanks__emoji { font-size: 48px; line-height: 1; }
.thanks__card h3 { margin: 10px 0 4px; font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); }
.thanks__card p { margin: 0 0 3px; font-size: 14px; }
.thanks__card p.muted { margin-bottom: 16px; font-size: 13px; }
.thanks__summary { display: flex; flex-direction: column; gap: 8px; text-align: left; max-width: 280px; margin: 0 auto; }
.sumrow { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 8px; border-bottom: 1px dashed var(--card-border); }
.sumrow span { color: var(--muted); }
.sumrow strong { color: var(--ink); text-align: right; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; text-align: center; padding: 22px 22px 30px; color: var(--muted); font-size: 13px; }
.footer p { margin: 0; }
.footer p + p { margin-top: 2px; }
