/* ══════════════════════════════════════════════════════
   COMFYTRIP — SUNRISE EXPRESS WEBSITE
   Full multi-page SPA stylesheet
══════════════════════════════════════════════════════ */

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

:root {
  --terra:       #c95f3a;
  --terra-lt:    #e8845f;
  --terra-pale:  #fdf1ec;
  --terra-mid:   rgba(201, 95, 58, 0.12);
  --blue:        #3b6fe8;
  --blue-pale:   #eef2fd;
  --green:       #2e7d4f;
  --green-pale:  #edf6f1;
  --cream:       #faf6f0;
  --cream-dk:    #f0e8d8;
  --cream-mid:   #e8dcc8;
  --white:       #ffffff;
  --ink:         #1c1410;
  --ink-mid:     #4a3c30;
  --ink-soft:    #7a6a5a;
  --ink-muted:   #a89f97;
  --border:      rgba(28,20,16,0.09);
  --border-md:   rgba(28,20,16,0.15);
  --shadow-xs:   0 1px 4px rgba(28,20,16,0.06);
  --shadow-sm:   0 2px 10px rgba(28,20,16,0.08);
  --shadow-md:   0 6px 28px rgba(28,20,16,0.11);
  --shadow-lg:   0 16px 48px rgba(28,20,16,0.14);
  --font-d:      'Fraunces', Georgia, serif;
  --font-b:      'Plus Jakarta Sans', system-ui, sans-serif;
  --r-sm:  6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --nav-h: 68px;
  --t: 0.22s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-b);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ──────────────────────────────────────────────
   NAVBAR
────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(250,246,240,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color var(--t), box-shadow var(--t);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 36px;
}

.logo-icon { font-size: 22px; line-height: 1; }

.logo-text {
  font-family: var(--font-b);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.logo-text strong {
  font-weight: 700;
  color: var(--terra);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  border: none;
  background: none;
  user-select: none;
}

.nav-link:hover { color: var(--ink); background: var(--cream-dk); }
.nav-link.active { color: var(--terra); background: var(--terra-pale); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-welcome {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 12px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-mid);
  border-radius: 2px;
  transition: all var(--t);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--t);
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--terra); }


/* ──────────────────────────────────────────────
   PAGES (SPA routing)
────────────────────────────────────────────── */
.page {
  display: none;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.page.active { display: block; }


/* ──────────────────────────────────────────────
   BUTTONS (shared)
────────────────────────────────────────────── */
button { font-family: var(--font-b); cursor: pointer; border: none; outline: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--t);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--terra);
  color: #fff;
}
.btn-primary:hover {
  background: var(--terra-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201,95,58,0.32);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink-mid);
  border: 1px solid var(--border-md);
}
.btn-ghost:hover { background: var(--cream-dk); color: var(--ink); }

.btn-white-outline {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
}
.btn-white-outline:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.8);
}

/* ──────────────────────────────────────────────
   INPUT (shared)
────────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.input::placeholder { color: var(--ink-muted); }

.input:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(201,95,58,0.12);
}


/* ──────────────────────────────────────────────
   HOME — HERO
────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(12,10,8,0.72) 0%,
    rgba(20,14,10,0.58) 60%,
    rgba(12,10,8,0.42) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-d);
  font-size: clamp(44px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #f5c084;
}

.hero-sub {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 440px;
}

/* Hero search box */
.hero-search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.97);
  border-radius: var(--r-xl);
  overflow: hidden;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}

.hs-icon {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
  margin-left: 18px;
}

.hs-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 14px 12px;
  outline: none;
}

.hs-input::placeholder { color: var(--ink-muted); }

