/* ═══════════════════════════════════════════════
   MAKE PARTIES FUN AGAIN — iMessage UI v2.1
   Fixes: tails, buttons, avatar, search bar
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

/* ══ TOKENS ══ */
:root {
  --green: #34C759; --green-dk: #2db84d;
  --blue: #007AFF; --blue-dk: #0063d1;
  --red: #FF3B30;
  --bg: #ffffff; --bg2: #f2f2f7; --bg3: #e5e5ea;
  --surface: #ffffff;
  --t1: #1c1c1e; --t2: #8e8e93; --t3: #aeaeb2;
  --bdr: #e5e5ea;
  --recv: #e9e9eb; --recv-text: #000000;
  --glass-bg: rgba(255,255,255,.82);
  --glass-bdr: rgba(0,0,0,.1);
  --shadow-s: 0 1px 3px rgba(0,0,0,.06);
  --shadow-m: 0 4px 16px rgba(0,0,0,.08);
  --shadow-l: 0 8px 32px rgba(0,0,0,.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg2: #1c1c1e; --bg3: #2c2c2e;
    --surface: #1c1c1e; --t1: #ffffff; --t2: #8e8e93; --t3: #636366;
    --bdr: #38383a; --recv: #26262a; --recv-text: #ffffff;
    --glass-bg: rgba(28,28,30,.85); --glass-bdr: rgba(255,255,255,.08);
    --shadow-s: 0 1px 3px rgba(0,0,0,.3); --shadow-m: 0 4px 16px rgba(0,0,0,.4);
    --shadow-l: 0 8px 32px rgba(0,0,0,.5);
  }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg); color: var(--t1); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; padding-bottom: 72px;
}
h1,h2,h3,.cta-btn,.nav-name,.bubble-hero-title { font-family: 'Nunito', -apple-system, sans-serif; }


/* ═══════════════════════════════════════════════
   NAV — Bigger M avatar (like iMessage contact)
   ═══════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--glass-bg); border-bottom: .5px solid var(--glass-bdr);
}
.nav-left { width: 80px; display: flex; align-items: center; }
.nav-tickets {
  display: flex; align-items: center; gap: 4px; color: var(--blue);
  font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity .2s;
}
.nav-tickets:hover { opacity: .7; }
.nav-center {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none;
}
/* FIX 5: Bigger avatar like iMessage contact photo */
.nav-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-name { font-size: 11px; font-weight: 600; color: var(--t1); }
.nav-right { width: 80px; display: flex; align-items: center; justify-content: flex-end; }
.nav-menu-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg2);
  border: .5px solid var(--bdr); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; color: var(--t2); font-size: 18px;
}
.nav-menu-btn:hover { background: var(--bg3); }

.nav-dropdown {
  position: absolute; top: 70px; right: 12px; background: var(--surface);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: .5px solid var(--glass-bdr); border-radius: 16px; padding: 8px; min-width: 260px;
  box-shadow: var(--shadow-l); opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(.97); transition: all .2s cubic-bezier(.16,1,.3,1);
}
.nav-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 10px; color: var(--t1); text-decoration: none;
  font-size: 15px; font-weight: 500; transition: background .15s;
}
.nav-dropdown a:hover { background: var(--bg2); }
.nav-dropdown a .nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-dropdown-divider { height: .5px; background: var(--bdr); margin: 4px 8px; }

/* Contact card header in dropdown */
.nav-card-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 14px; gap: 4px;
}
.nav-card-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.15); margin-bottom: 6px;
}
.nav-card-name { font-size: 17px; font-weight: 700; color: var(--t1); }
.nav-card-sub { font-size: 13px; color: var(--t2); }

.nav-card-actions {
  display: flex; justify-content: center; gap: 12px; padding: 8px 12px 12px;
}
.nav-card-action {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 16px; border-radius: 12px; background: var(--bg2);
  text-decoration: none; color: var(--t1); font-size: 11px; font-weight: 500;
  transition: background .15s; min-width: 64px;
}
.nav-card-action span:first-child { font-size: 20px; }
.nav-card-action:hover { background: var(--bg3); }


