/* ============================================================
   Envite – guest invitation page
   Colours come from the host's chosen pastel palette:
   --c-base (header) · --c-soft (page tint) · --c-accent · --c-deep
   ============================================================ */
body.inv { background: var(--c-soft); }
.inv-wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 120px; }

/* ---------- Hero ---------- */
.inv-hero {
  position: relative; overflow: hidden; text-align: center;
  background: var(--c-base); border-radius: 30px; padding: 0 24px 76px;
  box-shadow: 0 18px 40px -22px var(--c-deep);
}
.inv-hero > * { position: relative; z-index: 1; }
.inv-hero .bunting { margin: 0 auto 4px; }
.inv-hero .hero-ico { width: 110px; height: 110px; margin: 4px auto 0; display: block; }
.inv-hero .deco { position: absolute; z-index: 0; }
.inv-hero .deco.l { left: 3%; top: 64px; }
.inv-hero .deco.r { right: 4%; top: 84px; }
.inv-hero .hand { color: var(--c-deep); font-size: 1.9rem; margin-top: 4px; }
.inv-hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 auto 6px; max-width: 520px; color: var(--ink); }
.inv-hero .turning { font-weight: 700; color: var(--c-deep); display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 18px; }
.inv-hero .age {
  font-family: var(--head); font-weight: 800; font-size: 2.6rem; color: var(--c-accent);
  width: 82px; height: 82px; line-height: 90px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 6px rgba(255,255,255,.5);
}
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.75);
  padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink);
}
.chip .doodle { width: 22px; height: 22px; }
.chip.count { background: var(--c-accent); color: #fff; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.inv-hero .clouds { position: absolute; left: 0; bottom: 0; height: 42px; }

/* ---------- Buttons tinted by palette ---------- */
.inv .btn { background: var(--c-accent); border-radius: 999px; }
.inv .btn:hover { background: var(--c-deep); }
.inv .btn.secondary { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.inv .btn.secondary:hover { background: var(--ink); color: #fff; }
.inv .btn.soft { background: #fff; color: var(--c-deep); border: 2px solid var(--c-base); }
.inv .btn.soft:hover { background: var(--c-base); }
.inv .btn.block { display: block; width: 100%; text-align: center; padding: 15px; font-size: 1rem; }
.inv a { color: var(--c-accent); }

/* ---------- Cards ---------- */
.inv-card {
  background: #fff; border-radius: 24px; padding: 26px; margin-top: 18px;
  box-shadow: 0 6px 24px -14px rgba(22,22,22,.25);
}
.inv-card h2 { font-size: 1.5rem; margin-bottom: 4px; }
.inv-card .sub { color: var(--muted); margin: 0 0 16px; }
.eyebrow { font-family: var(--hand); font-size: 1.5rem; color: var(--c-accent); line-height: 1; }

/* message */
.message { position: relative; text-align: center; padding: 30px 26px 24px; }
.message p { font-size: 1.15rem; line-height: 1.6; margin: 0 0 10px; color: var(--text); }
.message .sig { font-family: var(--hand); font-size: 1.6rem; color: var(--c-deep); }
.message .q { position: absolute; font-family: var(--head); font-size: 5rem; line-height: 1; color: var(--c-base); }
.message .q.o { left: 14px; top: 0; }
.message .q.c { right: 14px; bottom: -30px; }

/* detail rows */
.rows { margin-top: 6px; }
.drow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.drow:first-child { border-top: none; }
.drow .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--c-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.drow .ic .doodle { width: 36px; height: 36px; }
.drow .txt { flex: 1; min-width: 0; }
.drow .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; }
.drow .v { font-weight: 700; color: var(--ink); }
.drow .s { color: var(--muted); font-size: .92rem; }
.drow .act { flex: none; }
.drow .act .btn { padding: 7px 14px; font-size: .74rem; }

.good { display: grid; gap: 10px; margin-top: 14px; }
.good .g { display: flex; gap: 12px; align-items: center; background: var(--c-soft); border-radius: 16px; padding: 12px 14px; }
.good .g .doodle { width: 34px; height: 34px; }

/* ---------- RSVP ---------- */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 4px; }
.choice { margin: 0; cursor: pointer; text-align: center; border: 2px solid var(--line); border-radius: 18px; padding: 14px 6px 12px; font-weight: 700; background: #fff; transition: all .15s; }
.choice input { display: none; }
.choice .doodle { width: 44px; height: 44px; display: block; margin: 0 auto 6px; }
.choice small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
.choice:hover { border-color: var(--c-base); }
.choice:has(input:checked) { border-color: var(--c-accent); background: var(--c-soft); box-shadow: 0 0 0 3px var(--c-base); }

.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stepper { display: flex; align-items: center; justify-content: space-between; border: 2px solid var(--line); border-radius: 14px; padding: 6px; background: #fafafa; }
.stepper button {
  width: 40px; height: 40px; border-radius: 10px; border: none; cursor: pointer; font-size: 1.3rem; font-weight: 700;
  background: #fff; color: var(--c-deep); box-shadow: 0 1px 0 var(--line);
}
.stepper button:hover { background: var(--c-base); }
.stepper output { font-family: var(--head); font-size: 1.4rem; font-weight: 800; }
.inv input:focus, .inv textarea:focus { border-color: var(--c-accent); }
.deadline { font-size: .88rem; color: var(--muted); text-align: center; margin: 12px 0 0; }

.done { text-align: center; }
.done .doodle { width: 90px; height: 90px; display: block; margin: 0 auto 6px; }
.done .summary { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 16px; }

/* ---------- Gifts ---------- */
.progress { height: 10px; background: var(--c-soft); border-radius: 999px; overflow: hidden; margin: 4px 0 6px; }
.progress span { display: block; height: 100%; background: var(--c-accent); border-radius: 999px; transition: width .4s; }
.prog-lbl { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.gcard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); margin-bottom: 10px; }
.gcard .gi { width: 48px; height: 48px; border-radius: 14px; background: var(--c-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.gcard .gi .doodle { width: 32px; height: 32px; }
.gcard .gt { flex: 1; min-width: 0; }
.gcard .gn { font-weight: 700; color: var(--ink); }
.gcard .gm { font-size: .85rem; color: var(--muted); }
.gcard.taken { opacity: .55; }
.gcard.taken .gn { text-decoration: line-through; }
.gcard.mine { border-color: var(--c-accent); background: var(--c-soft); }
.gcard .btn { padding: 9px 16px; font-size: .75rem; white-space: nowrap; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #f1f1f1; color: var(--muted); white-space: nowrap; }
.tag.mine { background: var(--c-base); color: var(--c-deep); }

.center-ill { text-align: center; }
.center-ill .doodle { width: 84px; height: 84px; display: block; margin: 0 auto 6px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(22,22,22,.45); display: none; align-items: flex-end; justify-content: center; z-index: 50; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 24px; padding: 26px; width: 100%; max-width: 440px; text-align: center; animation: up .25s ease-out; margin-bottom: auto; margin-top: auto; }
.modal .doodle { width: 76px; height: 76px; }
.modal .row2 { display: flex; gap: 10px; margin-top: 16px; }
.modal .row2 .btn { flex: 1; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

/* ---------- Sticky RSVP bar (mobile) ---------- */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  display: none; align-items: center; gap: 12px; z-index: 40; }
.sticky .t { flex: 1; font-weight: 700; font-size: .92rem; }
.sticky .t small { display: block; font-weight: 500; color: var(--muted); }

.made { text-align: center; margin-top: 28px; color: var(--muted); font-size: .9rem; }
.made .wordmark { font-size: 1.3rem; vertical-align: middle; }

@media (max-width: 640px) {
  .inv-hero { padding: 0 16px 70px; border-radius: 24px; }
  .inv-hero .deco { display: none; }
  .inv-card { padding: 20px; }
  .choices { gap: 8px; }
  .choice small { display: none; }
  .sticky.show { display: flex; }
  .drow .act .btn { padding: 7px 10px; }
}
.inv a.btn { color: #fff; }
.inv a.btn.secondary { color: var(--ink); }
.inv a.btn.secondary:hover { color: #fff; }
.inv a.btn.soft { color: var(--c-deep); }
.message .q.c { bottom: -38px; }

.pv-banner { background: var(--ink); color: #fff; text-align: center; font-weight: 600; font-size: .88rem;
  padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; }

/* gift question inside the RSVP form */
.gopts { display: grid; gap: 8px; }
.gopt { margin: 0; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--line);
  border-radius: 14px; cursor: pointer; font-weight: 500; background: #fff; transition: all .15s; }
.gopt input { display: none; }
.gopt .doodle { width: 34px; height: 34px; }
.gopt .gtx { flex: 1; }
.gopt .gtx small { display: block; color: var(--muted); font-size: .82rem; }
.gopt:hover { border-color: var(--c-base); }
.gopt:has(input:checked) { border-color: var(--c-accent); background: var(--c-soft); box-shadow: 0 0 0 3px var(--c-base); }
.gopt.off { opacity: .5; cursor: not-allowed; }
.gopt.off b { text-decoration: line-through; }
.ginfo { display: flex; gap: 12px; align-items: center; margin-top: 16px; background: var(--c-soft); border-radius: 14px; padding: 12px 14px; }
.ginfo .doodle { width: 40px; height: 40px; }

/* Embedded live preview (create page) */
body.embed .pv-banner, body.embed .sticky, body.embed .made { display: none !important; }
body.embed .inv-wrap { padding: 12px 12px 30px; }
body[data-only="cover"] [data-part]:not([data-part="cover"]),
body[data-only="details"] [data-part]:not([data-part="details"]),
body[data-only="form"] [data-part]:not([data-part="form"]) { display: none; }
body[data-only="details"] [data-part="details"]:first-of-type,
body[data-only="form"] #rsvp { margin-top: 0; }

/* Envite logo under the cover (only in the create-page Cover tab) */
.cover-brand { display: none; text-align: center; padding: 34px 0 10px; }
body.embed[data-only="cover"] .cover-brand { display: block; }
.cover-brand .cover-mascot { width: 92px; height: 92px; display: block; margin: 0 auto 4px; }
.cover-brand .wordmark { font-size: 2.4rem; }
.cover-brand .hand { color: var(--c-deep); font-size: 1.5rem; margin-top: 2px; }
.cover-brand { padding: 16px 0 0; }
.cover-brand .cover-mascot { width: 70px; height: 70px; }
.cover-brand .wordmark { font-size: 2rem; }
.cover-brand .hand { font-size: 1.3rem; }
/* Preview banner: soft pastel instead of black, matches the invite colour */
.pv-banner { background: var(--c-base); color: var(--c-deep); border: 2px dashed var(--c-accent); font-weight: 700; }
.cover-brand { padding: 14px 0 26px; }
.cover-brand .cover-mascot { width: 52px; height: 52px; }
.cover-brand .wordmark { font-size: 1.55rem; }
.cover-brand .hand { font-size: 1.1rem; }
.cover-brand { padding: 34px 0 20px; }
.cover-brand .cover-mascot { width: 44px; height: 44px; }
.cover-brand .wordmark { font-size: 1.35rem; }
.cover-brand .hand { font-size: 1rem; }
.cover-brand { padding-top: 54px; } /* +15px on screen (preview is scaled ~0.76) */

.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .85rem; color: var(--muted); margin-top: 16px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--c-accent); flex: none; }

/* iPhone pass */
@media (max-width: 640px) {
  .inv-wrap { padding: 12px 12px calc(110px + env(safe-area-inset-bottom)); }
  .inv-hero h1 { font-size: 1.9rem; }
  .inv-hero .hand { font-size: 1.6rem; }
  .chips { gap: 6px; }
  .chip { font-size: .82rem; padding: 6px 11px; }
  .hero-cta .btn { flex: 1 1 100%; max-width: 320px; }
  .drow { flex-wrap: wrap; }
  .drow .txt { flex: 1 1 calc(100% - 70px); }
  .drow .act { margin-left: 66px; }
  .choice { padding: 12px 4px 10px; font-size: .9rem; }
  .choice .doodle { width: 38px; height: 38px; }
  .gcard { flex-wrap: wrap; }
  .gcard .gt { flex: 1 1 calc(100% - 64px); }
  .gcard > .btn, .gcard > .tag { margin-left: 62px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; margin: 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
  .sticky { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
/* age bubble: true centring (the font's line box sat the number low) */
.inv-hero .age { display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding-top: 0; }
.inv-hero .age::before { content: ""; }
.inv-hero .age { padding-bottom: .1em; box-sizing: border-box; } /* Baloo digits sit ~0.05em low */
/* message text a little lower, away from the opening quote mark (+4px) */
.inv-card.message { padding-top: 34px; }
@media (max-width: 640px) { .inv-card.message { padding-top: 24px; } }
/* Turnstile: only shown when Cloudflare asks the visitor to click */
.ts-box { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.25); display: none; text-align: center; }
.ts-box.show { display: block; }
.ts-box .ts-msg { font-size: .85rem; font-weight: 600; margin: 0 0 8px; }
.ts-box { min-width: 330px; } .ts-box #ts-widget { min-height: 65px; }
/* reserved gifts: readable grey instead of fading the whole card */
.gcard.taken { opacity: 1; background: #fafafa; }
.gcard.taken .gn, .gcard.taken .gm, .gcard.taken .tag { color: #5a6060; }
.gcard.taken .gi { opacity: .6; }
