:root {
  --brand: #e4574f;
  --brand-dark: #c9423b;
  --brand-soft: #fdeeed;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e8e8ec;
  --surface: #f7f7f8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 8px 24px rgba(20, 24, 40, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2rem; line-height: 1.2; margin: .4em 0; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 1.6em 0 .4em; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 1em 0 .3em; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: .8em 0; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 36px 0; }
.narrow { max-width: 520px; }
.narrow-wide { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center-block { display: block; margin: 10px auto 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--brand); }
.brand-mark { margin-right: 2px; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); font-weight: 500; font-size: .92rem; }
.nav .nav-host { color: var(--brand-dark); font-weight: 600; }
.inline-form { display: inline; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .92rem; cursor: pointer; }
.link-button:hover { color: var(--ink); }

/* Banners & flashes */
.demo-banner { background: #fff8e6; color: #7a5b00; border-bottom: 1px solid #f3e3ae; text-align: center; font-size: .82rem; padding: 6px 12px; }
.demo-banner code { background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; }
.flash { border-radius: 12px; padding: 12px 16px; margin: 16px 0; font-size: .95rem; }
.flash-success { background: #e8f7ee; color: #14532d; }
.flash-error { background: #fdecec; color: #8c1d18; }
.flash-info { background: #eef4fd; color: #1e3a5f; }

/* Hero */
.hero { background: linear-gradient(160deg, #fff6f3 0%, #fdeeed 55%, #f6ecff 100%); padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: 2.7rem; margin: 0 0 12px; }
.hero-sub { font-size: 1.1rem; color: var(--muted); margin: 0 auto 28px; max-width: 640px; }
.hero-host { background: linear-gradient(160deg, #f0fbf4 0%, #e9f7f0 55%, #fdf5e9 100%); }
.hero-compact { padding: 34px 0 30px; text-align: left; }
.hero-compact h1 { font-size: 2rem; margin: 0 0 6px; }
.hero-compact .hero-sub { margin: 0; font-size: 1rem; max-width: 620px; }
.home-map .mapsearch-body { height: calc(100vh - 290px); min-height: 440px; }
@media (max-width: 900px) {
  .home-map .mapsearch-body { height: auto; }
}

/* Search bar */
.search-bar { display: flex; gap: 0; background: #fff; border-radius: 999px; box-shadow: var(--shadow); padding: 8px; max-width: 860px; margin: 0 auto; align-items: stretch; border: 1px solid var(--line); }
.search-field { flex: 1; text-align: left; padding: 6px 18px; border-right: 1px solid var(--line); min-width: 0; }
.search-field:last-of-type { border-right: 0; }
.search-field-small { flex: 0 0 110px; }
.search-field label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.search-field input, .search-field select { border: 0; outline: none; width: 100%; font-size: .95rem; background: transparent; color: var(--ink); padding: 2px 0; }
.search-btn { border-radius: 999px; padding: 0 28px; }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 12px 22px; font-size: .98rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-small { padding: 8px 16px; font-size: .88rem; }
.btn-large { padding: 14px 30px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-outline { background: #fff; color: var(--brand-dark); border: 2px solid var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 18px; }
.card { display: block; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; color: var(--ink); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card-art { position: relative; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-icon { font-size: 3rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); position: relative; }
.card-icon-large { font-size: 5rem; }
.card-body { padding: 14px 16px 16px; }
.card-meta { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.card-title { font-weight: 700; margin: 4px 0 6px; font-size: 1.02rem; }
.card-price { font-size: .92rem; color: var(--muted); }
.card-price strong { color: var(--ink); font-size: 1.05rem; }

/* Filter bar */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.filter-bar input, .filter-bar select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .93rem; background: #fff; color: var(--ink); }

/* Listing detail */
.listing-hero { border-radius: var(--radius); aspect-ratio: 21/8; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 26px; }
.listing-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.listing-columns { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: start; }
.listing-desc { font-size: 1.02rem; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: .86rem; }
.house-rules { background: var(--surface); border-radius: var(--radius); padding: 6px 20px 14px; margin-top: 22px; }
.house-rules ul { margin: 6px 0 0; padding-left: 20px; }
.house-rules li { margin: 6px 0; font-size: .93rem; }

/* Booking box */
.booking-box { position: sticky; top: 88px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; background: #fff; }
.booking-price { font-size: 1.05rem; margin-bottom: 14px; }
.booking-price strong { font-size: 1.4rem; }
.booking-box label { display: block; font-size: .85rem; font-weight: 600; margin: 10px 0 4px; }
.booking-box input, .booking-box select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; }
.fee-note { margin: 12px 0; }

/* Forms & auth */
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; margin: 10px auto; }
.auth-card.wide { max-width: none; }
.auth-card label { display: block; font-size: .88rem; font-weight: 600; margin: 14px 0 4px; }
.auth-card input, .auth-card select, .auth-card textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit; }
.auth-card textarea { resize: vertical; }
.auth-card .btn { margin-top: 20px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }

/* Checkout / booking detail */
.checkout-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.summary { margin: 18px 0; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .97rem; }
.summary-row.total { font-weight: 700; font-size: 1.05rem; }
.demo-tag { background: #fff8e6; color: #7a5b00; border: 1px dashed #e3c96b; border-radius: 10px; padding: 10px 14px; font-size: .82rem; margin: 12px 0; }
.fake-card { background: var(--surface); border-radius: 12px; padding: 16px; margin: 14px 0; }
.fake-card label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.fake-card input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; color: var(--muted); }
.fake-card-row { display: flex; gap: 12px; }

/* Status chips */
.status-chip { display: inline-block; border-radius: 999px; padding: 4px 14px; font-size: .8rem; font-weight: 700; }
.status-confirmed { background: #e8f7ee; color: #14532d; }
.status-pending { background: #fff8e6; color: #7a5b00; }
.status-cancelled, .status-expired { background: #f1f1f4; color: var(--muted); }

/* Dashboard */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 22px 0 8px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; }
.stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .85rem; }
.table { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: .93rem; }
.table th { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); }

/* Trips */
.booking-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.booking-row { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--ink); background: #fff; transition: box-shadow .15s; }
.booking-row:hover { box-shadow: var(--shadow); text-decoration: none; }
.booking-row-art { flex: 0 0 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.booking-row-main { flex: 1; min-width: 0; }
.booking-row-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* Split pitch + steps */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pitch { background: var(--surface); border-radius: var(--radius); padding: 30px; }
.pitch-host { background: linear-gradient(150deg, var(--brand-soft), #fdf6ec); }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 28px; position: relative; margin: 10px 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin: 20px 0; }
.step { background: var(--surface); border-radius: var(--radius); padding: 22px; }
.step-num { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; background: var(--brand); color: #fff; border-radius: 999px; font-weight: 800; }
.cta-row { display: flex; gap: 14px; margin: 28px 0; flex-wrap: wrap; }

/* ---------- Full-screen map search ---------- */
/* The map page is an app, not a document: the viewport is the map, and the
   chrome (filters, results, buttons) floats on top of it. */
body.map-page { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.map-page main { flex: 1; min-height: 0; position: relative; }
body.map-page .site-footer { display: none; }

.mapsearch { position: absolute; inset: 0; }
.mapsearch.is-loading .results-list { opacity: .5; transition: opacity .15s; }
#map { position: absolute; inset: 0; background: var(--surface); z-index: 1; }

.filter-pills {
  position: absolute; z-index: 600; top: 14px; left: 16px; right: 16px;
  display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap;
  padding: 10px 12px; background: #fff; border-radius: 16px;
  box-shadow: 0 2px 6px rgba(20,24,40,.10), 0 12px 32px rgba(20,24,40,.14);
}
.pill {
  display: flex; flex-direction: column; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px;
  background: #fff; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
.pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pill-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pill input, .pill select {
  border: 0; outline: none; background: transparent; font-size: .93rem;
  color: var(--ink); padding: 1px 0; font-family: inherit; min-width: 0;
}
.pill-where { flex: 1 1 200px; }
.pill-narrow { flex: 0 0 auto; }
.pill-narrow input, .pill-narrow select { width: 92px; }
.pill-btn { border-radius: 12px; padding: 0 26px; }
.pill-reset { align-self: center; padding: 0 4px; }

.results-pane {
  position: absolute; z-index: 550; top: 84px; left: 16px; bottom: 16px;
  width: min(390px, 38%); overflow-y: auto;
  border-radius: var(--radius); padding: 14px 16px 20px;
  box-shadow: 0 2px 6px rgba(20,24,40,.10), 0 12px 32px rgba(20,24,40,.14);
  transition: transform .22s ease, opacity .22s ease;
  /* Opaque fallback first; browsers with backdrop-filter get frosted glass
     below. Without the fallback, non-supporting browsers would render text
     straight onto map detail and become unreadable. */
  background: #fff;
  border: 1px solid rgba(255,255,255,.7);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .results-pane {
    background: rgba(255,255,255,.72);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
  }
  .results-pane .result-card { background: rgba(255,255,255,.66); }
  .results-pane .result-card:hover,
  .results-pane .result-card.is-active { background: rgba(255,255,255,.94); }
  .results-pane .results-empty,
  .results-pane .results-error { background: rgba(247,247,248,.72); }
  .filter-pills { background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
}
.mapsearch.hide-list .results-pane { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.results-head { font-size: .95rem; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.results-list { display: grid; gap: 14px; }
.results-empty, .results-error { background: var(--surface); border-radius: var(--radius); padding: 28px; text-align: center; }

.show-list-btn {
  position: absolute; z-index: 550; top: 84px; left: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: .88rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow); color: var(--ink);
}
.show-list-btn:hover { background: var(--surface); }

.map-error { position: absolute; z-index: 620; top: 84px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); }
.map-error .flash { margin: 0; box-shadow: var(--shadow); }

.result-card {
  display: flex; gap: 14px; align-items: center; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; background: #fff; color: var(--ink);
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.result-card:hover, .result-card.is-active { text-decoration: none; box-shadow: var(--shadow); border-color: var(--brand); }
.result-card.is-active { transform: translateY(-1px); }
.result-art {
  flex: 0 0 108px; height: 92px; border-radius: 12px; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.result-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result-art .card-icon { font-size: 2.1rem; }
.result-body { min-width: 0; flex: 1; }

.map-search-area {
  position: absolute; top: 84px; left: calc(50% + 190px); transform: translateX(-50%); z-index: 540;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 20px; font-size: .88rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow); color: var(--ink);
}
.map-search-area:hover { background: var(--surface); }
.map-privacy-note {
  position: absolute; bottom: 12px; right: 12px; z-index: 540;
  background: rgba(255,255,255,.94); border-radius: 8px; padding: 5px 10px;
  font-size: .72rem; color: var(--muted); max-width: 46%;
  box-shadow: 0 1px 4px rgba(20,24,40,.14);
}
/* Keep Leaflet's controls clear of the floating filter bar and results panel. */
.leaflet-top.leaflet-right { top: 76px; }
.leaflet-control-attribution { font-size: .68rem; }
.map-noscript { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--muted); }

/* Price bubble markers */
.price-marker-wrap { background: none !important; border: 0 !important; }
.price-marker {
  display: inline-block; white-space: nowrap; background: #fff; color: var(--ink);
  border: 1px solid rgba(20,24,40,.18); border-radius: 999px; padding: 4px 11px;
  font-size: .8rem; font-weight: 800; box-shadow: 0 2px 6px rgba(20,24,40,.22);
  transform: translate(-50%, -50%); transition: background .12s, color .12s, transform .12s;
}
.price-marker.is-active { background: var(--brand); color: #fff; border-color: var(--brand); transform: translate(-50%, -50%) scale(1.12); }

.leaflet-popup-content { margin: 0; width: 232px !important; }
.leaflet-popup-content-wrapper { padding: 0; border-radius: 14px; overflow: hidden; }
/* Beat Leaflet's default `.leaflet-container a` link colour. */
.leaflet-container a.map-popup, .leaflet-container a.map-popup .card-title { color: var(--ink); }
.map-popup { display: block; }
.map-popup:hover { text-decoration: none; }
.map-popup:hover .card-title { color: var(--brand-dark); }
.map-popup-art { height: 116px; position: relative; display: flex; align-items: center; justify-content: center; }
.map-popup-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-popup-body { padding: 10px 12px 12px; }

.map-toggle { display: none; }

/* Host pin picker */
.pin-picker { margin: 18px 0 6px; }
.pin-picker-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.pin-map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.pin-status { margin: 8px 0 2px; }
.pin-marker-wrap { background: none !important; border: 0 !important; }
.pin-marker {
  display: inline-block; font-size: 1.6rem; line-height: 1;
  transform: translate(-50%, -85%); cursor: grab;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.35));
}

@media (max-width: 900px) {
  /* Phone: filters on top, then either the list or the map full-bleed,
     swapped by the floating toggle. */
  .filter-pills { top: 8px; left: 8px; right: 8px; padding: 8px; gap: 8px; border-radius: 14px; }
  .pill-where { flex: 1 1 100%; }
  .pill-narrow input, .pill-narrow select { width: 76px; }

  .results-pane { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 58%; border-radius: 18px 18px 0 0; }
  .mapsearch.show-map .results-pane { display: none; }
  .mapsearch:not(.show-map) .map-privacy-note,
  .mapsearch:not(.show-map) .map-search-area { display: none; }
  .mapsearch.hide-list .results-pane { transform: translateY(100%); }

  .show-list-btn { display: none; }
  .map-search-area { top: auto; bottom: 76px; left: 50%; }
  .map-privacy-note { bottom: 76px; left: 12px; right: auto; max-width: 70%; }

  .map-toggle { display: block; position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; z-index: 640; pointer-events: none; }
  .map-toggle .btn { pointer-events: auto; box-shadow: var(--shadow); border-radius: 999px; padding: 11px 26px; }
}

/* ---------- Circles (invite-only trust graph) ---------- */

/* Inline badges on cards, pins, and names. Sized down from the amenity chip. */
.chip-locked, .chip-degree {
  display: inline-block; border-radius: 999px; padding: 2px 9px;
  font-size: .72rem; font-weight: 700; vertical-align: 1px; white-space: nowrap;
}
.chip-locked { background: #f4f0e6; color: #7a5b00; border: 1px dashed #d9c58a; }
.chip-degree { background: #e8f7ee; color: #14532d; border: 1px solid #bfe6cd; }

/* Locked listings stay fully visible — they're the shop window — but read as
   behind glass: dimmed art, dashed border, and the lock chip does the talking. */
.result-card.is-locked .result-art { filter: saturate(.55) brightness(.96); }
.result-card.is-locked { border-style: dashed; }
.result-card.is-locked:hover { border-color: #c9a94b; }
.price-marker.is-locked { background: #faf6ec; border: 1px dashed #c9a94b; color: #6b5b1e; }
.price-marker.is-locked::before { content: "🔒 "; font-size: .7em; }

/* Scope toggle (My circle / Everywhere) in the filter bar */
.pill-scope { flex-direction: row; align-items: center; gap: 4px; padding: 4px; }
.scope-btn {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  font-size: .85rem; font-weight: 700; padding: 6px 12px; border-radius: 9px; cursor: pointer;
}
.scope-btn:hover { color: var(--ink); }
.scope-btn.is-active { background: var(--brand); color: #fff; }

/* Pending-request count in the header nav */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800;
  vertical-align: 2px;
}

/* Locked booking box on the listing page */
.locked-panel { text-align: left; }
.locked-panel .btn { margin: 10px 0 8px; }
.center { text-align: center; }

/* Circle page */
.circle-page h1 { margin-bottom: .2em; }
.welcome-hero { background: linear-gradient(160deg, #fff6f3 0%, #fdeeed 55%, #f6ecff 100%); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 8px; }
.welcome-hero h1 { margin: 0 0 8px; }
.welcome-hero p { margin: 0; max-width: 640px; }
.circle-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 6px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-direction: column; }
.stat-card strong { font-size: 1.5rem; letter-spacing: -.02em; }
.circle-main { max-width: 760px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 18px 0; }
.panel h2 { margin: 0 0 4px; font-size: 1.15rem; }
.panel h3 { margin: 16px 0 6px; }
.panel textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit; resize: vertical; margin: 8px 0 2px; }
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 2px; border-top: 1px solid var(--line); }
.row-item:first-child { border-top: 0; }
.row-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.invite-form { display: flex; gap: 10px; margin: 10px 0 14px; flex-wrap: wrap; }
.invite-form input[type="email"] { flex: 1 1 220px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: .93rem; }
.invite-link-cell { flex: 1; min-width: 0; }
.invite-link { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: .8rem; color: var(--muted); background: var(--surface); }
.btn-ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.invite-details { margin: 14px 0 0; }
.invite-details summary { cursor: pointer; }

@media (max-width: 640px) {
  .row-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row-actions { align-self: flex-end; }
}

/* Empty states */
.empty-state { background: var(--surface); border-radius: var(--radius); padding: 36px; text-align: center; margin: 20px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0 20px; background: var(--surface); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.brand-footer { font-weight: 800; font-size: 1.1rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 820px) {
  /* Let the header grow instead of overflowing its fixed height once the
     logged-in nav no longer fits on one line beside the wordmark. */
  /* Longhand only — `padding: 10px 0` here would reset .container's
     horizontal padding, since both classes sit on the same element. */
  .header-row { height: auto; min-height: 60px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  /* Wrap rather than scroll — a scrolling nav hides items off-screen with no
     affordance, and the logged-in nav is exactly the case that overflows. */
  .nav { width: 100%; flex-wrap: wrap; gap: 10px 16px; }
  .site-header { position: static; }

  .hero h1 { font-size: 2rem; }
  .search-bar { flex-direction: column; border-radius: var(--radius); gap: 4px; }
  .search-field { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .search-field-small { flex: 1; }
  .search-btn { padding: 12px; }
  .listing-columns { grid-template-columns: 1fr; }
  .booking-box { position: static; }
  .split { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
}
