/* =====================
   DESIGN SYSTEM - MeetClub Trust Theme
   ===================== */
:root {
  --bg: #FAF5EE;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --dark: #2B2118;
  --text: #2B2118;
  --text-secondary: #5A4A3A;
  --muted: rgba(90, 74, 58, 0.72);
  --primary: #C4552D;
  --primary-hover: #A34523;
  --primary-light: rgba(196, 85, 45, 0.10);
  --accent-peach: #E8B88A;
  --accent-peach-hover: #F0CBA6;
  --danger: #B84A42;
  --danger-light: rgba(184, 74, 66, 0.12);
  --success: #5B7B65;
  --success-hover: #3E5A48;
  --success-light: rgba(91, 123, 101, 0.12);
  --star: #D9A441;
  --border: rgba(43, 33, 24, 0.10);
  --border-hover: rgba(43, 33, 24, 0.22);
  --shadow-sm: 0 4px 16px rgba(43,33,24,0.04);
  --shadow: 0 8px 24px rgba(43,33,24,0.07);
  --shadow-lg: 0 16px 40px rgba(43,33,24,0.10);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* =====================
   LAYOUT
   ===================== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 24px;
  }
}

/* =====================
   TYPOGRAPHY
   ===================== */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

@media (min-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

/* =====================
   CARD
   ===================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .card {
    padding: 28px;
  }
}

/* =====================
   LEGAL PAGES
   ===================== */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.legal-page h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-page .updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 22px;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text);
}

.legal-page h3 {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-page p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text);
}

.legal-page ul {
  margin: 16px 0;
  padding-left: 24px;
}

.legal-page li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text);
}

.legal-page a {
  color: var(--primary);
  text-decoration: none;
}

.legal-page a:hover {
  text-decoration: underline;
}

.contact-info {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.contact-info h3 {
  margin-top: 16px;
  font-size: 16px;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.contact-note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 16px;
  margin-top: 32px;
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .legal-page {
    padding: 24px 20px;
  }

  .legal-page h1 {
    font-size: 26px;
  }

  .legal-page h2 {
    font-size: 20px;
  }
}

/* =====================
   ALERTS
   ===================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(229, 72, 77, 0.2);
}

.alert-ok {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(48, 164, 108, 0.2);
}

/* =====================
   GRID & PANELS
   ===================== */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.panel h3 {
  margin-bottom: 4px;
}

.panel h4 {
  margin: 16px 0 8px;
  color: var(--text-secondary);
}

/* =====================
   FORMS
   ===================== */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 85, 45, 0.14);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c6370' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
}

/* Form spacing in wizards and panels */
.wizard-form label,
.panel label {
  margin-top: 16px;
}

.wizard-form label:first-of-type,
.panel label:first-of-type {
  margin-top: 0;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--bg);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(196,85,45,0.24);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--bg);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #d13438;
  border-color: #d13438;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: var(--success-hover);
  border-color: var(--success-hover);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(43, 33, 24, 0.06);
  color: var(--text);
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-google {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
}

.btn-google:hover {
  background: var(--bg);
  border-color: var(--border-hover);
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

.btn-glow {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(196,85,45,0.30);
}

.btn-glow:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 12px 32px rgba(196,85,45,0.34);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--bg);
}

.btn-dark:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

.btn-peach {
  background: var(--accent-peach);
  border-color: var(--accent-peach);
  color: var(--dark);
}

.btn-peach:hover {
  background: var(--accent-peach-hover);
  border-color: var(--accent-peach-hover);
  color: var(--dark);
}

