/* Happily Housed — mobile-first styles. Tokens first, then layout, components, views. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); }

:root {
  --brand: #1670b5;
  --brand-600: #115c95;
  --brand-50: #e8f3fc;
  --brand-logo: #1e88d0;
  --navy: #0b1b34;
  --on-brand: #ffffff;
  --map-water: #cfe5f5;
  --map-land: #f3f1ea;
  --map-line: #d6d0c2;
  --map-state: #b9b09c;
  --accent: #f5c518;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #121826;
  --text-2: #4b5565;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --ok: #15803d;
  --warn: #b45309;
  --cat-student: #7c3aed;
  --cat-student-bg: #f3edff;
  --cat-residential: #0f766e;
  --cat-residential-bg: #e3f5f2;
  --cat-commercial: #b45309;
  --cat-commercial-bg: #fff4e0;
  --cat-services: #db2777;
  --cat-services-bg: #fdecf4;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .16);
  --topbar-h: 56px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.nav-hidden { padding-bottom: 0; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
.h3, h3 { font-size: 1rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
[hidden] { display: none !important; }

/* Layout helpers ---------------------------------------------------------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.container.narrow { max-width: 640px; }
.section { margin-top: 28px; }
.row { display: flex; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap { gap: 12px; }
.gap-sm { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.minw0 { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mt-sm { margin-top: 10px; }
.pad { padding: 16px; }
.block { display: flex; width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; }
.ok { color: var(--ok); display: flex; align-items: center; gap: 4px; }
.warn { color: var(--warn); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prose { white-space: pre-line; color: var(--text-2); }
.icon { flex: none; vertical-align: middle; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* Top bar ------------------------------------------------------------------ */
/* Shown only on the staging site */
.env-banner { background: #b45309; color: #fff; text-align: center; font-size: .82rem; font-weight: 600; padding: 6px 16px; line-height: 1.35; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; color: var(--navy); font-weight: 800; letter-spacing: -.03em; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--brand-logo); font-weight: 800; }
.top-links { display: none; gap: 4px; }
.top-links a { color: var(--text-2); padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .92rem; border: 1px solid transparent; }
.top-links a:hover { background: var(--surface-2); text-decoration: none; }
.top-links a.active { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-link:hover { text-decoration: none; }

/* Bottom nav ---------------------------------------------------------------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .7rem; font-weight: 500; color: var(--muted); padding: 6px 0; min-height: 48px; justify-content: center;
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a.active { color: var(--brand); }
.nav-ic { position: relative; }
.nav-cta span {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.dot {
  position: absolute; top: -4px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700;
  display: inline-grid; place-items: center; line-height: 1;
}
.dot.static { position: static; }
.icon-btn .dot { top: 2px; right: 0; }

/* Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; animation: spin .7s linear infinite; }
.btn-ghost.busy::after { border-color: var(--brand) var(--brand) transparent transparent; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: #fff; color: #1670b5; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: var(--surface); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn.lg { min-height: 52px; font-size: 1.02rem; }
.btn.icon-only { padding: 0; width: 48px; flex: none; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; border: 0; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.glass { background: rgba(255, 255, 255, .9); color: #121826; box-shadow: var(--shadow); }
.link-btn { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.pill:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.pill-x { background: var(--brand-50); border-color: transparent; color: var(--brand); }

/* Chips & badges ------------------------------------------------------------ */
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; background: var(--surface); color: var(--text); }
.chip-student { background: var(--cat-student-bg); color: var(--cat-student); }
.chip-residential { background: var(--cat-residential-bg); color: var(--cat-residential); }
.chip-commercial { background: var(--cat-commercial-bg); color: var(--cat-commercial); }
.chip-services { background: var(--cat-services-bg); color: var(--cat-services); }
.chip-featured { background: #fff7e0; color: #92400e; }
.chip-soft { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: capitalize; background: var(--surface-2); color: var(--text-2); }
.badge-active, .badge-resolved { background: #dcfce7; color: #166534; }
.badge-pending, .badge-open { background: #fef3c7; color: #92400e; }
.badge-archived, .badge-dismissed { background: var(--surface-2); color: var(--muted); }
.badge-rejected, .badge-removed, .badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-role { background: var(--brand-50); color: var(--brand); text-transform: none; }
.verified { color: #2563eb; display: inline-flex; vertical-align: -2px; }

/* Avatars ------------------------------------------------------------------- */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #42a5f5); color: #fff; font-weight: 700; }
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; }
.avatar-md { width: 42px; height: 42px; font-size: .9rem; }
.avatar-lg { width: 54px; height: 54px; font-size: 1.1rem; }
.avatar-xl { width: 76px; height: 76px; font-size: 1.5rem; }

/* Cards --------------------------------------------------------------------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card.list > * + * { border-top: 1px solid var(--border); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px; margin: 0 -16px;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }

.listing-card { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.listing-card:hover .card-media img { transform: scale(1.03); }
.no-photo { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.no-photo.big { min-height: 260px; gap: 6px; align-content: center; }
.card-tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.card-tags .chip { box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.card-body { display: block; padding: 12px 14px 14px; color: inherit; }
.card-body:hover { text-decoration: none; }
.card-price .price { font-size: 1.15rem; font-weight: 700; }
.period { color: var(--muted); font-size: .85rem; }
.card-title { font-size: .98rem; font-weight: 600; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-loc { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-facts { display: flex; gap: 12px; margin-top: 8px; font-size: .82rem; color: var(--text-2); flex-wrap: wrap; }
.card-facts span { display: inline-flex; align-items: center; gap: 4px; }
.card-verified { margin-top: 8px; font-size: .78rem; color: #2563eb; display: flex; align-items: center; gap: 4px; font-weight: 600; }
.fav-btn {
  position: absolute; right: 10px; top: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: #374151; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s;
}
.fav-btn:active { transform: scale(.88); }
.fav-btn.on { color: #e11d48; }
.fav-btn.on svg { fill: currentColor; }
.gallery-ui .fav-btn { position: static; }

.skeleton { padding-bottom: 14px; }
.sk-media { aspect-ratio: 4 / 3; background: var(--surface-2); }
.sk-line { height: 12px; border-radius: 6px; background: var(--surface-2); margin: 12px 14px 0; }
.w40 { width: 40%; } .w60 { width: 60%; } .w90 { width: 90%; }
.skeleton > * { animation: pulse 1.2s ease-in-out infinite; }

/* Forms --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-size: .85rem; font-weight: 600; color: var(--text-2); padding: 0; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px; /* prevents iOS zoom */ transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .82rem; }
.hint { color: var(--muted); font-size: .8rem; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.input-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); }
.radio-list { display: flex; flex-direction: column; gap: 4px; }
.radio-list label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; flex-wrap: wrap; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label > span { display: grid; place-items: center; min-height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; }
.seg label > input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.seg label > input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.seg-tabs { background: var(--surface-2); padding: 4px; border-radius: 12px; margin: 4px 0 16px; flex-wrap: nowrap; overflow-x: auto; }
.seg-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 0 10px; }
.seg-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill input { position: absolute; opacity: 0; }
.check-pill span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); font-size: .85rem; cursor: pointer; background: var(--surface); }
.check-pill input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.check-pill input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); background: var(--bg); padding: 8px 0; z-index: 5; }
.sheet .sticky-actions { bottom: 0; background: var(--surface); }

