/* ── Theme tokens ─────────────────────────── */

:root {
  --primary: #0891b2;          /* teal accent */
  --primary-hover: #0e7490;    /* darker on hover */
  --primary-active: #155e75;   /* darkest on press */
  --text: #1c1917;             /* warm near-black */
}

/* ── Reset & Base ─────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Plus Jakarta Sans renders tight by default. open up word spacing slightly
     so phrases breathe without making the text look loose. */
  word-spacing: 0.04em;
  letter-spacing: 0.005em;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input, select {
  font-family: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
}

a {
  -webkit-tap-highlight-color: transparent;
}

/* ── Page transitions ────────────────────── */

.page {
  display: none;
  height: 100dvh;
  flex-direction: column;
}

.page.active {
  display: flex;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hidden {
  display: none !important;
}

/* ── Avatars ─────────────────────────────── */

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-xs {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Loading page ────────────────────────── */

#loading-page {
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e5e5;
  border-top-color: #888;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Navbar ───────────────────────────────── */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  height: calc(52px + env(safe-area-inset-top));
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--primary);
}

/* Two-tone wordmark: Parl in primary teal, App in #1C1917. Wraps the
   "App" half of the brand wherever the wordmark appears as visible text. */
.brand-app {
  color: #1C1917;
}

/* Keep the wordmark monochrome where the parent already sets a color
   (footer, welcome screen, join screen). The two-tone effect only fires
   in the navbar where Parl is teal. */
.landing-footer .brand-app,
.welcome-brand .brand-app,
.join-brand .brand-app {
  color: inherit;
}
.nav-logo-img {
  width: 36px;
  height: 36px;
  display: block;
  margin-right: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
}

.link-btn {
  border: none;
  background: none;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.link-btn:hover {
  color: #555;
}

.btn-signin {
  padding: 8px 18px;
  border: 1px solid #ddd;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-signin:hover {
  background: #fafafa;
  border-color: #ccc;
}

/* ── Landing page ────────────────────────── */

#landing-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse 1000px 520px at 50% 0%, #cffafe 0%, transparent 70%),
    linear-gradient(180deg, #ecfeff 0%, #ffffff 480px);
}

.hero {
  padding: 56px 24px 48px;
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}

.hero-content {
  /* On mobile this just acts as a pass-through; on desktop it becomes
     the left column. */
  display: contents;
}

.hero-visual {
  display: contents;
}

.hero-logo {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 20px;
  filter: drop-shadow(0 6px 18px rgba(8, 145, 178, 0.18));
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--text);
}

.hero p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Hero pills ────────────────────────── */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 28px;
  max-width: 440px;
}

.hero-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: #ecfeff;
  border-radius: 999px;
  border: 1px solid #a5f3fc;
  letter-spacing: 0.1px;
}

/* ── Chat preview mockup ────────────────── */
.chat-preview {
  width: 100%;
  max-width: 380px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 22px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.18), 0 4px 14px rgba(0,0,0,0.05);
  border: 1px solid #e0f2fe;
  text-align: left;
}

.chat-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}

.chat-preview-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-preview-header-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-preview-header-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.chat-preview-header-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}

.chat-preview-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-preview-row-me {
  justify-content: flex-end;
}

.chat-preview-bubble {
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  background: #f4f4f5;
  color: #222;
  max-width: 80%;
}

.chat-preview-bubble-me {
  background: var(--primary);
  color: #fff;
}

.chat-preview-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Voice bubble */
.chat-preview-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 22px;
  background: #f4f4f5;
  max-width: 80%;
}

.chat-preview-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.chat-preview-play svg {
  margin-left: 1px;
}

.chat-preview-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  flex: 1;
}

.chat-preview-wave span {
  display: block;
  width: 3px;
  background: #b0b0b0;
  border-radius: 1.5px;
}

.chat-preview-wave span:nth-child(1)  { height: 30%; }
.chat-preview-wave span:nth-child(2)  { height: 55%; }
.chat-preview-wave span:nth-child(3)  { height: 75%; }
.chat-preview-wave span:nth-child(4)  { height: 90%; }
.chat-preview-wave span:nth-child(5)  { height: 70%; }
.chat-preview-wave span:nth-child(6)  { height: 45%; }
.chat-preview-wave span:nth-child(7)  { height: 60%; }
.chat-preview-wave span:nth-child(8)  { height: 80%; }
.chat-preview-wave span:nth-child(9)  { height: 95%; }
.chat-preview-wave span:nth-child(10) { height: 70%; }
.chat-preview-wave span:nth-child(11) { height: 50%; }
.chat-preview-wave span:nth-child(12) { height: 35%; }
.chat-preview-wave span:nth-child(13) { height: 55%; }
.chat-preview-wave span:nth-child(14) { height: 70%; }
.chat-preview-wave span:nth-child(15) { height: 45%; }
.chat-preview-wave span:nth-child(16) { height: 30%; }

