/* ── Design tokens ────────────────────────────────────────────────── */
:root {
  --bg:       #f4f6f9;
  --surface:  #ffffff;
  --border:   #e4e8ee;
  --border-2: #f0f2f6;
  --ink:      #111827;
  --ink-2:    #374151;
  --muted:    #6b7280;
  --muted-2:  #9ca3af;
  --blue:     #1d4ed8;
  --green:    #059669;
  --amber:    #f59e0b;
  --red:      #dc2626;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --radius:    12px;
  --radius-sm: 8px;
  --topbar-h:  62px;
  --sidebar-w: 280px;
  --bottom-h:  64px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin-top: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
input, select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--ink); }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn.full { width: 100%; }
.btn-primary {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.btn-primary:hover { background: #1f2937; }
.btn-outline {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost {
  color: var(--muted);
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--ink); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 0.82rem; }

/* ── Top bar ──────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
  font-size: 1rem;
}
.brand-name { color: var(--ink); }

.product-promise {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.product-promise strong {
  color: var(--ink);
  font-weight: 850;
}
.product-promise span {
  color: var(--muted);
}

/* Desktop view toggle */
.view-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.view-btn {
  min-height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.view-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  box-shadow: var(--shadow-xs);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.account-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink);
  transition: border-color .15s;
}
.account-btn:hover { border-color: var(--ink); }
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ── Workspace (3-column desktop) ────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) minmax(0, 1.1fr);
  min-height: calc(100vh - var(--topbar-h));
}

/* split view = default (sidebar + results + map) */
.workspace[data-view="split"] .filter-panel,
.workspace[data-view="split"] .results-pane,
.workspace[data-view="split"] .map-panel { display: flex; }

/* list view = sidebar + results, no map */
.workspace[data-view="list"] {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.workspace[data-view="list"] .map-panel { display: none; }

/* map view = sidebar + map, no results */
.workspace[data-view="map"] {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.workspace[data-view="map"] .results-pane { display: none; }

/* community view = sidebar + renter posts, no listing/map panes */
.workspace[data-view="community"] {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.workspace[data-view="community"] .results-pane,
.workspace[data-view="community"] .map-panel { display: none; }
.workspace[data-view="community"] .seekers-section { display: block; }

/* ── Filter sidebar ───────────────────────────────────────────────── */
.filter-panel {
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - var(--topbar-h));
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
}
.filter-panel { display: flex; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header strong { font-size: 1.05rem; }
.reset-link {
  border: none;
  background: none;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}
.reset-link:hover { text-decoration: underline; }

.filter-section { display: flex; flex-direction: column; gap: 10px; }
.filter-label {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-label em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
  color: var(--muted-2);
  font-weight: 500;
}

.input-with-icon { position: relative; }
.field-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.input-with-icon input { padding-left: 34px; }

/* Price */
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-chip {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.preset-chip:hover, .preset-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.choice-chip {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.choice-chip:hover,
.choice-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.amenity-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
}
.amenity-chip input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 15px;
  width: 15px !important;
  height: 15px !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  accent-color: var(--ink);
}
.amenity-chip span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.amenity-chip:has(input:checked) {
  border-color: var(--ink);
  background: #f8fafc;
}
.price-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.price-sep { width: 12px; height: 1px; background: var(--border); margin-bottom: 22px; }
.price-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.dollar-wrap { position: relative; }
.dollar-wrap span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.88rem;
  pointer-events: none;
}
.dollar-wrap input { padding-left: 24px; min-height: 40px; }

/* Rental type radio rows */
.type-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.type-row:hover { border-color: var(--ink); }
.type-row input[type="radio"] { display: none; }
.type-row:has(input:checked) {
  border-color: var(--ink);
  background: var(--bg);
}
.type-icon {
  flex: 0 0 28px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}
.type-text { display: flex; flex-direction: column; gap: 1px; }
.type-text strong { font-size: 0.88rem; }
.type-text small { font-size: 0.76rem; color: var(--muted); }

/* Freshness */
.freshness-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.fresh-btn {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.fresh-btn:hover { border-color: var(--ink); color: var(--ink); }
.fresh-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-text strong { font-size: 0.88rem; }
.toggle-text small { font-size: 0.76rem; color: var(--muted); }
.toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background .2s;
  padding: 0;
}
.toggle-switch[aria-checked="true"] { background: var(--ink); }
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .2s;
}
.toggle-switch[aria-checked="true"] .toggle-knob { transform: translateX(18px); }

/* Live badge */
.live-badge {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.live-badge strong { font-size: 1.6rem; line-height: 1; }
.live-badge span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

/* ── Results pane ─────────────────────────────────────────────────── */
.results-pane {
  flex-direction: column;
  background: var(--bg);
  min-width: 0;
}
.results-pane { display: flex; }

.results-header {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
}
.results-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.results-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.location-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.results-count {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}
.result-sub { margin: 0; font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

.filter-trigger {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.filter-trigger:hover { border-color: var(--ink); }

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-2);
  font-size: 0.85rem;
}
.sort-label { color: var(--muted); font-size: 0.82rem; }

.sort-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sort-btn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2, #344054);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.sort-btn:hover { border-color: var(--ink); }
.sort-btn.active {
  background: var(--ink, #111827);
  color: #fff;
  border-color: var(--ink, #111827);
}
/* Dialog variant: full-width stacked pills */
.sort-group-dialog {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.sort-group-dialog .sort-btn {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.875rem;
  justify-content: center;
}

.sources-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .12s;
  white-space: nowrap;
}
.sources-btn:hover { border-color: var(--ink); }
.sources-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}
.sources-count:empty { display: none; }

/* Sources popover */
.sources-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 600;
  width: min(420px, calc(100vw - 32px));
  max-height: min(560px, 90dvh);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sources-popover[hidden] { display: none; }
.sources-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.sources-popover-header strong { font-size: 1rem; }
.sources-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}
.sources-close:hover { color: var(--ink); }
.sources-popover .source-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
}
.sources-popover .source-upgrade { margin: 0 16px 16px; }
.sources-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 590;
  background: rgba(0,0,0,.35);
}
.sources-popover-backdrop[hidden] { display: none; }

