/* ==========================================================================
   Make My Evite — 2026 design system
   ========================================================================== */
:root {
  --bg: #f7f7fb;
  --bg-elev: #ffffff;
  --ink: #0f1222;
  --ink-soft: #5b5f73;
  --ink-faint: #9aa0b4;
  --line: #ececf3;
  --brand: #6d28d9;
  --brand-2: #db2777;
  --brand-grad: linear-gradient(135deg, #6d28d9 0%, #db2777 100%);
  --ok: #0e9f6e;
  --warn: #d97706;
  --err: #e11d48;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 34, .06), 0 1px 3px rgba(16, 18, 34, .05);
  --shadow: 0 10px 30px rgba(16, 18, 34, .10);
  --shadow-lg: 0 24px 60px rgba(16, 18, 34, .18);
  --maxw: 1180px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The HTML `hidden` attribute must win over layout rules like display:grid/flex. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

/* Lock the page behind open modals so only the dialog scrolls. */
body.modal-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--ink-soft); }

/* ---- Top navigation ---------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
  box-shadow: var(--shadow-sm);
}
.brand .grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .94rem;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover { color: var(--ink); background: #f2f2f8; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, opacity .18s;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px rgba(109, 40, 217, .28); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(109, 40, 217, .36); }
.btn-ghost { background: #f2f2f8; color: var(--ink); }
.btn-ghost:hover { background: #e9e9f2; }
.btn-soft { background: #fff; color: var(--brand); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-soft:hover { border-color: #ddd; }
.btn-sm { padding: 9px 14px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 60px;
}
.hero::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%;
  height: 520px;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(109, 40, 217, .25), transparent 60%),
    radial-gradient(40% 60% at 80% 20%, rgba(219, 39, 119, .22), transparent 60%),
    radial-gradient(50% 60% at 60% 80%, rgba(56, 189, 248, .18), transparent 60%);
  filter: blur(8px);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700; font-size: .8rem;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 20px auto 14px;
  max-width: 16ch;
  font-weight: 850;
}
.hero h1 .grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch; margin: 0 auto 28px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 34px; justify-content: center; flex-wrap: wrap;
  margin-top: 40px; color: var(--ink-soft);
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-size: 1.6rem; color: var(--ink); letter-spacing: -.02em; }

/* ---- Section headers --------------------------------------------------- */
.section { padding: 46px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -.025em; margin: 0; font-weight: 820;
}
.section-head p { margin: 6px 0 0; color: var(--ink-soft); }

/* ---- Filter chips ------------------------------------------------------ */
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 15px;
  font-weight: 650; font-size: .86rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover { border-color: #d7d7e3; color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- Template gallery -------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.tpl-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease;
  display: flex; flex-direction: column;
}
.tpl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* The "art" — generated design preview */
.art {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  overflow: hidden;
  color: #fff;
}
.art .motif {
  font-size: 3.6rem;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25));
  z-index: 2;
  transition: transform .3s ease;
}
.tpl-card:hover .art .motif { transform: scale(1.12) rotate(-4deg); }
.art .frame {
  position: absolute; inset: 14px;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 12px;
  z-index: 2;
  pointer-events: none;
}
.art .ribbon {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(4px);
  padding: 5px 10px; border-radius: 999px;
}
/* decorative pattern layers */
.art .pat { position: absolute; inset: 0; z-index: 1; opacity: .55; }
.pat-confetti {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 2px, transparent 2.5px),
    radial-gradient(circle, rgba(255,255,255,.5) 2px, transparent 2.5px);
  background-size: 26px 26px, 40px 40px;
  background-position: 0 0, 13px 13px;
}
.pat-dots {
  background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.5px, transparent 2px);
  background-size: 18px 18px;
}
.pat-rings {
  background-image: radial-gradient(circle at 50% 50%, transparent 38%, rgba(255,255,255,.35) 39%, transparent 41%);
  background-size: 60px 60px;
}
.pat-waves {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 10px, transparent 10px 20px);
}
.pat-sparkle {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.95) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,255,255,.6) 1.5px, transparent 2px);
  background-size: 34px 34px, 22px 22px;
  background-position: 4px 8px, 18px 24px;
}
/* Real photo layer + legibility scrim + emoji badge */
.art .photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform .5s ease;
}
.tpl-card:hover .art .photo,
.event-card:hover .art .photo { transform: scale(1.07); }
.art .photo.failed { opacity: 0; } /* reveal gradient + pattern fallback */
.art .scrim {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.45) 100%);
}
.art .motif-badge {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  transition: transform .3s ease;
}
.tpl-card:hover .art .motif-badge { transform: scale(1.12) rotate(-6deg); }