.chat-preview-duration {
  font-size: 11px;
  color: #777;
  font-weight: 500;
  flex-shrink: 0;
}

.chat-preview-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #777;
  text-align: center;
  font-weight: 500;
}

/* Two-column hero on tablet+ */
@media (min-width: 901px) {
  .hero {
    max-width: 1100px;
    padding: 80px 32px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    text-align: left;
  }

  .hero-content,
  .hero-visual {
    display: flex;
    flex-direction: column;
  }

  .hero-content {
    align-items: flex-start;
  }

  .hero-visual {
    align-items: center;
  }

  .hero-logo {
    width: 88px;
    height: 88px;
    margin: 0 0 24px;
  }

  .hero h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -1.8px;
  }

  .hero p {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-pills {
    margin-left: 0;
    justify-content: flex-start;
  }

  .chat-preview {
    margin: 0;
    max-width: 460px;
    padding: 20px 22px 26px;
  }

  .chat-preview-bubble,
  .chat-preview-voice {
    max-width: 86%;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }
}

/* ── Features section ───────────────────── */

.features {
  padding: 64px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.features-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 36px;
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.feature {
  padding: 24px;
  background: #fff;
  border: 1px solid #e0f2fe;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.10);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
  color: var(--text);
}

.feature p {
  font-size: 14px;
  color: #666;
  line-height: 1.55;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 10px;
  min-height: 48px;
  width: 100%;
  max-width: 300px;
}

.get-app-section {
  text-align: center;
  padding: 32px 24px 8px;
}

.play-badge {
  display: inline-block;
  line-height: 0;
}

.play-badge img {
  height: 96px;
  width: auto;
}

.landing-divider {
  width: 48px;
  height: 1px;
  background: #e5e5e5;
  margin: 0 auto;
}

.how-it-works {
  padding: 48px 24px 64px;
  max-width: 680px;
  margin: 0 auto;
}

.how-it-works h2 {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 36px;
  color: var(--text);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 260px;
  margin: 0 auto;
}

.step {
  text-align: center;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.10);
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step p {
  font-size: 14px;
  color: #888;
  line-height: 1.5;
}

/* ── Home stats strip ───────────────────── */

.home-stats {
  padding: 32px 24px 8px;
  border-top: 1px solid #ecfeff;
  border-bottom: 1px solid #ecfeff;
  background: #fff;
}

.home-stats-inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  text-align: center;
}

.home-stat-num {
  font-size: clamp(24px, 4.6vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 4px;
  /* Long phrases like "Context-aware" or longer locale translations should
     wrap before they overflow the column. */
  overflow-wrap: break-word;
  word-break: normal;
}

.home-stat-plus,
.home-stat-amp {
  color: var(--text);
  font-weight: 700;
  margin-left: 2px;
}

.home-stat-amp {
  margin: 0 4px;
  color: #b7c1c7;
}

.home-stat-label {
  font-size: 13px;
  color: #777;
  font-weight: 500;
}

/* ── Feature rows (alternating, product-mock heavy) ─── */

.feature-row {
  padding: 56px 24px;
  background: #fff;
}

.feature-row-tint {
  background: #f8fdff;
}

.feature-row-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.feature-row-text {
  display: flex;
  flex-direction: column;
}

.feature-row h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  color: var(--text);
  margin: 8px 0 14px;
}

.feature-row-lede {
  font-size: 16px;
  color: #555;
  line-height: 1.65;
  margin-bottom: 20px;
}

.feature-row-quiet {
  font-size: 14px;
  color: #888;
  line-height: 1.55;
  margin-top: -6px;
}

.feature-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.feature-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-checklist li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: #444;
  line-height: 1.5;
}

.feature-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfeff, #cffafe);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230891b2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>"),
    linear-gradient(135deg, #ecfeff, #cffafe);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px, cover;
}

.feature-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.feature-tag {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #ecfeff;
  color: var(--primary);
  border: 1px solid #a5f3fc;
  border-radius: 999px;
}

.feature-row-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mini chat mock for feature rows */

.feature-mini-chat {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e0f2fe;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.18), 0 4px 14px rgba(0,0,0,0.05);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-mini-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 90%;
  background: #f4f4f5;
  color: #222;
}

.feature-mini-bubble-them { align-self: flex-start; }
.feature-mini-bubble-me {
  align-self: flex-end;
  flex-direction: row-reverse;
  background: var(--primary);
  color: #fff;
}

.feature-mini-bubble-voice {
  padding: 6px 10px 6px 6px;
  border-radius: 22px;
}

.feature-mini-flag img {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  display: block;
}

.feature-mini-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  background: #ecfeff;
  border-radius: 999px;
  border: 1px dashed #a5f3fc;
}