/* ── Listing grid ─────────────────────────────────────────────────── */
.listing-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  padding: 12px;
  background: var(--bg);
  gap: 8px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s, border-color .15s;
}
.listing-card:hover { box-shadow: var(--shadow-sm); }
.listing-card.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--shadow-sm);
}

.listing-main {
  display: grid;
  grid-template-columns: 156px minmax(0,1fr);
  gap: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
}

.listing-photo {
  position: relative;
  width: 100%;        /* fill whatever the grid column gives it */
  align-self: stretch;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;   /* prevent the image from bleeding into the text column */
}
.listing-photo img {
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius) 0 0 var(--radius);
  /* Ensure image never exceeds its container */
  max-width: 100%;
}
.listing-image-fallback,
.listing-no-photo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 130px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(145deg, #f0f4f8, #e4eaf1);
  color: #b8c5d3;
}
.placeholder-img {
  filter: brightness(0.88) saturate(0.7);
}
.no-photo-label {
  position: absolute;
  bottom: 7px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: .05em;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  pointer-events: none;
}
.freshness-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.freshness-badge.new { background: var(--green); color: #fff; }
.freshness-badge.recent { background: rgba(0,0,0,.55); color: #fff; }

.listing-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 14px 12px;
  min-width: 0;
}
.listing-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.listing-price {
  display: block;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--ink);
}
.listing-price span { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.listing-price.needs-price {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 850;
}
.listing-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.listing-address {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.listing-summary {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.listing-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.listing-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--ink-2);
}
.listing-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted-2);
  font-size: 0.76rem;
}
.source-badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.listing-time { font-size: 0.76rem; color: var(--muted-2); }
.listing-card-badges,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.listing-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}
.listing-badge.verified,
.listing-badge.direct {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}
.listing-badge.translated,
.listing-badge.photos {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}
.listing-badge.new {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.listing-badge.pending {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: var(--muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 10px 8px;
  border-top: 1px solid var(--border-2);
  gap: 8px;
}
.details-btn,
.view-orig {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .12s, background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
/* "Details" is now secondary — ghost outline */
.details-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-2);
}
.details-btn:hover { border-color: var(--ink-2); background: var(--bg); }

/* Source CTA is now primary — filled dark */
.view-orig {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  margin-left: auto;
}
.view-orig:hover { background: #1f2937; border-color: #1f2937; }
.no-source { font-size: 0.78rem; color: var(--muted-2); }

/* Heart/save button */
.save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.save-btn:hover { border-color: #e05454; color: #e05454; }
.save-btn.saved { border-color: #e05454; color: #e05454; background: #fff5f5; }
.save-btn svg { pointer-events: none; }

.source-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.source-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}
.source-filter input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 15px;
  width: 15px !important;
  height: 15px !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  accent-color: var(--ink);
}
.source-filter span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.source-filter small {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}
/* ── Locked premium source row ─────────────────────────────────────
   The locked state is applied by JS via .locked class.
   The row stays in the grid in its natural position.
   Clicking anywhere on the row triggers the subscription flow.
   ─────────────────────────────────────────────────────────────── */
.source-filter.locked {
  background: #fffbeb;
  border-color: #fde68a;
  border-style: dashed;
  cursor: pointer;
}
.source-filter.locked:hover {
  background: #fef9c3;
  border-color: #f59e0b;
}
.source-filter.locked span {
  color: #92400e;
}
/* Hide real checkbox when locked — visual state handled by lock icon */
.source-filter.locked input[type="checkbox"] {
  pointer-events: none;
  opacity: 0;
  width: 0;
  flex: 0;
}
/* Lock icon: hidden on unlocked rows, shown on locked rows */
.source-lock-icon {
  display: none;
  flex-shrink: 0;
  color: #d97706;
}
.source-filter.locked .source-lock-icon {
  display: block;
}

/* Inline "Unlock · $3/mo" pill button — lives on the locked row itself */
.source-unlock-pill {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: none;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
}
.source-unlock-pill:hover { background: #b45309; }
.source-unlock-pill[hidden] { display: none; }

/* Legacy upgrade button — hidden now that we use inline pills */
.source-upgrade,
.source-upgrade-card { display: none; }
.source-upgrade[hidden] { display: none; }

/* Skeleton loading */
.skeleton-card { pointer-events: none; }
.skeleton-card .listing-main { cursor: default; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel {
  border-radius: 6px;
  background: linear-gradient(90deg, #eef1f6 25%, #f8fafc 50%, #eef1f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skel-photo { width: 156px; min-height: 130px; border-radius: var(--radius) 0 0 var(--radius); }
.skel-line { height: 14px; margin-bottom: 8px; }
.skel-line.w40 { width: 40%; }
.skel-line.w70 { width: 70%; }
.skel-line.w55 { width: 55%; }
.skel-lg { height: 22px; width: 50%; margin-bottom: 10px; }

/* Empty state */
.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong { display: block; color: var(--ink); font-size: 1rem; }
.empty-state p { margin: 0; font-size: 0.9rem; line-height: 1.5; }

/* ── Map panel ────────────────────────────────────────────────────── */
.map-panel {
  position: sticky;
  top: var(--topbar-h);
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  border-left: 1px solid var(--border);
}
.map-panel { display: flex; }

.map-canvas {
  flex: 1;
  min-height: 0;
  background: #dde8ef;
}
.leaflet-container { font: inherit; }

.map-count-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
}
.map-count-bar strong { font-weight: 700; }

/* Locate-me button */
.locate-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(16,24,40,.14);
  border-radius: 9px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  cursor: pointer;
  color: var(--ink);
  transition: background .15s, color .15s;
}
.locate-btn:hover { background: var(--ink); color: #fff; }
.locate-btn.locating { animation: pulse-ring .9s ease-in-out infinite; }
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(29,78,216,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(29,78,216,.0); }
}

/* User location dot */
.user-location-dot {
  width: 16px !important;
  height: 16px !important;
  background: var(--blue);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(29,78,216,.3), 0 2px 8px rgba(0,0,0,.2);
}

/* Price markers */
.price-marker {
  display: grid !important;
  place-items: center;
  width: auto !important;
  min-width: 60px;
  height: 30px !important;
  padding: 0 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0,0,0,.22);
  white-space: nowrap;
}
.price-marker.active {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 3px 12px rgba(0,0,0,.28);
}
.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
}
.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 1.2rem !important;
  color: var(--ink) !important;
}

/* ── Landlord post section ────────────────────────────────────────── */
.post-section {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 28px;
  border-top: 1px solid var(--border);
}
.post-intro { padding-top: 12px; }
.partner-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 16px;
}
.post-intro h2 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); margin-bottom: 10px; }
.post-intro p { color: var(--muted); line-height: 1.6; }

