/* ─────────────────────────────────────────────────────────────────────────────
   styles.css — 1-on-1 Chat
   Phase 2: Full redesign — dark mode, CSS custom properties, Tailwind-inspired
   utilities. No dependency on Semantic UI or any external CSS framework.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --c-bg:          #f8f8fb;
  --c-surface:     #ffffff;
  --c-surface-2:   #f1f1f6;
  --c-border:      #e4e4ec;
  --c-text:        #18181b;
  --c-text-muted:  #71717a;
  --c-text-xmuted: #a1a1aa;
  --c-primary:     #6366f1;   /* indigo */
  --c-primary-d:   #4f46e5;
  --c-primary-bg:  #eef2ff;
  --c-danger:      #ef4444;
  --c-danger-d:    #dc2626;
  --c-success:     #10b981;
  --c-warn:        #f59e0b;
  --c-bubble-me:   #6366f1;
  --c-bubble-them: #ffffff;
  --c-bubble-me-text:   #ffffff;
  --c-bubble-them-text: #18181b;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Menlo, Consolas, monospace;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg:          #0f0f13;
    --c-surface:     #18181f;
    --c-surface-2:   #222228;
    --c-border:      #2e2e38;
    --c-text:        #f4f4f5;
    --c-text-muted:  #a1a1aa;
    --c-text-xmuted: #52525b;
    --c-primary-bg:  #1e1b4b;
    --c-bubble-them: #27272f;
    --c-bubble-them-text: #e4e4ec;
  }
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   INDEX PAGE
   ───────────────────────────────────────────────────────────────────────────── */
.index-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.index-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}

.index-logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--c-primary);
}

.online-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-muted);
}

.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-success);
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}


.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: all 0.15s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--c-primary-d);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}

.btn-ghost:hover { background: var(--c-surface-2); }

.index-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 720px;
  width: 100%;
}

.feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.feature-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 13px;
  color: var(--c-text-muted);
}

/* T&C banner */
.tc-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--c-text-muted);
  z-index: 100;
}

.tc-banner a { color: var(--c-primary); }

.tc-banner .btn {
  padding: 8px 20px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.index-footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--c-text-xmuted);
  border-top: 1px solid var(--c-border);
}


/* ─────────────────────────────────────────────────────────────────────────────
   HOMEPAGE — BELOW-FOLD CONTENT SECTIONS
   ───────────────────────────────────────────────────────────────────────────── */

.content-section {
  padding: 56px 24px;
  border-top: 1px solid var(--c-border);
}

.content-section.alt-bg {
  background: var(--c-surface);
}

.content-inner {
  max-width: 720px;
  margin: 0 auto;
}

.content-narrow {
  max-width: 640px;
}

.content-section h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--c-text);
}

.section-lead {
  font-size: 16px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 600px;
}