/* Mini chat-list mock for feature row 3 */

.feature-mini-list {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e0f2fe;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.18), 0 4px 14px rgba(0,0,0,0.05);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-mini-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  transition: background 0.15s;
}

.feature-mini-list-row:hover {
  background: #f8fdff;
}

.feature-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

.feature-mini-list-meta {
  flex: 1;
  min-width: 0;
}

.feature-mini-list-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-mini-list-snippet {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-mini-list-flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Polished how-it-works ──────────────── */

.how-it-works.home-section-block {
  background: transparent;
  padding: 80px 24px;
}

.how-it-works-inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.how-it-works-inner h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 8px 0 36px;
  color: var(--text);
}

.steps-pro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 420px;
  margin: 0 auto;
  align-items: stretch;
}

.steps-pro .step {
  position: relative;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid #e0f2fe;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.06);
  text-align: center;
}

.steps-pro .step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.steps-pro .step p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.steps-pro .step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.30);
}

.step-arrow {
  display: none;
}

/* Tablet: 3 cards side by side, no arrows between them */
@media (min-width: 700px) {
  .steps-pro {
    grid-template-columns: repeat(3, 1fr);
    max-width: 920px;
    gap: 18px;
  }
}

/* Desktop: 3 cards with arrows between */
@media (min-width: 1000px) {
  .steps-pro {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    max-width: none;
    gap: 16px;
  }
  .step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    align-self: center;
  }
}

/* ── Honest privacy section ────────────── */

.security-section-pro {
  background: #f8fdff;
  padding: 64px 24px;
}

.security-section-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.security-section-pro h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin: 8px 0 14px;
}

.security-section-pro p {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
}

/* ── Big closing CTA ────────────────────── */

.home-final-cta {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  padding: 80px 24px;
  text-align: center;
  color: #fff;
}

.home-final-cta-inner {
  max-width: 620px;
  margin: 0 auto;
}

.home-final-cta h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
}

.home-final-cta p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  max-width: 520px;
  margin: 0 auto 28px;
}

.home-final-cta-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.home-final-cta .btn-primary {
  background: #fff;
  color: var(--primary);
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.home-final-cta .btn-primary:hover {
  background: #f8fdff;
  color: var(--primary-hover);
}

.home-final-cta-store img {
  height: 56px;
  display: block;
}

/* Wider screens. alternating feature rows go side-by-side */

@media (min-width: 901px) {
  .home-stats-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .home-stat-num {
    /* clamp at base scales fine into desktop, just bump the cap a bit */
    font-size: clamp(28px, 3.4vw, 38px);
  }

  .feature-row {
    padding: 96px 32px;
  }

  .feature-row-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
  }

  /* Flip variant: text on left, visual on right */
  .feature-row-inner-flip > .feature-row-text {
    order: 1;
  }
  .feature-row-inner-flip > .feature-row-visual {
    order: 2;
  }

  .feature-row h2 {
    font-size: 36px;
    letter-spacing: -1.2px;
  }

  .feature-row-lede {
    font-size: 17px;
  }

  .home-final-cta h2 {
    font-size: 40px;
  }
}

/* ── About section ──────────────────────── */

.about-section {
  padding: 0 24px 40px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.about-section p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

/* ── Security section ─────────────────── */

.security-section {
  padding: 48px 24px;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.security-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #f0faf0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #34a853;
}

.security-section h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--text);
}

.security-section p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

/* ── Trust signal ──────────────────────── */

.trust-signal {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-top: 32px;
  line-height: 1.5;
}

/* ── FAQ section ───────────────────────── */

.faq-section {
  padding: 48px 24px 64px;
  max-width: 600px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 28px;
  color: var(--text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid #f0f0f0;
}

.faq-item summary {
  padding: 16px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  color: #222;
}

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

.faq-item summary::after {
  content: '+';
  float: right;
  font-size: 18px;
  color: #999;
  font-weight: 300;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  padding: 0 0 16px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* ── Footer ────────────────────────────── */

.landing-footer {
  padding: 28px 24px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  color: #ccc;
  border-top: 1px solid #f0f0f0;
  margin-top: auto;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-weight: 400;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  font-size: 12px;
}

.footer-links a:hover {
  color: #666;
}

/* ── Join page (invite link) ─────────────── */

.join-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
}

.join-card {
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.join-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #555;
}

.join-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text);
}

.join-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 28px;
}

.join-e2e {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  color: #34a853;
  font-weight: 500;
}

.join-brand {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #ddd;
  letter-spacing: -0.4px;
}

/* ── Buttons ─────────────────────────────── */

.btn-primary {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  min-height: 46px;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(8, 145, 178, 0.32);
}

.btn-primary:active {
  background: var(--primary-active);
  transform: translateY(1px);
}