.hs-btn {
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
  padding: 14px 24px;
  font-size: 14px;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ──────────────────────────────────────────────
   HOME — STATS BAR
────────────────────────────────────────────── */
.stats-bar {
  background: #1a1510;
  padding: 28px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 48px;
}

.stat-n {
  font-family: var(--font-d);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-l {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  margin-top: 5px;
  letter-spacing: 0.3px;
}

.stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}


/* ──────────────────────────────────────────────
   HOME — HOW IT WORKS
────────────────────────────────────────────── */
.hiw-section {
  padding: 80px 0 90px;
  background: var(--cream);
}

.hiw-title {
  font-family: var(--font-d);
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.hiw-sub {
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 50px;
  font-weight: 300;
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hiw-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 34px 30px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t);
}

.hiw-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hiw-num {
  font-family: var(--font-d);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hiw-num.blue   { color: var(--blue); }
.hiw-num.orange { color: var(--terra); }
.hiw-num.green  { color: var(--green); }

.hiw-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.hiw-card-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.65;
}


/* ──────────────────────────────────────────────
   HOME — FOOTER
────────────────────────────────────────────── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-brand {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  color: var(--terra);
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-muted);
}


/* ──────────────────────────────────────────────
   INNER PAGE HEADER (Browse / Post / Chats)
────────────────────────────────────────────── */
.inner-header {
  background: #1a1510;
  padding: 44px 0 40px;
}

.inner-title {
  font-family: var(--font-d);
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.inner-sub {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
}


/* ──────────────────────────────────────────────
   BROWSE PAGE
────────────────────────────────────────────── */
.browse-search-row {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  max-width: 600px;
}

.bsr-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.bsr-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--ink-muted);
  pointer-events: none;
}

.bsr-input {
  width: 100%;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-md);
  font-family: var(--font-b);
  font-size: 14px;
  color: var(--ink);
  padding: 11px 14px 11px 42px;
  outline: none;
  transition: all var(--t);
}

.bsr-input::placeholder { color: var(--ink-muted); }
.bsr-input:focus { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(201,95,58,0.15); }

.browse-body {
  padding: 32px 0 60px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-b);
  border: 1px solid var(--border-md);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--t);
}

.pill:hover { border-color: var(--terra); color: var(--terra); }
.pill.active { background: var(--terra); color: #fff; border-color: var(--terra); }

.results-count {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-weight: 400;
}

/* Request cards — written by app.js */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#requestsList .card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px 26px;
  color: var(--ink);
  margin: 0;
  transition: all var(--t);
  backdrop-filter: none;
  box-shadow: var(--shadow-xs);
  display: block;
}

#requestsList .card:hover {
  border-color: rgba(201,95,58,0.28);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Each <p> inside card rendered by app.js */
#requestsList .card p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-mid);
  padding: 6px 0;
  margin: 0;
  grid-column: unset;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

#requestsList .card p:last-of-type { border-bottom: none; }

#requestsList .card p b {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  flex-shrink: 0;
  margin-right: 12px;
}

#requestsList .card button {
  margin-top: 16px;
  padding: 10px 22px;
  background: var(--terra);
  border: none;
  border-radius: var(--r-md);
  color: #fff;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
}

#requestsList .card button:hover {
  background: var(--terra-lt);
  transform: translateY(-1px);
}

#requestsList .card button:disabled { opacity: 0.4; cursor: default; transform: none; }

#requestsList > p {
  text-align: center;
  color: var(--ink-muted);
  font-style: italic;
  padding: 40px 0;
  font-size: 14px;
}


/* ──────────────────────────────────────────────
   POST PAGE
────────────────────────────────────────────── */
.post-body {
  padding: 40px 0 70px;
  max-width: 600px;
}

/* Login gate */
.login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 60px 40px;
  box-shadow: var(--shadow-sm);
  gap: 12px;
}

.gate-icon { font-size: 40px; margin-bottom: 6px; }

.login-gate h3 {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.login-gate p {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.6;
  max-width: 320px;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.sdot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sdot-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream-dk);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-md);
  transition: all var(--t);
}

.sdot span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color var(--t);
}

.sdot.active .sdot-circle {
  background: var(--terra);
  color: #fff;
  border-color: var(--terra);
  box-shadow: 0 0 0 4px rgba(201,95,58,0.15);
}

.sdot.active span { color: var(--terra); font-weight: 600; }

.sdot.completed .sdot-circle {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.sline {
  flex: 1;
  height: 2px;
  background: var(--border-md);
  margin: 0 12px;
  margin-bottom: 22px;
  transition: background var(--t);
}

/* Form */
.post-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.fstep { padding: 30px 32px; }
.fstep.hidden { display: none; }

.fstep-hd {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.fstep-hd h3 {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.fstep-hd p {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 300;
}

.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mid);
  letter-spacing: 0.2px;
}

.req { color: var(--terra); margin-left: 2px; }
.opt-tag { font-weight: 400; font-size: 11px; color: var(--ink-muted); margin-left: 4px; }

/* Berth radio options */
.berth-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bopt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--cream);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  cursor: pointer;
  transition: all var(--t);
}