.tpl-meta { padding: 13px 15px 15px; }
.tpl-meta h3 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.tpl-meta .cat { margin: 3px 0 0; font-size: .82rem; color: var(--ink-faint); font-weight: 600; }
.tpl-meta .use { margin-top: 11px; }

/* ---- Modal / drawer ---------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 18, 34, .5);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  width: min(880px, 100%);
  /* Definite height (capped to the viewport) so the form pane below can own
     the scroll. Without a definite height the grid row sizes to content and
     the fields get clipped instead of becoming scrollable. */
  height: min(92vh, 700px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: minmax(0, 1fr); /* bind the row to the modal height */
  align-items: stretch;
  animation: pop .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .preview-pane {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 0; /* allow the grid track to bound the scrollable form pane */
}
.modal .preview-pane .art { aspect-ratio: auto; height: 100%; min-height: 360px; }
.modal .form-pane {
  padding: 26px 28px;
  overflow-y: auto;
  overscroll-behavior: contain; /* don't chain scroll to the page behind */
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.modal .form-pane h2 { margin: 0 0 4px; font-size: 1.4rem; letter-spacing: -.02em; }
.modal .form-pane .sub { margin: 0 0 18px; color: var(--ink-soft); font-size: .92rem; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9); cursor: pointer;
  font-size: 18px; color: var(--ink); box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
}
.modal-close:hover { background: #fff; }

/* ---- Forms ------------------------------------------------------------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 7px; color: var(--ink); }
.field .hint { font-weight: 500; color: var(--ink-faint); font-size: .78rem; }
input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fbfbfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .14);
}
textarea { resize: vertical; min-height: 76px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- Feedback / toast -------------------------------------------------- */
.feedback { margin-top: 12px; min-height: 20px; font-size: .9rem; font-weight: 600; }
.feedback.success { color: var(--ok); }
.feedback.error { color: var(--err); }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 14px 20px; border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: all .25s ease;
  z-index: 200; display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); }