.btn-secondary {
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  min-height: 46px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: #fafafa;
  border-color: #ccc;
}

.btn-secondary:active {
  background: #f0f0f0;
}

/* ── Home page ───────────────────────────── */

.home-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
}

.home-card {
  max-width: 380px;
  width: 100%;
}

.home-section {
  padding: 4px 0;
}

.home-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.home-section p {
  font-size: 14px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 16px;
}

.home-section .btn-primary {
  width: 100%;
}

.home-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #ccc;
  font-size: 13px;
}

.home-divider::before,
.home-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

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

.input-row input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  min-height: 46px;
  transition: border-color 0.15s;
}

.input-row input:focus {
  border-color: #aaa;
}

/* ── Room header ─────────────────────────── */

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  border-bottom: 1px solid #f0f0f0;
  min-height: 48px;
  flex-shrink: 0;
  gap: 8px;
}

.room-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

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

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  min-width: 40px;
  min-height: 40px;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: #333;
  background: #f5f5f5;
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.e2e-badge {
  display: flex;
  align-items: center;
  color: #34a853;
  flex-shrink: 0;
}

.room-code {
  font-size: 13px;
  color: #999;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  font-weight: 500;
  white-space: nowrap;
}

.link-btn-sm {
  border: none;
  background: none;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.link-btn-sm:hover {
  color: #555;
}

/* ── UI language picker ─────────────────── */

.ui-lang-picker {
  position: relative;
}

.ui-lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  min-height: 36px;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.ui-lang-btn:hover {
  border-color: #ccc;
  background: #fafafa;
}

.ui-lang-btn svg {
  color: #999;
  flex-shrink: 0;
}

.ui-lang-label {
  letter-spacing: 0.5px;
}

.ui-lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 55;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

.ui-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  min-height: 38px;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.ui-lang-option:hover {
  background: #f5f5f5;
}

.ui-lang-option:active {
  background: #eee;
}

.ui-lang-option.selected {
  background: #f0f0f0;
  font-weight: 500;
}

.ui-lang-option .flag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Language picker (header, compact) ────── */

.lang-picker {
  position: relative;
}

.lang-picker-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: #333;
  cursor: pointer;
  min-height: 40px;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.lang-picker-btn:hover {
  border-color: #ccc;
  background: #fafafa;
}

.lang-picker-btn .flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
}

.lang-picker-label {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 50;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.lang-option:hover {
  background: #f5f5f5;
}

.lang-option:active {
  background: #eeeeee;
}

.lang-option.selected {
  background: #f0f0f0;
  font-weight: 500;
}

.lang-option .flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Language overlay (full screen on mobile) ── */

.lang-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.18s ease;
}

.lang-overlay-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: env(safe-area-inset-bottom);
}

.lang-overlay-card h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  text-align: center;
  margin-bottom: 4px;
  padding-top: 24px;
  flex-shrink: 0;
}

.lang-overlay-card > p {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.lang-search-wrap {
  position: relative;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.lang-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  pointer-events: none;
}

.lang-search-wrap input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  min-height: 48px;
  transition: border-color 0.15s;
  background: #fafafa;
}

.lang-search-wrap input:focus {
  border-color: #aaa;
  background: #fff;
}

.lang-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 16px;
}

.lang-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 12px;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: background 0.1s;
  flex-shrink: 0;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

.lang-list-item:hover {
  background: #f5f5f5;
}

.lang-list-item:active {
  background: #eeeeee;
}

.lang-list-item.selected {
  background: #f0f0f0;
  font-weight: 500;
}

.lang-list-item .flag {
  width: 28px;
  height: 21px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.lang-list-empty {
  text-align: center;
  color: #ccc;
  font-size: 14px;
  padding: 32px 0;
}

/* ── Partner bar ─────────────────────────── */

.partner-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #555;
  font-weight: 500;
  flex-shrink: 0;
}

.partner-dot {
  color: #ccc;
}

