:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-hero: clamp(2.5rem, 1.5rem + 4.5vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* SecondChapter palette — warm cream + deep teal + gold accent.
     Warm, mature, aspirational; contrast-checked for AA. */
  --color-bg: #f6f1e8; /* warm cream */
  --color-surface: #fdfaf3;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ecdfc9;
  --color-border: #d9c9ac;
  --color-divider: #e6d7bd;

  --color-text: #1e2a2b; /* near-black with a teal shade */
  --color-text-muted: #5c6566;
  --color-text-faint: #8a908f;
  --color-text-inverse: #f6f1e8;

  --color-primary: #0f4c4f; /* deep teal */
  --color-primary-hover: #093638;
  --color-primary-highlight: #cfe0dd;

  --color-accent: #b8894b; /* warm gold */
  --color-accent-hover: #a1743b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(30, 42, 43, 0.05);
  --shadow-md: 0 6px 20px rgba(30, 42, 43, 0.08);
  --shadow-lg: 0 20px 50px rgba(30, 42, 43, 0.14);

  --content: 1200px;

  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* -------- Layout primitives -------- */
.container {
  width: min(var(--content), 100% - var(--space-8));
  margin-inline: auto;
}
@media (max-width: 600px) {
  .container {
    width: min(var(--content), 100% - var(--space-6));
  }
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-12);
}
.section-head h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-3);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fdfaf3;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-surface-offset);
}
.btn-lg {
  padding: 1.05rem 1.6rem;
  font-size: var(--text-base);
}

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled {
  border-color: var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-primary);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.site-nav a:hover {
  color: var(--color-text);
}
.site-nav .btn-ghost {
  color: var(--color-text);
}
@media (max-width: 780px) {
  .site-nav a:not(.btn) {
    display: none;
  }
}

/* -------- Hero -------- */
.hero {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero-title {
  font-size: var(--text-hero);
  font-weight: 400;
  margin-top: var(--space-4);
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 30, 'opsz' 100;
}
.hero-title em {
  font-style: italic;
  color: var(--color-primary);
  font-variation-settings: 'SOFT' 60, 'opsz' 144;
}
.hero-lede {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 52ch;
}
.hero-cta {
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-primary);
}
.hero-stats span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}
.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(0.5deg);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-media figcaption {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  padding: 0.5rem 0.85rem;
  background: color-mix(in oklab, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text);
  font-weight: 500;
}