/* Toasts -------------------------------------------------------------------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: #1f2937; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 420px; animation: toast-in .2s ease-out; transition: opacity .3s, transform .3s; }
.toast-success { background: #166534; }
.toast-error { background: #b91c1c; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Bottom sheet -------------------------------------------------------------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform .22s ease-out; overscroll-behavior: contain;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* Empty / notices ----------------------------------------------------------- */
.empty { text-align: center; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; grid-column: 1 / -1; }
.empty p { color: var(--muted); max-width: 340px; }
.empty .btn { margin-top: 8px; }
.empty-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 14px; }
.boot-spinner { width: 36px; height: 36px; margin: 30vh auto; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; }
main[aria-busy="true"] { opacity: .65; transition: opacity .2s .15s; }
main { outline: none; }

/* Page header ---------------------------------------------------------------- */
.page-head { display: flex; align-items: center; gap: 8px; padding: 16px 0 12px; }
.page-head h1 { font-size: 1.4rem; display: flex; align-items: center; gap: 8px; }
.page-head .icon-btn { margin-left: -10px; }
.page-actions { margin-left: auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.section-head a:not(.btn) { display: inline-flex; align-items: center; font-weight: 600; font-size: .9rem; }

/* Home ----------------------------------------------------------------------- */
.hero {
  position: relative; color: #fff; padding: 40px 0 36px;
  background:
    linear-gradient(180deg, rgba(8, 26, 48, .72) 0%, rgba(8, 26, 48, .82) 100%),
    url(/img/hero-students-900.jpg) 40% center / cover no-repeat, #0b2d52;
}
@media (min-width: 900px) {
  /* Photo on the right, brand navy behind the text, blended where they meet. */
  .hero {
    background:
      linear-gradient(90deg, #0b2d52 0%, #0b2d52 40%, rgba(11, 45, 82, .55) 52%, rgba(11, 45, 82, 0) 66%),
      url(/img/hero-students.jpg) right center / auto 100% no-repeat, #0b2d52;
  }
}
@media (max-width: 599px) {
  /* Phones: the photo sits uncovered at the top and fades into navy behind the text. */
  .hero {
    padding-top: 50vw;
    background:
      linear-gradient(180deg, rgba(11, 45, 82, 0) 0, rgba(11, 45, 82, 0) 34vw, #0b2d52 60vw),
      url(/img/hero-students-900.jpg) center top / 100% auto no-repeat, #0b2d52;
  }
}.hero-inner { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fdd835; }
.hero h1 { font-size: clamp(2rem, 7.5vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; max-width: 14ch; }
.hero .hl { color: #fdd835; }
.hero-sub { opacity: .9; max-width: 520px; font-size: 1.02rem; }
.hero-scope { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.hero-scope button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; backdrop-filter: blur(6px); }
.hero-scope button[aria-checked="true"] { background: #fff; color: #0b1b34; border-color: #fff; }
.hero-search { display: flex; align-items: center; gap: 8px; width: 100%; background: #fff; color: #6b7280; border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow-lg); max-width: 640px; }
.hero-search input { border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 44px !important; background: transparent !important; color: #121826 !important; }
.hero-search .btn { flex: none; border-radius: 999px; }
.hero-quick { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .88rem; }
.hero-quick a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); }
.hero-quick a:hover { text-decoration-color: #fff; }
.hero-quick .quick-map { display: inline-flex; align-items: center; gap: 4px; color: #fdd835; text-decoration-color: rgba(253, 216, 53, .6); font-weight: 700; }

.cat-section { margin-top: 20px; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: #fff; transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .4s; }
.cat-tile:hover .cat-img { transform: scale(1.05); }
.cat-student .cat-img { background-image: url(/img/scenes/cat-student.svg); }
.cat-residential .cat-img { background-image: url(/img/scenes/cat-residential.svg); }
.cat-commercial .cat-img { background-image: url(/img/scenes/cat-commercial.svg); }
.cat-services .cat-img { background-image: url(/img/scenes/cat-services.svg); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 38, 0) 35%, rgba(8, 20, 38, .82) 100%); }
.cat-label { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; display: flex; align-items: center; gap: 8px; }
.cat-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #fff; }
.cat-student .cat-ic { color: var(--cat-student); }
.cat-residential .cat-ic { color: #0f766e; }
.cat-commercial .cat-ic { color: #b45309; }
.cat-services .cat-ic { color: #db2777; }
.cat-name { display: block; font-weight: 800; line-height: 1.15; font-size: .92rem; letter-spacing: -.01em; }
.cat-count { display: block; font-size: .75rem; opacity: .85; }

.trust { display: grid; gap: 12px; }
.trust > div { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.trust > div > .icon { color: var(--brand); margin-top: 2px; }
.trust h3 { color: var(--text); margin-bottom: 4px; }
.trust p { color: var(--muted); font-size: .9rem; }

.list-band { background: #0b1b34; color: #fff; border-radius: 20px; padding: 26px 22px; display: grid; gap: 22px; }
.list-band h2 { font-size: 1.7rem; letter-spacing: -.035em; }
.list-band-intro { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.list-band-intro p { color: #c7d2e0; max-width: 46ch; }
.list-band-cards { display: grid; gap: 10px; }
.list-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #c7d2e0; font-size: .88rem; }
.list-card b { color: #fff; font-size: .98rem; }
.list-card:hover { text-decoration: none; background: rgba(255, 255, 255, .1); border-color: rgba(253, 216, 53, .5); }

/* Footer ---------------------------------------------------------------------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0 20px; font-size: .9rem; }
.footer-grid { display: grid; gap: 24px; }
.footer-grid h2 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav a { color: var(--text); }
.footer-grid p { color: var(--muted); max-width: 40ch; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }

/* User menu ------------------------------------------------------------------- */
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; position: relative; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: var(--surface); border-color: var(--border); }
.um-text, .um-chev { display: none; }
.um-text b { display: block; font-size: .85rem; line-height: 1.2; }
.um-text small { display: block; color: var(--muted); font-size: .72rem; }
.um-dot { position: absolute; top: -4px; left: 24px; right: auto; }
.um-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.um-panel a, .um-panel button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--text); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.um-panel a:hover, .um-panel button:hover { background: var(--surface-2); text-decoration: none; }
.um-panel .dot { margin-left: auto; }
.um-panel button { color: var(--danger); border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; margin-top: 4px; }

/* Search --------------------------------------------------------------------- */
.search-top { position: sticky; top: var(--topbar-h); z-index: 20; background: var(--bg); padding-top: 12px; border-bottom: 1px solid var(--border); }
.search-bar { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 2px 2px 2px 12px; color: var(--muted); }
.search-bar input { border: 0 !important; box-shadow: none !important; padding: 0 4px !important; background: transparent !important; color: var(--text); }
.filter-btn { color: var(--text); }
.filter-btn .dot { top: 4px; right: 4px; }
.tabs-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--text-2); white-space: nowrap; }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.results-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; gap: 12px; }
.sort select { min-height: 38px !important; padding: 6px 10px !important; font-size: .9rem !important; width: auto !important; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.active-filters:empty { display: none; }

/* Listing detail ------------------------------------------------------------- */
.gallery-wrap { position: relative; background: var(--surface-2); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; max-height: 62vh; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; overflow: hidden; scroll-snap-align: center; }
.gallery .slide-img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.gallery .slide-bg { display: none; }
.gallery-ui { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 16px; }
.detail-grid > * { min-width: 0; }
.detail-title { font-size: 1.4rem; margin: 10px 0 6px; }
.loc { display: flex; align-items: flex-start; gap: 4px; }
.loc .icon { margin-top: 2px; }
.detail-price { margin: 12px 0 4px; }
.detail-price .price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.fact { display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .88rem; font-weight: 500; color: var(--text-2); }
.fact .icon { color: var(--brand); }
.detail-section { margin: 20px 0; }
.detail-section h2 { margin-bottom: 8px; }
.amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.amenities li { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--text-2); }
.amenities .icon { color: var(--ok); }
.owner-card { padding: 16px; }
.owner-card > a { color: inherit; }
.owner-card > a:hover { text-decoration: none; }
.owner-name { font-weight: 700; }
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.safety { display: flex; gap: 8px; align-items: flex-start; padding: 12px 4px; }
.safety .icon { color: var(--ok); margin-top: 2px; }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}
.sticky-cta .price { font-weight: 800; font-size: 1.1rem; }
.detail { padding-bottom: 72px; }

/* Auth ----------------------------------------------------------------------- */
.auth { padding-top: 20px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 16px; }
.auth-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-opt input { position: absolute; opacity: 0; }
.role-opt span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; color: var(--text-2); }
.role-opt b { color: var(--text); font-size: .9rem; margin-top: 4px; }
.role-opt small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.role-opt input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.role-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.demo { display: flex; flex-direction: column; gap: 10px; }

/* Dashboard ------------------------------------------------------------------ */
.dash-head { display: flex; align-items: center; gap: 14px; padding: 20px 0 16px; }
.dash-head h1 { font-size: 1.3rem; margin: 2px 0 6px; }
.stats { display: grid; gap: 10px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-4 { grid-template-columns: repeat(2, 1fr); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); text-align: left; font-size: .8rem; }
.stat b { font-size: 1.5rem; color: var(--text); letter-spacing: -.02em; }
.stat .icon { color: var(--brand); }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: var(--brand); }
.admin-link { display: flex; align-items: center; gap: 14px; color: var(--text); margin-bottom: 16px; }
.admin-link > .icon:first-child { color: var(--brand); }
.admin-link div { flex: 1; }
.admin-link:hover { text-decoration: none; border-color: var(--brand); }
.my-listing { display: flex; gap: 12px; padding: 10px; align-items: flex-start; }
.my-thumb { flex: none; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.my-title { font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.my-stats { display: flex; gap: 12px; }
.my-stats span { display: inline-flex; align-items: center; gap: 3px; }
.my-actions { display: flex; flex-direction: column; margin: -4px -4px 0 0; }
.convo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; }
.convo:hover { text-decoration: none; background: var(--surface-2); }
.convo.unread b { color: var(--brand); }
.convo-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: none; }
.convo-body { flex: 1; min-width: 0; }

/* Thread --------------------------------------------------------------------- */
.thread { max-width: 720px; margin: 0 auto; min-height: calc(100vh - var(--topbar-h)); display: flex; flex-direction: column; }
.thread-head { position: sticky; top: var(--topbar-h); z-index: 10; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 4px; background: var(--surface); border-bottom: 1px solid var(--border); }
.thread-head .block { display: block; }
.messages { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 90px; }
.msg { max-width: 82%; align-self: flex-start; }
.msg p { background: var(--surface); border: 1px solid var(--border); padding: 10px 14px; border-radius: 18px 18px 18px 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { font-size: .7rem; color: var(--muted); padding: 0 8px; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine p { background: var(--brand); color: var(--on-brand); border-color: transparent; border-radius: 18px 18px 6px 18px; text-align: left; }
.composer { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--border); max-width: 720px; margin: 0 auto; }
.composer textarea { min-height: 48px; max-height: 140px; resize: none; border-radius: 24px; padding: 12px 16px; }
.composer .btn { border-radius: 50%; height: 48px; }

/* Listing form ---------------------------------------------------------------- */
.cat-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-pick input { position: absolute; opacity: 0; }
.cat-pick span { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; }
.cat-pick input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.cat-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid:empty { display: none; }
.photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-cover { outline: 3px solid var(--brand); outline-offset: -3px; }
.photo-del { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cover-tag, .photo-cover { position: absolute; left: 4px; bottom: 4px; font-size: .68rem; font-weight: 700; padding: 3px 7px; border-radius: 6px; border: 0; }
.cover-tag { background: var(--brand); color: var(--on-brand); }
.photo-cover { background: rgba(255, 255, 255, .92); color: #121826; cursor: pointer; }
.upload-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border: 2px dashed var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--brand); }
.upload-btn:hover { border-color: var(--brand); background: var(--brand-50); }
.upload-btn:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }

/* Profile ------------------------------------------------------------------- */
.profile-head { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.profile-head h1 { font-size: 1.3rem; }

/* Admin ---------------------------------------------------------------------- */
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-filters input { flex: 1 1 100%; }
.admin-filters select { flex: 1 1 140px; width: auto; }
.admin-row select { width: auto; min-height: 36px; padding: 4px 8px; font-size: .85rem; }
.admin-row blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--border); color: var(--text-2); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.admin-cols { display: grid; gap: 12px; margin-top: 12px; }
.admin-cols h2 { margin-bottom: 12px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 30px; gap: 8px; align-items: center; font-size: .85rem; }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 5px; }
.bar-fill.cat-student { background: var(--cat-student); }
.bar-fill.cat-residential { background: var(--cat-residential); }
.bar-fill.cat-commercial { background: var(--cat-commercial); }
.bar-fill.cat-services { background: var(--cat-services); }
.w-0 { width: 2%; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; }
.w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }
.kv { list-style: none; padding: 0; margin: 0 0 10px; }
.kv li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0; }

/* Animations ------------------------------------------------------------------ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Larger screens --------------------------------------------------------------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .scroller { grid-auto-columns: 46%; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-4 { grid-template-columns: repeat(4, 1fr); }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .role-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-pick { grid-template-columns: repeat(3, 1fr); }
  .admin-filters input { flex: 2 1 200px; }
}

@media (min-width: 900px) {
  :root { --topbar-h: 64px; }
  body { padding-bottom: 0; }
  .bottom-nav, .sticky-cta { display: none; }
  .top-links { display: flex; }
  .toasts { bottom: 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .scroller { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; }
  .scroller > :nth-child(n+5) { display: none; }
  .hero { padding: 56px 0 50px; }
  .hero h1 { font-size: 2.6rem; }
  h1 { font-size: 1.8rem; }
  .detail { padding-bottom: 40px; }
  .gallery-wrap { max-width: 1180px; margin: 16px auto 0; border-radius: 18px; overflow: hidden; }
  .gallery { width: 100%; height: min(560px, 60vh); max-height: none; aspect-ratio: auto; background: #0b1b34; }
  /* Show the whole photo on wide screens; a blurred copy fills the sides. */
  .gallery .slide-img { object-fit: contain; }
  .gallery .slide-bg { display: block; position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); max-width: none; object-fit: cover; filter: blur(22px) brightness(.7); }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
  .detail-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
  .detail-title { font-size: 1.9rem; }
  .amenities { grid-template-columns: repeat(3, 1fr); }
  .admin-cols { grid-template-columns: 1fr 1fr; }
  .sticky-actions { bottom: 0; }
  .sheet { left: 50%; right: auto; bottom: 50%; width: min(520px, 92vw); border-radius: 18px; transform: translate(-50%, 60%); opacity: 0; transition: transform .2s, opacity .2s; padding-bottom: 20px; }
  .sheet-wrap.open .sheet { transform: translate(-50%, 50%); opacity: 1; }
  .sheet-grip { display: none; }
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px; }
  .msg { max-width: 70%; }
}
@media (max-width: 559px) {
  .hide-sm { display: none !important; }
}
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 420px) {
  .seg-tabs button .icon { display: none; }
}