/* ---- Dashboard --------------------------------------------------------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.event-card .art { aspect-ratio: 16 / 7; }
.event-card .art .motif { font-size: 2.6rem; }
.event-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-body h3 { margin: 0; font-size: 1.12rem; letter-spacing: -.01em; }
.event-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-soft); }
.event-row .ic { width: 16px; text-align: center; opacity: .8; }
.rsvp-pills { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pill {
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.pill.going { background: #e7f7ef; color: var(--ok); }
.pill.maybe { background: #fff4e5; color: var(--warn); }
.pill.no { background: #fdeaee; color: var(--err); }
.event-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.link-line {
  margin-top: 10px; font-size: .82rem;
  background: #f6f6fb; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; display: flex; align-items: center; gap: 8px;
  color: var(--ink-soft); word-break: break-all;
}
.link-line a { color: var(--brand); font-weight: 700; text-decoration: none; }

.empty {
  grid-column: 1 / -1;
  text-align: center; padding: 50px 20px; color: var(--ink-soft);
  border: 2px dashed var(--line); border-radius: var(--radius);
}
.empty .big { font-size: 2.4rem; }
.more-count { grid-column: 1 / -1; color: var(--ink-faint); font-size: .9rem; margin-top: 6px; }

/* ---- Invite / RSVP page ------------------------------------------------ */
.invite-shell { max-width: 720px; margin: 36px auto; padding: 0 22px; }
.invite-hero {
  border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  position: relative;
}
.invite-hero .art { aspect-ratio: 16 / 8; }
.invite-hero .art .motif { font-size: 4.6rem; }
.invite-card-2026 {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-top: -28px; position: relative; z-index: 2;
}
.invite-card-2026 h1 { margin: 0 0 4px; font-size: 1.8rem; letter-spacing: -.02em; }
.invite-card-2026 .type-badge {
  display: inline-block; font-weight: 700; font-size: .8rem;
  color: var(--brand); background: #f4ecff; padding: 5px 12px; border-radius: 999px;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.detail {
  background: #fafaff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
}
.detail .k { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.detail .v { margin-top: 4px; font-weight: 650; }
.rsvp-summary-2026 {
  display: flex; gap: 10px; margin: 4px 0 22px; flex-wrap: wrap;
}
.rsvp-form-2026 h3 { margin: 0 0 14px; letter-spacing: -.01em; }
.status-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-toggle input { display: none; }
.status-toggle label {
  text-align: center; padding: 12px 6px; border-radius: 12px;
  border: 1.5px solid var(--line); cursor: pointer; font-weight: 700; font-size: .9rem;
  transition: all .15s; margin: 0;
}
.status-toggle input:checked + label.going { border-color: var(--ok); background: #e7f7ef; color: var(--ok); }
.status-toggle input:checked + label.maybe { border-color: var(--warn); background: #fff4e5; color: var(--warn); }
.status-toggle input:checked + label.no { border-color: var(--err); background: #fdeaee; color: var(--err); }

/* ---- Footer ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  padding: 30px 0; margin-top: 30px;
  color: var(--ink-faint); font-size: .88rem;
  text-align: center;
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  justify-content: center; margin-bottom: 14px;
}
.footer-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--brand); }
.footer-copy { color: var(--ink-faint); }

/* ---- Static content pages (Privacy, Terms, About) ---------------------- */
.page { max-width: 760px; margin: 0 auto; }
.page .eyebrow { margin-bottom: 16px; }
.page h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -.03em; line-height: 1.08;
  margin: 0 0 10px; font-weight: 850;
}
.page .page-meta { color: var(--ink-faint); font-size: .9rem; margin: 0 0 28px; }
.page h2 {
  font-size: 1.35rem; letter-spacing: -.02em; font-weight: 800;
  margin: 34px 0 10px;
}
.page h3 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 6px; }
.page p, .page li { color: var(--ink-soft); line-height: 1.7; }
.page p { margin: 0 0 14px; }
.page ul { margin: 0 0 14px; padding-left: 22px; }
.page li { margin: 0 0 8px; }
.page a { color: var(--brand); font-weight: 600; }
.page strong { color: var(--ink); }
.page .card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 24px 8px;
  box-shadow: var(--shadow-sm); margin: 0 0 18px;
}
.page .contact-row { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: 4px 0 0; }

/* ---- Google Sign-In ---------------------------------------------------- */
.auth-area { display: flex; align-items: center; gap: 10px; }
#gsi-button { display: inline-flex; }
.gsi-fallback {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: #3c4043; cursor: pointer;
  border: 1px solid #dadce0; border-radius: 10px;
  padding: 9px 15px; font-weight: 600; font-size: .9rem; font-family: inherit;
}
.gsi-fallback:hover { background: #f8f9fc; box-shadow: var(--shadow-sm); }
.gsi-fallback .g {
  width: 18px; height: 18px; display: inline-block;
  background: conic-gradient(from -45deg, #ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
  -webkit-mask: radial-gradient(circle 4px at center, transparent 98%, #000) center/contain;
  border-radius: 50%;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 6px 5px 12px; box-shadow: var(--shadow-sm);
}
.user-chip .uname { font-weight: 700; font-size: .88rem; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .uavatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; overflow: hidden;
}
.user-chip .uavatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip .signout {
  border: none; background: #f2f2f8; color: var(--ink-soft); cursor: pointer;
  border-radius: 999px; width: 26px; height: 26px; font-size: 15px; line-height: 1;
}
.user-chip .signout:hover { background: #e9e9f2; color: var(--ink); }

/* ---- Google AdSense slots --------------------------------------------- */
.ad-zone {
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
}
.ad-zone .ad-label {
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700;
}
.ad-slot {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f4f4fb, #eef0f7);
  border: 1px dashed #d7d7e3;
  border-radius: var(--radius-sm);
  color: var(--ink-faint);
  overflow: hidden;
}
.ad-slot .ph { font-size: .82rem; font-weight: 600; opacity: .8; padding: 16px; text-align: center; }
.ad-slot.leaderboard { min-height: 110px; max-width: 970px; }
.ad-slot.rectangle { min-height: 250px; max-width: 336px; }
.ad-slot ins.adsbygoogle { display: block; width: 100%; }
.ad-zone.in-section { padding: 10px 0 4px; }

/* ---- Rewards button + panel ------------------------------------------- */
.rewards-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); cursor: pointer;
  border-radius: 999px; padding: 6px 12px 6px 10px; font-family: inherit;
  box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .18s;
}
.rewards-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.rewards-btn .rb-emoji { font-size: 1.15rem; }
.rewards-btn .rb-count {
  font-weight: 800; font-size: .8rem; color: #fff;
  background: var(--brand-grad); border-radius: 999px;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
}
.rewards-card {
  position: relative;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  width: min(720px, 100%);
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: var(--shadow-lg);
  padding: 30px;
  animation: pop .22s cubic-bezier(.2,.9,.3,1.2);
}
.rewards-head h2 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -.02em; }
.rewards-head .sub { margin: 0 0 16px; color: var(--ink-soft); font-size: .92rem; }
.rewards-stats { display: flex; gap: 26px; margin-bottom: 16px; }
.rewards-stats .rstat b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.rewards-stats .rstat span { font-size: .8rem; color: var(--ink-faint); font-weight: 600; }
.rewards-progress { display: grid; gap: 12px; margin-bottom: 22px; }
.rprog-label { font-size: .82rem; font-weight: 650; color: var(--ink-soft); }
.rbar { height: 9px; background: #eee; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.rbar i { display: block; height: 100%; background: var(--brand-grad); border-radius: 999px; transition: width .5s ease; }
.rbar i.alt { background: linear-gradient(135deg, #fb7185, #f5d061); }
.sticker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.sticker {
  text-align: center; padding: 16px 10px; border-radius: 16px;
  border: 1px solid var(--line); background: #fafaff;
  transition: transform .15s, box-shadow .2s;
}
.sticker.owned { background: linear-gradient(160deg, #fff, #f4ecff); border-color: #e3d6ff; }
.sticker.owned:hover { transform: translateY(-4px) rotate(-3deg); box-shadow: var(--shadow); }
.sticker.locked { opacity: .72; filter: grayscale(.3); }
.sticker .st-emoji { font-size: 2.1rem; line-height: 1; }
.sticker .st-name { margin-top: 8px; font-weight: 800; font-size: .82rem; }
.sticker .st-hint { margin-top: 3px; font-size: .68rem; color: var(--ink-faint); line-height: 1.25; }
.sticker.owned .st-hint { color: var(--brand); }
.rewards-foot { margin: 22px 0 0; font-size: .82rem; color: var(--ink-faint); text-align: center; }

/* ---- Confetti --------------------------------------------------------- */
#confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -16px; border-radius: 2px;
  animation-name: confetti-fall; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(106vh) rotate(720deg); opacity: .9; }
}

/* ---- Gallery toolbar (search + surprise) ------------------------------ */
.gallery-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box input { padding-left: 38px; }
.search-box .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); opacity: .5; }
.surprise-btn { white-space: nowrap; }

/* ---- Guest builder ----------------------------------------------------- */
#guest-list { display: flex; flex-direction: column; gap: 8px; }
.guest-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr auto;
  gap: 8px;
  align-items: center;
}
.guest-row input { padding: 9px 11px; font-size: .9rem; }
.guest-row .g-remove {
  width: 34px; height: 38px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-faint); border-radius: 10px; cursor: pointer; font-size: 17px; line-height: 1;
}
.guest-row .g-remove:hover { background: #fdeaee; color: var(--err); border-color: #f7c9d3; }
.guest-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.guest-count { font-size: .82rem; color: var(--ink-faint); font-weight: 600; margin-left: auto; }
#bulk-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
#bulk-wrap textarea { min-height: 96px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }

/* ---- Single-column modal (responses) ----------------------------------- */
.modal.single { grid-template-columns: 1fr; }
.resp-pane { position: relative; }
.resp-group { margin-top: 16px; }
.resp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.resp-head .resp-n { font-weight: 800; color: var(--ink-faint); font-size: .9rem; }
.pill.pending { background: #eef1f6; color: #5b6070; }
.resp-item {
  background: #fafaff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; margin-bottom: 8px;
}
.resp-line { display: flex; align-items: center; gap: 8px; }
.resp-name { font-weight: 700; }
.resp-plus { font-size: .74rem; font-weight: 700; color: var(--brand); background: #f4ecff; padding: 2px 8px; border-radius: 999px; }
.resp-contact { font-size: .82rem; color: var(--ink-faint); margin-top: 2px; }
.resp-msg { margin-top: 7px; font-size: .9rem; color: var(--ink-soft); font-style: italic; }
.resp-empty { color: var(--ink-faint); font-size: .88rem; margin: 2px 0 4px; }

/* ---- Invite page polish ------------------------------------------------ */
.invite-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .78rem; color: var(--brand);
  background: #f4ecff; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
}
.invite-card-2026 .type-badge { margin-left: 8px; }
.resp-head-label {
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-faint); margin-bottom: 8px;
}
.going-names { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.go-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px 4px 4px; font-size: .85rem; font-weight: 650; box-shadow: var(--shadow-sm);
}
.go-av {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-grad); color: #fff; font-size: .75rem; font-weight: 800;
}
.go-more { align-self: center; font-size: .82rem; color: var(--ink-faint); font-weight: 600; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .guest-row { grid-template-columns: 1fr 1fr; }
  .guest-row .g-contact { grid-column: 1 / 2; }
  .guest-row .g-remove { grid-column: 2 / 3; justify-self: end; }
  .modal { grid-template-columns: 1fr; height: min(94vh, 760px); }
  .modal .preview-pane { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .nav-links a.hide-sm { display: none; }
}