/* -------- Feature grid -------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}
.feature {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}
.feature h3 {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.feature p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* -------- Editorial break -------- */
.editorial {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface-offset) 100%);
}
.editorial-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
@media (max-width: 900px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}
.editorial-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.editorial-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.editorial-copy h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}
.editorial-copy p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
}
.editorial-pullquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-4) 0 var(--space-4) var(--space-6);
  margin-top: var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  font-style: italic;
  line-height: 1.4;
}
.editorial-attrib {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* -------- Steps -------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  counter-reset: step;
}
@media (max-width: 780px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.steps li {
  position: relative;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}
.step-num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.steps h3 {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-block: var(--space-3) var(--space-2);
}
.steps p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* -------- Testimonials -------- */
.stories {
  background: var(--color-surface);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}
.testimonial {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
}
.testimonial img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: var(--space-5);
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--color-text);
  font-weight: 400;
  font-style: italic;
}
.testimonial figcaption {
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* -------- Form -------- */
.form-section {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.form-section .eyebrow {
  color: #e8c98a;
}
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: center;
}
@media (max-width: 900px) {
  .form-wrap {
    grid-template-columns: 1fr;
  }
}
.form-copy h2 {
  font-size: var(--text-2xl);
  color: #fdfaf3;
  margin-block: var(--space-3) var(--space-6);
}
.form-copy p {
  color: color-mix(in oklab, #fdfaf3 78%, transparent);
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
}
.form-check {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.form-check li {
  padding-left: var(--space-6);
  position: relative;
  color: #fdfaf3;
  font-size: var(--text-sm);
}
.form-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 6px;
  border-left: 2px solid #e8c98a;
  border-bottom: 2px solid #e8c98a;
  transform: rotate(-45deg) translateY(-50%);
}

.signup-form {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: var(--space-5);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.field input {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: var(--text-base);
  color: var(--color-text);
}
.field input::placeholder {
  color: var(--color-text-faint);
}
.field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 18%, transparent);
}
.field input[aria-invalid='true'] {
  border-color: #b0303f;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.signup-form .btn {
  margin-top: var(--space-2);
}
.form-legal {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: none;
}
.form-legal a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* -------- Thank you -------- */
.thank-you {
  grid-column: 1 / -1;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-10), 5vw, var(--space-20));
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.thank-check {
  color: var(--color-primary);
  margin-inline: auto;
  margin-bottom: var(--space-6);
}
.thank-you h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
.thank-you p {
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-3);
}
.thank-small {
  font-size: var(--text-sm);
}
.thank-small a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* -------- FAQ -------- */
.faq-list {
  display: grid;
  gap: var(--space-3);
  max-width: 840px;
}
.faq-list details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
}
.faq-list summary {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: '+';
  color: var(--color-accent);
  font-size: 1.5rem;
  transition: transform 200ms ease;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
}
.faq-list p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* -------- Footer -------- */
.site-footer {
  background: #131f20;
  color: #cdd3d1;
  padding-block: var(--space-16) var(--space-6);
  margin-top: 0;
}
.site-footer .brand {
  color: #e8c98a;
}
.site-footer .brand-name {
  color: #fdfaf3;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid #2a3435;
}
@media (max-width: 780px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}
.footer-brand p {
  margin-top: var(--space-4);
  color: #8f9997;
  font-size: var(--text-sm);
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.footer-links h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8c98a;
  margin-bottom: var(--space-4);
}
.footer-links a {
  display: block;
  padding: 0.25rem 0;
  color: #cdd3d1;
  font-size: var(--text-sm);
}
.footer-links a:hover {
  color: #fdfaf3;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-6);
  color: #8f9997;
  font-size: var(--text-xs);
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* -------- Field hint (used in phone label) -------- */
.field-hint {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

/* -------- "Ladies near you" finder -------- */
.near-you {
  background:
    radial-gradient(1200px 500px at 15% 0%, rgba(15, 76, 79, 0.06), transparent 60%),
    radial-gradient(1200px 500px at 85% 100%, rgba(184, 137, 75, 0.08), transparent 60%),
    var(--color-bg);
}
.near-you-head {
  text-align: center;
  margin-inline: auto;
  margin-bottom: var(--space-10);
}
.near-you-head p {
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  font-size: var(--text-base);
}

.finder-form {
  display: flex;
  gap: var(--space-3);
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-surface-2);
  padding: var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}
.finder-form input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0 var(--space-5);
  font-size: var(--text-lg);
  font-family: inherit;
  color: var(--color-text);
  min-width: 0;
  outline: none;
  letter-spacing: 0.02em;
}
.finder-form input::placeholder {
  color: var(--color-text-faint);
}
.finder-form input[aria-invalid="true"] {
  color: #b03a2e;
}
.finder-form .btn-primary {
  border-radius: var(--radius-full);
  padding-inline: var(--space-6);
  white-space: nowrap;
}
.finder-legal {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
  max-width: 560px;
  margin-inline: auto;
}

@media (max-width: 560px) {
  .finder-form {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
  }
  .finder-form input {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    background: var(--color-bg);
    border-radius: var(--radius-md);
  }
  .finder-form .btn-primary {
    border-radius: var(--radius-md);
    padding-block: var(--space-4);
  }
}

.finder-results {
  margin-top: var(--space-12);
}
.finder-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}
.finder-count {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.4;
}
.finder-count > strong {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3rem);
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1;
}
.finder-count-label strong {
  color: var(--color-text);
  font-weight: 600;
}
.finder-city {
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.finder-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.finder-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.finder-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.finder-card-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #d9c9ac 0%, #ecdfc9 50%, #cfe0dd 100%);
  overflow: hidden;
}
.finder-card-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(30, 42, 43, 0.14) 0 22%, transparent 24%),
    radial-gradient(ellipse 55% 30% at 50% 78%, rgba(30, 42, 43, 0.14) 0 60%, transparent 62%);
  filter: blur(14px);
}
.finder-card-photo::after {
  content: "🔒 Blurred until you join";
  position: absolute;
  left: 50%;
  bottom: var(--space-4);
  transform: translateX(-50%);
  background: rgba(30, 42, 43, 0.72);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.finder-card-body {
  padding: var(--space-5) var(--space-5) var(--space-6);
}
.finder-card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.finder-card-meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.finder-card-bio {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  font-style: italic;
}
.finder-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.finder-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-8);
}

/* -------- Chat widget -------- */
.chat-widget {
  position: fixed;
  right: clamp(var(--space-4), 3vw, var(--space-8));
  bottom: clamp(var(--space-4), 3vw, var(--space-8));
  z-index: 60;
  font-family: var(--font-body);
}