.post-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 700;
}

.category-group { display: flex; flex-direction: column; gap: 10px; }
.category-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-2);
  transition: border-color .12s, background .12s;
}
.cat-card input[type="radio"] { display: none; }
.cat-card:hover { border-color: var(--ink); }
.cat-card.active {
  border-color: var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-weight: 750;
}

.whats-next {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.86rem;
}
.whats-next svg { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.whats-next strong { display: block; margin-bottom: 3px; }
.whats-next p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.84rem; }

.terms-note { margin: -6px 0 0; font-size: 0.76rem; color: var(--muted-2); text-align: center; }
.form-status { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.4; }
.form-status:empty { display: none; }

.value-props { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; border-top: 1px solid var(--border-2); }
.vp-row { display: flex; align-items: flex-start; gap: 10px; }
.vp-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.vp-row strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.vp-row p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

/* ── Seekers section ─────────────────────────────────────────────── */
.seekers-section {
  display: none;
  min-height: calc(100vh - var(--topbar-h));
  padding: 28px;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
}
.seekers-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto 28px;
}
.seekers-header h2 { font-size: clamp(1.3rem, 2vw, 1.8rem); margin-bottom: 6px; }
.seekers-header p { color: var(--muted); margin: 0; font-size: 0.92rem; }

.seekers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  max-width: 1040px;
  margin: 0 auto;
}
.seekers-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 32px;
  font-size: 0.9rem;
}