/* =====================
   NAVIGATION
   ===================== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand .logo-svg {
  width: 32px;
  height: 32px;
}

.logo-svg {
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0;
}

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

.mobile-nav-menu,
.mobile-tabbar {
  display: none;
}

.nav-icon {
  flex-shrink: 0;
}

.chip {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  min-width: 104px;
  width: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip:hover {
  background: rgba(43, 33, 24, 0.06);
  color: var(--text);
}

.chip.active {
  background: var(--success-light);
  color: var(--primary);
}

@media (min-width: 640px) {
  .chip {
    display: inline-flex;
  }
}

.nav-messages {
  position: relative;
}

.badge {
  position: absolute;
  top: 2px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--danger);
  border-radius: 9px;
  line-height: 1;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  background: var(--bg);
}

.me {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 639px) {
  body:has(.mobile-tabbar) .container {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .app-nav {
    position: sticky;
    top: 10px;
    z-index: 70;
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 18px;
  }

  .brand-name {
    font-size: 18px;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav-menu {
    display: block;
    position: relative;
  }

  .mobile-nav-menu summary {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-alt);
    color: var(--text);
    cursor: pointer;
    list-style: none;
    box-shadow: var(--shadow-sm);
  }

  .mobile-nav-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav-menu summary span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-nav-menu[open] summary {
    border-color: var(--border-hover);
    background: var(--primary-light);
    color: var(--primary);
  }

  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(230px, calc(100vw - 32px));
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
  }

  .mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-menu-item:hover,
  .mobile-menu-item.active {
    background: var(--primary-light);
    color: var(--primary);
  }

  .mobile-menu-logout {
    color: var(--danger);
  }

  .mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: min(430px, calc(100vw - 24px));
    margin: 0 auto;
    padding: 6px;
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(43,33,24,0.16);
    backdrop-filter: blur(14px);
  }

  .nav-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 58px;
    gap: 3px;
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
  }

  .nav-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.1;
  }

  .nav-tab.active {
    background: var(--primary);
    color: var(--bg);
  }

  .nav-tab:not(.active):hover {
    background: rgba(43, 33, 24, 0.06);
    color: var(--text);
  }

  .nav-tab .badge {
    top: 4px;
    right: 14px;
  }
}

/* =====================
   PROFILE CARD (Swipe)
   ===================== */
.filter-panel {
  max-width: 640px;
  margin: 0 auto 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.filter-toggle {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: background 0.15s ease;
}

.filter-toggle:hover {
  background: var(--bg);
}

.filter-form {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-range input {
  flex: 1;
  min-width: 0;
}

.filter-range span {
  color: var(--text-secondary);
  font-weight: 500;
}

.filter-form button {
  grid-column: 1 / -1;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .filter-form {
    grid-template-columns: 1fr;
  }

  .filter-form button {
    grid-column: 1;
  }
}

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

.deck-empty {
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
}

.empty-app-state {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: center;
  min-height: 360px;
  padding: 44px 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 16%, rgba(196,85,45,0.12), transparent 34%),
    linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.86) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.empty-app-main {
  max-width: 620px;
}

.empty-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--success-light);
  color: var(--success-hover);
  font-size: 13px;
  font-weight: 700;
}

.empty-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.empty-app-state h1 {
  max-width: 560px;
  margin-bottom: 14px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 46px;
  font-weight: 400;
  line-height: 1.08;
}

.empty-app-state p {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.65;
}

.empty-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.empty-actions form {
  margin: 0;
}

.empty-app-side {
  position: relative;
  min-height: 270px;
}

.empty-stack-card {
  position: absolute;
  width: 280px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(43,33,24,0.08);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.empty-stack-card span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #E8D5C4;
  color: #8A5A3A;
  font-weight: 700;
}

.empty-stack-card strong,
.empty-stack-card small {
  display: block;
}

.empty-stack-card strong {
  color: var(--dark);
  font-size: 16px;
  margin-bottom: 6px;
}

.empty-stack-card small {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.empty-stack-card.card-one {
  top: 4px;
  left: 10px;
  transform: rotate(-3deg);
}

.empty-stack-card.card-two {
  right: 2px;
  bottom: 22px;
  transform: rotate(2deg);
}

.empty-stack-card.card-two span {
  background: var(--success-light);
  color: var(--success-hover);
}

.empty-stack-pill {
  position: absolute;
  left: 38px;
  bottom: 0;
  max-width: 270px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--dark);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(43,33,24,0.20);
}

.empty-filter-panel {
  max-width: none;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .empty-app-state {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }

  .empty-app-side {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .empty-app-state {
    padding: 28px 20px;
  }

  .empty-app-state h1 {
    font-size: 36px;
  }

  .empty-actions,
  .empty-actions .btn,
  .empty-actions form {
    width: 100%;
  }

  .empty-app-side {
    min-height: 360px;
  }

  .empty-stack-card {
    width: min(280px, 100%);
  }

  .empty-stack-card.card-one,
  .empty-stack-card.card-two,
  .empty-stack-pill {
    left: 0;
    right: auto;
  }
}

.profile-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.photo {
  height: 380px;
  background-size: cover;
  background-position: center;
  position: relative;
}

@media (min-width: 480px) {
  .photo {
    height: 440px;
  }
}

.photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 30%, rgba(0,0,0,0.4) 100%);
}

.photo-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.photo-controls .btn {
  background: rgba(255,255,255,0.9);
  border: none;
  color: var(--text);
  padding: 8px 14px;
}

.photo-controls .btn:hover {
  background: #fff;
}

.profile-body {
  padding: 20px;
}