/* Launcher (collapsed state) */
.chat-launcher {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  color: var(--color-text);
  font-family: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease;
  max-width: 320px;
  position: relative;
  animation: chat-pop 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(30, 42, 43, 0.18);
}
.chat-launcher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8894b 0%, #0f4c4f 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  flex-shrink: 0;
}
.chat-launcher-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.chat-launcher-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.chat-launcher-preview {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: #b8894b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 2px solid var(--color-surface-2);
}

@keyframes chat-pop {
  0% { transform: translateY(20px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Panel (expanded state) */
.chat-panel {
  width: min(380px, calc(100vw - 2 * var(--space-4)));
  height: min(560px, calc(100vh - 2 * var(--space-4)));
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(30, 42, 43, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chat-slide 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes chat-slide {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--color-primary);
  color: #fff;
}
.chat-header-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8894b 0%, #cfa376 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.chat-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.2;
}
.chat-status {
  font-size: 0.75rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fc48b;
  box-shadow: 0 0 0 3px rgba(127, 196, 139, 0.28);
}
.chat-close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: background 150ms ease;
}
.chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  background:
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scroll-behavior: smooth;
}

.chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.45;
  animation: chat-bubble 240ms cubic-bezier(0.16, 1, 0.3, 1);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
@keyframes chat-bubble {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.chat-msg.bot {
  align-self: flex-start;
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  border-bottom-left-radius: 6px;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.chat-msg.bot a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  word-break: break-word;
}
.chat-msg.user a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-msg.meta {
  align-self: center;
  background: transparent;
  color: var(--color-text-faint);
  font-size: 0.75rem;
  text-align: center;
  padding: 2px 8px;
  animation: none;
  max-width: 100%;
}

.chat-typing {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--color-divider);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 12px 16px;
  display: flex;
  gap: 4px;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-faint);
  animation: chat-typing 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-form {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-2);
}
.chat-form input {
  flex: 1;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  min-width: 0;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.chat-form input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms ease, transform 150ms ease;
}
.chat-send:hover {
  background: var(--color-primary-hover);
  transform: scale(1.05);
}
.chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.chat-safety {
  font-size: 0.6875rem;
  color: var(--color-text-faint);
  text-align: center;
  padding: 0 var(--space-4) var(--space-3);
  background: var(--color-surface-2);
  margin: 0;
}

/* Mobile: full-height panel */
@media (max-width: 560px) {
  .chat-widget {
    right: var(--space-3);
    bottom: var(--space-3);
    left: var(--space-3);
  }
  .chat-launcher {
    margin-left: auto;
  }
  .chat-panel {
    width: 100%;
    height: min(600px, calc(100vh - var(--space-6)));
  }
}

/* Fix: [hidden] must override flex/grid display on chat components */
.chat-widget[hidden],
.chat-launcher[hidden],
.chat-panel[hidden] {
  display: none !important;
}

/* Suggested-reply chip strip */
.chat-starters {
  padding: var(--space-3) var(--space-4) 0;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  animation: chat-slide 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-starters[hidden] { display: none !important; }
.chat-starters-label {
  font-size: 0.6875rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
  font-weight: 500;
}
.chat-starters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-starter-chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
  line-height: 1.2;
}
.chat-starter-chip:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.chat-starter-chip:active {
  transform: scale(0.97);
}

/* -------- Profile-viewed toast -------- */
.pv-toast {
  position: fixed;
  top: clamp(var(--space-4), 4vw, var(--space-8));
  right: clamp(var(--space-4), 3vw, var(--space-8));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(30, 42, 43, 0.14);
  cursor: pointer;
  max-width: 340px;
  font-family: var(--font-body);
  color: var(--color-text);
  animation: pv-slide-in 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 200ms ease, box-shadow 200ms ease, opacity 300ms ease;
}
.pv-toast[hidden] { display: none !important; }
.pv-toast.pv-toast-leaving {
  opacity: 0;
  transform: translateY(-6px);
}
.pv-toast:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 48px rgba(30, 42, 43, 0.18);
}
.pv-toast:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.pv-toast-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.pv-toast-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pv-toast-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.3;
}
.pv-toast-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.35;
}
.pv-toast-close {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease;
}
.pv-toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
}
@keyframes pv-slide-in {
  0% { opacity: 0; transform: translateY(-16px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 480px) {
  .pv-toast { max-width: calc(100vw - 32px); left: 16px; right: 16px; }
}

/* -------- Match success overlay -------- */
.match-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at center,
    rgba(15, 76, 79, 0.94) 0%,
    rgba(9, 40, 42, 0.98) 60%,
    rgba(9, 40, 42, 1) 100%
  );
  padding: var(--space-6) var(--space-4);
  overflow: hidden;
  animation: match-fade-in 400ms ease-out;
}
.match-overlay[hidden] { display: none !important; }
.match-overlay.match-leaving {
  animation: match-fade-out 350ms ease-in forwards;
}