.seeker-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.seeker-card:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }

.seeker-header { display: flex; align-items: center; gap: 10px; }
.seeker-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}
.seeker-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.seeker-source {
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.seeker-time { font-size: 0.76rem; color: var(--muted-2); }

.seeker-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
}

.seeker-details { display: flex; flex-wrap: wrap; gap: 6px; }
.seeker-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--ink-2);
}

.seeker-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.seeker-footer { margin-top: auto; }
.seeker-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
}
.seeker-link:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .seekers-section { padding: 32px 16px; }
  .seekers-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seekers-grid { grid-template-columns: 1fr; }
  .sources-popover .source-filter-grid { grid-template-columns: 1fr; }
}

/* ── Post section stats ───────────────────────────────────────────── */
.post-stats {
  display: flex;
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.post-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.post-stat:last-child { border-right: none; }
.post-stat strong { font-size: 1.1rem; font-weight: 800; }
.post-stat span { font-size: 0.76rem; color: var(--muted); font-weight: 600; }

/* ── Verify CTA section ───────────────────────────────────────────── */
.verify-cta {
  background: var(--ink);
  color: #fff;
  padding: 64px 28px;
}
.verify-cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
}
.verify-cta .eyebrow { color: rgba(255,255,255,.5); }
.verify-cta h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); color: #fff; margin-bottom: 12px; }
.verify-cta > .verify-cta-inner > div > p { color: rgba(255,255,255,.7); line-height: 1.65; margin-bottom: 24px; }
.verify-cta .btn-primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.verify-cta .btn-primary:hover { background: #f0f0f0; }

.verify-trust-items { display: flex; flex-direction: column; gap: 20px; }
.trust-item { display: flex; align-items: flex-start; gap: 12px; }
.trust-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.trust-item strong { display: block; font-size: 0.95rem; color: #fff; margin-bottom: 3px; }
.trust-item p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,.6); line-height: 1.45; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0;
}

/* ── Mobile bottom tab bar ────────────────────────────────────────── */
.bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--bottom-h);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  padding: 0 4px;
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.tab-btn span {
  max-width: 100%;
  font-size: 0.64rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab-btn.active { color: var(--ink); }
.tab-btn svg { transition: transform .15s; }
.tab-btn.active svg { transform: scale(1.08); }

/* ── Filter dialog ────────────────────────────────────────────────── */
dialog {
  padding: 0;
  border: none;
  outline: none;
}
dialog::backdrop { background: rgba(0,0,0,.45); }

#filterDialog {
  width: min(480px, 100vw);
  max-height: 100dvh;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: auto auto 0;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 600px) {
  #filterDialog {
    border-radius: var(--radius);
    margin: auto;
    max-height: 90vh;
  }
}
.filter-sheet { display: flex; flex-direction: column; max-height: 90dvh; }
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
}
.sheet-header strong { font-size: 1rem; }
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--surface);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .12s;
}
.check-row:hover { border-color: var(--ink); }
.check-row:has(input:checked) { border-color: var(--ink); background: var(--bg); }
.check-row input[type="radio"] { display: none; }
.check-icon {
  flex: 0 0 44px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}
.check-text { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.check-text strong { font-size: 0.9rem; }
.check-text small { font-size: 0.78rem; color: var(--muted); }
.match-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 0.88rem;
}
.match-preview svg { color: var(--green); flex-shrink: 0; }
.match-preview p { margin: 0; }
.sheet-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Auth / verify dialog ─────────────────────────────────────────── */
#accessDialog {
  width: min(460px, calc(100vw - 24px));
  max-height: 92dvh;
  border-radius: var(--radius);
  margin: auto;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#originDialog {
  width: min(860px, calc(100vw - 28px));
  height: min(680px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.origin-preview {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  background: var(--surface);
}
.origin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
  cursor: move;
  user-select: none;
}
.origin-header strong,
.origin-header span {
  display: block;
  max-width: min(520px, 62vw);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.origin-header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}