.profile-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-title h2 {
  font-size: 24px;
}

.pill {
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border-radius: 20px;
}

.profile-sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.bio {
  margin: 16px 0 20px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 12px;
}

.actions .btn {
  flex: 1;
  padding: 14px;
  font-size: 15px;
}

/* =====================
   MATCHES
   ===================== */
.list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .list {
    grid-template-columns: 1fr 1fr;
  }
}

.match {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.match:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.match img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}

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

.match .name {
  font-weight: 600;
  color: var(--text);
}

.match .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* =====================
   MATCHES GRID (New Design)
   ===================== */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
  background: var(--bg);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .matches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .matches-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.match-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.match-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.match-photo {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
}

.match-content {
  padding: 16px;
}

.match-header {
  margin-bottom: 10px;
}

.match-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.match-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.match-location svg {
  flex-shrink: 0;
}

.match-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.match-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
}

.match-tag svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.match-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.match-actions .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.match-actions .btn svg {
  flex-shrink: 0;
}

/* =====================
   THUMBS (Profile Edit)
   ===================== */
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .thumbs {
    grid-template-columns: repeat(6, 1fr);
  }
}

.thumb {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-actions {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}

.thumb-actions .btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
}

/* =====================
   LOGIN PAGE
   ===================== */
.login-wrap {
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-logo {
  margin-bottom: 24px;
}

.login-logo .logo-svg {
  width: 72px;
  height: 72px;
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

.login-subtitle {
  color: var(--muted);
  margin-bottom: 32px;
  text-align: center;
  font-size: 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
}

@media (min-width: 480px) {
  .login-card {
    padding: 40px;
  }
}

.login-card .btn-google {
  margin-bottom: 8px;
}

.google-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Login Tabs */
.login-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-tab:hover {
  color: var(--text-secondary);
}

.login-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.login-tab-content {
  display: none;
}

.login-tab-content.active {
  display: block;
}

/* Login Form */
.form-login label {
  margin: 16px 0 6px;
  font-size: 14px;
}

.form-login label:first-of-type {
  margin-top: 0;
}

.form-login input {
  padding: 12px 14px;
  font-size: 15px;
}

.forgot-link,
.auth-back-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.forgot-link:hover,
.auth-back-link:hover {
  color: var(--primary-hover);
}

.auth-back-link {
  width: 100%;
  justify-content: center;
  margin-top: 20px;
}

.btn-full {
  width: 100%;
  margin-top: 20px;
  padding: 12px 18px;
}

/* =====================
   INVITATIONS
   ===================== */
.invite-entry-wrap {
  min-height: calc(100vh - 32px);
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.invite-entry-wrap > p {
  max-width: 540px;
  color: var(--text-secondary);
  font-size: 16px;
}

.invite-entry-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 21px;
  font-weight: 700;
}

.invite-entry-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  font-size: 28px;
  font-weight: 700;
}

.invite-eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.invite-steps {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 14px;
}

.invite-steps span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13px;
}

.invite-steps b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
}

.invite-login-link {
  color: var(--text-secondary);
  font-weight: 600;
}

.invite-confirm {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(91, 123, 101, 0.25);
  border-radius: var(--radius-sm);
  background: var(--success-light);
}