/* ═══════════════════════════════════════════════
   TAPBACK REACTIONS (on event cards)
   ═══════════════════════════════════════════════ */
.tapback-bar {
  display: flex; gap: 4px; padding: 6px 10px;
  background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; border: .5px solid var(--glass-bdr);
  box-shadow: var(--shadow-l);
  position: absolute; top: -44px; left: 50%; transform: translateX(-50%) scale(.8);
  opacity: 0; pointer-events: none; z-index: 100;
  transition: all .2s cubic-bezier(.16,1,.3,1);
}
.tapback-bar.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); }
.tapback-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: none;
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.tapback-btn:hover { transform: scale(1.3); }
.tapback-btn:active { transform: scale(.9); }
.tapback-badge {
  position: absolute; top: -8px; right: -4px;
  background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 12px; padding: 2px 6px; font-size: 14px;
  border: .5px solid var(--glass-bdr); box-shadow: var(--shadow-s);
}


/* ═══════════════════════════════════════════════
   SCROLL TO TOP
   ═══════════════════════════════════════════════ */
.scroll-top {
  position: fixed; bottom: 88px; right: 16px; z-index: 900;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: .5px solid var(--glass-bdr); box-shadow: var(--shadow-m);
  color: var(--t2); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: all .3s cubic-bezier(.16,1,.3,1);
}
.scroll-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--bg2); color: var(--t1); }


/* ═══════════════════════════════════════════════
   THREAD + PAGE TRANSITION
   ═══════════════════════════════════════════════ */
.thread {
  max-width: 680px; margin: 0 auto; padding: 80px 16px 32px;
  display: flex; flex-direction: column;
  animation: pageIn .4s cubic-bezier(.16,1,.3,1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.time-divider {
  text-align: center; padding: 28px 0 16px;
  font-size: 12px; font-weight: 600; color: var(--t3);
}
.time-divider:first-child { padding-top: 8px; }


/* ═══════════════════════════════════════════════
   BUBBLE SYSTEM — Clean tails (no radial gradient)
   ═══════════════════════════════════════════════ */
.bubble {
  max-width: 78%; padding: 10px 16px; font-size: 16px; line-height: 1.4;
  position: relative; margin-bottom: 4px;
  opacity: 0; transform: scale(.92) translateY(8px);
  transition: opacity .4s .1s, transform .4s .1s cubic-bezier(.175,.885,.32,1.275);
}
.bubble.visible { opacity: 1; transform: scale(1) translateY(0); }

/* Received (left, gray) */
.bubble.recv {
  background: var(--recv); color: var(--recv-text); align-self: flex-start;
  border-radius: 18px 18px 18px 18px; margin-left: 8px;
}
/* When recv bubbles follow a bubble-row with avatar, indent to align */
.bubble-group.recv > .bubble-row ~ .bubble.recv { margin-left: 36px; }
.bubble-group.recv > .bubble-row .bubble.recv { margin-left: 0; }

/* FIX 3: Use clip-path for tail instead of broken radial gradient */
.bubble.recv.tail {
  border-bottom-left-radius: 4px;
}

/* Sent (right, blue) */
.bubble.sent {
  background: var(--blue); color: #fff; align-self: flex-end;
  border-radius: 18px 18px 18px 18px; margin-right: 8px;
}
.bubble.sent.tail {
  border-bottom-right-radius: 4px;
  margin-right: 4px;
}

/* Green variant */
.bubble.sent-green {
  background: var(--green); color: #fff; align-self: flex-end;
  border-radius: 18px 18px 18px 18px; margin-right: 8px;
}
.bubble.sent-green.tail {
  border-bottom-right-radius: 4px;
  margin-right: 4px;
}

/* Groups */
.bubble-group { display: flex; flex-direction: column; margin-bottom: 16px; }
.bubble-group.sent { align-items: flex-end; }
.bubble-group.recv { align-items: flex-start; }

.bubble-row { display: flex; gap: 6px; align-items: flex-end; margin-bottom: 2px; }
.bubble-row.recv { flex-direction: row; }
.bubble-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* Receipt */
.receipt {
  font-size: 11px; color: var(--t3); padding: 2px 12px 0;
  opacity: 0; animation: fadeIn .3s ease 1s forwards;
}
.receipt.sent { text-align: right; }
@keyframes fadeIn { to { opacity: 1; } }

/* Hero title bubble */
.bubble-hero-title {
  font-size: clamp(28px, 6vw, 44px); font-weight: 900;
  line-height: 1; letter-spacing: -1.5px; padding: 14px 20px;
}
.bubble-hero-title .gr { color: var(--green); }
.bubble-hero-title .bl { color: var(--blue); }


/* ═══════════════════════════════════════════════
   HERO CENTERED
   ═══════════════════════════════════════════════ */
.hero-center {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 16px; margin-top: 8px;
}
.hero-center .bubble { align-self: center; margin-left: 0; margin-right: 0; }

.hero-viewport {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: calc(100svh - 56px);
  padding: 16px 0 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════
   CTA BUTTONS — Obviously tappable
   ═══════════════════════════════════════════════ */
.cta-stack {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; padding: 8px 0;
  margin-bottom: 4px;
}
.cta-stack.center { align-items: center; }
.cta-btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 20px;
  border-radius: 18px; font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; color: var(--t2);
  transition: color .2s;
}
.cta-btn-sm:hover { color: var(--blue); }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 24px;
  border-radius: 22px; font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  min-width: 200px; text-align: center;
  /* Make them pop */
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.cta-btn:active { transform: scale(.97); }

.cta-btn.green {
  background: var(--green); color: #fff;
  box-shadow: 0 2px 16px rgba(52,199,89,.4);
}
.cta-btn.green:hover { box-shadow: 0 4px 24px rgba(52,199,89,.5); }
.cta-btn.blue, .cta-btn.outline {
  background: var(--surface); color: var(--t1);
  border: 1.5px solid var(--bdr);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.cta-btn.blue:hover, .cta-btn.outline:hover {
  border-color: var(--blue); color: var(--blue);
  box-shadow: 0 2px 12px rgba(0,122,255,.15);
}


/* ═══════════════════════════════════════════════
   TYPING INDICATOR
   ═══════════════════════════════════════════════ */
.typing-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 12px 18px; background: var(--recv);
  border-radius: 18px; margin-left: 8px; margin-bottom: 8px; align-self: flex-start;
}
.typing-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--t3);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}