.bopt:has(input:checked) {
  background: var(--terra-pale);
  border-color: var(--terra);
  color: var(--terra);
}

.bopt input[type="radio"] { accent-color: var(--terra); width: 14px; height: 14px; }

/* File upload */
.file-label { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.file-hidden { display: none; }

.file-btn {
  padding: 9px 16px;
  background: var(--cream);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  white-space: nowrap;
  transition: all var(--t);
}

.file-label:hover .file-btn {
  background: var(--terra-pale);
  border-color: var(--terra);
  color: var(--terra);
}

.file-name { font-size: 13px; color: var(--ink-muted); }

/* Step actions */
.fstep-actions { display: flex; justify-content: flex-end; }
.fstep-actions.spaced { justify-content: space-between; }

/* Status message */
.status-msg {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--green);
  min-height: 20px;
  margin-top: 14px;
}


/* ──────────────────────────────────────────────
   CHATS PAGE
────────────────────────────────────────────── */
.chats-body {
  padding: 36px 0 70px;
  max-width: 680px;
}

/* Chat list items (created by auth.js) */
.chat-list { display: flex; flex-direction: column; gap: 10px; }

.chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: all var(--t);
  box-shadow: var(--shadow-xs);
  color: var(--ink-mid);
  font-size: 14px;
  font-weight: 500;
}

.chat-item:hover {
  border-color: rgba(201,95,58,0.28);
  box-shadow: var(--shadow-md);
  color: var(--terra);
  transform: translateY(-1px);
}

.chat-item::after {
  content: '→';
  font-size: 18px;
  color: var(--ink-muted);
  transition: all var(--t);
}

.chat-item:hover::after { color: var(--terra); transform: translateX(3px); }

/* Chat view */
.chat-view {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-view-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}

.back-btn {
  background: var(--white);
  border: 1px solid var(--border-md);
  color: var(--ink-mid);
  border-radius: var(--r-md);
  padding: 7px 14px;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
}

.back-btn:hover { background: var(--cream-dk); color: var(--ink); }

.chat-view-name {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.chat-messages {
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  scroll-behavior: smooth;
  background: #fdf9f5;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--cream-mid); border-radius: 4px; }

#chatMessages div {
  max-width: 68%;
  padding: 11px 15px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.5;
}

.my-message {
  background: var(--terra) !important;
  color: #fff !important;
  border-radius: 16px 16px 4px 16px !important;
  margin-left: auto;
  max-width: 68%;
  text-align: right;
}

.my-message small { color: rgba(255,255,255,0.6) !important; font-size: 10px !important; }

.other-message {
  background: var(--white) !important;
  color: var(--ink-mid) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px 16px 16px 4px !important;
  max-width: 68%;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.other-message small { color: var(--ink-muted) !important; font-size: 10px !important; }
#chatMessages small { font-size: 10px; margin-top: 3px; }

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.chat-input-row .input { flex: 1; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 70px 40px;
  gap: 12px;
}

.empty-emoji { font-size: 48px; margin-bottom: 4px; }

.empty-h {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.empty-p {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.65;
  max-width: 320px;
  margin-bottom: 6px;
}


/* ──────────────────────────────────────────────
   ANIMATIONS
────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page.active { animation: fadeUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }


/* ──────────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-actions .btn { display: none; }
  .nav-actions .btn#loginBtn,
  .nav-actions .btn#logoutBtn { display: inline-flex; }

  .hero { height: auto; padding: 60px 0 50px; }
  .hero-title { font-size: 38px; }
  .hero-search-box { max-width: 100%; }
  .hs-btn { padding: 14px 18px; }

  .stats-grid { gap: 0; }
  .stat { padding: 16px 22px; }
  .stat-sep { height: 28px; }

  .hiw-grid { grid-template-columns: 1fr; gap: 14px; }
  .hiw-section { padding: 54px 0 60px; }

  .fgrid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }

  .post-body, .chats-body { padding: 28px 0 50px; }
  .fstep { padding: 22px 18px; }

  .browse-search-row { flex-direction: column; max-width: 100%; }
  .bsr-wrap { width: 100%; }

  .inner-header { padding: 32px 0 28px; }
  .inner-title { font-size: 26px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 32px; }
  .hero-badge { font-size: 10px; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .hero-cta-row { flex-direction: column; }
  .stat { padding: 14px 16px; }
  .stat-n { font-size: 28px; }
}