.origin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.origin-actions a,
.origin-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}
#closeOriginDialog {
  width: 34px;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
}
.origin-frame-wrap {
  position: relative;
  min-height: 0;
  background: #fff;
}
#originFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.origin-fallback {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: grid;
  gap: 7px;
  width: min(420px, calc(100% - 32px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  transform: translateX(-50%);
}
.origin-fallback[hidden] { display: none; }
.origin-fallback p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.origin-fallback a {
  justify-self: start;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.listing-detail-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.listing-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  max-height: inherit;
  background: var(--surface);
}
.detail-close {
  z-index: 3;
  background: rgba(255,255,255,.9);
}
.detail-media {
  min-height: 520px;
  background: #eef2f7;
}
.detail-media > img,
.detail-gallery-main {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}
.detail-gallery {
  position: relative;
  height: 100%;
  min-height: 520px;
}
.detail-gallery-main {
  position: absolute;
  inset: 0;
}
.detail-gallery-strip {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.detail-gallery-strip img {
  width: 100%;
  height: 70px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.detail-media-fallback {
  display: grid;
  height: 100%;
  min-height: 520px;
  place-content: center;
  gap: 6px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}
.detail-media-fallback strong {
  color: var(--ink);
  font-size: 1.15rem;
}
.detail-body {
  display: grid;
  gap: 16px;
  max-height: min(820px, calc(100dvh - 28px));
  padding: 28px;
  overflow-y: auto;
}
.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 28px;
}
.detail-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.detail-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.12;
}
.detail-price {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  white-space: nowrap;
}
.detail-price.needs-price {
  color: var(--ink-2);
  font-size: 1rem;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.detail-facts span {
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 800;
}
.detail-address {
  margin: 0;
  color: var(--ink-2);
  font-weight: 750;
}
.detail-section {
  display: grid;
  gap: 7px;
}
.detail-section h3 {
  margin: 0;
  font-size: 0.95rem;
}
.detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-grid div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.detail-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.detail-grid strong {
  color: var(--ink);
  font-size: 0.9rem;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-actions .btn.saved {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #047857;
}
.safety-note {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fffbeb;
}
.safety-note p {
  margin: 0;
  color: #78350f;
  font-size: 0.86rem;
  line-height: 1.5;
}
.safety-note button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #92400e;
  cursor: pointer;
  font-weight: 850;
}
.verify-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px 20px;
  overflow-y: auto;
  max-height: 92dvh;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: color .15s;
}
.modal-close:hover { color: var(--ink); }
.verify-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  margin: 0 auto 4px;
}
.verify-modal h2 { font-size: 1.3rem; text-align: center; margin: 0; }
.verify-modal > p { font-size: 0.9rem; color: var(--muted); text-align: center; line-height: 1.55; margin: 0; }
.auth-status {
  min-height: 18px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.88rem;
  color: var(--muted);
}
.auth-status:empty { display: none; }
.verify-field-group { display: flex; flex-direction: column; gap: 8px; }
.login-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-modal-actions[hidden] { display: none; }
.email-chips { display: flex; gap: 6px; }
.email-chip {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.email-chip:hover { border-color: var(--ink); background: var(--bg); }
.cant-access {
  border: none;
  background: none;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  padding: 0;
  margin: -6px auto 0;
  text-decoration: underline;
}
.why-verify { display: flex; flex-direction: column; gap: 12px; }
.why-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  margin: 0;
}
.why-item { display: flex; align-items: flex-start; gap: 10px; }
.why-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.why-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.why-item p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.privacy-note {
  font-size: 0.76rem;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.5;
  padding: 10px 0 0;
  border-top: 1px solid var(--border-2);
  margin: 0;
}