.content-section p {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-section p strong {
  color: var(--c-text);
  font-weight: 600;
}

/* ── How it works steps ─────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-primary-bg);
  color: var(--c-primary);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--c-text);
}

.step-desc {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ── Feature cards (below fold) ─────────────────────────────────────────── */
.index-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.feature-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.feature-icon { font-size: 22px; margin-bottom: 8px; }
.feature-title { font-weight: 600; font-size: 14px; margin-bottom: 5px; color: var(--c-text); }
.feature-desc  { font-size: 13px; color: var(--c-text-muted); line-height: 1.55; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--c-border);
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
  cursor: pointer;
  list-style: none;
  background: var(--c-surface);
  user-select: none;
  gap: 12px;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  color: var(--c-text-muted);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.7;
  background: var(--c-surface);
  margin: 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.index-footer {
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}

.footer-logo span { color: var(--c-primary); }

.footer-desc {
  font-size: 13px;
  color: var(--c-text-muted);
}

.footer-legal {
  font-size: 12px;
  color: var(--c-text-xmuted);
  line-height: 1.6;
}

.footer-legal a { color: var(--c-text-muted); text-decoration: underline; }

.footer-copy {
  font-size: 12px;
  color: var(--c-text-xmuted);
  margin-top: 4px;
}

/* ── Nav logo update ─────────────────────────────────────────────────────── */
.index-logo span { color: var(--c-primary); }

/* Mobile tweaks for below-fold */
@media (max-width: 480px) {
  .content-section { padding: 40px 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .index-features { grid-template-columns: 1fr 1fr; }
}


/* ── Trust chips (hero) ──────────────────────────────────────────────────── */
.trust-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* ── Comparison list ─────────────────────────────────────────────────────── */
.comparison-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
}

.comparison-row {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.comparison-row:last-child { border-bottom: none; }

.comparison-row.yes {
  color: var(--c-text);
  background: var(--c-surface);
}

.comparison-row.yes::first-letter {
  /* the ✓ inherits primary colour */
}

/* Colour the ✓ tick green */
.comparison-row.yes {
  background: var(--c-surface);
}

@media (prefers-color-scheme: dark) {
  .comparison-row.yes { background: var(--c-surface); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   CHAT PAGE  
   ───────────────────────────────────────────────────────────────────────────── */
.chat-body {
  height: 100dvh; /* dynamic viewport height (handles mobile keyboard) */
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 60px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  z-index: 10;
}

.header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  user-select: none;
}

.header-info { flex: 1; min-width: 0; }

.header-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c-text-muted);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-connecting   { background: var(--c-text-xmuted); }
.status-waiting      { background: var(--c-warn); animation: pulse-amber 1.5s ease-in-out infinite; }
.status-paired       { background: var(--c-success); }
.status-disconnected { background: var(--c-danger); }

@keyframes pulse-amber {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-online {
  font-size: 12px;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* ── Icon buttons ─────────────────────────────────────────────────────────── */
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.12s var(--ease);
}

.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.icon-btn.danger:hover { background: #fef2f2; color: var(--c-danger); border-color: #fecaca; }
@media (prefers-color-scheme: dark) {
  .icon-btn.danger:hover { background: #450a0a; border-color: #7f1d1d; }
}

/* ── Message area ─────────────────────────────────────────────────────────── */
.msgs-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}

/* Thin custom scrollbar */
.msgs-wrapper::-webkit-scrollbar { width: 4px; }
.msgs-wrapper::-webkit-scrollbar-track { background: transparent; }
.msgs-wrapper::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 2px; }

/* System messages */
.msg-system {
  text-align: center;
  font-size: 12px;
  color: var(--c-text-xmuted);
  padding: 6px 12px;
  margin: 8px auto;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  max-width: 360px;
  line-height: 1.4;
}

/* Message rows */
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.msg-row.msg-visible { opacity: 1; transform: translateY(0); }

.msg-mine   { flex-direction: row-reverse; }
.msg-theirs { flex-direction: row; }

/* Avatars in message list (stranger only) */
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #fff;
  align-self: flex-end;
  margin-bottom: 2px;
}

/* Bubbles */
.msg-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: var(--radius-xl);
  position: relative;
  word-break: break-word;
}

.msg-mine .msg-bubble {
  background: var(--c-bubble-me);
  color: var(--c-bubble-me-text);
  border-bottom-right-radius: var(--radius-sm);
}

.msg-theirs .msg-bubble {
  background: var(--c-bubble-them);
  color: var(--c-bubble-them-text);
  border: 1px solid var(--c-border);
  border-bottom-left-radius: var(--radius-sm);
}

.msg-text {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.msg-mine .msg-text a    { color: rgba(255,255,255,0.85); }
.msg-theirs .msg-text a  { color: var(--c-primary); }

.msg-time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.65;
  text-align: right;
}

/* ── Typing indicator ────────────────────────────────────────────────────── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 8px;
  font-size: 12px;
  color: var(--c-text-muted);
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dot {
  width: 6px; height: 6px;
  background: var(--c-text-xmuted);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-5px); }
}

/* ── Idle warning ─────────────────────────────────────────────────────────── */
.idle-warning {
  background: #fef3c7;
  border-top: 1px solid #fde68a;
  padding: 10px 16px;
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .idle-warning { background: #451a03; border-color: #78350f; color: #fcd34d; }
}

.idle-warning strong { font-weight: 600; }

/* ── Composer ─────────────────────────────────────────────────────────────── */
.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}

.composer-left {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.composer-input-wrap {
  flex: 1;
  position: relative;
}

.composer-input {
  width: 100%;
  resize: none;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.15s var(--ease);
  max-height: 120px;
  overflow-y: auto;
  display: block;
}

.composer-input:focus {
  border-color: var(--c-primary);
}

.composer-input:disabled {
  background: var(--c-surface-2);
  color: var(--c-text-xmuted);
  cursor: not-allowed;
}

.composer-input::-webkit-scrollbar { width: 3px; }

.send-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--c-primary);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.12s var(--ease);
  flex-shrink: 0;
  align-self: flex-end;
}