/* Maps ------------------------------------------------------------------------- */
.map, .mini-map, .pin-map { position: relative; isolation: isolate; z-index: 0; background: var(--surface-2); border-radius: var(--radius); overflow: hidden; }
.leaflet-container { font: inherit; }
.leaflet-container a { color: var(--brand); }
.leaflet-control-attribution { font-size: .65rem; }
.vector-map { background: var(--map-water) !important; }
.vector-map .bm-land { fill: var(--map-land); fill-opacity: 1; stroke: none; }
.vector-map .bm-border { fill: none; stroke: var(--map-state); stroke-width: 1.5; }
.bm-label span { position: absolute; transform: translate(31px, -50%); white-space: nowrap; font-size: .72rem; font-weight: 700; color: var(--text-2); text-shadow: 0 0 3px var(--map-land), 0 0 3px var(--map-land); pointer-events: none; }
.bm-label span::before { content: ""; position: absolute; left: -33.5px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--text-2); }

.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.view-toggle button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 600; font-size: .85rem; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--navy); color: var(--surface); }
.pill-map { background: #fdd835 !important; color: #0b1b34 !important; border-color: transparent !important; font-weight: 700; }

.map-wrap { position: relative; margin-bottom: 16px; }
.map-wrap .map { height: max(340px, calc(100dvh - var(--topbar-h) - var(--nav-h) - 250px)); border: 1px solid var(--border); }
.map-area-btn { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; box-shadow: var(--shadow-lg); }
.map-card { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.map-card-link { display: flex; gap: 12px; padding: 10px 44px 10px 10px; color: inherit; }
.map-card-link:hover { text-decoration: none; }
.map-card-link img, .map-card-img { width: 96px; height: 80px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.map-card .card-title { margin: 0; -webkit-line-clamp: 2; }
.map-card-close { position: absolute; top: 4px; right: 4px; }

.price-pin { background: none; border: 0; }
.price-pin span {
  position: absolute; transform: translate(-50%, calc(-100% - 6px)); white-space: nowrap;
  background: var(--surface); color: var(--text); font-weight: 700; font-size: .78rem; line-height: 1;
  padding: 6px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); border: 2px solid var(--brand);
  cursor: pointer; transition: transform .12s;
}
.price-pin span::after { content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--brand); }
.price-pin.cat-student span { border-color: var(--cat-student); } .price-pin.cat-student span::after { border-top-color: var(--cat-student); }
.price-pin.cat-commercial span { border-color: var(--cat-commercial); } .price-pin.cat-commercial span::after { border-top-color: var(--cat-commercial); }
.price-pin.cat-services span { border-color: var(--cat-services); } .price-pin.cat-services span::after { border-top-color: var(--cat-services); }
.price-pin.active span { background: var(--navy); color: var(--surface); transform: translate(-50%, calc(-100% - 6px)) scale(1.12); }
.price-pin:focus-visible span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.leaflet-marker-icon.price-pin.active { z-index: 1000 !important; }

.loc-pin span { display: block; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.loc-area { fill: var(--brand); fill-opacity: .18; stroke: var(--brand); stroke-width: 2; }
.mini-map { height: 220px; border: 1px solid var(--border); }
.pin-map { height: 240px; border: 1px solid var(--border); cursor: crosshair; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
@media (min-width: 900px) {
  .map-wrap .map { height: max(480px, calc(100vh - var(--topbar-h) - 230px)); }
  .map-card { left: auto; right: 16px; bottom: 16px; width: 380px; }
  .mini-map { height: 280px; }
}
.pin-cluster { display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: .9rem; border: 3px solid var(--surface); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 25%, transparent), 0 2px 8px rgba(0, 0, 0, .3); cursor: pointer; }
.pin-cluster:focus-visible { outline: 3px solid var(--accent); }

/* Search layout ------------------------------------------------------------------ */
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.filters-panel { display: none; }
.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0 10px; }
.results-head h1 { font-size: 1.35rem; }
.results-tools { display: flex; align-items: center; gap: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--text); }
.chip-btn.active { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.check-list { display: flex; flex-direction: column; }
.check-list .check { min-height: 36px; font-size: .92rem; }
.card-meta { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.listing-card .card-loc { font-size: .82rem; }

@media (min-width: 560px) {
  .list-band-cards { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-label { left: 14px; bottom: 14px; }
}
@media (min-width: 900px) {
  .hero { padding: 72px 0 64px; }
  .hero-inner { gap: 18px; }
  .cat-section { margin-top: -36px; position: relative; z-index: 2; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .cat-tile { aspect-ratio: 16 / 10; }
  .list-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: center; padding: 40px; }
  .list-band h2 { font-size: 2.2rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
  .um-text, .um-chev { display: block; }
  .user-menu summary { padding: 3px 10px 3px 3px; border-color: var(--border); background: var(--surface); }
  .results-head h1 { font-size: 1.8rem; }
}
@media (min-width: 1000px) {
  .search-top { display: none; }
  .search-layout { grid-template-columns: 280px minmax(0, 1fr); padding-top: 20px; }
  .filters-panel { display: block; align-self: start; position: sticky; top: calc(var(--topbar-h) + 16px); padding: 20px; max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; }
  .results-head { padding-top: 0; }
  .search-layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1099px) { .hide-md { display: none !important; } }
@media (min-width: 1300px) {
  .search-layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Ratings & reviews ------------------------------------------------------------------ */
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.star { fill: var(--border); }
.star.on { fill: #f5b301; }
.card-rating { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: .82rem; color: var(--text-2); flex-wrap: wrap; }
.card-rating.new { color: var(--muted); }
.card-rating.new .icon { color: var(--muted); }
.rating-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text); font-size: .92rem; }
.rating-link span { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.profile-rating { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.review-summary { display: grid; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.review-score { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.review-score b { font-size: 2.6rem; line-height: 1; letter-spacing: -.04em; font-weight: 800; }
.review-bars { display: flex; flex-direction: column; gap: 6px; }
.review-bars .bar-row { grid-template-columns: 34px 1fr 28px; font-size: .8rem; color: var(--muted); }
.rating-fill { background: #f5b301; }
.review-cta { margin: 14px 0; }
.review-cta:empty { display: none; }
.review-list { display: flex; flex-direction: column; }
.review { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; gap: 10px; align-items: center; }
.review-body { white-space: pre-line; color: var(--text-2); overflow-wrap: anywhere; }
.review-reply { margin-left: 12px; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--brand-50); border-radius: 0 10px 10px 0; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.review-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.review-actions:empty { display: none; }
.ok-inline { color: var(--ok); display: inline-flex; align-items: center; gap: 2px; }

.star-picker { display: flex; gap: 4px; }
.star-opt { position: relative; cursor: pointer; padding: 2px; border-radius: 8px; }
.star-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.star-opt svg { display: block; fill: var(--border); transition: transform .1s, fill .1s; }
.star-opt.on svg { fill: #f5b301; }
.star-opt:hover svg { transform: scale(1.1); }
.star-opt:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }

.review-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 12px 0; padding: 12px 14px; border-radius: 14px; background: #fff8e1; border: 1px solid #fde68a; color: #5b4300; }
.review-banner div { display: flex; flex-direction: column; font-size: .9rem; }
.review-banner.done { justify-content: flex-start; background: var(--surface-2); border-color: var(--border); color: var(--text-2); font-size: .88rem; }
@media (min-width: 900px) {
  .review-summary { grid-template-columns: 180px 1fr; align-items: center; }
}
.rating-fill.w-0 { width: 0; }

/* Google Maps & address search ------------------------------------------------------- */
.gm-pin span { position: relative; display: inline-block; transform: none; margin-bottom: 7px; }
.gm-pin.active span { transform: scale(1.12); }
.gm-cluster { width: 44px; height: 44px; transform: translateY(50%); }
.place-box { margin-bottom: 10px; }
.place-box input { border-radius: 999px; padding-left: 16px; }
.place-search { position: relative; }
.place-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; }
.place-list li[role="option"] { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; cursor: pointer; }
.place-list li[role="option"] .icon { color: var(--brand); margin-top: 2px; }
.place-list li[role="option"] span { display: flex; flex-direction: column; min-width: 0; }
.place-list li[role="option"] small { color: var(--muted); font-size: .8rem; }
.place-list li[role="option"]:hover, .place-list li.active { background: var(--brand-50); }
.place-credit { text-align: right; font-size: .7rem; color: var(--muted); padding: 4px 8px 0; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.label-row label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.center-col { align-items: center; text-align: center; }

/* Location suggestions under the home search box */
.suggest-host { position: relative; }
.hero-search .loc-list { color: var(--text); text-align: left; top: calc(100% + 8px); border-radius: 16px; max-height: min(420px, 60vh); }
.loc-list .loc-group { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.loc-list li[role="option"] b { font-weight: 700; }
/* Lift the hero above the category tiles while the suggestion list is open. */
.hero:focus-within { z-index: 5; }
.suggest-host { scroll-margin-top: calc(var(--topbar-h) + 12px); }

/* Map experience ------------------------------------------------------------ */
/* Leaflet sets marker icons to display:block, which pushed cluster numbers into a corner. */
.leaflet-marker-icon.pin-cluster { display: grid; }

/* Listings already opened on this device */
.price-pin.seen:not(.active) span { background: #eef1f5; color: #5b6472; border-color: #b8c0cc; }
.price-pin.seen:not(.active) span::after { border-top-color: #b8c0cc; }
.seen-tag { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(17, 24, 39, .72); color: #fff; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.seen-tag.inline { position: static; background: var(--surface-2); color: var(--muted); align-self: flex-start; margin-top: 4px; }

/* Campus distance on cards */
.card-campus { margin-top: 6px; font-size: .8rem; color: var(--cat-student); font-weight: 600; display: flex; align-items: center; gap: 5px; }

/* Campus labels on maps */
.map-landmark { background: none; border: 0; }
.map-landmark span { display: inline-flex; align-items: center; gap: 4px; transform: translate(-50%, -50%); white-space: nowrap; background: #fff; color: var(--cat-student); border: 1.5px solid var(--cat-student); border-radius: 8px; padding: 3px 7px; font: 700 .72rem/1.2 var(--font); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.gm-landmark span { transform: translateY(50%); }
.map-landmark .lm-label { font-weight: 700; }
/* Zoomed out: just a small campus badge, so labels don't crowd the pins. */
.zoom-far .map-landmark .lm-label { display: none; }
.zoom-far .map-landmark span { padding: 3px; border-radius: 50%; }

/* Alerts */
.alert-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .88rem; font-weight: 600; color: var(--brand); }
.alert-summary { display: flex; align-items: center; gap: 8px; background: var(--brand-50); border-radius: 12px; padding: 12px 14px; color: var(--navy); }
.notice { margin-bottom: 16px; }
.notice p { margin: 4px 0 0; }
.notice-ok { border-color: #a6e9c3; background: #ecfdf3; }
.notice-error { border-color: #fecaca; background: var(--danger-50); }
.account-link { color: inherit; align-items: center; }
.account-link:hover { text-decoration: none; border-color: var(--brand); }

/* What's nearby on listing pages */
.nearby { margin-top: 18px; }
.nearby .h4 { font-size: 1rem; margin: 0 0 8px; }
.nearby-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nearby-list li { display: flex; gap: 10px; align-items: flex-start; }
.nearby-list li .icon { color: var(--brand); flex: none; margin-top: 2px; }
.nearby-list li span { display: flex; flex-direction: column; }
.nearby-list small { color: var(--muted); }
@media (min-width: 700px) { .nearby-list { grid-template-columns: 1fr 1fr; } }

/* Map view: map + listings in view */
.map-split { display: grid; grid-template-columns: minmax(0, 1fr); height: var(--map-h, 70vh); }
.map-pane { position: relative; min-height: 0; }
.map-wrap .map-split .map { height: 100%; }
.map-list { display: none; }
.map-float-tools { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; }
.map-float { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--surface); color: var(--navy); font: 700 .88rem var(--font); box-shadow: var(--shadow-lg); cursor: pointer; }
.map-float[aria-pressed="true"] { display: none; }
.map-carousel { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 12px; scrollbar-width: none; }
.map-carousel::-webkit-scrollbar { display: none; }
.map-carousel:empty { display: none; }
.map-slide { flex: 0 0 min(86%, 360px); scroll-snap-align: center; display: flex; gap: 10px; padding: 8px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); color: inherit; border: 2px solid transparent; }
.map-slide:hover { text-decoration: none; }
.map-slide.is-active { border-color: var(--brand); }
.map-slide img, .map-slide .map-card-img { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.map-slide > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.map-slide .card-title { margin: 0; font-size: .9rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-slide .card-loc { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-slide .card-campus { margin-top: 2px; font-size: .74rem; }
.map-card { display: none; }

/* The map view fills the window, so the footer is not needed there. */
body:has(.is-map) .site-footer { display: none; }

/* Phones and tablets: the map fills the screen; cards swipe along the bottom */
@media (max-width: 999px) {
  .is-map .results-head { display: none; }
  .is-map .search-layout { padding-bottom: 0; }
  .is-map .map-wrap { margin: 0 -16px; }
  .is-map .map-wrap .map { border-radius: 0; border-left: 0; border-right: 0; }
  .is-map .active-filters:empty { display: none; }
}

/* Desktop: listings beside the map, filters in a pop-up */
@media (min-width: 1000px) {
  .is-map .search-top { display: block; }
  .is-map .search-layout { grid-template-columns: minmax(0, 1fr); max-width: none; padding-top: 12px; }
  .is-map .filters-panel { display: none; }
  .is-map .results-head { padding-bottom: 8px; }
  .map-split { grid-template-columns: minmax(420px, 46%) minmax(0, 1fr); gap: 16px; }
  .map-list { display: block; overflow-y: auto; padding-right: 4px; min-height: 0; }
  .map-list-head { margin: 0 0 10px; font-weight: 600; color: var(--text-2); font-size: .92rem; }
  .map-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .map-list .listing-card { transition: box-shadow .15s, border-color .15s; border: 2px solid transparent; }
  .map-list .listing-card:hover, .map-list .listing-card.is-active { border-color: var(--brand); box-shadow: var(--shadow-lg); }
  .map-carousel, .map-float-tools .map-float[data-view] { display: none; }
  .map-card { display: block; }
  .map-card[hidden] { display: none; }
}
@media (min-width: 1500px) { .map-list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .map-split { grid-template-columns: minmax(420px, 55%) minmax(0, 1fr); } }

/* Homepage: campus tabs, cities, recently viewed ------------------------------ */
.campus-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 14px; padding-bottom: 2px; }
.campus-tabs::-webkit-scrollbar { display: none; }
.campus-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 600 .9rem var(--font); cursor: pointer; }
.campus-tabs button span { font-size: .75rem; font-weight: 700; color: var(--cat-student); background: var(--cat-student-bg); border-radius: 999px; padding: 1px 7px; }
.campus-tabs button[aria-selected="true"] { background: var(--cat-student); border-color: var(--cat-student); color: #fff; }
.campus-tabs button[aria-selected="true"] span { background: rgba(255, 255, 255, .22); color: #fff; }
.city-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.city-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 104px; padding: 16px; border-radius: var(--radius); color: #fff; overflow: hidden; box-shadow: var(--shadow); }
.city-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.city-tile { transition: transform .15s, box-shadow .15s; }
.city-tile::before { content: ""; position: absolute; right: -24px; top: -24px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.city-tile::after { content: ""; position: absolute; right: 30px; top: 34px; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.city-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; position: relative; }
.city-count { font-size: .85rem; opacity: .9; position: relative; }
.city-tile .icon { position: absolute; right: 14px; bottom: 16px; }
.city-0 { background: linear-gradient(135deg, #1670b5, #0b2d52); }
.city-1 { background: linear-gradient(135deg, #0f766e, #134e4a); }
.city-2 { background: linear-gradient(135deg, #b45309, #7c2d12); }
.city-3 { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.city-4 { background: linear-gradient(135deg, #db2777, #831843); }
.city-5 { background: linear-gradient(135deg, #334155, #0f172a); }
@media (min-width: 700px) { .city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .city-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .city-tile { min-height: 120px; } }
#recent .seen-tag { display: none; }

/* Footer legal links, legal pages, contact page */
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: inherit; }
.legal-text { line-height: 1.65; color: var(--text-2); }
.legal-text h2 { font-size: 1.1rem; margin: 22px 0 6px; color: var(--text); }
.legal-text ul { padding-left: 20px; margin: 0 0 8px; }
.legal-text li { margin: 4px 0; }
.legal-text .lead { font-size: 1.05rem; margin-top: 0; }
.contact-grid { display: grid; gap: 16px; }
.contact-side > div { display: flex; gap: 10px; align-items: flex-start; }
.contact-side .icon { color: var(--brand); flex: none; margin-top: 2px; }
.contact-side p { margin: 2px 0 0; color: var(--text-2); font-size: .92rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.container.mid { max-width: 960px; }

/* Listing page ------------------------------------------------------------- */
.loc > span { min-width: 0; }
.loc-near { white-space: normal; }
.owner-stats { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 7px; font-size: .86rem; color: var(--text-2); }
.owner-stats:empty { display: none; }
.owner-stats li { display: flex; gap: 7px; align-items: flex-start; }
.owner-stats .icon { color: var(--ok); flex: none; margin-top: 2px; }
.viewing-slot select { flex: 1; min-width: 0; }
.share-list { display: grid; gap: 8px; }
.share-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.share-opt:hover { border-color: var(--brand); text-decoration: none; }
.share-opt > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.share-opt small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.share-wa .share-ic { background: #25d366; color: #fff; }
.gallery .slide { cursor: zoom-in; }
.photo-grid, .show-all-photos { display: none; }
@media (max-width: 420px) { .hide-xs { display: none; } }

/* Full-screen photos */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 10, 20, .96); display: flex; flex-direction: column; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; }
.lb-count { font-weight: 600; font-size: .9rem; }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; padding: 0 12px 24px; }
.lb-slide img { max-width: 100%; max-height: calc(100dvh - 90px); object-fit: contain; border-radius: 6px; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@media (max-width: 699px) { .lb-prev, .lb-next { display: none; } }

/* Desktop photo grid: one large photo and up to four small ones */
@media (min-width: 900px) {
  .gallery-wrap.has-grid .gallery { display: none; }
  .gallery-wrap.has-grid { background: none; }
  .photo-grid { display: grid; gap: 8px; height: min(480px, 58vh); grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .photo-grid .pg-cell { padding: 0; border: 0; background: var(--surface-2); overflow: hidden; cursor: zoom-in; }
  .photo-grid .pg-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s, filter .25s; }
  .photo-grid .pg-cell:hover img { transform: scale(1.03); filter: brightness(.92); }
  .photo-grid .pg-cell:first-child { grid-row: 1 / 3; }
  .photo-grid.photos-3 { grid-template-columns: 2fr 1fr; }
  .photo-grid.photos-4 .pg-cell:nth-child(4) { grid-column: 2 / 4; }
  .show-all-photos { display: inline-flex; position: absolute; right: 16px; bottom: 16px; background: var(--surface); color: var(--navy); border: 1px solid var(--border); box-shadow: var(--shadow); }
  .gallery-wrap.has-grid .gallery-count { display: none; }
}

/* Dashboard ------------------------------------------------------------------ */
.stats-5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stats-5 { grid-template-columns: repeat(5, 1fr); } }
.stat-sub { font-size: .75rem; color: var(--muted); }
.trend { font-weight: 700; font-size: .75rem; color: var(--muted); }
.trend.up { color: var(--ok); }
.trend.down { color: var(--danger); }
.badge-rented { background: #e0e7ff; color: #3730a3; }
.attention { margin: 16px 0 0; padding: 14px 16px; border-color: #fcd34d; background: #fffbeb; }
.attention h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #92400e; }
.attention ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention li { display: flex; align-items: center; gap: 10px; }
.attention li > .icon { color: #b45309; flex: none; }
.attention li > span { flex: 1; min-width: 0; }
.attention li .btn { flex: none; }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.seg-tabs-sm { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.seg-tabs-sm button { flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 600 .85rem var(--font); cursor: pointer; }
.seg-tabs-sm button span { color: var(--muted); font-weight: 700; margin-left: 2px; }
.seg-tabs-sm button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg-tabs-sm button[aria-selected="true"] span { color: rgba(255, 255, 255, .75); }
.sort-sm select { min-height: 34px; padding: 4px 30px 4px 10px; font-size: .85rem; border-radius: 999px; }
.my-listing { flex-wrap: wrap; }
.my-perf { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; color: var(--text-2); }
.my-perf > span { display: inline-flex; align-items: center; gap: 4px; }
.health { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: .8rem; }
.health-score { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #b45309; }
.health-tip { padding: 2px 9px; border-radius: 999px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; font-weight: 600; }
.health-tip:hover { text-decoration: none; border-color: #fb923c; }
.health.ok { color: var(--ok); font-weight: 600; }
.my-listing .my-actions { margin: 0; flex-basis: 100%; display: flex; flex-direction: row; justify-content: flex-end; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.icon.rot90 { transform: rotate(90deg); }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); display: grid; }
.menu-list button { display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; border-radius: 8px; font: 500 .9rem var(--font); color: var(--text); text-align: left; cursor: pointer; }
.menu-list button:hover { background: var(--surface-2); }
.menu-list button.danger { color: var(--danger); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }
.alert-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
@media (min-width: 900px) {
  .my-listing { flex-wrap: nowrap; }
  .my-listing .my-actions { flex-basis: auto; flex-direction: column; align-items: stretch; padding-top: 0; border-top: 0; }
  .my-listing .my-actions .btn { justify-content: flex-start; }
  .my-listing .my-actions .menu > summary { width: 100%; }
}
.convo .badge, .my-listing .badge { text-transform: none; }

/* Profile photos */
.avatar-xs { width: 22px; height: 22px; font-size: .6rem; }
.avatar-img { object-fit: cover; background: var(--surface-2); padding: 0; }
.convo-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.photo-field { display: flex; align-items: center; gap: 16px; }
.photo-field .avatar { width: 84px; height: 84px; font-size: 1.6rem; }
.photo-field .stack-sm { flex: 1; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