.invite-confirm span {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.signup-locked {
  text-align: center;
}

.signup-locked-icon {
  color: var(--primary);
  font-size: 30px;
  margin-bottom: 8px;
}

.signup-locked p {
  color: var(--text-secondary);
  margin-top: 10px;
}

.invites-page {
  max-width: 880px;
  margin: 32px auto 64px;
}

.invite-hero {
  display: grid;
  gap: 24px;
  padding: 24px 0 30px;
  border-bottom: 1px solid var(--border);
}

.invite-hero h1 {
  margin: 5px 0 10px;
}

.invite-hero p:not(.invite-eyebrow),
.invite-create p,
.invite-row p,
.invite-empty p {
  color: var(--text-secondary);
}

.invite-counter {
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.invite-counter strong {
  font-family: 'Instrument Serif', Georgia, serif;
  color: var(--primary);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
}

.invite-counter span {
  max-width: 90px;
  color: var(--text-secondary);
  font-size: 13px;
}

.invite-create {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.invite-create h2,
.invite-list > h2 {
  margin-bottom: 7px;
}

.invite-list {
  padding-top: 28px;
}

.invite-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.invite-status {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.invite-status-pending { color: var(--primary); }
.invite-status-accepted { color: var(--success); }
.invite-status-expired,
.invite-status-revoked { color: var(--muted); }

.invite-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invite-empty {
  padding: 28px 0;
}

@media (min-width: 700px) {
  .invite-hero {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .invite-create,
  .invite-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =====================
   LANDING PAGE
   ===================== */
.landing {
  min-height: 100vh;
  background: var(--bg);
}

/* Landing Header */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.landing-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
}

.landing-brand .logo-svg {
  width: 36px;
  height: 36px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero Section */
.hero-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 20px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr 1fr;
    padding: 80px 20px 100px;
    gap: 64px;
  }
}

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

@media (min-width: 900px) {
  .hero-content {
    text-align: left;
  }
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 16px;
  color: var(--text);
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 42px;
  }
}

@media (min-width: 900px) {
  .hero-title {
    font-size: 48px;
  }
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 480px;
}

@media (min-width: 900px) {
  .hero-subtitle {
    font-size: 18px;
  }
}

@media (max-width: 899px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

@media (min-width: 900px) {
  .hero-cta {
    justify-content: flex-start;
  }
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  background: var(--bg);
  color: var(--text);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  justify-content: center;
}

@media (min-width: 900px) {
  .hero-trust {
    justify-content: flex-start;
  }
}

.hero-trust svg {
  color: var(--success);
  flex-shrink: 0;
}

/* Hero Visual - Profile Cards */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.hero-cards {
  position: relative;
  width: 280px;
  height: 320px;
}

@media (min-width: 640px) {
  .hero-cards {
    width: 320px;
    height: 360px;
  }
}

.hero-card {
  position: absolute;
  width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.3s ease;
}

@media (min-width: 640px) {
  .hero-card {
    width: 220px;
    padding: 24px;
  }
}

.hero-card-1 {
  top: 0;
  left: 0;
  transform: rotate(-6deg);
  z-index: 1;
}

.hero-card-2 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(3deg);
  z-index: 3;
}

.hero-card-3 {
  bottom: 0;
  right: 0;
  transform: rotate(8deg);
  z-index: 2;
}

.hero-card:hover {
  transform: scale(1.02) rotate(0deg);
  z-index: 10;
}

.hero-card-2:hover {
  transform: translate(-50%, -50%) scale(1.02) rotate(0deg);
}

.hero-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.hero-card-info {
  min-width: 0;
}

.hero-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.hero-card-loc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* Features Section */
.features-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .section-header h2 {
    font-size: 32px;
  }
}

.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius);
  color: var(--primary);
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Stats Section */
.stats-section {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 20px;
}

.stats-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
  }
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

@media (min-width: 640px) {
  .stat-number {
    font-size: 32px;
  }
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

/* CTA Section */
.cta-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 20px;
}

.cta-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .cta-content h2 {
    font-size: 32px;
  }
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 24px;
}

/* Footer */
.landing-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.footer-brand .logo-svg,
.landing-brand .logo-svg {
  width: 36px;
  height: 36px;
}

.footer-brand .logo-svg {
  width: 28px;
  height: 28px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text);
}

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

/* Landing redesign from design handoff */
.container:has(> .landing) {
  max-width: none;
  padding: 0;
}

.landing {
  width: 100%;
  min-height: 100vh;
  margin-left: 0;
  background: var(--bg);
  color: var(--dark);
  overflow: hidden;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 238, 0.92);
  border-bottom: 1px solid rgba(43, 33, 24, 0.08);
  backdrop-filter: blur(12px);
}

.landing-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.landing-brand .logo-svg {
  width: 40px;
  height: 40px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.landing-nav a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.landing-nav a:hover {
  color: var(--primary);
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-section {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -160px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,85,45,0.10) 0%, rgba(196,85,45,0) 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 32px 96px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: left;
}

.trust-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--success-light);
  color: var(--success-hover);
  font-size: 14px;
  font-weight: 600;
}

.trust-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.hero-title {
  max-width: 640px;
  margin: 0;
  color: var(--dark);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-title em {
  color: var(--primary);
  font-style: italic;
}

.hero-subtitle {
  max-width: 480px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(43,33,24,0.2);
  color: var(--dark);
}

.btn-outline:hover {
  border-color: var(--dark);
  background: rgba(43,33,24,0.04);
  color: var(--dark);
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.hero-trust svg {
  color: var(--success);
}

.hero-visual {
  position: relative;
  display: block;
  height: 460px;
  padding: 0;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
}

.vouch-card {
  position: absolute;
  width: 300px;
  background: var(--card);
  border: 1px solid rgba(43,33,24,0.08);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: floatCard 7s ease-in-out infinite;
}

.vouch-card-one {
  --rot: -3deg;
  top: 8px;
  left: 12px;
}

.vouch-card-two {
  --rot: 2deg;
  top: 190px;
  right: 0;
  width: 290px;
  animation-duration: 8s;
  animation-delay: 0.8s;
}

.vouch-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vouch-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
}

.avatar-warm {
  background: #E8D5C4;
  color: #8A5A3A;
}

.avatar-green {
  background: #D6E0D0;
  color: #3E5A48;
}

.avatar-gold {
  background: #EAD9BC;
  color: #8A6A2A;
}

.vouch-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dark);
  font-size: 17px;
  font-weight: 700;
}