/* ═══════════════════════════════════════════════
   LINK PREVIEW CARDS (Events)
   ═══════════════════════════════════════════════ */
.link-preview {
  display: block; max-width: 320px; border-radius: 18px; overflow: hidden;
  text-decoration: none; color: inherit; margin-bottom: 12px;
  opacity: 0; transform: scale(.92) translateY(8px);
  transition: opacity .4s, transform .4s cubic-bezier(.175,.885,.32,1.275);
}
.link-preview.visible { opacity: 1; transform: scale(1) translateY(0); }
.link-preview:hover { transform: scale(1.015); box-shadow: var(--shadow-m); }

.link-preview.recv {
  background: var(--recv); align-self: flex-start; margin-left: 8px;
  border-bottom-left-radius: 4px;
}
.link-preview.recv .lp-body { color: var(--recv-text); }
.link-preview.recv .lp-domain { color: var(--t3); }

.link-preview.sent {
  background: var(--blue); color: #fff; align-self: flex-end; margin-right: 8px;
  border-bottom-right-radius: 4px;
}
.link-preview.sent .lp-body,.link-preview.sent .lp-title { color: #fff; }
.link-preview.sent .lp-venue,.link-preview.sent .lp-date { color: rgba(255,255,255,.8); }
.link-preview.sent .lp-domain { color: rgba(255,255,255,.5); }
.link-preview.sent .lp-foot { border-top-color: rgba(255,255,255,.15); }
.link-preview.sent .lp-status { color: rgba(255,255,255,.9); }
.link-preview.sent .lp-status.sold-out { color: #ffcdd2; }
.link-preview.sent .lp-countdown { color: rgba(255,255,255,.8); }

.lp-img { width: 100%; aspect-ratio: 2.2/1; object-fit: cover; display: block; background: var(--bg3); }
.lp-img-fallback {
  width: 100%; aspect-ratio: 2.2/1; display: flex; align-items: center;
  justify-content: center; font-size: 40px; background: var(--bg3);
}
.lp-body { padding: 10px 14px 12px; }
.lp-title { font-weight: 700; font-size: 15px; line-height: 1.25; margin-bottom: 3px; }
.lp-venue { font-size: 13px; opacity: .85; margin-bottom: 2px; }
.lp-date { font-size: 12px; opacity: .65; }
.lp-countdown { font-size: 11px; font-weight: 600; color: var(--green); margin-top: 2px; }
.lp-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 8px; border-top: .5px solid var(--bdr);
}
.lp-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.lp-status.sold-out { color: var(--red); }
.lp-cta { font-size: 12px; font-weight: 600; opacity: .85; }
.lp-domain { font-size: 11px; color: var(--t3); padding: 0 14px 10px; }


/* ═══════════════════════════════════════════════
   CITY SECTIONS
   ═══════════════════════════════════════════════ */
.city-section { display: flex; flex-direction: column; margin-bottom: 20px; }
.city-section.hidden { display: none; }
.city-filter {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 0 8px 24px;
}
.city-btn {
  padding: 7px 16px; border-radius: 18px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--bdr); background: var(--surface); color: var(--t2);
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.city-btn:hover { border-color: var(--blue); color: var(--blue); }
.city-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.filter-country {
  width: 100%; font-size: 13px; font-weight: 600; color: var(--t2);
  padding: 6px 2px 2px;
}
.events-wrap { display: flex; flex-direction: column; }
.events-see-all { text-align: center; padding: 28px 0; }


/* ═══════════════════════════════════════════════
   FIX 4: BOTTOM BAR — Event search
   ═══════════════════════════════════════════════ */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--glass-bg); border-top: .5px solid var(--glass-bdr);
}
.bottom-bar-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 6px;
}
.quick-suggestions {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.quick-suggestions::-webkit-scrollbar { display: none; }
.quick-pill {
  padding: 6px 14px; border-radius: 16px; background: var(--bg2);
  border: .5px solid var(--bdr); font-size: 13px; font-weight: 500; color: var(--t2);
  white-space: nowrap; cursor: pointer; transition: all .2s; text-decoration: none;
}
.quick-pill:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.bottom-input-row { display: flex; gap: 8px; align-items: center; }
.search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 20px;
  border: 1px solid var(--bdr); background: var(--surface);
  transition: border-color .2s;
}
.search-input-wrap:focus-within { border-color: var(--blue); }
.search-icon { width: 18px; height: 18px; fill: var(--t3); flex-shrink: 0; }
.search-input {
  flex: 1; border: none; background: transparent;
  color: var(--t1); font-size: 16px; font-family: inherit; outline: none;
  /* 16px prevents iOS auto-zoom on focus */
}
.search-input::placeholder { color: var(--t3); }