.partner-lang {
  color: #999;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.partner-lang-flag {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

/* ── Status banner ───────────────────────── */

.status-banner {
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  color: #999;
  background: #fcfcfc;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

/* ── Messages ────────────────────────────── */

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.message {
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.message.received {
  align-self: flex-start;
  align-items: flex-start;
}

.voice-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 22px;
  background: #f4f4f4;
  transition: background 0.1s;
}

.message.sent .voice-bubble {
  background: #ebebeb;
}

/* Text bubble */
.text-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  background: #f4f4f4;
  font-size: 15px;
  line-height: 1.4;
  color: #222;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
  transition: background 0.1s;
}

.message.sent .text-bubble {
  background: #ebebeb;
}

.text-bubble-translated {
  display: block;
}

.text-bubble-original {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  color: #888;
  font-style: italic;
}

.msg-toggle-original {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}

.msg-toggle-original:hover {
  color: #555;
}

.play-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.play-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.play-btn:active {
  background: #e8e8e8;
}

.play-btn svg {
  display: block;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 28px;
}

.waveform .bar {
  width: 3px;
  background: #c0c0c0;
  border-radius: 1.5px;
  min-height: 3px;
  transition: background 0.2s;
}

.message.sent .waveform .bar {
  background: #aaa;
}

.waveform.playing .bar {
  background: #666;
}

.message.sent .waveform.playing .bar {
  background: #555;
}

.msg-time {
  font-size: 11px;
  color: #bbb;
  padding: 0 4px;
}

.msg-transcript {
  font-size: 12px;
  color: #999;
  padding: 0 4px;
  line-height: 1.4;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85%;
  cursor: pointer;
  display: block;
}

.msg-transcript.expanded {
  white-space: normal;
  text-overflow: unset;
}

/* ── Invite panel ───────────────────────── */

.invite-panel {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.invite-panel-inner {
  text-align: center;
  width: 100%;
  max-width: 340px;
  padding: 0 8px;
}

.invite-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.invite-panel-sub {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.invite-link-row {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
  gap: 8px;
  margin-bottom: 16px;
}

.invite-link-text {
  flex: 1;
  font-size: 13px;
  color: #666;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.invite-copy-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 36px;
  transition: background 0.15s;
}

.invite-copy-btn:hover {
  background: var(--primary-hover);
}

.invite-copy-btn:active {
  background: var(--primary-active);
}

.invite-share-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

.share-btn:hover {
  background: #fafafa;
  border-color: #ccc;
}

.share-btn:active {
  background: #f0f0f0;
}

.share-whatsapp {
  color: #25d366;
}

.share-email {
  color: #555;
}

.share-sms {
  color: #555;
}

/* ── Empty state ─────────────────────────── */

.empty-state {
  margin: auto;
  text-align: center;
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
  padding: 0 20px;
}

/* ── Processing dots ─────────────────────── */

.processing-indicator {
  align-self: flex-start;
  padding: 14px 18px;
  border-radius: 22px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.processing-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bbb;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.processing-indicator .dot:nth-child(2) { animation-delay: 0.15s; }
.processing-indicator .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Controls ────────────────────────────── */

.controls {
  padding: 10px 12px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.my-lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #777;
  background: #f4f4f5;
  border-radius: 999px;
  align-self: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.my-lang-chip:hover {
  background: #ebebed;
}

.my-lang-chip-flag {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Compose row (text + send + translate toggle) */
.compose-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 720px;
}

.compose-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 22px;
  background: #fafafa;
  font-size: 15px;
  outline: none;
  min-height: 42px;
  transition: border-color 0.15s, background 0.15s;
}

.compose-input:focus {
  border-color: #bbb;
  background: #fff;
}

.compose-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.send-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.send-btn:disabled {
  background: #d4d4d8;
  cursor: not-allowed;
}

.send-btn svg {
  margin-left: -2px;
}

.record-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.record-btn:hover:not(:disabled) {
  background: #f5f5f5;
}

.record-btn:active:not(:disabled) {
  background: #eee;
}

.record-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.record-btn.recording {
  border-color: #e54;
  background: #fff5f4;
  color: #e54;
  animation: recordPulse 1.8s ease-in-out infinite;
}

.record-btn.recording .mic-icon {
  display: none;
}

.record-btn.recording .stop-icon {
  display: block !important;
}

@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(238, 85, 68, 0.15); }
  50% { box-shadow: 0 0 0 12px rgba(238, 85, 68, 0); }
}

.record-label {
  font-size: 13px;
  color: #bbb;
  min-height: 18px;
  font-weight: 500;
}

/* ── Toast ────────────────────────────────── */

.toast {
  position: fixed;
  bottom: max(110px, calc(100px + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  transition: opacity 0.25s;
  max-width: calc(100vw - 48px);
  text-align: center;
}

.toast.fade-out {
  opacity: 0;
}

/* ── Blog ────────────────────────────────── */

.blog-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.blog-page body,
.blog-page {
  height: auto;
  overflow: auto;
}

.blog-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.blog-nav-logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--primary);
  text-decoration: none;
}

.blog-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-nav-link {
  font-size: 14px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}

.blog-nav-link:hover {
  color: var(--text);
}

.blog-hero {
  padding: 56px 24px 40px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.blog-hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.blog-hero p {
  font-size: 15px;
  color: #888;
}

.blog-grid {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.blog-card {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.blog-card:hover {
  border-color: #ddd;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.blog-card-tag {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blog-card h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.blog-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-card-meta {
  font-size: 12px;
  color: #bbb;
}

/* ── Blog post ───────────────────────────── */

.blog-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.blog-article-tag {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.blog-article h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text);
}

.blog-article-meta {
  font-size: 13px;
  color: #bbb;
  margin-bottom: 36px;
}

.blog-article h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text);
}

.blog-article h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #222;
}

.blog-article p {
  font-size: 16px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 18px;
}

.blog-article ul, .blog-article ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.blog-article li {
  font-size: 16px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 6px;
}

.blog-article blockquote {
  border-left: 3px solid #e0e0e0;
  margin: 24px 0;
  padding: 12px 20px;
  color: #666;
  font-style: italic;
}

.blog-cta {
  margin: 40px 0;
  padding: 28px;
  background: #f8f8f8;
  border-radius: 12px;
  text-align: center;
}

.blog-cta h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text);
}