.verified-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.vouch-meta {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 14px;
}

.vouch-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.vouch-note strong {
  display: block;
  margin-top: 6px;
  color: var(--dark);
  font-weight: 600;
}

.vouch-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 14px;
}

.vouch-rating span,
.stars {
  color: var(--star);
  letter-spacing: 1px;
}

.vouch-notice {
  --rot: -1deg;
  position: absolute;
  bottom: 0;
  left: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--dark);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(43,33,24,0.25);
  animation: floatCard 6.5s ease-in-out infinite 1.6s;
}

.vouch-notice span {
  color: var(--accent-peach);
}

.trust-bar {
  background: #fff;
  border-top: 1px solid rgba(43,33,24,0.08);
  border-bottom: 1px solid rgba(43,33,24,0.08);
}

.trust-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-bar-inner div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--dark);
  font-size: 15px;
  font-weight: 600;
}

.trust-bar-inner svg {
  color: var(--primary);
}

.landing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 104px 32px;
}

.section-copy {
  max-width: 560px;
  margin-bottom: 64px;
}

.section-copy.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-kicker {
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-section h2,
.trust-section h2,
.faq-section h2,
.landing-final h2 {
  color: var(--dark);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.steps-grid,
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card,
.testimonial-card {
  background: #fff;
  border: 1px solid rgba(43,33,24,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.feature-card {
  padding: 36px 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.steps-grid .step-num {
  margin-bottom: 18px;
  color: var(--primary);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 44px;
  font-style: italic;
  line-height: 1;
}

.feature-card h3,
.testimonial-card h3 {
  margin: 0 0 12px;
  color: var(--dark);
  font-size: 22px;
  font-weight: 700;
}

.feature-card p,
.testimonial-card p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.trust-section,
.landing-final {
  width: 100%;
  background: var(--dark);
  color: var(--bg);
}

.trust-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 104px 32px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: start;
}

.trust-sticky {
  position: sticky;
  top: 120px;
}

.trust-section .section-kicker {
  color: var(--accent-peach);
}

.trust-section h2 {
  margin-bottom: 20px;
  color: var(--bg);
}

.trust-section p {
  max-width: 420px;
  color: rgba(250,245,238,0.72);
  font-size: 17px;
  line-height: 1.65;
}

.trust-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trust-list article {
  display: flex;
  gap: 20px;
  padding: 26px 28px;
  border: 1px solid rgba(250,245,238,0.10);
  border-radius: 20px;
  background: rgba(250,245,238,0.05);
}

.trust-list article > span {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(232,184,138,0.14);
  color: var(--accent-peach);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  font-style: italic;
}

.trust-list h3 {
  margin: 0 0 6px;
  color: var(--bg);
  font-size: 19px;
}

.trust-list p {
  max-width: none;
  margin: 0;
  color: rgba(250,245,238,0.68);
  font-size: 15.5px;
  line-height: 1.6;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
}

.testimonial-card p {
  color: var(--dark);
  font-size: 16.5px;
  line-height: 1.65;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.testimonial-author .vouch-avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.testimonial-author strong,
.testimonial-author small {
  display: block;
}

.testimonial-author strong {
  color: var(--dark);
  font-size: 15px;
}

.testimonial-author small {
  color: var(--text-secondary);
  font-size: 13.5px;
}

.faq-section {
  background: #fff;
  border-top: 1px solid rgba(43,33,24,0.08);
}

.faq-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 104px 32px;
}

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

.faq-item {
  border: 1px solid rgba(43,33,24,0.10);
  border-radius: 16px;
  background: var(--bg);
  overflow: hidden;
}

.faq-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border: 0;
  background: transparent;
  color: var(--dark);
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
}

.faq-item button span {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 22px;
  transition: transform 0.2s ease;
}

.faq-item > div {
  display: none;
  padding: 0 26px 24px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
}

.faq-item.active button span {
  transform: rotate(45deg);
}

.faq-item.active > div {
  display: block;
}

.landing-final-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 104px 32px 88px;
  text-align: center;
}

.landing-final h2 {
  max-width: 720px;
  margin: 0 auto 20px;
  color: var(--bg);
  font-size: 52px;
  line-height: 1.1;
}

.landing-final h2 em {
  color: var(--accent-peach);
  font-style: italic;
}

.landing-final p {
  max-width: 460px;
  margin: 0 auto 36px;
  color: rgba(250,245,238,0.72);
  font-size: 18px;
  line-height: 1.6;
}

.landing-final .landing-footer {
  background: transparent;
  border-top: 1px solid rgba(250,245,238,0.12);
  padding: 0;
}

.landing-final .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: rgba(250,245,238,0.55);
  font-size: 14px;
}

.landing-final .footer-brand {
  color: rgba(250,245,238,0.8);
}

.landing-final .footer-links {
  display: flex;
  gap: 28px;
}

.landing-final .footer-links a {
  color: rgba(250,245,238,0.55);
}

.landing-final .footer-links a:hover {
  color: var(--accent-peach);
}

@media (max-width: 900px) {
  .landing-header-inner {
    flex-wrap: wrap;
  }

  .landing-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 18px;
  }

  .hero-inner,
  .trust-section-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-visual {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }

  .trust-bar-inner,
  .steps-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .trust-sticky {
    position: static;
  }
}