.match-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  width: 100%;
  color: var(--color-text-inverse);
}

.match-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: match-rise 500ms 200ms ease-out forwards;
}

.match-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-text-inverse);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-8);
  opacity: 0;
  animation: match-rise 500ms 350ms ease-out forwards;
}

.match-cards {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(var(--space-4), 3vw, var(--space-8));
  margin: 0 0 var(--space-8) 0;
  padding: 0;
  flex-wrap: wrap;
}

.match-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  opacity: 0;
  transform: translateY(24px) scale(0.85);
  animation: match-card-pop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.match-card[data-idx="0"] { animation-delay: 550ms; }
.match-card[data-idx="1"] { animation-delay: 750ms; }
.match-card[data-idx="2"] { animation-delay: 950ms; }

.match-photo {
  width: clamp(96px, 15vw, 140px);
  height: clamp(96px, 15vw, 140px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  box-shadow:
    0 0 0 4px rgba(184, 137, 75, 0.25),
    0 20px 40px rgba(0, 0, 0, 0.35);
}

.match-heart {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: match-heart-pop 400ms ease-out forwards;
}
.match-card[data-idx="0"] .match-heart { animation-delay: 850ms; }
.match-card[data-idx="1"] .match-heart { animation-delay: 1050ms; }
.match-card[data-idx="2"] .match-heart { animation-delay: 1250ms; }

.match-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text-inverse);
  margin-top: var(--space-3);
}
.match-meta {
  font-size: var(--text-xs);
  color: rgba(246, 241, 232, 0.7);
  letter-spacing: 0.02em;
}

.match-sub {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(246, 241, 232, 0.85);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: match-rise 500ms 1400ms ease-out forwards;
}

.match-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(184, 137, 75, 0.35);
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
  opacity: 0;
  animation: match-rise 500ms 1500ms ease-out forwards;
}
.match-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(184, 137, 75, 0.45);
}
.match-cta:active { transform: translateY(0); }
.match-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Sparks — radiating particles */
.match-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(184, 137, 75, 0.8), 0 0 24px rgba(184, 137, 75, 0.4);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: spark-burst 2400ms ease-out infinite;
}
.spark-1  { animation-delay: 500ms;  --dx:  180px; --dy: -120px; background: #f4d29a; }
.spark-2  { animation-delay: 650ms;  --dx: -220px; --dy:  -80px; }
.spark-3  { animation-delay: 800ms;  --dx:  260px; --dy:   40px; background: #f4d29a; }
.spark-4  { animation-delay: 400ms;  --dx: -160px; --dy:  180px; }
.spark-5  { animation-delay: 900ms;  --dx:   60px; --dy: -240px; background: #cfe0dd; }
.spark-6  { animation-delay: 1100ms; --dx: -300px; --dy:  100px; background: #f4d29a; }
.spark-7  { animation-delay: 700ms;  --dx:  320px; --dy: -180px; }
.spark-8  { animation-delay: 1300ms; --dx: -100px; --dy:  260px; background: #cfe0dd; }
.spark-9  { animation-delay: 550ms;  --dx:  140px; --dy:  220px; background: #f4d29a; }
.spark-10 { animation-delay: 1050ms; --dx: -260px; --dy: -160px; }
.spark-11 { animation-delay: 850ms;  --dx:  240px; --dy:  180px; background: #cfe0dd; }
.spark-12 { animation-delay: 1200ms; --dx:  -80px; --dy: -260px; background: #f4d29a; }

@keyframes spark-burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  15%  { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1);
  }
}
@keyframes match-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes match-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes match-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes match-card-pop {
  0%   { opacity: 0; transform: translateY(24px) scale(0.85); }
  60%  { transform: translateY(-4px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes match-heart-pop {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Mobile: stack vertically */
@media (max-width: 520px) {
  .match-cards {
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
  }
  .match-card {
    flex-direction: row;
    text-align: left;
    gap: var(--space-4);
    width: 100%;
    max-width: 340px;
  }
  .match-photo {
    width: 72px;
    height: 72px;
  }
  .match-card .match-name,
  .match-card .match-meta {
    margin-top: 0;
  }
  .match-title {
    font-size: var(--text-xl);
  }
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .match-overlay,
  .match-eyebrow,
  .match-title,
  .match-card,
  .match-heart,
  .match-sub,
  .match-cta,
  .spark {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .spark { opacity: 0 !important; }
}