.blog-cta p {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.blog-cta .btn-primary {
  display: inline-block;
  text-decoration: none;
}

.blog-cta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--primary);
  border-radius: 10px;
  color: #fff;
}

.blog-cta-inline p {
  font-size: 14px;
  color: #ccc;
  margin: 0;
  line-height: 1.4;
}

.blog-cta-inline strong {
  color: #fff;
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.blog-cta-inline a {
  flex-shrink: 0;
  padding: 10px 20px;
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.blog-cta-inline a:hover {
  background: #eee;
}

@media (max-width: 600px) {
  .blog-cta-inline {
    flex-direction: column;
    text-align: center;
  }
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  margin-bottom: 32px;
}

.blog-back:hover {
  color: #555;
}

/* ── Blog landing-page sections ─────────── */

.blog-page-hero {
  position: relative;
  padding: 64px 24px 48px;
  text-align: center;
  background:
    radial-gradient(ellipse 1000px 520px at 50% 0%, #cffafe 0%, transparent 70%),
    linear-gradient(180deg, #ecfeff 0%, #ffffff 600px);
}

.blog-page-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.blog-tag-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.blog-tag-row .blog-tag-pill {
  padding: 5px 12px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
}

.blog-tag-row .blog-tag-meta {
  color: #888;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.blog-page-hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.blog-lede {
  font-size: 18px;
  color: #555;
  line-height: 1.5;
  margin: 0 auto 28px;
  max-width: 580px;
}

.blog-page-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-page-hero-cta .btn-primary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  font-size: 16px;
}

.blog-page-hero-cta .blog-secondary-link {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  font-weight: 500;
}

.blog-page-hero-cta .blog-secondary-link:hover {
  color: var(--primary);
}

/* Play Store badge under the blog hero CTA */
.blog-hero-store {
  display: inline-block;
  margin-top: 20px;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.blog-hero-store img {
  height: 56px;
  width: auto;
  display: block;
}

/* Side-by-side CTA + Play Store in the closing block */
.blog-final-cta-buttons {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-final-cta-store {
  display: inline-block;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.blog-final-cta-store img {
  height: 56px;
  width: auto;
  display: block;
}

/* Stats strip directly under hero */
.blog-stats-strip {
  background: #fff;
  border-top: 1px solid #ecfeff;
  border-bottom: 1px solid #ecfeff;
  padding: 18px 24px;
}

.blog-stats-strip-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  font-size: 13px;
  color: #666;
}

.blog-stats-strip-inner span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.blog-stats-strip-inner svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Plain content section (full-width background) */
.blog-section {
  padding: 56px 24px;
  background: #fff;
}

.blog-section-tint {
  background: #f8fdff;
}

.blog-section-dark {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  color: #fff;
}

.blog-section-dark h2,
.blog-section-dark h3,
.blog-section-dark strong {
  color: #fff;
}

.blog-section-dark p {
  color: rgba(255, 255, 255, 0.92);
}

.blog-section-inner {
  max-width: 680px;
  margin: 0 auto;
}

.blog-section h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
  color: var(--text);
}

.blog-section h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.blog-section p {
  font-size: 16px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 18px;
}

.blog-section ul,
.blog-section ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.blog-section li {
  font-size: 16px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 8px;
}

/* Eyebrow above the H2 in tinted sections */
.blog-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

/* Two-column comparison block */
.blog-compare {
  padding: 56px 24px;
  background: #fff;
}

.blog-compare-inner {
  max-width: 920px;
  margin: 0 auto;
}

.blog-compare-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
  color: var(--text);
}

.blog-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.compare-card {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
}

.compare-card-good {
  border-color: #a5f3fc;
  background: linear-gradient(180deg, #ecfeff 0%, #fff 100%);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.10);
}

.compare-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.compare-card-good h3 {
  color: var(--primary);
}

.compare-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compare-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: #444;
  padding: 8px 0;
}

.compare-card .compare-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.compare-card-bad .compare-icon {
  color: #be7c7c;
}

.compare-card-good .compare-icon {
  color: var(--primary);
}

/* Product-preview section */
.blog-product-preview {
  padding: 56px 24px;
  background:
    radial-gradient(ellipse 800px 400px at 50% 50%, #ecfeff 0%, transparent 70%),
    #f8fdff;
  text-align: center;
}

.blog-product-preview-inner {
  max-width: 480px;
  margin: 0 auto;
}

.blog-product-preview h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text);
}

.blog-product-preview p {
  font-size: 15px;
  color: #666;
  margin: 0 0 28px;
  line-height: 1.5;
}

.blog-product-preview .chat-preview {
  margin: 0 auto;
}

/* Big closing CTA section */
.blog-final-cta {
  padding: 80px 24px;
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  color: #fff;
  text-align: center;
}

.blog-final-cta-inner {
  max-width: 620px;
  margin: 0 auto;
}

.blog-final-cta h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
}

.blog-final-cta p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  margin: 0 auto 28px;
  max-width: 520px;
}