@media (max-width: 640px) {
  .landing-header-inner,
  .hero-inner,
  .landing-section,
  .trust-section-inner,
  .faq-inner,
  .landing-final-content,
  .landing-final .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .landing-actions .btn-ghost,
  .landing-nav {
    display: none;
  }

  .hero-inner {
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .hero-title {
    font-size: 40px;
  }

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

  .hero-visual {
    height: 430px;
  }

  .vouch-card {
    width: min(300px, calc(100vw - 56px));
  }

  .vouch-card-two {
    right: 8px;
  }

  .vouch-notice {
    left: 8px;
    right: 8px;
    max-width: none;
  }

  .landing-section,
  .trust-section-inner,
  .faq-inner {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .landing-section h2,
  .trust-section h2,
  .faq-section h2 {
    font-size: 36px;
  }

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

  .landing-final .footer-inner,
  .landing-final .footer-links {
    flex-direction: column;
  }
}

/* =====================
   ONBOARDING WIZARD
   ===================== */
.wizard-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: var(--bg);
}

.wizard-header {
  width: 100%;
  max-width: 560px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.wizard-progress {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 8px;
}

.wizard-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.2s ease;
}

.wizard-step .step-num {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  line-height: 1;
}

.wizard-step.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(196,85,45,0.24);
}

.wizard-step.completed {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.wizard-step.completed .step-num::after {
  content: '\2713';
}

.wizard-step.completed .step-num {
  font-size: 0;
}

.wizard-line {
  width: 24px;
  height: 2px;
  background: var(--border);
  transition: background 0.2s ease;
}

@media (min-width: 480px) {
  .wizard-line {
    width: 36px;
  }
}

.wizard-line.completed {
  background: var(--success);
}

.wizard-card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .wizard-card {
    padding: 32px;
  }
}

.wizard-card h2 {
  margin-bottom: 6px;
}

.wizard-card > .muted {
  margin-bottom: 24px;
  font-size: 15px;
}

.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.wizard-actions .btn {
  flex: 1;
  padding: 12px 20px;
}

.wizard-skip {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.wizard-skip:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* =====================
   PHOTO GALLERY (Onboarding)
   ===================== */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 480px) {
  .photo-gallery {
    grid-template-columns: repeat(6, 1fr);
  }
}

.photo-slot {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.photo-slot.filled {
  border-style: solid;
  cursor: grab;
}

.photo-slot.filled:active {
  cursor: grabbing;
}

.photo-slot.empty:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-pos {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.photo-add {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.photo-slot.filled:hover .photo-overlay {
  opacity: 1;
}

.btn-photo-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-photo-action:hover {
  background: #fff;
  transform: scale(1.05);
}

.btn-photo-action.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-photo-action.btn-danger:hover {
  background: #d13438;
}

/* Drag states */
.photo-slot.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.photo-slot.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196,85,45,0.16);
}

/* Upload dropzone */
.photo-upload-area {
  margin-top: 12px;
}

.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-dropzone svg {
  color: var(--muted);
  margin-bottom: 8px;
}

.upload-dropzone p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.upload-dropzone .link {
  color: var(--primary);
  font-weight: 500;
}

.upload-dropzone .muted {
  font-size: 13px;
}

.upload-dropzone.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* =====================
   OPTION CARDS (Step 4)
   ===================== */
.option-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 480px) {
  .option-cards {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-card:hover {
  border-color: var(--border-hover);
  background: var(--bg);
}

.option-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-card input {
  display: none;
}

.option-label {
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  color: var(--text);
}

/* =====================
   INTERESTS (Step 5)
   ===================== */
.interests-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 12px;
}

.interest-category h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.interest-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.interest-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-alt);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  transition: all 0.15s ease;
}

