/* ==========================================================================
   FreeSpace design system — see docs/design-system.md
   Tokens derive from the FreeSpace logo (violet gradient on near-black).
   Plain CSS, no build step (DreamHost production has no Node toolchain).
   ========================================================================== */

:root {
  /* Brand */
  --fs-violet-50: #F5F0FF;
  --fs-violet-100: #EBDDFF;
  --fs-violet-200: #D6BCFF;
  --fs-violet-300: #B98AFF;
  --fs-violet-400: #9C4DFF;
  --fs-violet-500: #7D0DFB;   /* primary (logo) */
  --fs-violet-600: #6A04E0;
  --fs-violet-700: #5703F6;   /* deep (logo) */
  --fs-violet-800: #3F0A9E;
  --fs-violet-900: #1E0650;
  --fs-ink: #0B0614;          /* logo background */
  --fs-ink-2: #150D24;
  --fs-gradient: linear-gradient(135deg, #A64DFF 0%, #7D0DFB 45%, #5703F6 100%);

  /* Neutrals */
  --fs-gray-0: #FFFFFF;
  --fs-gray-25: #FBFAFD;
  --fs-gray-50: #F6F4F9;
  --fs-gray-100: #ECE9F2;
  --fs-gray-200: #DDD8E6;
  --fs-gray-300: #C3BCD0;
  --fs-gray-400: #9C94AB;
  --fs-gray-500: #6F6880;   /* min for body text on white (AA) */
  --fs-gray-700: #3B3548;
  --fs-gray-900: #1A1525;

  /* Semantic */
  --fs-success: #0E8A5F; --fs-success-bg: #E6F6EF;
  --fs-warning: #A15C00; --fs-warning-bg: #FFF4E0;
  --fs-danger: #C2253D;  --fs-danger-bg: #FDECEF;
  --fs-info: #2457C5;    --fs-info-bg: #EAF0FD;

  /* Typography */
  --fs-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-text-xs: .75rem; --fs-text-sm: .875rem; --fs-text-md: 1rem; --fs-text-lg: 1.125rem;
  --fs-text-xl: 1.375rem; --fs-text-2xl: 1.75rem; --fs-text-3xl: 2.25rem; --fs-text-4xl: clamp(2.25rem, 5vw, 3.75rem);

  /* Spacing (4px scale) */
  --fs-1: .25rem; --fs-2: .5rem; --fs-3: .75rem; --fs-4: 1rem; --fs-5: 1.25rem; --fs-6: 1.5rem;
  --fs-8: 2rem; --fs-10: 2.5rem; --fs-12: 3rem; --fs-16: 4rem; --fs-20: 5rem;

  /* Shape & depth */
  --fs-radius-sm: 8px; --fs-radius: 12px; --fs-radius-lg: 18px; --fs-radius-xl: 28px; --fs-radius-pill: 999px;
  --fs-border: 1px solid var(--fs-gray-100);
  --fs-shadow-sm: 0 1px 2px rgba(26, 21, 37, .06);
  --fs-shadow: 0 4px 16px rgba(26, 21, 37, .08);
  --fs-shadow-lg: 0 18px 50px rgba(30, 6, 80, .16);
  --fs-ring: 0 0 0 3px rgba(125, 13, 251, .35);

  --fs-container: 1200px;
  --fs-header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--fs-font); font-size: var(--fs-text-md); line-height: 1.55; color: var(--fs-gray-900); background: var(--fs-gray-25); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--fs-violet-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--fs-3); letter-spacing: -.02em; font-weight: 800; color: var(--fs-gray-900); }
