:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body.theme-business {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #0f766e;
  --accent-fg: #ffffff;
  --accent-soft: #ccfbf1;
}

body.theme-dating {
  --bg: #faf6f0;
  --surface: #fffdf9;
  --surface-alt: #f3ebe0;
  --text: #2c241e;
  --muted: #6e5f53;
  --border: #e6dacb;
  --accent: #b85d3b;
  --accent-fg: #ffffff;
  --accent-soft: #f7e4db;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.blurred { filter: blur(10px); pointer-events: none; user-select: none; }

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 18px; font-size: 0.92rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }

.hero { padding: 72px 0 48px; }
.hero-warm { padding: 64px 0 40px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.warm-kicker {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.hero-title {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  max-width: 22ch;
}
.theme-dating .hero-title { font-family: var(--font-serif); font-weight: 600; }
.hero-summary {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-sm { padding: 7px 13px; font-size: 0.84rem; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-danger { background: #dc2626; color: #fff; }
.link-chip {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.metric-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.metric-val { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.metric-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.section { padding: 40px 0; border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.section-num { font-family: var(--font-mono); font-size: 0.84rem; color: var(--accent); }
.section-head h2 { margin: 0; font-size: 1.38rem; letter-spacing: -0.015em; }

.timeline { display: flex; flex-direction: column; gap: 22px; }
.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.timeline-period { font-family: var(--font-mono); font-size: 0.84rem; color: var(--muted); padding-top: 4px; }
.timeline-body h3 { margin: 0 0 6px; font-size: 1.08rem; }
.subline { margin: 0 0 10px; font-size: 0.9rem; color: var(--accent); font-weight: 500; }
.bullet-list { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.bullet-list li { margin-bottom: 6px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card, .story-card, .contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.tag { font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); }
.status-pill {
  font-size: 0.74rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
}
.card h3, .story-card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.card p, .story-card p { margin: 0 0 12px; color: var(--muted); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.snapshot-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.snapshot-label { font-size: 0.78rem; color: var(--muted); }
.snapshot-value { font-weight: 600; font-size: 0.96rem; }

.story-stack { display: flex; flex-direction: column; gap: 18px; }
.contact-card { margin: 28px 0; }
.small-note { font-size: 0.85rem; margin-top: 14px; }
.muted { color: var(--muted); }

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 96px;
  font-size: 0.84rem;
  color: var(--muted);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Optional Passcode Gate */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28, 22, 18, 0.55);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.gate-form { display: flex; gap: 8px; margin-top: 16px; }
.gate-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.gate-error { color: #dc2626; font-size: 0.85rem; margin-top: 10px; }

/* Full-Duplex Realtime Bot Launcher + Drawer */
.bot-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.bot-fab .pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
}

.bot-drawer {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: min(430px, calc(100vw - 24px));
  height: min(720px, calc(100vh - 28px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bot-avatar-stage {
  position: relative;
  width: 100%;
  height: 168px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.bot-avatar-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.bot-stage-pill {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  color: var(--accent);
  border: 1px solid var(--border);
}
.bot-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-alt);
}
.bot-title { font-weight: 700; font-size: 0.98rem; margin: 0; }
.bot-sub { font-size: 0.78rem; color: var(--muted); margin: 2px 0 0; }
.bot-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 6px;
}

.bot-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  gap: 8px;
}
.bot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.bot-voice-bar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--accent-soft) 35%, var(--surface));
}
.bot-wave {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bot-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.bot-msg.assistant {
  align-self: flex-start;
  background: var(--surface-alt);
  color: var(--text);
}
.bot-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-fg);
}
.bot-msg.system {
  align-self: center;
  font-size: 0.76rem;
  color: var(--muted);
  background: transparent;
  padding: 4px 8px;
}

.bot-starters {
  padding: 0 14px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.starter-btn {
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.starter-btn:hover { border-color: var(--accent); color: var(--accent); }

.bot-composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.bot-composer input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .nav a { display: none; }
}