.interest-chip:hover {
  border-color: var(--border-hover);
  background: var(--bg);
}

.interest-chip.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.interest-chip input {
  display: none;
}

/* =====================
   PROFILE PREVIEW (Step 6)
   ===================== */
.profile-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}

.preview-photo {
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
}

@media (min-width: 480px) {
  .preview-photo {
    height: 280px;
  }
}

.preview-info {
  padding: 18px;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-header h2 {
  font-size: 22px;
}

.preview-location {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

.preview-bio {
  margin: 14px 0;
  line-height: 1.5;
  color: var(--text-secondary);
}

.preview-looking {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.preview-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.preview-interest-chip {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-alt);
}

/* =====================
   SCROLLBAR
   ===================== */
.interests-grid::-webkit-scrollbar {
  width: 6px;
}

.interests-grid::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 3px;
}

.interests-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.interests-grid::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* =====================
   UTILITY: HR
   ===================== */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* =====================
   CHAT SYSTEM
   ===================== */
.chat-layout {
  display: flex;
  height: calc(100vh - 80px);
  max-width: 1080px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* Chat Sidebar */
.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.chat-conversations {
  flex: 1;
  overflow-y: auto;
}

.chat-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.chat-conv-item:hover {
  background: var(--bg-alt);
}

.chat-conv-item.active {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
}

.chat-conv-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
  flex-shrink: 0;
}

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

.chat-conv-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-preview {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-item.has-unread .chat-conv-name {
  color: var(--primary);
}

.chat-conv-item.has-unread .chat-conv-preview {
  color: var(--text);
  font-weight: 500;
}

.chat-unread-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.chat-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.chat-empty a {
  color: var(--primary);
}

/* Chat Main Area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  min-width: 0;
}

.chat-main-empty {
  justify-content: center;
  align-items: center;
}

.chat-placeholder {
  text-align: center;
  color: var(--muted);
}

.chat-placeholder svg {
  opacity: 0.3;
  margin-bottom: 16px;
}

.chat-placeholder p {
  margin: 0;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.chat-back-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.chat-back-btn:hover {
  background: var(--bg-alt);
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
  flex-shrink: 0;
}

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

.chat-header-name {
  font-weight: 600;
  font-size: 16px;
}

.chat-header-status {
  font-size: 13px;
  color: var(--muted);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-welcome {
  text-align: center;
  padding: 60px 20px;
  margin: auto;
}

.chat-welcome-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
  margin: 0 auto 16px;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow);
}

.chat-welcome h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.chat-welcome p {
  margin: 0;
  color: var(--muted);
}

.chat-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}

.chat-date-divider span {
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
}

.chat-message {
  display: flex;
  max-width: 70%;
}

.chat-message.mine {
  align-self: flex-end;
}

.chat-message.theirs {
  align-self: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  max-width: 100%;
  word-wrap: break-word;
}

.chat-message.mine .chat-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.theirs .chat-bubble {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-text {
  font-size: 15px;
  line-height: 1.4;
}

.chat-time {
  font-size: 11px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.chat-message.mine .chat-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-message.theirs .chat-time {
  color: var(--muted);
}

/* Chat Input */
.chat-input-area {
  padding: 16px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.chat-form {
  display: flex;
  gap: 12px;
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 8px 8px 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.chat-input-wrapper textarea {
  flex: 1;
  border: none;
  background: none;
  resize: none;
  font-size: 15px;
  line-height: 1.4;
  padding: 6px 0;
  max-height: 120px;
  font-family: inherit;
  color: var(--text);
}

.chat-input-wrapper textarea::placeholder {
  color: var(--muted);
}

.chat-input-wrapper textarea:focus {
  outline: none;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

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

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Nav badge for unread messages */
.nav-badge {
  background: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-layout {
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    border-radius: var(--radius-lg);
    margin: 0;
    border: 1px solid var(--border);
  }

  body:has(.mobile-tabbar) .chat-layout {
    height: calc(100vh - 192px);
    height: calc(100dvh - 192px);
  }

  .chat-sidebar {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
    transition: transform 0.3s ease;
  }

  .chat-layout-active .chat-sidebar {
    display: none;
  }

  .chat-layout-list .chat-main-empty {
    display: none;
  }

  .chat-back-btn {
    display: flex;
  }

  .chat-message {
    max-width: 85%;
  }
}

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar,
.chat-conversations::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-conversations::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-conversations::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.chat-conversations::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* =====================
   GLOBAL CHAT
   ===================== */
.gchat-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gchat-header {
  padding: 16px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.gchat-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.gchat-header .muted {
  font-size: 13px;
  margin-top: 2px;
}

.gchat-sender {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.gchat-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
  flex-shrink: 0;
}

.gchat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.gchat-guest-cta {
  padding: 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gchat-guest-cta p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.gchat-layout .chat-message {
  max-width: 80%;
}

.gchat-layout .chat-message.theirs {
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .gchat-layout {
    height: calc(100vh - 100px);
    margin: 0;
  }

  .gchat-layout .chat-message {
    max-width: 90%;
  }
}

/* =====================
   PROFILE VIEW PAGE
   ===================== */
.profile-view-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .profile-view-container {
    grid-template-columns: 400px 1fr;
    align-items: start;
  }
}

.profile-view-photos {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.profile-view-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
}

.profile-photo-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.photo-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.15s ease, transform 0.15s ease;
}

.photo-nav-btn:hover {
  background: white;
  transform: scale(1.1);
}

.photo-counter {
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.profile-view-info {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.profile-view-header {
  margin-bottom: 20px;
}

.profile-view-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.profile-view-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.profile-view-location svg {
  flex-shrink: 0;
}

.profile-vouch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--success);
}

.profile-vouch-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--success-light);
  font-weight: 700;
}

.profile-vouch div {
  display: flex;
  flex-direction: column;
}

.profile-vouch small {
  color: var(--muted);
  font-size: 12px;
}

.profile-vouch strong {
  color: var(--text);
  font-size: 14px;
}

.profile-view-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.profile-view-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-view-section {
  margin-bottom: 24px;
}

.profile-view-section:last-child {
  margin-bottom: 0;
}

.profile-view-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.profile-view-bio {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.profile-view-details {
  display: grid;
  gap: 12px;
}

.profile-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.profile-detail-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-detail-label {
  font-size: 13px;
  color: var(--muted);
  min-width: 80px;
}

.profile-detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

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

.interest-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* =====================
   PROFILE EDIT PAGE
   ===================== */
.profile-edit {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

.profile-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.profile-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  margin-top: 0;
}

.form-group textarea {
  min-height: 80px;
}

.profile-section .option-cards {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.profile-section .option-card {
  padding: 10px 8px;
  font-size: 13px;
}

.profile-section .interests-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-section .interest-category h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.profile-save-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

.profile-save-bar .btn-lg {
  width: 100%;
  max-width: 640px;
  padding: 14px 24px;
  font-size: 16px;
}

.photo-gallery-wrap .upload-dropzone {
  margin-top: 12px;
  padding: 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.photo-gallery-wrap .upload-dropzone:hover,
.photo-gallery-wrap .upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-gallery-wrap .upload-dropzone p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .profile-edit {
    padding: 0 8px 100px;
  }
  .profile-section {
    padding: 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-row-3 {
    grid-template-columns: 1fr 1fr;
  }
  .profile-section .option-cards {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

/* =====================
   ADMIN PANEL
   ===================== */
.admin-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -12px 0 24px;
}

.admin-subnav .chip {
  display: inline-flex;
}

.admin-page {
  display: grid;
  gap: 20px;
  padding-bottom: 56px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-header h1 {
  margin-top: 4px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.admin-stat {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.admin-stat strong {
  display: block;
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
}

.admin-stat span {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.admin-panel {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-panel + .admin-panel {
  margin-top: 4px;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.admin-panel-head a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.admin-search {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-search input {
  max-width: 460px;
}

.admin-edit-table input,
.admin-edit-table select,
.admin-edit-table textarea {
  min-width: 130px;
  margin-bottom: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.admin-edit-table textarea {
  min-width: 220px;
  min-height: 72px;
}

.admin-actions {
  min-width: 150px;
}

.admin-actions form {
  display: inline-flex;
  margin: 0 6px 6px 0;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
}

.admin-check input {
  width: auto;
  min-width: 0;
  margin: 0;
}

@media (max-width: 640px) {
  .admin-search {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-search input,
  .admin-search .btn {
    max-width: none;
    width: 100%;
  }
}