/* ── Location autocomplete ───────────────────────────────────────── */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}
.ac-list:empty { display: none; }
.ac-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink);
  transition: background .1s;
}
.ac-item:hover, .ac-item[aria-selected="true"] { background: var(--bg); }
.ac-item-icon { color: var(--muted); flex-shrink: 0; }
.ac-item-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ac-item-name { font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-item-sub { font-size: 0.76rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-loading, .ac-empty {
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────── */

/* Tablet: hide map column, show 2-col */
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 260px minmax(0,1fr);
  }
  .workspace[data-view="split"] .map-panel,
  .workspace[data-view="map"] .map-panel { display: none; }
  .workspace[data-view="map"] .results-pane { display: flex; }
  .view-toggle { display: none; }
}

/* Mobile: single column, bottom nav */
@media (max-width: 760px) {
  body { padding-bottom: var(--bottom-h); background: var(--surface); }
  .bottom-bar { display: flex; }
  .topbar { padding: 0 14px; }
  .topbar-actions .btn-outline { display: none; }
  .view-toggle { display: none; }
  .product-promise {
    display: grid;
    gap: 3px;
    padding: 10px 14px;
    font-size: 0.82rem;
  }
  .product-promise span { font-size: 0.78rem; }

  .workspace {
    display: block;
    min-height: auto;
  }

  /* Default mobile tab = listings */
  .filter-panel { display: none !important; }
  .results-pane { display: flex !important; }
  .map-panel { display: none !important; }
  .seekers-section { display: none !important; }

  /* tab = search → show filter panel */
  body[data-tab="search"] .filter-panel {
    display: flex !important;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  body[data-tab="search"] .results-pane { display: none !important; }

  /* tab = map */
  body[data-tab="map"] .results-pane { display: none !important; }
  body[data-tab="map"] .map-panel {
    display: flex !important;
    position: static;
    height: calc(100dvh - var(--topbar-h) - var(--bottom-h));
    border-left: none;
  }
  body[data-tab="map"] .map-count-bar { display: flex; }

  /* tab = community */
  body[data-tab="community"] .results-pane,
  body[data-tab="community"] .map-panel { display: none !important; }
  body[data-tab="community"] .seekers-section {
    display: block !important;
    min-height: calc(100dvh - var(--topbar-h) - var(--bottom-h));
    border-left: none;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  /* tab = profile → listings is shown, dialog opens */
  body[data-tab="profile"] .results-pane { display: flex !important; }

  /* Mobile view bar (List/Map) inside results pane */
  .mobile-view-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }
  .mob-view-btn {
    flex: 1;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
  }
  .mob-view-btn.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
  }

  /* Show filter button in mobile results header */
  .filter-trigger { display: inline-flex; }
  .result-sub { display: none; } /* hide subline in mobile header, save space */
  .sources-btn { display: none; }
  .result-bar { justify-content: flex-start; }
  #filterDialog .source-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #filterDialog .source-filter {
    min-height: 42px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
  #filterDialog .source-filter span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  #filterDialog .source-filter small { display: none; }
  #filterDialog .source-upgrade {
    min-height: 78px;
    padding: 14px;
  }
  #filterDialog .source-upgrade strong { font-size: 1rem; }

  /* Listing cards — horizontal, compact */
  .listing-main { grid-template-columns: 110px minmax(0,1fr); }
  .listing-photo img,
  .listing-image-fallback,
  .listing-no-photo { min-height: 110px; }
  .skel-photo { width: 110px; min-height: 110px; }
  .listing-price { font-size: 1.05rem; }
  .listing-summary { display: none; }
  .listing-card-badges .listing-badge:nth-child(n+3) { display: none; }
  .card-footer { padding: 7px 9px; }
  .details-btn { display: none; } /* on mobile, card tap opens details — only show primary CTA */
  .view-orig { display: inline-flex; max-width: 160px; font-size: 0.74rem; }
  .listing-title {
    font-size: 0.9rem;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Results header — compact single row */
  .results-header { min-height: 48px; padding: 0 12px; }
  .location-label { max-width: 100px; }

  /* Result bar */
  .result-bar { padding: 6px 12px; }
  .listing-grid { padding: 8px; gap: 6px; }

  /* Post section */
  .post-section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 16px;
  }
  .post-stats { flex-wrap: wrap; }
  .post-stat { min-width: 120px; }
  .category-cards { grid-template-columns: repeat(3, 1fr); }

  /* Verify */
  .verify-cta { padding: 40px 16px 56px; }
  .verify-cta-inner { grid-template-columns: 1fr; gap: 32px; }

  /* Filter dialog on mobile = bottom sheet */
  #filterDialog {
    width: 100vw;
    max-height: 95dvh;
    border-radius: var(--radius) var(--radius) 0 0;
    margin: auto auto 0;
  }

  .listing-detail-dialog {
    width: 100vw;
    max-height: 96dvh;
    margin: auto auto 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .listing-detail {
    grid-template-columns: 1fr;
  }
  .detail-media,
  .detail-media > img,
  .detail-gallery,
  .detail-gallery-main,
  .detail-media-fallback {
    min-height: 260px;
    max-height: 34dvh;
  }
  .detail-gallery-strip { display: none; }
  .detail-body {
    max-height: 62dvh;
    padding: 20px 16px 18px;
  }
  .detail-heading {
    display: grid;
    padding-right: 42px;
  }
  .detail-facts,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}