h1 { font-size: var(--fs-text-3xl); } h2 { font-size: var(--fs-text-2xl); } h3 { font-size: var(--fs-text-xl); } h4 { font-size: var(--fs-text-lg); }
p { margin: 0 0 var(--fs-4); }
:focus-visible { outline: none; box-shadow: var(--fs-ring); border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
hr { border: 0; border-top: var(--fs-border); margin: var(--fs-6) 0; }

.container { width: 100%; max-width: var(--fs-container); margin: 0 auto; padding: 0 var(--fs-4); }
@media (min-width: 768px) { .container { padding: 0 var(--fs-6); } }
/* Vertical padding only: these combine with .container, whose side padding must survive. */
.section { padding-block: var(--fs-12); }
.section-sm { padding-block: var(--fs-8); }
.stack > * + * { margin-top: var(--fs-4); }
.stack-sm > * + * { margin-top: var(--fs-2); }
.row { display: flex; gap: var(--fs-3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--fs-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: var(--fs-6); }
.grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.muted { color: var(--fs-gray-500); } .small { font-size: var(--fs-text-sm); } .xs { font-size: var(--fs-text-xs); }
.center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mb-0 { margin-bottom: 0 } .mt-2 { margin-top: var(--fs-2) } .mb-2 { margin-bottom: var(--fs-2) } .mt-10 { margin-top: var(--fs-10) } .mt-4 { margin-top: var(--fs-4) } .mt-6 { margin-top: var(--fs-6) } .mt-8 { margin-top: var(--fs-8) } .mb-4 { margin-bottom: var(--fs-4) } .mb-6 { margin-bottom: var(--fs-6) }
.w-full { width: 100%; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: var(--fs-text-xs); font-weight: 700; color: var(--fs-violet-500); }
.text-gradient { background: var(--fs-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 6, 20, .94); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
.site-header .container { height: var(--fs-header-h); display: flex; align-items: center; gap: var(--fs-4); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.nav { display: none; gap: var(--fs-1); align-items: center; margin-left: auto; }
.nav a, .nav button.linklike { color: #E9E4F5; font-weight: 600; font-size: var(--fs-text-sm); padding: 8px 12px; border-radius: var(--fs-radius-pill); background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav a:hover, .nav button.linklike:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav .badge-dot { display: inline-block; min-width: 18px; padding: 0 5px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: var(--fs-violet-400); color: #fff; font-size: 11px; margin-left: 4px; }
@media (min-width: 960px) { .nav { display: flex; } .menu-toggle { display: none; } }
.menu-toggle { margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.mobile-nav { display: none; background: var(--fs-ink); border-top: 1px solid rgba(255,255,255,.06); padding: var(--fs-3) var(--fs-4) var(--fs-5); }
.mobile-nav.open { display: block; }
.mobile-nav a, .mobile-nav button { display: block; width: 100%; text-align: left; color: #E9E4F5; padding: 12px 4px; font-weight: 600; border: 0; background: none; font: inherit; border-bottom: 1px solid rgba(255,255,255,.06); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border-radius: var(--fs-radius); box-shadow: var(--fs-shadow-lg); padding: 6px; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; color: var(--fs-gray-900) !important; padding: 10px 12px; border-radius: 8px; font-size: var(--fs-text-sm); font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--fs-gray-50) !important; text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--fs-gradient); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.lang-select { background: transparent; color: #E9E4F5; border: 1px solid rgba(255,255,255,.18); border-radius: var(--fs-radius-pill); padding: 6px 10px; font: inherit; font-size: var(--fs-text-xs); }
.lang-select option { color: #000; }

/* ---------- Footer ---------- */
.site-footer { background: var(--fs-ink); color: #BDB4D0; padding: var(--fs-12) 0 var(--fs-8); margin-top: var(--fs-16); }
.site-footer a { color: #E2DCEF; }
.site-footer h4 { color: #fff; font-size: var(--fs-text-sm); text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { margin: 8px 0; font-size: var(--fs-text-sm); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: var(--fs-8); padding-top: var(--fs-6); font-size: var(--fs-text-xs); }

/* ---------- Buttons ---------- */
.btn { --b: var(--fs-violet-500); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--fs-radius-pill); border: 1px solid transparent; font: 700 var(--fs-text-sm)/1 var(--fs-font); cursor: pointer; text-decoration: none !important; transition: transform .08s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fs-gradient); color: #fff; box-shadow: 0 6px 18px rgba(125, 13, 251, .28); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(125, 13, 251, .38); }
.btn-secondary { background: #fff; color: var(--fs-gray-900); border-color: var(--fs-gray-200); }
.btn-secondary:hover { border-color: var(--fs-gray-300); background: var(--fs-gray-25); }
.btn-ghost { background: transparent; color: var(--fs-violet-600); }
.btn-ghost:hover { background: var(--fs-violet-50); }
.btn-dark { background: var(--fs-ink); color: #fff; }
.btn-danger { background: var(--fs-danger); color: #fff; }
.btn-danger-outline { background: #fff; color: var(--fs-danger); border-color: #F2B8C1; }
.btn-sm { min-height: 34px; padding: 6px 14px; font-size: var(--fs-text-xs); }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: var(--fs-text-md); }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--fs-violet-600); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: var(--fs-4); }
label, .label { font-weight: 600; font-size: var(--fs-text-sm); color: var(--fs-gray-700); }
.hint { font-size: var(--fs-text-xs); color: var(--fs-gray-500); }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--fs-gray-200); border-radius: var(--fs-radius); background: #fff; font: inherit; color: var(--fs-gray-900); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 110px; resize: vertical; }
/* Custom chevron: the native arrow sits flush against the right edge. */
select.select:not([multiple]), .search-bar select.sb-input, select.lang-select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b6480' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 12px 8px; background-position: right 16px center;
  padding-right: 44px; text-overflow: ellipsis; cursor: pointer;
}
.search-bar select.sb-input { background-position: right 4px center; padding-right: 26px; }
select.lang-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23E9E4F5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px 7px; background-position: right 12px center; padding-right: 32px;
}
select.select:disabled { cursor: not-allowed; opacity: .6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--fs-violet-400); box-shadow: var(--fs-ring); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--fs-danger); }
.error { color: var(--fs-danger); font-size: var(--fs-text-xs); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fs-violet-500); flex: none; }
.form-grid { display: grid; gap: var(--fs-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } .form-grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.form-grid .field + .field { margin-top: 0; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--fs-gray-50); border: 1px solid var(--fs-gray-200); border-right: 0; border-radius: var(--fs-radius) 0 0 var(--fs-radius); font-weight: 600; color: var(--fs-gray-500); }
.input-group .input { border-radius: 0 var(--fs-radius) var(--fs-radius) 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: var(--fs-2); }

/* ---------- Cards & surfaces ---------- */
.card { background: #fff; border: var(--fs-border); border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-sm); }
.card-body { padding: var(--fs-6); }
.card-body-sm { padding: var(--fs-4); }
.card-title { font-size: var(--fs-text-lg); margin-bottom: var(--fs-3); }
.panel-dark { background: var(--fs-ink); color: #E6E0F2; border-radius: var(--fs-radius-xl); }
.panel-dark h2, .panel-dark h3 { color: #fff; }
.divider-list > * + * { border-top: var(--fs-border); }

/* ---------- Badges / alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--fs-radius-pill); font-size: var(--fs-text-xs); font-weight: 700; background: var(--fs-gray-100); color: var(--fs-gray-700); white-space: nowrap; }
.badge-success { background: var(--fs-success-bg); color: var(--fs-success); }
.badge-warning { background: var(--fs-warning-bg); color: var(--fs-warning); }
.badge-danger { background: var(--fs-danger-bg); color: var(--fs-danger); }
.badge-info { background: var(--fs-info-bg); color: var(--fs-info); }
.badge-brand { background: var(--fs-violet-50); color: var(--fs-violet-600); }
.badge-test { background: #111; color: #FDE047; }
.badge-muted { background: var(--fs-gray-100); color: var(--fs-gray-500); }
.alert { padding: 12px 16px; border-radius: var(--fs-radius); font-size: var(--fs-text-sm); font-weight: 500; border: 1px solid transparent; margin-bottom: var(--fs-5); }
.alert:last-child, .stack > .alert, .stack-sm > .alert { margin-bottom: 0; }
.alert ul { margin: 6px 0 0; padding-left: 1.2em; }
.alert-success { background: var(--fs-success-bg); color: #075E40; border-color: #BFE7D5; }
.alert-danger { background: var(--fs-danger-bg); color: #8C1427; border-color: #F5C2CB; }
.alert-warning { background: var(--fs-warning-bg); color: #7A4500; border-color: #FBDDA9; }
.alert-info { background: var(--fs-info-bg); color: #1A3F8F; border-color: #C9D8FA; }
.flash-wrap { position: relative; z-index: 5; margin-top: var(--fs-4); }

/* ---------- Hero / home ---------- */
/* The glows are background layers rather than oversized pseudo-elements, so the hero needs no
   overflow: hidden and the search bar's "Quando?" panel can drop below it. */
.hero { position: relative; color: #fff; padding: var(--fs-16) 0 var(--fs-20);
  background:
    radial-gradient(circle 349px at calc(110% - 380px) calc(-40% + 380px), rgba(125,13,251,.55), rgba(125,13,251,0)),
    radial-gradient(circle 312px at calc(-15% + 340px) calc(150% - 340px), rgba(87,3,246,.45), rgba(87,3,246,0)),
    var(--fs-ink); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: var(--fs-text-4xl); max-width: 14ch; letter-spacing: -.035em; }
.hero p.lead { color: #CFC6E2; font-size: var(--fs-text-lg); max-width: 52ch; }
.search-bar { margin-top: var(--fs-8); background: #fff; border-radius: var(--fs-radius-xl); padding: 8px; display: grid; gap: 6px; grid-template-columns: 1fr; box-shadow: var(--fs-shadow-lg); width: 100%; }
.search-bar .sb-field { padding: 8px 14px; border-radius: var(--fs-radius-lg); }
.search-bar .sb-field:hover { background: var(--fs-gray-50); }
.search-bar label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--fs-gray-500); }
.search-bar .sb-input { width: 100%; border: 0; padding: 4px 0; font: 600 var(--fs-text-md) var(--fs-font); background: transparent; color: var(--fs-gray-900); }
.search-bar .sb-input:focus { outline: none; }
.search-bar .btn { min-height: 56px; border-radius: var(--fs-radius-lg); }
@media (min-width: 860px) { .search-bar { grid-template-columns: 1.6fr 1.3fr 1fr .8fr auto; align-items: center; border-radius: var(--fs-radius-pill); } .search-bar .btn { border-radius: var(--fs-radius-pill); padding: 0 28px; } }
.trust-row { display: flex; gap: var(--fs-6); flex-wrap: wrap; margin-top: var(--fs-6); color: #BDB4D0; font-size: var(--fs-text-sm); }
.trust-row span::before { content: "✓"; color: var(--fs-violet-300); margin-right: 6px; font-weight: 800; }

/* overflow-x also clips vertically: pad so the hover lift and shadow are not cut off */
.cat-scroller { display: flex; gap: var(--fs-3); overflow-x: auto; padding: 8px 6px 18px; margin: -8px -6px -12px; scrollbar-width: thin; }
.cat-chip { flex: none; display: flex; flex-direction: column; gap: 10px; width: 150px; padding: var(--fs-4); background: #fff; border: var(--fs-border); border-radius: var(--fs-radius-lg); color: var(--fs-gray-900); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-chip:hover { border-color: var(--fs-violet-300); transform: translateY(-2px); box-shadow: var(--fs-shadow); text-decoration: none; }
.cat-chip .icon { width: 40px; height: 40px; border-radius: 12px; background: var(--fs-violet-50); color: var(--fs-violet-600); display: grid; place-items: center; }
.cat-chip strong { font-size: var(--fs-text-sm); line-height: 1.3; }

.step { display: flex; gap: var(--fs-4); }
.step .num { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--fs-gradient); color: #fff; display: grid; place-items: center; font-weight: 800; }
.city-card { position: relative; display: block; border-radius: var(--fs-radius-lg); overflow: hidden; min-height: 140px; padding: var(--fs-5); background: var(--fs-gradient); color: #fff; }
.city-card:nth-child(3n+2) { background: linear-gradient(135deg, #1E0650, #7D0DFB); }
.city-card:nth-child(3n) { background: linear-gradient(135deg, #3F0A9E, #C084FC); }
.city-card strong { font-size: var(--fs-text-xl); display: block; }
.city-card:hover { text-decoration: none; filter: brightness(1.08); }

/* ---------- Listing cards ---------- */
.listing-card { display: block; color: inherit; }
.listing-card:hover { text-decoration: none; }
.listing-card .media { position: relative; aspect-ratio: 4/3; border-radius: var(--fs-radius-lg); overflow: hidden; background: var(--fs-gray-100); }
.listing-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.listing-card:hover .media img { transform: scale(1.04); }
.listing-card .media .tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.listing-card .media .tags .badge { background: rgba(255,255,255,.94); color: var(--fs-gray-900); }
.listing-card .body { padding: 10px 2px 0; }
.listing-card .title { font-weight: 700; font-size: var(--fs-text-md); margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-card .meta { font-size: var(--fs-text-sm); color: var(--fs-gray-500); display: flex; gap: 10px; flex-wrap: wrap; }
.listing-card .price { margin-top: 4px; font-size: var(--fs-text-sm); } .listing-card .price strong { font-size: var(--fs-text-md); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--fs-gray-900); }
.rating::before { content: "★"; color: var(--fs-violet-500); }
.stars { color: var(--fs-violet-500); letter-spacing: 2px; }

/* ---------- Search page ---------- */
.search-page { --fbar-h: 0px; background: #fff; }
/* Filter bar: pill controls with popovers (not clipped) + a horizontally scrolling chip row. */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; background: #fff; border-bottom: var(--fs-border); }
.fbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fbar-where { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--fs-gray-200); border-radius: var(--fs-radius-pill); color: var(--fs-gray-500); min-width: 0; flex: 1 1 220px; }
.fbar-where:focus-within { border-color: var(--fs-violet-400); box-shadow: var(--fs-ring); }
.fbar-where input { border: 0; outline: 0; font: 600 var(--fs-text-sm) var(--fs-font); color: var(--fs-gray-900); background: transparent; min-width: 0; width: 100%; }
.fpill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid var(--fs-gray-200); border-radius: var(--fs-radius-pill); background: #fff; font: 700 var(--fs-text-sm) var(--fs-font); color: var(--fs-gray-900); cursor: pointer; white-space: nowrap; list-style: none; }
.fpill::-webkit-details-marker { display: none; }
summary.fpill::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.fpill:hover { border-color: var(--fs-gray-300); }
.fpill.is-active { border-color: var(--fs-violet-500); background: var(--fs-violet-50); color: var(--fs-violet-700); }
select.fpill.select { min-height: 40px; width: auto; padding-top: 0; padding-bottom: 0; }
.fpop { position: relative; }
.fpop[open] > .fpill { border-color: var(--fs-gray-900); }
.fpop-panel { position: absolute; z-index: 45; top: calc(100% + 8px); left: 0; width: 300px; max-width: calc(100vw - 32px); background: #fff; border: var(--fs-border); border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-lg); padding: var(--fs-5); }
.fpop-wide { width: 360px; }
.fpop-panel .amenity-list { max-height: 240px; overflow: auto; display: grid; gap: 8px; }
.fbar-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; min-width: 0; padding: 2px 0; }
.fbar-chips::-webkit-scrollbar { display: none; }
.fchip { position: relative; flex: none; cursor: pointer; }
.fchip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.fchip span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--fs-gray-200); border-radius: var(--fs-radius-pill); font-size: var(--fs-text-sm); font-weight: 600; white-space: nowrap; background: #fff; }
.fchip:hover span { border-color: var(--fs-gray-400); }
.fchip input:checked + span { background: var(--fs-ink); border-color: var(--fs-ink); color: #fff; }
.fchip input:focus-visible + span { box-shadow: var(--fs-ring); }

.search-split { display: block; }
.search-results { padding: var(--fs-5) 16px var(--fs-10); transition: opacity .15s; }
.search-results.is-loading { opacity: .5; pointer-events: none; }
.results-head { margin-bottom: var(--fs-5); }
.results-title { font-size: var(--fs-text-xl); margin: 0 0 2px; }
.results-grid { display: grid; gap: var(--fs-6) var(--fs-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .search-page:not(.has-map) .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .search-page:not(.has-map) .results-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .has-map .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.listing-card.is-map-hover .title { color: var(--fs-violet-600); }
.listing-card.is-map-hover .media { box-shadow: 0 0 0 3px var(--fs-violet-400); }

/* Map column */
.search-map { display: none; position: relative; }
.search-map .google-maps-mark { font-weight: 700; color: #3c4043; letter-spacing: .01em; }
.search-map #search-map { width: 100%; height: 100%; background: var(--fs-gray-100); }
/* Address autocomplete */
.ac { position: relative; }
.ac.is-loading .input { background-image: linear-gradient(90deg, transparent, var(--fs-violet-50), transparent); background-size: 200% 100%; animation: ac-load 1s linear infinite; }
@keyframes ac-load { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .ac.is-loading .input { animation: none; } }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 74px; margin: 0; padding: 6px; list-style: none; background: #fff; border: var(--fs-border); border-radius: var(--fs-radius); box-shadow: var(--fs-shadow-lg); max-height: 300px; overflow: auto; }
.ac-list [role="option"] { display: grid; gap: 2px; padding: 9px 12px; border-radius: var(--fs-radius-sm); cursor: pointer; }
.ac-list [role="option"]:hover, .ac-list [aria-selected="true"] { background: var(--fs-violet-50); }
.ac-main { font-weight: 700; color: var(--fs-gray-900); }
.ac-sub { font-size: var(--fs-text-xs); color: var(--fs-gray-500); }
.ac-empty { padding: 9px 12px; font-size: var(--fs-text-sm); color: var(--fs-gray-500); }
.map-move-toggle { position: absolute; z-index: 500; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff; border-radius: var(--fs-radius-pill); box-shadow: var(--fs-shadow); font-size: var(--fs-text-sm); font-weight: 700; cursor: pointer; }
.map-move-toggle input { accent-color: var(--fs-violet-500); width: 16px; height: 16px; }
.map-switch { display: none; }
.has-map .map-switch { display: inline-flex; position: fixed; z-index: 55; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--fs-ink); color: #fff; box-shadow: var(--fs-shadow-lg); }
.has-map.show-map .search-results { display: none; }
.has-map.show-map .search-map { display: block; height: calc(100dvh - var(--fs-header-h)); }
@media (min-width: 1024px) {
  .search-page { --fbar-h: 66px; }
  .fbar { position: sticky; top: var(--fs-header-h); z-index: 40; flex-wrap: nowrap; height: var(--fbar-h); padding: 0 24px; }
  .fbar-controls { flex-wrap: nowrap; flex: none; }
  .fbar-where { flex: 0 1 240px; }
  .fbar-chips { flex: 1 1 auto; border-left: var(--fs-border); padding-left: 14px; }
  .search-results { padding: var(--fs-6) 24px var(--fs-12); }
  .has-map .search-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 42%); align-items: start; }
  .has-map .search-map, .has-map.show-map .search-map { display: block; position: sticky; top: calc(var(--fs-header-h) + var(--fbar-h)); height: calc(100vh - var(--fs-header-h) - var(--fbar-h)); }
  .has-map.show-map .search-results { display: block; }
  .has-map .map-switch { display: none; }
}

/* Price pins and popup card */
.map-pin-anchor { background: none; border: 0; }
.map-pin { position: absolute; transform: translate(-50%, -50%); display: inline-block; padding: 6px 10px; background: #fff; color: var(--fs-gray-900); border-radius: var(--fs-radius-pill); box-shadow: 0 2px 8px rgba(11, 6, 20, .25); font: 800 13px/1 var(--fs-font); white-space: nowrap; cursor: pointer; transition: transform .12s, background .12s, color .12s; }
.map-pin:hover, .is-active .map-pin { background: var(--fs-ink); color: #fff; transform: translate(-50%, -50%) scale(1.08); }
.map-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: var(--fs-radius-lg); overflow: hidden; box-shadow: var(--fs-shadow-lg); }
.map-popup .leaflet-popup-content { margin: 0; width: 240px !important; }
.map-card { display: block; color: var(--fs-gray-900) !important; text-decoration: none !important; }
.map-card img { display: block; width: 100%; height: 150px; object-fit: cover; background: var(--fs-gray-100); }
.map-card-body { display: grid; gap: 4px; padding: 10px 12px 12px; font-size: var(--fs-text-sm); }
.map-card-meta { color: var(--fs-gray-500); }
.map-card-cta { color: var(--fs-violet-600); font-weight: 700; }
.leaflet-container { font-family: var(--fs-font); }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tabs a { padding: 8px 14px; border-radius: var(--fs-radius-pill); border: 1px solid var(--fs-gray-200); color: var(--fs-gray-700); font-weight: 600; font-size: var(--fs-text-sm); background: #fff; }
.pill-tabs a.active, .pill-tabs a[aria-current="page"] { background: var(--fs-ink); color: #fff; border-color: var(--fs-ink); }
.pill-tabs a:hover { text-decoration: none; border-color: var(--fs-gray-400); }

/* ---------- Listing detail ---------- */
/* Listing gallery: layout adapts to the photo count (gallery-n1 … gallery-n5).
   Mobile: swipeable row with scroll snap; desktop: mosaic. */
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--fs-radius-xl); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; scroll-snap-align: start; border-radius: var(--fs-radius-xl); background: var(--fs-gray-100); }
.gallery:not(.gallery-n1) img { flex-basis: 88%; }
.gallery > .card { flex: 1; }
@media (min-width: 860px) {
  .gallery { display: grid; overflow: hidden; height: 448px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .gallery img { height: 100%; min-height: 0; min-width: 0; aspect-ratio: auto; border-radius: 0; }
  .gallery img:first-child { grid-row: span 2; }
  .gallery-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; max-height: 520px; }
  .gallery-n1 img { aspect-ratio: 21/9; max-height: 520px; }
  .gallery-n2 { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); }
  .gallery-n2 img:first-child { grid-row: auto; }
  .gallery-n3 { grid-template-columns: 2fr 1fr; }
  .gallery-n4 img:nth-child(2) { grid-column: span 2; }
}
.detail-layout { display: grid; gap: var(--fs-10); grid-template-columns: minmax(0, 1fr); margin-top: var(--fs-6); }
@media (min-width: 1024px) { .detail-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--fs-12); } }
.booking-box { position: relative; overflow: hidden; }
@media (min-width: 1024px) { .booking-box { position: sticky; top: calc(var(--fs-header-h) + 72px); } }
.booking-box .price-head { font-size: var(--fs-text-2xl); font-weight: 800; }
.breakdown { font-size: var(--fs-text-sm); }
.breakdown .line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.breakdown .total { border-top: var(--fs-border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: var(--fs-text-md); }
.facts { display: flex; flex-wrap: wrap; gap: var(--fs-2) var(--fs-6); color: var(--fs-gray-700); font-weight: 600; font-size: var(--fs-text-sm); }
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.amenity-grid div { display: flex; gap: 10px; align-items: center; }
.amenity-grid div::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fs-violet-400); flex: none; }
.prose { white-space: pre-line; color: var(--fs-gray-700); }
.hours-table td { padding: 4px 16px 4px 0; font-size: var(--fs-text-sm); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: var(--fs-border); border-radius: var(--fs-radius-lg); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-text-sm); }
.table th { text-align: left; font-size: var(--fs-text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--fs-gray-500); background: var(--fs-gray-25); font-weight: 700; padding: 12px 14px; border-bottom: var(--fs-border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: var(--fs-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--fs-gray-25); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: var(--fs-text-sm); }
.kv dt { color: var(--fs-gray-500); font-weight: 600; } .kv dd { margin: 0; }

/* ---------- Account / dashboard shells ---------- */
.page-head { padding-block: var(--fs-8) var(--fs-4); }
.page-head h1 { margin: 0; }
.side-layout { display: grid; gap: var(--fs-6); grid-template-columns: 1fr; }
@media (min-width: 960px) { .side-layout { grid-template-columns: 240px 1fr; } }
.side-nav { display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 960px) { .side-nav { flex-direction: column; position: sticky; top: calc(var(--fs-header-h) + 16px); align-self: start; } }
.side-nav a { padding: 10px 14px; border-radius: var(--fs-radius); color: var(--fs-gray-700); font-weight: 600; font-size: var(--fs-text-sm); white-space: nowrap; }
.side-nav a:hover { background: var(--fs-gray-50); text-decoration: none; }
.side-nav a.active { background: var(--fs-violet-50); color: var(--fs-violet-700); }
.side-nav .done::after { content: " ✓"; color: var(--fs-success); }
.stat { padding: var(--fs-5); }
.stat .label { font-size: var(--fs-text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--fs-gray-500); }
.stat .value { font-size: var(--fs-text-2xl); font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat .sub { font-size: var(--fs-text-xs); color: var(--fs-gray-500); }
.empty { text-align: center; padding: var(--fs-12) var(--fs-4); color: var(--fs-gray-500); }
.empty h3 { color: var(--fs-gray-900); }
.thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--fs-gray-100); flex: none; }
.thumb-lg { width: 120px; height: 90px; border-radius: 12px; object-fit: cover; flex: none; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--fs-gray-100); }
.timeline li { position: relative; padding: 0 0 14px 18px; font-size: var(--fs-text-sm); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--fs-violet-400); }
/* Photo uploader: drop zone + upload queue */
.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 40px 24px; text-align: center; border: 2px dashed var(--fs-violet-200); border-radius: var(--fs-radius-xl); background: linear-gradient(180deg, var(--fs-violet-50), #fff); cursor: pointer; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--fs-violet-400); box-shadow: var(--fs-ring); }
.dropzone.is-dragover { border-color: var(--fs-violet-500); background: var(--fs-violet-100); transform: scale(1.01); }
.dropzone.is-pasted { border-color: var(--fs-violet-500); }
.dz-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #fff; color: var(--fs-violet-600); box-shadow: var(--fs-shadow); margin-bottom: 6px; }
.dropzone.is-dragover .dz-icon { animation: dz-bounce .6s ease infinite alternate; }
@keyframes dz-bounce { to { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .dropzone.is-dragover .dz-icon { animation: none; } .dropzone.is-dragover { transform: none; } }
.dz-title { font-size: var(--fs-text-lg); font-weight: 800; color: var(--fs-gray-900); }
.dz-sub { color: var(--fs-gray-700); }
.dz-browse { color: var(--fs-violet-600); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.dz-hint { font-size: var(--fs-text-xs); color: var(--fs-gray-500); max-width: 520px; }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--fs-gray-200); border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 600 12px/1.4 var(--fs-font); color: var(--fs-gray-700); }
.uploader.is-enhanced .uploader-fallback { display: none; }
.upload-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.upload-queue:not(:empty) { margin-top: var(--fs-4); }
.uq-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: var(--fs-border); border-radius: var(--fs-radius); background: #fff; }
.uq-item img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; background: var(--fs-gray-100); }
.uq-meta { display: grid; gap: 4px; flex: 1; min-width: 0; }
.uq-name { font-size: var(--fs-text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uq-status { font-size: var(--fs-text-xs); color: var(--fs-gray-500); }
.uq-bar { height: 4px; border-radius: 4px; background: var(--fs-gray-100); overflow: hidden; }
.uq-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--fs-violet-400), var(--fs-violet-600)); transition: width .2s; }
.uq-item.is-done .uq-status { color: var(--fs-success); font-weight: 700; }
.uq-item.is-error { border-color: #F5C2CB; background: var(--fs-danger-bg); }
.uq-item.is-error .uq-status { color: #8C1427; font-weight: 600; }
.uq-item.is-error .uq-bar { display: none; }

/* Photo grid: draggable cards with hover actions */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photo-grid .photo { border: var(--fs-border); border-radius: var(--fs-radius-lg); overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s, opacity .15s; cursor: grab; }
.photo-grid .photo:hover { box-shadow: var(--fs-shadow); }
.photo-grid .photo.is-dragging { opacity: .45; transform: scale(.97); cursor: grabbing; }
.photo-grid .photo.cover { border-color: var(--fs-violet-400); box-shadow: 0 0 0 2px var(--fs-violet-200); }
.p-media { position: relative; }
.p-media img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--fs-gray-100); }
.p-cover-badge { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: var(--fs-radius-pill); background: var(--fs-violet-600); color: #fff; font-size: 12px; font-weight: 700; }
.p-grip { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--fs-gray-700); opacity: 0; transition: opacity .15s; }
.p-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; justify-content: flex-end; padding: 10px; background: linear-gradient(transparent, rgba(11, 6, 20, .55)); opacity: 0; transition: opacity .15s; }
.photo:hover .p-actions, .photo:focus-within .p-actions, .photo:hover .p-grip { opacity: 1; }
@media (hover: none) { .p-actions { opacity: 1; } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.95); color: var(--fs-gray-900); cursor: pointer; }
.icon-btn:hover { background: #fff; color: var(--fs-violet-600); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--fs-ring); }
.icon-btn-danger:hover { color: var(--fs-danger); }
.p-actions form { display: contents; }
.p-body { padding: 10px; display: grid; gap: 8px; cursor: default; }
.input-sm { min-height: 38px; padding: 7px 12px; font-size: var(--fs-text-sm); }

/* ---------- Messaging ---------- */
.chat { display: flex; flex-direction: column; height: min(70vh, 680px); }
.chat-log { flex: 1; overflow-y: auto; padding: var(--fs-4); display: flex; flex-direction: column; gap: 10px; background: var(--fs-gray-25); }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: var(--fs-text-sm); white-space: pre-wrap; word-wrap: break-word; }
.bubble.them { align-self: flex-start; background: #fff; border: var(--fs-border); border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--fs-violet-500); color: #fff; border-bottom-right-radius: 6px; }
.bubble.staff { align-self: center; background: var(--fs-ink); color: #fff; }
.bubble.system { align-self: center; background: var(--fs-gray-100); color: var(--fs-gray-700); }
.bubble .meta { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }
.chat-form { display: flex; gap: 8px; padding: var(--fs-3); border-top: var(--fs-border); background: #fff; }
.chat-form .textarea { min-height: 46px; height: 46px; }
.convo-item { display: flex; gap: 12px; padding: 14px; color: inherit; align-items: center; }
.convo-item:hover { background: var(--fs-gray-25); text-decoration: none; }
.convo-item.unread .title { font-weight: 800; }

/* ---------- Admin ---------- */
.admin-body { background: var(--fs-gray-50); }
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 1024px) { .admin-shell { grid-template-columns: 250px 1fr; } }
.admin-sidebar { background: var(--fs-ink); color: #CFC6E2; padding: var(--fs-5) var(--fs-3); }
@media (min-width: 1024px) { .admin-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.admin-sidebar .brand img { height: 30px; }
.admin-sidebar .tag { display: inline-block; margin-top: 6px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fs-violet-300); font-weight: 700; }
.admin-nav { margin-top: var(--fs-6); display: none; }
.admin-nav.open { display: block; }
@media (min-width: 1024px) { .admin-nav { display: block; } .admin-sidebar .menu-toggle { display: none; } }
.admin-nav .group { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: #7E7494; margin: 18px 10px 6px; font-weight: 700; }
.admin-nav a { display: block; padding: 9px 12px; border-radius: 10px; color: #DDD6EC; font-size: var(--fs-text-sm); font-weight: 600; }
.admin-nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.admin-nav a.active { background: rgba(125, 13, 251, .28); color: #fff; }
.admin-main { padding: var(--fs-6) var(--fs-4); min-width: 0; }
@media (min-width: 768px) { .admin-main { padding: var(--fs-8); } }
/* Flash messages in the admin: full content width (no .container inset) and spaced from the page. */
.admin-main .flash-wrap { max-width: none; padding-inline: 0; margin: 0 0 var(--fs-5); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: var(--fs-6); flex-wrap: wrap; }
.admin-topbar h1 { font-size: var(--fs-text-2xl); margin: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: var(--fs-4); }
.toolbar .input, .toolbar .select { min-height: 40px; width: auto; }
.env-banner { background: #FDE047; color: #111; text-align: center; font-size: var(--fs-text-xs); font-weight: 700; padding: 4px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: var(--fs-6); flex-wrap: wrap; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--fs-gray-200); background: #fff; color: var(--fs-gray-700); font-weight: 600; font-size: var(--fs-text-sm); }
.pagination .active span { background: var(--fs-ink); color: #fff; border-color: var(--fs-ink); }
.pagination .disabled span { opacity: .45; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--fs-header-h)); display: grid; place-items: center; padding: var(--fs-10) var(--fs-4); background: radial-gradient(1000px 500px at 100% 0%, var(--fs-violet-100), transparent 60%), var(--fs-gray-25); }
.auth-card { width: 100%; max-width: 440px; }
.map-embed { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 240px; border: var(--fs-border); border-radius: var(--fs-radius-lg); background: var(--fs-gray-50); margin: var(--fs-2) 0; }
.steps { margin: 0 0 var(--fs-4); padding-left: 1.4em; }
.steps li { margin-bottom: 6px; line-height: 1.5; }
.mfa-qr { display: inline-block; padding: 8px; background: #fff; border: var(--fs-border); border-radius: 12px; line-height: 0; }
.mfa-qr svg { width: 220px; height: 220px; max-width: 100%; }
.auth-card .card-body { padding: var(--fs-8); }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; background: var(--fs-ink); color: #E6E0F2; border-radius: var(--fs-radius-lg); padding: var(--fs-5); box-shadow: var(--fs-shadow-lg); display: none; }
.cookie-banner.show { display: block; }
.cookie-banner a { color: var(--fs-violet-200); }

/* ---------- Misc ---------- */
.tabs { display: flex; gap: 4px; border-bottom: var(--fs-border); margin-bottom: var(--fs-6); overflow-x: auto; }
.tabs button, .tabs a { padding: 10px 14px; border: 0; background: none; font: 600 var(--fs-text-sm) var(--fs-font); color: var(--fs-gray-500); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs .active, .tabs [aria-selected="true"] { color: var(--fs-violet-600); border-bottom-color: var(--fs-violet-500); }
.tab-panel[hidden] { display: none; }
.test-ribbon { background: repeating-linear-gradient(45deg, #111, #111 10px, #222 10px, #222 20px); color: #FDE047; text-align: center; font-weight: 800; font-size: var(--fs-text-xs); letter-spacing: .1em; padding: 6px; }
.icon-svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
details.disclosure { border: var(--fs-border); border-radius: var(--fs-radius); background: #fff; padding: 12px 16px; }
details.disclosure + details.disclosure { margin-top: 8px; }
details.disclosure summary { font-weight: 700; cursor: pointer; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 34px; color: var(--fs-gray-200); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--fs-violet-500); }
.star-input input:focus-visible + label { box-shadow: var(--fs-ring); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cookie-banner { display: none; } }

/* ---- Listing page ------------------------------------------------------- */
.listing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--fs-4); flex-wrap: wrap; }
.listing-actions { display: flex; gap: 4px; align-items: center; }
.listing-actions form { margin: 0; }
.facts .rating::before { content: none; }
.facts .rating { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.facts .rating .icon-svg { color: var(--fs-violet-500); fill: currentColor; }
.facts > span, .facts > a { display: inline-flex; align-items: center; gap: 6px; }
.gallery-wrap { position: relative; }
.gallery img[data-open-photo] { cursor: zoom-in; transition: filter .2s; }
.gallery img[data-open-photo]:hover { filter: brightness(.92); }
.gallery-all { position: absolute; right: 16px; bottom: 16px; box-shadow: var(--fs-shadow-sm); background: #fff; }
@media (max-width: 859px) { .gallery-all { right: 12px; bottom: 12px; } }

/* Section bar: sticks under the site header while reading the page. */
.listing-nav { position: sticky; top: var(--fs-header-h); z-index: 20; margin: var(--fs-6) calc(-1 * var(--fs-4)) 0; padding: 0 var(--fs-4); background: rgba(250, 249, 252, .94); backdrop-filter: blur(10px); border-bottom: var(--fs-border); }
.listing-nav-inner { display: flex; gap: var(--fs-6); overflow-x: auto; scrollbar-width: none; }
.listing-nav-inner::-webkit-scrollbar { display: none; }
.listing-nav a { flex: none; padding: 16px 0 14px; font-weight: 600; font-size: var(--fs-text-sm); color: var(--fs-gray-500); text-decoration: none; border-bottom: 2px solid transparent; }
.listing-nav a:hover { color: var(--fs-gray-900); }
.listing-nav a.is-active { color: var(--fs-gray-900); border-bottom-color: var(--fs-violet-500); }
.listing-section, .listing-main [id] { scroll-margin-top: calc(var(--fs-header-h) + 64px); }

.listing-main > * + * { border-top: var(--fs-border); padding-top: var(--fs-8); margin-top: var(--fs-8); }
.listing-main h2 { font-size: var(--fs-text-xl); }
.host-strip { display: flex; align-items: center; gap: var(--fs-4); }
.host-strip-text { flex: 1; min-width: 0; }
.host-strip h2 { font-size: var(--fs-text-lg); }
.review-highlights ul { list-style: none; padding: 0; margin: 0 0 var(--fs-4); display: grid; gap: var(--fs-4); }
.review-highlights li { display: flex; gap: 12px; align-items: flex-start; }
.review-highlights .avatar { width: 36px; height: 36px; flex: none; }
.strong-link { font-weight: 700; color: var(--fs-gray-900); }

[data-clamp].is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { background: none; border: 0; padding: 0; margin-top: 8px; font: inherit; font-weight: 700; color: var(--fs-gray-900); text-decoration: underline; cursor: pointer; }

.amenity-list-lg { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; }
.amenity-list-lg li { display: flex; align-items: center; gap: 12px; }
.amenity-list-lg .icon-svg { width: 22px; height: 22px; color: var(--fs-gray-700); flex: none; }
.amenity-list-lg.is-collapsed .is-extra { display: none; }

.addon-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.addon-card { display: flex; gap: 12px; align-items: flex-start; border: var(--fs-border); border-radius: var(--fs-radius-lg); padding: 14px; background: #fff; }
.addon-icon { width: 40px; height: 40px; border-radius: var(--fs-radius); background: var(--fs-violet-50); color: var(--fs-violet-600); display: grid; place-items: center; flex: none; }

.hours-table { border-collapse: collapse; min-width: min(100%, 360px); }
.hours-table td:first-child { font-weight: 600; }
.hours-table tr.is-closed td { color: var(--fs-gray-400); }

.accordion { border-top: var(--fs-border); }
.accordion details { border-bottom: var(--fs-border); padding: 0; }
.accordion summary { display: flex; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; font-weight: 700; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion details > :not(summary) { margin: 0 0 16px 34px; }

.review { padding: var(--fs-5) 0; border-bottom: var(--fs-border); }
.review:first-of-type { padding-top: 0; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-head .avatar { width: 40px; height: 40px; }
.review-head .stars { margin-left: auto; }
.reviews-empty { display: flex; gap: 14px; align-items: center; padding: var(--fs-5); border: 1px dashed var(--fs-gray-200); border-radius: var(--fs-radius-lg); color: var(--fs-violet-500); }
.reviews-empty strong { color: var(--fs-gray-900); }

.discount-badges { list-style: none; padding: 0; margin: var(--fs-3) 0 0; display: grid; gap: 6px; }
.discount-badges li { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-text-sm); padding: 8px 12px; background: var(--fs-gray-50); border-radius: var(--fs-radius); }
.booking-mode-note { display: flex; gap: 12px; align-items: flex-start; padding: var(--fs-4) var(--fs-6); border-top: var(--fs-border); background: var(--fs-gray-50); }
.booking-mode-note .icon-svg { color: var(--fs-violet-500); flex: none; margin-top: 2px; }

/* Mobile: fixed bottom bar with the price and a jump to the booking form. */
.mobile-book-bar { display: none; }
@media (max-width: 1023px) {
  .mobile-book-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: var(--fs-border); box-shadow: 0 -8px 24px rgba(20, 6, 50, .08); }
  .listing-page { padding-bottom: 96px; }
}

/* Photo viewer */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 4, 16, .96); color: #fff; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(8, 4, 16, .96); }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.lightbox-count { font-weight: 600; font-size: var(--fs-text-sm); }
.lightbox-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 0 16px 24px; }
.lightbox figure { margin: 0; height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lightbox figure img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--fs-radius); }
.lightbox figcaption { font-size: var(--fs-text-sm); color: #CFC6E2; min-height: 1.2em; }
.lightbox-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox-btn:hover { background: rgba(255,255,255,.18); }
.lightbox-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .lightbox-stage { grid-template-columns: 1fr; } .lightbox-prev, .lightbox-next { position: absolute; bottom: 20px; } .lightbox-prev { left: 20px; } .lightbox-next { right: 20px; } }

/* ---- Date picker (public/js/datepicker.js) ------------------------------ */
.dp { position: relative; }
.dp-display { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; cursor: pointer; font: inherit; }
.dp-value { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-bar .dp-display { font: 600 var(--fs-text-md) var(--fs-font); color: var(--fs-gray-900); }
.dp-display.is-empty .dp-value { color: var(--fs-gray-400); font-weight: 500; }
.dp-display .icon-svg { color: var(--fs-gray-500); flex: none; }
.dp-display[aria-expanded="true"] { border-color: var(--fs-violet-500); box-shadow: var(--fs-ring); }
.search-bar .dp-display { border: 0; background: transparent; padding: 4px 0; box-shadow: none; }
.dp-panel { position: fixed; z-index: 80; width: 320px; max-width: calc(100vw - 16px); background: #fff; border: var(--fs-border); border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-lg); padding: 16px; color: var(--fs-gray-900); }
.dp-inline .dp-panel { position: static; width: auto; border: 0; box-shadow: none; padding: 4px 0 0; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-weight: 700; font-size: var(--fs-text-md); }
.dp-nav { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--fs-gray-900); }
.dp-nav:hover:not(:disabled) { background: var(--fs-gray-100); }
.dp-nav:disabled { opacity: .3; cursor: default; }
.dp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dp-grid th { font-size: 12px; font-weight: 600; color: var(--fs-gray-500); padding: 6px 0; text-align: center; }
.dp-grid td { padding: 2px 0; text-align: center; }
.dp-day { width: 40px; height: 40px; max-width: 100%; border-radius: 50%; border: 1px solid transparent; background: transparent; font: inherit; font-size: var(--fs-text-sm); font-weight: 500; color: var(--fs-gray-900); cursor: pointer; }
.dp-day:hover:not(:disabled) { border-color: var(--fs-gray-900); }
.dp-day:focus-visible { outline: 2px solid var(--fs-violet-500); outline-offset: 1px; }
.dp-day.is-today { color: var(--fs-violet-600); font-weight: 800; }
.dp-day.is-selected { background: var(--fs-gradient); color: #fff; border-color: transparent; font-weight: 700; }
.dp-day.is-disabled { color: var(--fs-gray-300); text-decoration: line-through; cursor: default; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: var(--fs-border); }
.dp-link { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: var(--fs-text-sm); font-weight: 700; color: var(--fs-violet-600); cursor: pointer; }
.dp-link:disabled { color: var(--fs-gray-300); cursor: default; }
.dp-error { color: var(--fs-danger); font-size: var(--fs-text-xs); margin: 6px 0 0; }
.fpop-date { width: 360px; }

/* ---- "Where?" place suggestions ----------------------------------------- */
.ps-box { position: fixed; z-index: 80; background: #fff; border: var(--fs-border); border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-lg); overflow: hidden; }
.ps-list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow: auto; }
.ps-list [role="option"] { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--fs-radius); cursor: pointer; color: var(--fs-gray-700); }
.ps-list [aria-selected="true"] { background: var(--fs-gray-50); }
.ps-pin { width: 32px; height: 32px; border-radius: var(--fs-radius); background: var(--fs-violet-50); flex: none; position: relative; }
.ps-pin::after { content: ""; position: absolute; left: 50%; top: 45%; width: 10px; height: 10px; border: 2px solid var(--fs-violet-600); border-radius: 50% 50% 50% 0; transform: translate(-50%, -50%) rotate(-45deg); }
.ps-text { display: grid; min-width: 0; flex: 1; }
.ps-name { color: var(--fs-gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-name strong { font-weight: 800; }
.ps-sub { font-size: var(--fs-text-xs); color: var(--fs-gray-500); }
.ps-tag { flex: none; font-size: 11px; font-weight: 700; color: var(--fs-success); background: var(--fs-success-bg); border-radius: var(--fs-radius-pill); padding: 3px 8px; }
.ps-empty { padding: 12px; font-size: var(--fs-text-sm); color: var(--fs-gray-500); }
.ps-credit { margin: 0; padding: 8px 18px; border-top: var(--fs-border); font-size: 11px; color: var(--fs-gray-400); }

/* ---- General rules (listing page) ---- */
.general-rules { margin-top: 24px; padding-top: 20px; border-top: var(--fs-border); }
.general-rules h3 { font-size: 1.05rem; margin: 0 0 12px; }
.rule-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 24px; }
.rule-list li { display: flex; align-items: center; gap: 12px; }
.rule-list .icon-svg { width: 22px; height: 22px; color: var(--fs-gray-700); flex: none; }
.rule-list li.is-off { color: var(--fs-gray-500); }
.rule-list li.is-off > span:not(.sr-only) { text-decoration: line-through; }
.rule-list li.is-off .icon-svg { color: var(--fs-gray-400); }

/* ---- Host: rules editor ---- */
.rule-group { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.rule-group legend { margin: 12px 0 4px; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: var(--fs-border); flex-wrap: wrap; }
.rule-label { display: inline-flex; align-items: center; gap: 10px; }
.rule-label .icon-svg { width: 20px; height: 20px; color: var(--fs-gray-700); }
.seg { display: inline-flex; border: var(--fs-border); border-radius: 999px; overflow: hidden; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 5px 12px; font-size: .85rem; }
.seg label + label span { border-left: var(--fs-border); }
.seg input:checked + span { background: var(--fs-gray-100); color: var(--fs-gray-900); font-weight: 600; }
.seg input[value="yes"]:checked + span, .seg input[value="no"]:checked + span { color: #fff; }
.seg input[value="no"]:checked + span { background: var(--fs-danger); }
.seg input[value="yes"]:checked + span { background: var(--fs-success); }
.seg input:focus-visible + span { outline: 2px solid var(--fs-violet-500); outline-offset: -2px; }

/* ---- Host: add-on kind picker ---- */
.kind-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.kind-opt { position: relative; cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind-opt span { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: var(--fs-border); border-radius: var(--fs-radius); font-size: .85rem; background: #fff; }
.kind-opt .icon-svg { width: 20px; height: 20px; flex: none; color: var(--fs-gray-700); }
.kind-opt input:checked + span { border-color: var(--fs-violet-500); box-shadow: 0 0 0 1px var(--fs-violet-500); background: var(--fs-violet-50); }
.kind-opt input:focus-visible + span { outline: 2px solid var(--fs-violet-500); outline-offset: 2px; }

/* Home search "Quando?": calendar + times in one panel under the whole bar (see app.js) */
.search-bar { position: relative; }
.sb-when-display { display: block; width: 100%; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-when-display.is-empty { color: var(--fs-gray-400); font-weight: 500; }
.sb-when.is-enhanced:has([aria-expanded="true"]) { background: var(--fs-gray-50); }
.when-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 70; display: grid; grid-template-columns: 1fr; gap: 20px 32px; padding: 20px 24px; background: #fff; border-radius: var(--fs-radius-xl); box-shadow: var(--fs-shadow-lg); color: var(--fs-gray-900); text-align: left; }
.when-panel[hidden] { display: none; }
@media (min-width: 860px) { .when-panel { grid-template-columns: minmax(300px, 340px) 1fr; } }
.when-panel .dp-foot { display: none; }
.search-bar .when-panel label { font-size: var(--fs-text-sm); font-weight: 600; text-transform: none; letter-spacing: normal; color: var(--fs-gray-700); margin-bottom: 6px; }
.when-times { display: flex; flex-direction: column; gap: 14px; }
.when-times-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-text-sm); }
.when-times .field { margin: 0; }
.search-bar .when-panel .btn { align-self: flex-end; min-height: 40px; padding: 0 22px; border-radius: var(--fs-radius-pill); margin-top: auto; }

/* ---- Search filter bar on phones and tablets ----------------------------
   Pills sit in one swipeable row; their panels open full width under the bar
   (anchored to .fbar, outside the scroller) so they never widen the page. */
.fbar-pills { display: contents; }
@media (max-width: 1023.98px) {
  .fbar { position: relative; }
  .fbar-controls { flex: 1 1 100%; min-width: 0; }
  .fbar-where { flex: 1 1 100%; }
  .fbar-pills { display: flex; flex: 1 1 100%; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .fbar-pills::-webkit-scrollbar { display: none; }
  .fbar-pills > * { flex: none; }
  .fbar-pills .fpop { position: static; }
  .fbar-pills .fpop-panel, .fbar-pills .fpop-date, .fbar-pills .fpop-wide { left: 16px; right: 16px; width: auto; max-width: none; top: auto; margin-top: 8px; max-height: calc(100dvh - var(--fs-header-h) - 140px); overflow-y: auto; }
  .fbar-chips { margin: 0 -16px; padding-inline: 16px; }
}
/* Date/time fields never grow past their column (iOS gives them a wide intrinsic size). */
.fpop-panel .field, .fpop-panel .form-grid > * { min-width: 0; }
.fpop-panel .input { min-width: 0; max-width: 100%; }
.fpop-panel input[type="time"] { -webkit-appearance: none; appearance: none; min-height: 44px; display: block; }
/* A closed filter panel must not take part in layout at all (some engines still size it, widening the page). */
.fpop:not([open]) > .fpop-panel { display: none; }
/* Visually hidden labels inside the swipeable rows must be positioned against their own control. */
.fselect, .fbar-where { position: relative; }