.blog-final-cta .btn-primary {
  display: inline-block;
  padding: 14px 32px;
  font-size: 16px;
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-final-cta .btn-primary:hover {
  background: #f8fdff;
  color: var(--primary-hover);
}

/* In-content CTA banner (improved) */
.blog-section .blog-cta-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  border-radius: 14px;
  color: #fff;
  margin: 32px 0;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.20);
}

.blog-section .blog-cta-banner-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.blog-section .blog-cta-banner-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
  color: #fff;
}

.blog-section .blog-cta-banner a {
  flex-shrink: 0;
  padding: 10px 22px;
  background: #fff;
  color: var(--primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.blog-section .blog-cta-banner a:hover {
  background: #f8fdff;
}

@media (max-width: 600px) {
  .blog-section .blog-cta-banner {
    flex-direction: column;
    text-align: center;
  }
}

/* Wider screens. comparison goes side by side, hero gets bigger */
@media (min-width: 760px) {
  .blog-page-hero {
    padding: 96px 24px 72px;
  }
  .blog-page-hero h1 {
    font-size: 52px;
    letter-spacing: -1.6px;
  }
  .blog-lede {
    font-size: 19px;
  }
  .blog-section h2 {
    font-size: 30px;
  }
  .blog-compare-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .blog-final-cta h2 {
    font-size: 40px;
  }
}

/* ── Desktop / wider screens ─────────────── */

@media (min-width: 601px) {
  .navbar {
    padding: 0 24px;
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
  }

  .hero p {
    font-size: 17px;
  }

  .btn-lg {
    width: auto;
  }

  .how-it-works {
    padding: 64px 24px 80px;
  }

  .how-it-works h2 {
    font-size: 20px;
    margin-bottom: 44px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    max-width: none;
  }

  .home-section .btn-primary {
    width: auto;
  }

  .room-header {
    padding: 10px 16px;
    padding-top: max(10px, env(safe-area-inset-top));
    min-height: 52px;
  }

  .message {
    max-width: 320px;
  }

  .lang-overlay {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
  }

  .lang-overlay-card {
    max-width: 400px;
    height: auto;
    max-height: 80dvh;
    padding: 0;
    border-radius: 16px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: #fff;
    padding: 0 20px 20px;
    padding-top: 0;
  }

  .lang-overlay-card h2 {
    padding-top: 28px;
  }

  .lang-list-item {
    font-size: 14px;
    padding: 11px 14px;
    min-height: 44px;
  }

  .lang-list-item .flag {
    width: 24px;
    height: 18px;
  }

  .invite-panel-inner {
    max-width: 380px;
  }
}

/* ── Onboarding (native app) ─────────────── */

#onboarding-page {
  background: #fff;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
  position: relative;
}

.onb-skip {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 16px);
  right: 20px;
  background: none;
  border: none;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  z-index: 2;
}

.onb-skip:active {
  color: var(--text);
}

.onb-slides {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onb-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  padding: 0 8px;
  animation: fadeIn 0.25s ease;
}

.onb-slide.active {
  display: flex;
}

.onb-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  color: var(--text);
}

.onb-icon-img,
.welcome-icon-img {
  background: transparent;
  border-radius: 0;
  width: auto;
  height: auto;
}

.onb-icon-img img,
.welcome-icon-img img {
  display: block;
  object-fit: contain;
}

.onb-icon-img img {
  width: 144px;
  height: 144px;
}

.welcome-icon-img img {
  width: 112px;
  height: 112px;
}

.onb-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}

.onb-sub {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}

.onb-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
}

.onb-dots {
  display: flex;
  gap: 8px;
}

.onb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: background 0.2s, width 0.2s;
}

.onb-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.onb-next {
  width: 100%;
  max-width: 360px;
}

/* ── Welcome (native app) ─────────────────── */

#welcome-page {
  background: #fff;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
}