/* Very small phones: switch to vertical card layout */
@media (max-width: 440px) {
  .listing-main {
    grid-template-columns: 1fr;
    grid-template-rows: 180px auto;
  }
  .listing-photo {
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .listing-photo img,
  .listing-image-fallback,
  .listing-no-photo {
    border-radius: var(--radius) var(--radius) 0 0;
    min-height: 180px;
    height: 180px;
  }
  .skel-photo {
    width: 100%;
    min-height: 180px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .freshness-badge { top: 10px; left: 10px; }
  .no-photo-label { bottom: 10px; }
}

@media (max-width: 400px) {
  .listing-main {
    grid-template-columns: 1fr;
    grid-template-rows: 170px auto;
  }
  .listing-photo img,
  .listing-image-fallback,
  .listing-no-photo {
    min-height: 170px;
    height: 170px;
  }
  .skel-photo { width: 100%; min-height: 170px; }
}

/* ══════════════════════════════════════════════════════════════════════
   AI-NATIVE DESIGN SYSTEM — v2
   ══════════════════════════════════════════════════════════════════════ */

/* ── New design tokens ──────────────────────────────────────────────── */
:root {
  --ai:       #6366f1;   /* indigo — AI accent */
  --ai-dark:  #4f46e5;
  --ai-light: #eef2ff;
  --ai-glow:  rgba(99,102,241,.18);
  --green-ai: #10b981;
}

/* ── AI banner (replaces product-promise) ───────────────────────────── */
.ai-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #fafbff 0%, #f5f3ff 50%, #fafbff 100%);
  font-size: 0.88rem;
}
.ai-banner-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ai), var(--ai-dark));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .03em;
}
.ai-banner-text {
  color: var(--ink-2);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-banner-text em { font-style: normal; color: var(--ai); font-weight: 700; }
.ai-banner-cta {
  border: none;
  background: none;
  color: var(--ai);
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  padding: 2px 0;
}
.ai-banner-cta:hover { color: var(--ai-dark); text-decoration: underline; }

/* ── AI Search topbar button ────────────────────────────────────────── */
.copilot-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ai), var(--ai-dark));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  box-shadow: 0 2px 8px var(--ai-glow);
}
.copilot-launch-btn:hover { opacity: .9; transform: translateY(-1px); }
.topbar-btn-secondary { display: none; }
@media (min-width: 900px) { .topbar-btn-secondary { display: inline-flex; } }

/* ── Radius filter grid ─────────────────────────────────────────────── */
.radius-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.radius-grid .choice-chip { font-size: 0.74rem; padding: 0 4px; }

/* ── Match badge on cards ───────────────────────────────────────────── */
.match-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.match-badge.high  { background: #ecfdf5; color: #059669; border: 1px solid #bbf7d0; }
.match-badge.med   { background: var(--ai-light); color: var(--ai); border: 1px solid #c7d2fe; }
.match-badge.low   { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.match-reason {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--border-2);
  white-space: nowrap;
}
.ai-insight-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #7c3aed;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid #ddd6fe;
  white-space: nowrap;
}
.listing-distance {
  font-size: 0.73rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── "Best Match" sort button accent ────────────────────────────────── */
.sort-btn-match {
  border-color: #c7d2fe;
  color: var(--ai);
}
.sort-btn-match.active {
  background: linear-gradient(135deg, var(--ai), var(--ai-dark));
  border-color: var(--ai);
  color: #fff;
}

/* ── Search this area button ────────────────────────────────────────── */
.search-area-btn {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .1s;
  white-space: nowrap;
}
.search-area-btn:hover { box-shadow: var(--shadow-lg); transform: translateX(-50%) translateY(-1px); }
.search-area-btn[hidden] { display: none; }

/* ══════════════════════════════════════════════════════════════════════
   AI CO-PILOT WIZARD
   ══════════════════════════════════════════════════════════════════════ */
.copilot-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.copilot-overlay[hidden] { display: none; }

.copilot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,20,.65);
  backdrop-filter: blur(8px);
}

.copilot-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,.28), 0 0 0 1px rgba(99,102,241,.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90dvh;
}

.copilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  flex-shrink: 0;
}
.copilot-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}
.copilot-brand-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--ai), var(--ai-dark));
  color: #fff;
  flex-shrink: 0;
}
.copilot-brand-name { color: var(--ink); }
.copilot-skip-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.copilot-skip-btn:hover { color: var(--ink); }

