*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rose:        #d4537e;
  --rose-dark:   #993556;
  --rose-mid:    #ed93b1;
  --rose-soft:   #fbeaf0;
  --rose-border: #f4c0d1;
  --gold-soft:   #faeeda;
  --gold-text:   #854f0b;
  --green-soft:  #eaf3de;
  --green-text:  #3b6d11;
  --ink:         #1a1a2e;
  --ink-mid:     #4e5670;
  --ink-soft:    #8892a8;
  --surface:     #fff8f5;
  --white:       #ffffff;
  --border:      rgba(220,170,190,0.35);
  --shadow:      0 2px 20px rgba(180,60,100,0.08);
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  26px;
  --font: -apple-system, 'Segoe UI', system-ui, sans-serif;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  min-height: 100vh;
}

/* ══════════════════════════════
   LANDING PAGE
══════════════════════════════ */
#landingPage { display: block; }

.lp-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,248,245,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rose-border);
  padding: 0 1.25rem;
  height: 56px;
  display: flex; align-items: center;
}
.lp-nav-inner {
  width: 100%; max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.lp-logo { display: flex; align-items: center; gap: 10px; }
.lp-logo-img { height: 32px; width: auto; }
.lp-logo-text { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.2px; }
.lp-login-btn {
  background: var(--rose); color: #fff; border: none;
  border-radius: var(--r-md); padding: 8px 18px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.lp-login-btn:hover { background: var(--rose-dark); }

/* Hero */
.lp-hero {
  max-width: 680px; margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--rose-soft); color: var(--rose-dark);
  border-radius: 20px; padding: 5px 14px;
  font-size: 13px; font-weight: 500; margin-bottom: 1.25rem;
}
.lp-eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }

.lp-h1 {
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 700; line-height: 1.15;
  color: var(--ink); margin-bottom: 1rem;
  letter-spacing: -.5px;
}
.lp-h1 em { font-style: italic; color: var(--rose-dark); }

.lp-lead {
  font-size: 16px; color: var(--ink-mid);
  line-height: 1.65; margin-bottom: 1.75rem; max-width: 520px;
}

.lp-hero-cta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.25rem; }
.btn-hero {
  background: var(--rose); color: #fff; border: none;
  border-radius: var(--r-lg); padding: 14px 24px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: var(--font); text-align: center;
  transition: background .15s, transform .1s;
}
.btn-hero:hover { background: var(--rose-dark); transform: translateY(-1px); }
.btn-hero-ghost {
  background: none; color: var(--rose-dark);
  border: 1.5px solid var(--rose-mid);
  border-radius: var(--r-lg); padding: 13px 24px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  font-family: var(--font); text-align: center;
  text-decoration: none; display: block;
  transition: background .15s;
}
.btn-hero-ghost:hover { background: var(--rose-soft); }

.lp-trust {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: var(--ink-soft); margin-bottom: 1.5rem;
}
.lp-trust span { display: flex; align-items: center; gap: 5px; }

/* Preview card in hero */
.lp-preview-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--shadow);
}
.lp-pc-loc { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.lp-pc-text {
  font-size: 15px; color: var(--ink); line-height: 1.55;
  font-style: italic; margin-bottom: 12px;
}
.lp-pc-match {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-soft); color: var(--green-text);
  border-radius: 20px; padding: 5px 13px;
  font-size: 13px; font-weight: 500;
}

/* Sections */
.lp-section {
  max-width: 680px; margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.lp-section + .lp-section { padding-top: 0; }
.lp-section-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--rose);
  margin-bottom: .5rem;
}
.lp-section-title {
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 700; color: var(--ink);
  margin-bottom: 1.5rem; line-height: 1.2; letter-spacing: -.2px;
}

/* Steps */
.lp-steps { display: flex; flex-direction: column; gap: 10px; }
.lp-step {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  display: flex; gap: 14px; align-items: flex-start;
}
.lp-step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--rose-soft); color: var(--rose-dark);
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lp-step h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.lp-step p { font-size: 14px; color: var(--ink-mid); line-height: 1.5; }