.send-btn:hover:not(:disabled) { background: var(--c-primary-d); transform: scale(1.08); }
.send-btn:disabled { background: var(--c-border); cursor: not-allowed; }

/* ── End/New/Home action buttons ─────────────────────────────────────────── */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s var(--ease);
  text-decoration: none;
}

.action-btn:hover { background: var(--c-surface-2); color: var(--c-text); }

.action-btn.danger { color: var(--c-danger); border-color: #fecaca; }
.action-btn.danger:hover { background: #fef2f2; }
@media (prefers-color-scheme: dark) {
  .action-btn.danger { border-color: #7f1d1d; }
  .action-btn.danger:hover { background: #450a0a; }
}

.action-btn.primary { color: var(--c-primary); border-color: #c7d2fe; }
.action-btn.primary:hover { background: var(--c-primary-bg); }
@media (prefers-color-scheme: dark) {
  .action-btn.primary { border-color: #3730a3; }
  .action-btn.primary:hover { background: #1e1b4b; }
}

/* ── Confirmation dialog (native <dialog>) ───────────────────────────────── */
dialog {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  color: var(--c-text);
  padding: 28px;
  max-width: 360px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

dialog::backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}

.dialog-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dialog-body {
  font-size: 14px;
  color: var(--c-text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Connecting skeleton (Phase 3) ───────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--c-surface-2) 25%,
    var(--c-border) 50%,
    var(--c-surface-2) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ── Mobile tweaks ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .header-online { display: none; }
  .msg-bubble { max-width: 85%; }
  .action-btn span { display: none; } /* icon only on tiny screens */
  .action-btn { padding: 8px 10px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   INTERESTS — homepage
   ───────────────────────────────────────────────────────────────────────────── */
.interests-section {
  width: 100%;
  max-width: 680px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.interests-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.interests-optional {
  font-weight: 400;
  color: var(--c-text-muted);
  font-size: 13px;
}

.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s var(--ease);
  user-select: none;
}

.interest-pill:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-bg);
}

.interest-pill.selected {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.interest-pill.selected:hover {
  background: var(--c-primary-d);
  border-color: var(--c-primary-d);
  color: #fff;
}

.interests-custom-row {
  display: flex;
  gap: 8px;
}

.interests-custom-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.12s var(--ease);
}

.interests-custom-input:focus { border-color: var(--c-primary); }

.interests-custom-add {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s var(--ease);
}

.interests-custom-add:hover {
  background: var(--c-primary-bg);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.interests-selected-label {
  font-size: 12px;
  color: var(--c-text-muted);
  min-height: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHARED INTERESTS BAR — chat page
   ───────────────────────────────────────────────────────────────────────────── */
.shared-interests-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--c-primary-bg);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (prefers-color-scheme: dark) {
  .shared-interests-bar { background: #1e1b4b; }
}

.shared-interests-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  white-space: nowrap;
}

.shared-interests-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shared-interest-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--c-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SKIP BUTTON
   ───────────────────────────────────────────────────────────────────────────── */
.skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
  align-self: flex-end;
}

.skip-btn:hover:not(:disabled) {
  background: var(--c-surface-2);
  color: var(--c-text);
  border-color: var(--c-text-muted);
}

/* First click — confirm state, yellow */
.skip-btn.skip-confirm {
  border-color: var(--c-warn);
  color: #92400e;
  background: #fef3c7;
  animation: skip-pulse 0.5s ease;
}

@media (prefers-color-scheme: dark) {
  .skip-btn.skip-confirm { background: #451a03; color: #fcd34d; border-color: #78350f; }
}

/* Second click — skipping, brief red flash */
.skip-btn.skip-active {
  border-color: var(--c-danger);
  color: var(--c-danger);
  background: #fef2f2;
}

@media (prefers-color-scheme: dark) {
  .skip-btn.skip-active { background: #450a0a; }
}

/* Searching state — muted, disabled */
.skip-btn.skip-searching {
  opacity: 0.45;
  cursor: not-allowed;
}

.skip-btn:disabled {
  cursor: not-allowed;
}

.skip-icon {
  font-size: 14px;
}

@keyframes skip-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Adjust composer layout so skip button fits naturally */
.chat-composer {
  gap: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   INTERESTS — shared styles (index + chat)
   ───────────────────────────────────────────────────────────────────────────── */

.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.interest-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.13s var(--ease);
  user-select: none;
  white-space: nowrap;
}

.interest-pill:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-bg);
}

.interest-pill.selected {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.interests-custom-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.interests-custom-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s var(--ease);
}

.interests-custom-input:focus { border-color: var(--c-primary); }

.interests-custom-add {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s var(--ease);
  white-space: nowrap;
}

.interests-custom-add:hover {
  background: var(--c-primary-bg);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* ── INDEX PAGE layout ──────────────────────────────────────────────────── */
.index-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 40px;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.hero-text { text-align: center; }

.index-hero-title {
  font-size: clamp(24px, 4.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.index-hero-title span { color: var(--c-primary); }

.index-hero-sub {
  font-size: 14px;
  color: var(--c-text-muted);
  letter-spacing: 0.2px;
}

/* ── Interests card ─────────────────────────────────────────────────────── */
.interests-section {
  width: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.interests-section-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.interests-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.interests-hint {
  font-size: 12px;
  color: var(--c-text-muted);
}

.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interests-grid-extra { margin-top: -6px; }

.interest-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s var(--ease);
  user-select: none;
}

.interest-pill:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-bg);
}

.interest-pill.selected {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.interest-pill.selected:hover {
  background: var(--c-primary-d);
  border-color: var(--c-primary-d);
}

.interests-more-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-top: -4px;
}

.interests-more-btn:hover { text-decoration: underline; }

.interests-custom-row {
  display: flex;
  gap: 8px;
}

.interests-custom-input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.12s var(--ease);
}
.interests-custom-input:focus { border-color: var(--c-primary); }

.interests-custom-add {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s var(--ease);
  white-space: nowrap;
}
.interests-custom-add:hover {
  background: var(--c-primary-bg);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* ── Wait time section ──────────────────────────────────────────────────── */
.wait-time-section {
  border-top: 1px solid var(--c-border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeSlideIn 0.2s var(--ease);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wait-time-header { display: flex; flex-direction: column; gap: 2px; }

.wait-time-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}

.wait-time-hint {
  font-size: 12px;
  color: var(--c-text-muted);
}

.wait-time-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wait-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  cursor: pointer;
  transition: all 0.12s var(--ease);
  text-align: center;
}

.wait-option:hover {
  border-color: var(--c-primary);
  background: var(--c-primary-bg);
}

.wait-option.selected {
  border-color: var(--c-primary);
  background: var(--c-primary-bg);
  box-shadow: 0 0 0 1px var(--c-primary);
}

.wait-option-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1;
}

.wait-option.selected .wait-option-label { color: var(--c-primary); }

.wait-option-desc {
  font-size: 10px;
  color: var(--c-text-muted);
  line-height: 1.3;
}

.wait-time-explainer {
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
}

.wait-time-explainer strong { color: var(--c-text); font-weight: 600; }

/* ── CTA button ─────────────────────────────────────────────────────────── */
.btn-cta {
  width: 100%;
  max-width: 340px;
  justify-content: center;
  font-size: 17px;
  padding: 16px 32px;
}

/* ── Selected label ─────────────────────────────────────────────────────── */
.interests-selected-label {
  font-size: 12px;
  color: var(--c-text-muted);
  text-align: center;
  min-height: 16px;
}

/* ── Features section (below fold) ─────────────────────────────────────── */
.features-section {
  border-top: 1px solid var(--c-border);
  padding: 32px 24px;
}

.index-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.feature-icon { font-size: 20px; margin-bottom: 6px; }
.feature-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.feature-desc  { font-size: 12px; color: var(--c-text-muted); line-height: 1.5; }

/* Mobile */
@media (max-width: 480px) {
  .wait-time-options { grid-template-columns: repeat(2, 1fr); }
  .wait-option-desc  { display: none; }
}

/* ── CHAT PAGE interests bar /* ── CHAT PAGE interests bar ──────────────────────────────────────────────── */
.chat-interests-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-interests-bar::-webkit-scrollbar { display: none; }

.chat-interests-label {
  font-size: 12px;
  color: var(--c-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-interests-pills {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-interests-pills::-webkit-scrollbar { display: none; }

.chat-interest-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--c-primary-bg);
  color: var(--c-primary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}

@media (prefers-color-scheme: dark) {
  .chat-interest-pill { background: #1e1b4b; color: #a5b4fc; }
}

.chat-interest-none {
  font-size: 12px;
  color: var(--c-text-xmuted);
  font-style: italic;
}

.chat-interests-edit {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s var(--ease);
  white-space: nowrap;
}

.chat-interests-edit:hover {
  background: var(--c-surface-2);
  color: var(--c-text);
}

/* ── Interests overlay panel ──────────────────────────────────────────────── */
.interests-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.interests-panel {
  background: var(--c-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slide-up 0.22s var(--ease);
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.interests-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.interests-panel-title {
  font-size: 16px;
  font-weight: 700;
}

.interests-panel-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--c-surface-2);
  color: var(--c-text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.interests-panel-close:hover { background: var(--c-border); }

.interests-panel-sub {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SKIP BUTTON — 3-state
   ───────────────────────────────────────────────────────────────────────────── */
.skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  user-select: none;
}

/* idle */
.skip-btn.skip-idle:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-bg);
}

/* confirm — amber, pulsing border */
.skip-btn.skip-confirm {
  border-color: var(--c-warn);
  color: #92400e;
  background: #fef3c7;
  animation: warn-pulse 0.5s ease-in-out 1;
}

@media (prefers-color-scheme: dark) {
  .skip-btn.skip-confirm { background: #451a03; color: #fcd34d; border-color: #d97706; }
}

@keyframes warn-pulse {
  0%  { transform: scale(1); }
  40% { transform: scale(1.05); }
  100%{ transform: scale(1); }
}

/* disconnected — red flash */
.skip-btn.skip-disconnected {
  border-color: var(--c-danger);
  color: var(--c-danger);
  background: #fef2f2;
}

@media (prefers-color-scheme: dark) {
  .skip-btn.skip-disconnected { background: #450a0a; }
}

/* searching — purple pulse */
.skip-btn.skip-searching {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-bg);
  animation: searching-pulse 1.2s ease-in-out infinite;
  cursor: default;
}

@keyframes searching-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