.copilot-progress-wrap {
  height: 3px;
  background: var(--border);
  margin: 16px 0 0;
  flex-shrink: 0;
}
.copilot-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ai), #a78bfa);
  transition: width .4s cubic-bezier(.4,0,.2,1);
  border-radius: 0 999px 999px 0;
}

.copilot-body {
  padding: 24px 24px 16px;
  overflow-y: auto;
  flex: 1;
}
.copilot-question {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 5px;
}
.copilot-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.copilot-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.copilot-options.cols-1 { grid-template-columns: 1fr; }
.copilot-options.cols-3 { grid-template-columns: repeat(3, 1fr); }
.copilot-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, background .12s, color .12s;
}
.copilot-option:hover { border-color: var(--ai); background: var(--ai-light); }
.copilot-option.selected {
  border-color: var(--ai);
  background: var(--ai-light);
  color: var(--ai-dark);
}
.copilot-check {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ai);
  color: #fff;
  flex-shrink: 0;
  margin-left: auto;
}
.copilot-option.selected .copilot-check { display: flex; }

.copilot-location-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color .15s;
  color: var(--ink);
  background: var(--surface);
  min-height: 0;
}
.copilot-location-input:focus { border-color: var(--ai); box-shadow: 0 0 0 3px var(--ai-glow); }
.copilot-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.copilot-example {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.copilot-example:hover { border-color: var(--ai); color: var(--ai); }

.copilot-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border-2);
  flex-shrink: 0;
}
.copilot-back-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}
.copilot-step-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.copilot-next-btn {
  min-height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ai), var(--ai-dark));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--ai-glow);
  transition: opacity .15s, transform .1s;
}
.copilot-next-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ── Preference-applied indicator in sidebar ─────────────────────────── */
.ai-prefs-active {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-sm);
  background: var(--ai-light);
  font-size: 0.78rem;
  color: var(--ai-dark);
  font-weight: 650;
}
.ai-prefs-active svg { flex-shrink: 0; color: var(--ai); }
.ai-prefs-edit {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--ai);
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .copilot-card { border-radius: 16px; }
  .copilot-question { font-size: 1.15rem; }
  .copilot-options { grid-template-columns: 1fr; }
  .copilot-options.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .ai-banner-text { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   COMMUNITY BOARD — MAP + FILTERS
   ══════════════════════════════════════════════════════════════════════ */

/* Full-width community view — hide sidebar, use entire canvas */
.workspace[data-view="community"] {
  grid-template-columns: 1fr;
  display: flex;
  flex-direction: column;
}
.workspace[data-view="community"] .filter-panel { display: none !important; }
.workspace[data-view="community"] .seekers-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Seeker filter bar */
.seeker-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: calc(var(--topbar-h) + 44px);
  z-index: 20;
  flex-shrink: 0;
}
.seeker-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.seeker-filter-label {
  font-size: 0.73rem;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.seeker-chip-row { display: flex; gap: 4px; flex-wrap: wrap; }
.seeker-chip-btn {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.seeker-chip-btn:hover { border-color: var(--ink); }
.seeker-chip-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Split layout: cards left, map right */
.seekers-body {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.seekers-list-panel {
  overflow-y: auto;
  border-right: 1px solid var(--border);
}
.seekers-map-panel {
  overflow: hidden;
  position: relative;
}
.community-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.seekers-count-label {
  padding: 10px 20px 0;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  font-weight: 600;
}

/* Community map markers */
.community-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #6366f1;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
  border: 1.5px solid rgba(255,255,255,.6);
  cursor: pointer;
}
.community-marker-female { background: #db2777; }
.community-marker-male   { background: #2563eb; }
.community-marker-any    { background: #6366f1; }

/* Seeker card structured tags */
.seeker-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}
.seeker-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  white-space: nowrap;
}
.seeker-tag.gender-female { border-color: #fbcfe8; background: #fdf2f8; color: #9d174d; }
.seeker-tag.gender-male   { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.seeker-tag.private-bath  { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.seeker-tag.budget        { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.seeker-tag.housing-room     { border-color: #e9d5ff; background: #f5f3ff; color: #6d28d9; }
.seeker-tag.housing-entire   { border-color: #dbeafe; background: #eff6ff; color: #1d4ed8; }
.seeker-tag.housing-sublease { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

/* Mobile: stack cards above map */
@media (max-width: 768px) {
  .seekers-body { grid-template-columns: 1fr; grid-template-rows: 1fr 320px; }
  .seekers-map-panel { border-right: none; border-top: 1px solid var(--border); }
  .seeker-filter-bar { top: var(--topbar-h); gap: 8px 12px; padding: 8px 12px; }
}