.welcome-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
}

.welcome-brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  position: absolute;
  top: calc(env(safe-area-inset-top) + 20px);
  left: 50%;
  transform: translateX(-50%);
}

.welcome-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  color: var(--text);
}

.welcome-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 320px;
  margin-bottom: 12px;
}

.welcome-sub {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
  max-width: 320px;
}

.welcome-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
}

.welcome-google-btn {
  width: 100%;
  max-width: 360px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 500;
  color: #3c4043;
  padding: 0 24px;
  transition: background 0.15s, box-shadow 0.15s;
}

.welcome-google-btn:active {
  background: #f5f5f5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.welcome-legal {
  font-size: 12px;
  color: #888;
  text-align: center;
  max-width: 320px;
  line-height: 1.5;
}

.welcome-legal a {
  color: #555;
  text-decoration: underline;
}

/* ── Chats list ───────────────────────────── */

.chats-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 24px;
  box-sizing: border-box;
}

.chats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chats-toolbar h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.new-chat-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.new-chat-btn:hover {
  background: var(--primary-hover);
}

.chats-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-row:hover {
  background: #f4f4f5;
}

.chat-row-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e5e5e7;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-row-meta {
  flex: 1;
  min-width: 0;
}

.chat-row-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row-snippet {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.chat-row-time {
  font-size: 12px;
  color: #999;
}

.chat-row-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chats-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #777;
  gap: 12px;
  padding: 60px 20px;
}

.chats-empty-icon {
  color: #c4c4c8;
}

.chats-empty p {
  margin: 0;
  font-size: 14px;
}

/* ── New chat / simple page chrome ────────── */

.simple-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid #ececef;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.simple-header h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.new-chat-main {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
  box-sizing: border-box;
}

.new-chat-desc {
  color: #666;
  font-size: 14px;
  margin: 0 0 16px;
}

.new-chat-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.new-chat-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.new-chat-form input:focus {
  border-color: var(--primary);
}

.new-chat-form button {
  padding: 0 18px;
}

.new-chat-result {
  min-height: 60px;
}

.new-chat-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  margin-top: 8px;
}

.new-chat-result-card .avatar-sm {
  width: 44px;
  height: 44px;
}

.new-chat-result-info {
  flex: 1;
  min-width: 0;
}

.new-chat-result-name {
  font-weight: 600;
  font-size: 15px;
}

.new-chat-result-sub {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

.new-chat-result-msg {
  padding: 14px;
  border-radius: 12px;
  background: #fafafa;
  color: #555;
  font-size: 14px;
  margin-top: 8px;
}

.new-chat-result-msg .btn-primary {
  margin-top: 10px;
}

/* ── Chat (stub) ──────────────────────────── */

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid #ececef;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-peer-meta {
  flex: 1;
  min-width: 0;
}

.chat-peer-name {
  font-weight: 600;
  font-size: 15px;
}

.chat-peer-lang {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.coming-soon {
  margin: auto;
  color: #999;
  font-size: 14px;
  text-align: center;
}

.chat-header-actions {
  margin-left: auto;
}

.chat-header .lang-picker-btn {
  padding: 6px 10px;
}

.message.pending {
  opacity: 0.6;
}

.message.failed {
  opacity: 1;
}

.message.failed .voice-bubble {
  border: 1px solid #d33;
}

.msg-retry {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #d33;
  background: #fff;
  border: 1px solid #d33;
  border-radius: 6px;
  cursor: pointer;
}

.msg-status {
  font-size: 11px;
  color: #999;
  margin-left: 6px;
  letter-spacing: -1px;
}

.msg-status.seen {
  color: #2563eb;
}

.message.sent .msg-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 18px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.message.sent {
  position: relative;
}

.message.sent:hover .msg-delete,
.message.sent:focus-within .msg-delete {
  opacity: 1;
}

.msg-delete:hover {
  background: rgba(0,0,0,0.06);
  color: #d33;
}

.message.deleted .voice-bubble,
.message.deleted .text-bubble {
  background: #f4f4f5 !important;
  color: #999;
  font-style: italic;
  padding: 10px 14px;
  min-width: 0;
}

.msg-deleted-placeholder {
  font-size: 13px;
  color: #888;
}

@media (hover: none) {
  .message.sent .msg-delete {
    opacity: 0.6;
  }
}

.messages-loading {
  margin: 24px auto;
  color: #999;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.messages-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e5e5;
  border-top-color: #888;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Invite share card ────────────────────── */

.invite-share-card {
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  background: #fff;
}

.invite-share-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}

.invite-share-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f4f5;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.invite-share-link {
  flex: 1;
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.invite-share-copy {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.invite-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.invite-share-btn {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.invite-share-btn:hover {
  background: #fafafa;
}

.invite-share-native {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.invite-share-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