/* Moment cards */
.lp-moments-grid { display: flex; flex-direction: column; gap: 10px; }
.lp-moment {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
}
.lp-moment-location { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.lp-moment p { font-size: 14px; color: var(--ink); line-height: 1.55; font-style: italic; margin-bottom: 10px; }
.lp-moment-status { display: inline-block; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 500; }
.lp-moment-status.matched { background: var(--green-soft); color: var(--green-text); }
.lp-moment-status.waiting { background: var(--gold-soft); color: var(--gold-text); }

/* Trust grid */
.lp-trust-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.lp-trust-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
}
.lp-trust-icon { font-size: 22px; margin-bottom: 8px; }
.lp-trust-item h3 { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.lp-trust-item p { font-size: 13px; color: var(--ink-mid); line-height: 1.5; }

/* CTA section */
.lp-cta-section {
  background: linear-gradient(135deg, var(--rose-soft) 0%, #fff8f0 100%);
  border-top: 1px solid var(--rose-border);
  border-bottom: 1px solid var(--rose-border);
  padding: 2.5rem 1.25rem; text-align: center;
}
.lp-cta-inner { max-width: 520px; margin: 0 auto; }
.lp-cta-inner h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700; color: var(--ink);
  line-height: 1.3; margin-bottom: .75rem; font-style: italic;
}
.lp-cta-inner p { font-size: 15px; color: var(--ink-mid); margin-bottom: 1.5rem; }

/* Footer */
.lp-footer {
  background: var(--ink); padding: 1.5rem 1.25rem;
  font-size: 13px; color: var(--ink-soft);
}
.lp-footer-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem;
}
.lp-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.lp-footer a { color: var(--ink-soft); text-decoration: none; }
.lp-footer a:hover { color: #fff; }

/* ══════════════════════════════
   APP SHELL
══════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 270px; flex-shrink: 0;
  background: rgba(255,248,245,0.96);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--rose-border);
  display: flex; flex-direction: column;
  padding: 20px 16px; gap: 20px;
}
.sidebar-top { display: flex; flex-direction: column; gap: 16px; }
.brand-wrap { display: flex; flex-direction: column; gap: 8px; }
#logo { width: 130px; max-width: 100%; height: auto; display: block; }
#brand h1 { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.tagline { font-size: 12px; color: var(--ink-mid); }

.user-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
}
.user-box-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 3px;
}
.user-box-name { font-size: 14px; font-weight: 500; color: var(--ink); word-break: break-word; }

.sidebar-nav { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.sidebar-bottom { display: flex; flex-direction: column; gap: 10px; }
.sidebar-legal { display: flex; gap: 12px; flex-wrap: wrap; }
.sidebar-legal a { font-size: 12px; color: var(--rose); text-decoration: none; font-weight: 500; }
.sidebar-legal a:hover { text-decoration: underline; }

.main-content {
  flex: 1; padding: 24px 20px;
  display: flex; align-items: flex-start; justify-content: center; min-width: 0;
}

/* ══════════════════════════════
   CARD
══════════════════════════════ */
.card {
  width: 100%; max-width: 620px;
  background: var(--white);
  border-radius: var(--r-xl); padding: 24px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: var(--r-md);
  padding: 11px 17px; font-size: 14px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  background: linear-gradient(135deg, #e8608a 0%, #c9406e 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(212,83,126,0.28);
  transition: transform .15s, box-shadow .15s, opacity .15s;
  white-space: nowrap; text-align: left; line-height: 1.2;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(212,83,126,0.35); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.secondary {
  background: var(--rose-soft); color: var(--rose-dark);
  box-shadow: none; border: 1px solid var(--rose-border);
}
.btn.secondary:hover:not(:disabled) { background: #fad6e4; box-shadow: none; }

.btn.full { width: 100%; justify-content: space-between; font-size: 14px; padding: 11px 13px; }
.btn.small { font-size: 13px; padding: 7px 12px; border-radius: var(--r-sm); }

.btn.google-btn {
  background: var(--white); color: #3c4043;
  box-shadow: 0 1px 4px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.08);
  font-weight: 500;
}
.btn.google-btn:hover:not(:disabled) { background: #f8f8f8; transform: translateY(-1px); }

.btn.facebook-btn { background: #1877f2; color: #fff; box-shadow: 0 3px 12px rgba(24,119,242,.28); }
.btn.facebook-btn:hover:not(:disabled) { background: #1560cc; }

.badge {
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #ff4d7e; color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inline-badge { margin-left: 6px; vertical-align: middle; }

/* ══════════════════════════════
   LOGIN IN APP
══════════════════════════════ */
#loginPrompt { font-size: 24px; font-weight: 700; color: var(--ink); margin-bottom: 8px; line-height: 1.2; }
.login-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.login-divider { text-align: center; font-size: 12px; color: var(--ink-soft); margin: 2px 0; }

/* ══════════════════════════════
   FORM
══════════════════════════════ */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-mid); margin: 16px 0 5px; letter-spacing: .01em; }
label:first-of-type { margin-top: 0; }

textarea, input[type="text"], input[type="date"],
input[type="time"], input[type="file"], select {
  width: 100%; border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 11px 13px;
  font-size: 15px; font-family: var(--font);
  background: #fff9fb; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
textarea:focus, input[type="text"]:focus, input[type="date"]:focus,
input[type="time"]:focus, select:focus {
  border-color: var(--rose); box-shadow: 0 0 0 3px rgba(212,83,126,.10); background: #fff;
}
textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath fill='%238892a8' d='M5.5 7L0 0h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ══════════════════════════════
   INTRO / CLAIM
══════════════════════════════ */
.intro-box {
  background: linear-gradient(135deg, var(--rose-soft) 0%, #fff8f0 100%);
  border: 1px solid var(--rose-border);
  border-radius: var(--r-lg); padding: 18px 16px 14px; margin-bottom: 16px;
}
.intro-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--rose); margin-bottom: 5px;
}
.intro-box h2 { font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--ink); margin-bottom: 8px; letter-spacing: -.2px; }
.intro-box p { font-size: 14px; line-height: 1.55; color: var(--ink-mid); margin-bottom: 6px; }
.intro-box p:last-child { margin-bottom: 0; }

.claim-box {
  background: rgba(251,234,240,0.60); border: 1px solid var(--rose-border);
  border-radius: var(--r-md); padding: 11px 14px;
  font-size: 14px; color: #9b3f67; margin-bottom: 18px;
}

/* ══════════════════════════════
   SECTION HEAD + RESULTS
══════════════════════════════ */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.section-head h2 { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }

.result-card {
  background: #fffafc; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 15px 15px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.result-card:hover { border-color: var(--rose-mid); box-shadow: 0 2px 12px rgba(212,83,126,.08); }
.result-main { min-width: 0; }
.result-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 3px; line-height: 1.3; }
.result-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 5px; line-height: 1.4; }
.result-text { font-size: 14px; color: var(--ink-mid); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.result-actions { display: flex; flex-wrap: wrap; gap: 7px; }

/* ══════════════════════════════
   CHAT
══════════════════════════════ */
.chat-messages {
  min-height: 260px; max-height: 440px; overflow-y: auto;
  padding: 12px; border-radius: var(--r-lg);
  background: #fff9fb; border: 1.5px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
  -webkit-overflow-scrolling: touch;
}
.chat-bubble {
  max-width: 80%; padding: 9px 13px;
  border-radius: 17px; font-size: 15px; line-height: 1.45; word-break: break-word; margin-bottom: 3px;
}
.chat-bubble.me {
  align-self: flex-end; margin-left: auto;
  background: linear-gradient(135deg, #e8608a 0%, #c9406e 100%);
  color: #fff; border-bottom-right-radius: 5px;
}
.chat-bubble.other {
  align-self: flex-start;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--border); border-bottom-left-radius: 5px;
}
.chat-meta-line { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; font-size: 11px; opacity: .75; }
.chat-sender { font-weight: 700; }
.chat-time { white-space: nowrap; flex-shrink: 0; }
.chat-text { white-space: pre-wrap; }
.chat-compose { display: flex; gap: 9px; margin-top: 12px; }
#chatInput { flex: 1; }
.empty-chat { font-size: 14px; color: var(--ink-soft); text-align: center; padding: 1rem 0; }

/* ══════════════════════════════
   FAQ
══════════════════════════════ */
.faq-box { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 18px; }
.faq-box h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.faq-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item h4 { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.faq-item p { font-size: 13px; color: var(--ink-mid); line-height: 1.5; }

/* ══════════════════════════════
   MOBILE
══════════════════════════════ */
.sidebar-toggle {
  display: none; position: fixed; bottom: 20px; right: 16px; z-index: 300;
  width: 50px; height: 50px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #e8608a 0%, #c9406e 100%);
  color: #fff; font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(212,83,126,.40);
  align-items: center; justify-content: center; transition: transform .15s;
}
.sidebar-toggle:active { transform: scale(.94); }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,14,20,.40); z-index: 200;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

@media (max-width: 700px) {
  .sidebar-toggle { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100%; z-index: 250;
    transform: translateX(-108%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; box-shadow: none;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 28px rgba(0,0,0,.16); }
  .main-content { padding: 16px 14px 80px; }
  .card { border-radius: var(--r-lg); padding: 18px 15px; }
  .lp-trust-grid { grid-template-columns: 1fr 1fr; }
  .result-actions { flex-direction: column; }
  .result-actions .btn, .form-actions .btn, .login-actions .btn { width: 100%; justify-content: center; }
  #chatInput { font-size: 16px; }
  .chat-messages { max-height: 320px; }
}

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