/* ═══════════════════════════════════════════════
   EMAIL BANNER (subpages only)
   ═══════════════════════════════════════════════ */
.email-banner {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 999; padding: 14px 16px;
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--glass-bg); border-bottom: .5px solid var(--glass-bdr);
  transform: translateY(-100%); transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.email-banner.show { transform: translateY(0); }
.email-banner-inner { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.email-banner-top { display: flex; justify-content: space-between; align-items: center; }
.email-banner-text { font-size: 14px; font-weight: 600; color: var(--t1); }
.email-banner-sub { font-size: 12px; color: var(--t2); }
.email-banner-close {
  background: none; border: none; color: var(--t3); font-size: 20px;
  cursor: pointer; padding: 4px; line-height: 1;
}
.email-banner-form { display: flex; gap: 8px; }
.email-banner-form input {
  flex: 1; padding: 9px 14px; border-radius: 10px;
  border: .5px solid var(--bdr); background: var(--surface); color: var(--t1);
  font-size: 14px; font-family: inherit; min-width: 0;
}
.email-banner-form input::placeholder { color: var(--t3); }
.email-banner-form input:focus { outline: none; border-color: var(--blue); }
.email-banner-form button {
  padding: 9px 18px; border-radius: 10px; background: var(--blue);
  color: #fff; border: none; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: inherit;
}


/* ═══════════════════════════════════════════════
   PROMO SLOTS (blocker-proof naming)
   ═══════════════════════════════════════════════ */
.promo-slot { display: flex; flex-direction: column; align-items: flex-start; margin: 12px 0; }
.promo-label {
  font-size: 10px; color: var(--t3); text-align: center; width: 100%;
  padding-bottom: 4px; letter-spacing: .3px;
}
.promo-card {
  background: var(--recv); border-radius: 18px; padding: 4px;
  margin-left: 8px; max-width: 340px; width: 100%; overflow: hidden; min-height: 60px;
}
.promo-placeholder {
  padding: 24px 16px; text-align: center; font-size: 12px; color: var(--t3);
  border: 1.5px dashed var(--bdr); border-radius: 14px;
}


/* ═══════════════════════════════════════════════
   PARTY BUBBLES
   ═══════════════════════════════════════════════ */
.party-bubble {
  background: var(--recv); color: var(--recv-text); border-radius: 18px;
  padding: 20px; max-width: 85%; align-self: flex-start; margin-left: 8px; margin-bottom: 6px;
  opacity: 0; transform: translateY(16px);
  transition: all .5s cubic-bezier(.16,1,.3,1);
}
.party-bubble.visible { opacity: 1; transform: translateY(0); }
.party-bubble-emoji { font-size: 32px; margin-bottom: 8px; display: block; }
.party-bubble h3 { font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.party-bubble p { font-size: 14px; line-height: 1.5; opacity: .85; }


/* ═══════════════════════════════════════════════
   FORM BUBBLES
   ═══════════════════════════════════════════════ */
.form-sent-group {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  margin-bottom: 8px; max-width: 78%; align-self: flex-end;
}
.form-sent-group input,.form-sent-group textarea,.form-sent-group select {
  width: 100%; padding: 12px 16px; border-radius: 20px; border: 2px solid var(--bdr);
  background: var(--surface); color: var(--t1);
  font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.form-sent-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}
.form-sent-group select option[disabled] { color: var(--t3); }
.form-sent-group input:focus,.form-sent-group textarea:focus,.form-sent-group select:focus {
  border-color: var(--blue);
}
.form-sent-group input::placeholder,.form-sent-group textarea::placeholder,.form-sent-group select::placeholder { color: var(--t3); }
.form-sent-group textarea { resize: vertical; min-height: 80px; border-radius: 20px; }

/* Chat-style venue form */
.chat-q { display: none; }
.chat-q.active { display: block; animation: chatFadeIn .3s ease; }
.chat-q.answered { display: block; }
.chat-q.answered .chat-input-row,
.chat-q.answered .chat-option-row { display: none; }
@keyframes chatFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.chat-input-row {
  display: flex; align-items: center; gap: 8px; max-width: 78%;
  align-self: flex-end; margin-left: auto; margin-top: 4px;
}
.chat-field {
  flex: 1; padding: 12px 16px; border-radius: 20px; border: 2px solid var(--bdr);
  background: var(--surface); color: var(--t1); font-size: 15px; font-family: inherit;
  outline: none; transition: border-color .2s; min-width: 0;
}
.chat-field:focus { border-color: var(--blue); }
.chat-field::placeholder { color: var(--t3); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: transform .15s;
}
.chat-send-btn:hover { transform: scale(1.1); }
.chat-send-btn svg { width: 18px; height: 18px; fill: #fff; }
.chat-option-row {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end;
  max-width: 85%; margin-left: auto; margin-top: 4px;
}
.chat-option {
  padding: 8px 16px; border-radius: 18px; border: 1.5px solid var(--blue);
  background: transparent; color: var(--blue); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.chat-option:hover { background: var(--blue); color: #fff; }
.venue-answer {
  display: flex; justify-content: flex-end; margin-top: 4px;
}
.venue-answer .bubble { opacity: 1; transform: none; }
.form-send-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; align-self: flex-end; margin-right: 8px; transition: transform .15s;
  box-shadow: 0 2px 12px rgba(52,199,89,.3);
}
.form-send-btn:hover { transform: scale(1.1); }
.form-send-btn svg { width: 20px; height: 20px; fill: #fff; }
.form-success { display: none; margin-bottom: 8px; }
.form-success.show { display: flex; flex-direction: column; }


/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer-timestamp { text-align: center; padding: 48px 16px 32px; font-size: 12px; color: var(--t3); }
.footer-timestamp .copyright { margin-bottom: 12px; }
.footer-socials { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.footer-social-pill {
  padding: 6px 14px; border-radius: 16px; background: var(--bg2);
  border: .5px solid var(--bdr); color: var(--t2); text-decoration: none; font-size: 13px;
  transition: all .2s;
}
.footer-social-pill:hover { background: var(--blue); color: #fff; border-color: var(--blue); }


/* ═══════════════════════════════════════════════
   CONFETTI
   ═══════════════════════════════════════════════ */
.confetti-container {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-piece {
  position: absolute; width: 10px; height: 10px; top: -10px;
  animation: confettiFall 3s ease-in forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}


/* ═══════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(16px); transition: all .5s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.btn {
  padding: 10px 24px; border-radius: 20px; font-size: 15px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; cursor: pointer; border: none; font-family: inherit;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dk); }
.btn-outline { background: transparent; color: var(--t1); border: 1.5px solid var(--bdr); }
.btn-outline:hover { border-color: var(--t3); background: var(--bg2); }


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .thread { padding: 72px 10px 24px; }
  .bubble,.link-preview { max-width: 85%; }
  .party-bubble { max-width: 92%; }
  .nav-name { font-size: 14px !important; }
  .nav-left,.nav-right { width: auto; min-width: 50px; }
  .email-banner-form { flex-direction: column; }
  .form-sent-group { max-width: 85%; }
  .cta-btn { min-width: 180px; font-size: 15px; padding: 12px 20px; }
}


/* ═══════════════════════════════════════════════
   LEGACY (subpages not yet converted)
   ═══════════════════════════════════════════════ */
section { padding: 80px 20px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-label {
  display: inline-block; padding: 5px 14px; border-radius: 50px;
  font-size: 13px; font-weight: 600; letter-spacing: .5px; margin-bottom: 14px;
}
.section-label.green { background: rgba(52,199,89,.1); color: var(--green); }
.section-label.blue { background: rgba(0,122,255,.1); color: var(--blue); }
.section-title {
  font-weight: 700; font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.8px; line-height: 1.1; margin-bottom: 10px;
}
.section-desc { color: var(--t2); font-size: 16px; max-width: 480px; margin: 0 auto; line-height: 1.5; }
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500; color: var(--t2);
  margin-bottom: 5px; padding-left: 4px;
}
.form-group input,.form-group textarea,.form-group select {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: .5px solid var(--bdr); background: var(--surface);
  color: var(--t1); font-size: 15px; font-family: inherit; transition: all .2s; outline: none;
}
.form-group input:focus,.form-group textarea:focus,.form-group select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}
.form-group input::placeholder,.form-group textarea::placeholder { color: var(--t3); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-submit {
  width: 100%; padding: 13px; border-radius: 14px; background: var(--blue);
  color: #fff; font-size: 16px; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit; transition: all .2s;
}
.form-submit:hover { background: var(--blue-dk); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.nav-logo-text { font-weight: 700; font-size: 17px; color: var(--t1); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--t2); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 7px 14px; border-radius: 20px; transition: all .2s;
}
.nav-links a:hover { color: var(--t1); background: var(--bg2); }
.nav-mob {
  display: none; background: none; border: none; color: var(--blue);
  font-size: 24px; cursor: pointer;
}
@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-direction: column; padding: 12px; border-bottom: .5px solid var(--glass-bdr);
  }
  .nav-links.open { display: flex; }
  .nav-mob { display: block; }
}
