:root {
    --navy: #0f172a;
    --navy-soft: #1e293b;
    --gold: #d4af37;
    --gold-light: #f3d069;
    --canvas: #f5f6f8;
    --surface: #fff;
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --line-strong: #d4d8df;
    --danger: #b42318;
    --radius-control: 12px;
    --radius-panel: 16px;
    --shadow-float: 0 14px 40px rgba(15, 23, 42, .14);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.premium-icon { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; line-height: 1; vertical-align: -.125em; stroke-width: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.property-app { min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-family: Inter, Arial, sans-serif; font-size: 14px; }
.property-app :focus-visible { outline: 3px solid rgba(212, 175, 55, .72); outline-offset: 2px; }

.app-header { position: sticky; z-index: 40; top: 0; height: 92px; display: grid; grid-template-columns: 250px minmax(390px, 1fr) minmax(280px, 420px) auto; align-items: center; gap: 24px; padding: 0 28px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); box-shadow: 0 4px 22px rgba(15, 23, 42, .035); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; width: 186px; }
.brand img { width: 178px; height: auto; }
.mode-nav { --mode-index: 0; position: relative; min-width: 0; justify-self: start; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); }
.mode-nav::before { content: ""; position: absolute; z-index: 0; top: 5px; left: 5px; width: var(--pill-w, calc((100% - 22px) / 4)); height: calc(100% - 10px); border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(15, 23, 42, .10); transform: translateX(var(--pill-x, 0px)); transition: transform .3s var(--ease), width .3s var(--ease); }
.mode-nav:not([data-mode-index])::before { opacity: 0; }
.mode-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 18px; border: 0; border-radius: 11px; background: transparent; color: #475467; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; transition: color .22s var(--ease); }
.mode-link:hover { color: var(--navy); }
.mode-link:active { transform: scale(.97); }
.mode-link.is-active { color: var(--navy); }
.mode-link span { display: none; min-width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 10px; }
.mode-link span.has-count { display: inline-flex; }

.global-search { width: 100%; min-width: 0; max-width: 420px; height: 48px; justify-self: end; display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.global-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 23, 42, .08); }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.global-search input:focus-visible, .field-pair input:focus-visible { outline: 0; }
.global-search input::placeholder { color: #747b87; opacity: 1; }
.global-search > .premium-icon { width: 21px; height: 21px; color: var(--navy); }
.search-clear { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--canvas); color: var(--muted); }
.search-clear:hover { background: var(--navy); color: #fff; }
.search-clear .premium-icon { width: 14px; height: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.round-action { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.round-action:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.round-action .premium-icon { width: 21px; height: 21px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.profile .avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-weight: 800; font-size: 12px; }
.profile .avatar .premium-icon { width: 19px; height: 19px; }
.profile > span:nth-child(2) { display: grid; gap: 2px; min-width: 142px; }
.profile strong { font-size: 13px; }
.profile small { color: var(--muted); font-size: 11px; }
.profile svg { width: 16px; height: 16px; }
.logout-form { display: flex; margin: 0; }
.logout-btn { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.logout-btn:hover { background: var(--navy); color: #fff; }
.logout-btn .premium-icon { width: 15px; height: 15px; }
.mobile-filter-trigger { display: none; }

.workspace-flash { position: fixed; z-index: 95; top: 104px; left: 50%; width: min(420px, calc(100vw - 32px)); display: grid; gap: 8px; transform: translateX(-50%); }
.workspace-flash p { margin: 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-float); }
.workspace-flash-success { background: #ecfdf3; border: 1px solid #a7f3d0; color: #047857; }
.workspace-flash-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

.workspace { min-height: calc(100vh - 92px); display: grid; grid-template-columns: minmax(260px, 19.5vw) minmax(630px, 1fr) minmax(420px, 31vw); align-items: start; }
.filter-rail, .listing-pane, .detail-pane { min-height: calc(100vh - 92px); }
.filter-rail { position: sticky; top: 92px; height: calc(100vh - 92px); overflow-y: auto; background: #fff; border-right: 1px solid var(--line); scrollbar-width: none; }
.filter-rail::-webkit-scrollbar { width: 0; height: 0; }
.filter-heading { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.section-kicker { display: block; margin-bottom: 5px; color: #856d11; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-heading h1, .results-bar h2 { margin: 0; color: var(--navy); font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.filter-heading > button { border: 0; background: transparent; color: #856d11; font-size: 12px; font-weight: 700; }
.filter-heading .drawer-close { display: none; }
.filter-section { padding: 22px 26px; border-bottom: 1px solid var(--line); }
.filter-label { height: 44px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: #f8f9fb; color: var(--navy); font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,.85); }
.filter-label > span:nth-child(2) { flex: 1; }
.filter-label > .premium-icon { width: 19px; height: 19px; color: var(--navy); }
.filter-reset { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--canvas); color: #667085; }
.filter-reset .premium-icon { width: 13px; height: 13px; }
.option-list { display: grid; gap: 12px; }
.check-row, .radio-row { display: flex; align-items: center; gap: 11px; color: #344054; font-weight: 500; cursor: pointer; }
.check-row input, .radio-row input { appearance: none; width: 19px; height: 19px; flex: 0 0 19px; display: grid; place-content: center; margin: 0; border: 1.5px solid #c7ccd4; background: #fff; }
.check-row input { border-radius: 5px; }
.radio-row input { border-radius: 50%; }
.check-row input::before { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .12s; }
.radio-row input::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .12s; }
.check-row input:checked { border-color: var(--navy); background: var(--navy); }
.check-row input:checked::before, .radio-row input:checked::before { transform: rotate(-45deg) scale(1); }
.radio-row input:checked { border-color: var(--gold); }
.radio-row input:checked::before { transform: scale(1); }
.radio-row + .radio-row { margin-top: 14px; }
.filter-select-shell { position: relative; width: 100%; height: 44px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: #fff; box-shadow: 0 2px 7px rgba(15, 23, 42, .055); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.filter-select-shell:hover { border-color: var(--muted); background: var(--canvas); box-shadow: 0 4px 11px rgba(15, 23, 42, .075); }
.filter-select-shell:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 23, 42, .09), 0 4px 11px rgba(15, 23, 42, .075); }
.filter-select-shell > .premium-icon { position: absolute; right: 13px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; transition: color .2s var(--ease), transform .2s var(--ease); }
.filter-select-shell:focus-within > .premium-icon { color: var(--navy); transform: translateY(1px); }
.filter-select { width: 100%; height: 100%; min-width: 0; padding: 0 42px 0 14px; border: 0; border-radius: inherit; background: transparent; color: var(--navy); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; appearance: none; -webkit-appearance: none; outline: 0; }
.filter-select::-ms-expand { display: none; }
.filter-select:focus-visible { outline: 0; }
.filter-select option { background: #fff; color: var(--navy); font-weight: 500; }
.filter-hint { margin: 12px 0 0; color: #667085; font-size: 11px; font-weight: 600; line-height: 1.5; }
.radio-row input:disabled { opacity: .45; cursor: not-allowed; }
.dual-range input[type="range"]:disabled { opacity: .4; }
.dual-range { --min-pct: 20%; --max-pct: 80%; position: relative; height: 68px; margin: 10px 10px 0; padding-top: 42px; }
.dual-range output { position: absolute; top: 0; z-index: 3; min-width: 46px; padding: 5px 8px; border: 1px solid #edf0f3; border-radius: 999px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 800; line-height: 1; text-align: center; box-shadow: 0 3px 10px rgba(15,23,42,.08); transform: translateX(-50%); }
#price-min-label { left: clamp(31px, var(--min-pct), calc(100% - 31px)); }
#price-max-label { left: clamp(31px, var(--max-pct), calc(100% - 31px)); }
.range-track { position: relative; height: 14px; overflow: hidden; border: 1px solid #e6e9ee; border-radius: 999px; background: #f5f6f8; box-shadow: inset 0 1px 3px rgba(15,23,42,.08); }
.range-track i { position: absolute; top: 3px; bottom: 3px; left: var(--min-pct); right: calc(100% - var(--max-pct)); border-radius: 999px; background: var(--navy); }
.dual-range input[type="range"] { position: absolute; z-index: 2; right: 0; bottom: 7px; left: 0; width: 100%; height: 24px; margin: 0; appearance: none; outline: 0; pointer-events: none; background: transparent; }
.dual-range input[type="range"]::-webkit-slider-runnable-track { height: 14px; background: transparent; }
.dual-range input[type="range"]::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: 1px; appearance: none; border: 2.5px solid var(--navy); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.18); pointer-events: auto; cursor: grab; }
.dual-range input[type="range"]::-moz-range-track { height: 14px; background: transparent; }
.dual-range input[type="range"]::-moz-range-thumb { width: 7px; height: 7px; border: 2.5px solid var(--navy); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.18); pointer-events: auto; cursor: grab; }
.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(15,23,42,.14); }
.dual-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(15,23,42,.14); }
.dual-range input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.08); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-pair label { height: 44px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-control); }
.field-pair label:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15,23,42,.08); }
.field-pair input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.field-pair small { color: var(--muted); white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { min-height: 36px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: #475467; font-size: 12px; font-weight: 700; }
.filter-chip.is-active { border-color: var(--gold); background: var(--gold); color: var(--navy); }

.listing-pane { position: relative; min-width: 0; padding: 28px 22px 48px; background: var(--canvas); }
.results-bar { min-width: 0; min-height: 50px; display: none; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.results-bar > div { min-width: 0; }
#result-count { display: inline-block; transform-origin: center; }
#result-count.is-flashing { animation: valueFlash .32s var(--ease); }
@keyframes valueFlash { 45% { color: #856d11; transform: translateY(-2px) scale(1.08); } }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sort-control select { min-height: 38px; padding: 0 28px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--navy); font-weight: 600; }
.listing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.listing-pane > .pagination { margin-top: 22px; }
.listing-grid.is-filtering { pointer-events: none; }
.listing-skeleton { position: absolute; z-index: 5; top: 28px; right: 22px; left: 22px; display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.property-app.is-booting .listing-skeleton { display: grid; }
.property-app.is-booting .listing-grid { opacity: 0; visibility: hidden; }
.skeleton-card { position: relative; height: 378px; overflow: hidden; border-radius: var(--radius-panel); background: #e7e9ed; }
.skeleton-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.72) 46%, transparent 60%); transform: translateX(-110%); animation: skeletonSweep 1.25s ease-in-out infinite; }
.skeleton-card > span { position: absolute; top: 14px; left: 14px; width: 58px; height: 27px; border-radius: 999px; background: rgba(255,255,255,.72); }
.skeleton-card > div { position: absolute; right: 14px; bottom: 14px; left: 14px; height: 108px; display: grid; align-content: center; gap: 11px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.88); }
.skeleton-card i { display: block; height: 10px; border-radius: 999px; background: #dfe2e7; }
.skeleton-card i:nth-child(1) { width: 54%; height: 14px; }
.skeleton-card i:nth-child(2) { width: 72%; }
.skeleton-card i:nth-child(3) { width: 38%; }
@keyframes skeletonSweep { to { transform: translateX(110%); } }
.property-card { position: relative; min-height: 378px; overflow: hidden; border: 1px solid transparent; border-radius: var(--radius-panel); background: #dfe3e8; isolation: isolate; cursor: pointer; transition: transform .28s var(--ease), border-color .28s, box-shadow .28s, opacity .2s var(--ease); }
.property-card::after { content: ""; position: absolute; inset: 40% 0 0; z-index: 0; background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, .38)); pointer-events: none; }
.property-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(15, 23, 42, .12); }
.property-card:active { transform: translateY(-1px) scale(.992); }
.property-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212, 175, 55, .15), 0 14px 28px rgba(15, 23, 42, .13); }
.property-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.property-card > img.is-loading, .detail-gallery img.is-loading { filter: blur(12px); transform: scale(1.04); opacity: .74; }
.property-card:hover > img { transform: scale(1.03); }
.property-card.is-image-unavailable::before { content: "Image unavailable"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.property-type { position: absolute; z-index: 2; top: 14px; left: 14px; padding: 7px 12px; border-radius: 999px; background: #fff; color: #765f0b; font-size: 11px; font-weight: 800; box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.save-card, .detail-save { z-index: 3; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--navy); transition: color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.save-card:hover, .detail-save:hover { transform: scale(1.06); }
.save-card:active, .detail-save:active { transform: scale(.86); }
.save-card.is-popping .premium-icon, .detail-save.is-popping .premium-icon { animation: savePop .42s var(--ease); }
@keyframes savePop { 45% { transform: scale(1.32) rotate(-7deg); } }
.save-card { position: static; width: 40px; height: 40px; flex: 0 0 40px; background: #f0f2f5; box-shadow: none; }
.save-card .premium-icon, .detail-save .premium-icon { width: 20px; height: 20px; }
.detail-save { position: absolute; background: rgba(255, 255, 255, .94); box-shadow: 0 4px 16px rgba(15, 23, 42, .12); }
.save-card.is-saved, .detail-save.is-saved { background: var(--gold); color: var(--navy); }
.save-card.is-saved .premium-icon, .detail-save.is-saved .premium-icon { stroke-width: 2.5; }
.save-card.is-saved .premium-icon, .detail-save.is-saved .premium-icon { fill: rgba(15,23,42,.14); }
.card-dock { position: absolute; z-index: 2; right: 14px; bottom: 14px; left: 14px; padding: 15px 16px 13px; border-radius: 14px; background: rgba(255, 255, 255, .97); box-shadow: 0 9px 24px rgba(15, 23, 42, .14); backdrop-filter: blur(8px); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading > div { min-width: 0; }
.card-dock h3 { overflow: hidden; margin: 0 0 7px; color: var(--navy); font-size: 15px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.card-dock p { display: flex; align-items: center; gap: 5px; overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-dock p .premium-icon { width: 14px; height: 14px; color: #9a7d13; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.card-footer strong { color: var(--navy); font-size: 16px; white-space: nowrap; }
.card-footer strong small, #detail-price small { color: var(--muted); font-size: 10px; font-weight: 500; }
.card-footer span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.card-footer span .is-featured { color: var(--gold); fill: rgba(212, 175, 55, .16); }
.card-footer span .is-available { color: var(--navy); }
.empty-state { min-height: 420px; align-content: center; justify-items: center; padding: 30px; text-align: center; color: var(--muted); }
.empty-state:not([hidden]) { display: grid; animation: emptyReveal .32s var(--ease) both; }
.empty-orbit { width: max-content; display: block; color: #8a7013; }
.empty-orbit .premium-icon { width: 34px; height: 34px; color: inherit; stroke-width: 1.6; }
.empty-state h3 { margin: 16px 0 6px; color: var(--navy); }
.empty-state p { margin: 0 0 18px; }
.empty-state button { padding: 10px 16px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; }
.empty-state button:active { transform: scale(.96); }
@keyframes emptyReveal { from { opacity: 0; transform: translateY(8px); } }

.detail-pane { position: sticky; top: 92px; height: calc(100vh - 92px); overflow-y: auto; padding: 18px; background: #fff; border-left: 1px solid var(--line); scrollbar-width: thin; }
.detail-pane.is-refreshing .detail-gallery > img, .detail-pane.is-refreshing .detail-summary, .detail-pane.is-refreshing .tab-panel:not([hidden]) { animation: detailRefresh .32s var(--ease) both; }
@keyframes detailRefresh { from { opacity: .28; transform: translateY(5px); } }
.detail-close { display: none; }
.detail-gallery { position: relative; height: 302px; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 10px; overflow: hidden; border-radius: var(--radius-panel); background: var(--canvas); }
.detail-gallery > img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery > img.is-image-unavailable { visibility: hidden; }
.detail-gallery:has(> img.is-image-unavailable)::before { content: "Property image unavailable"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.gallery-strip { display: grid; grid-template-rows: repeat(2, 1fr); gap: 10px; }
.gallery-strip:empty { display: none; }
.detail-gallery:has(.gallery-strip:empty) { grid-template-columns: 1fr; }
.gallery-strip button { min-height: 0; overflow: hidden; padding: 0; border: 0; border-radius: 12px; background: #e5e7eb; }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; }
.detail-save { top: 14px; right: 128px; width: 40px; height: 40px; }
.detail-gallery:has(.gallery-strip:empty) .detail-save { right: 14px; }
.detail-summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 8px 17px; }
.detail-type { color: #856d11; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.detail-summary h2 { margin: 5px 0 7px; color: var(--navy); font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.detail-summary p { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 11px; }
.detail-summary p .premium-icon { width: 15px; height: 15px; color: #9a7d13; }
#detail-price { align-self: center; color: var(--navy); font-size: 20px; white-space: nowrap; }
.detail-tabs { --tab-index: 0; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.detail-tabs button { position: relative; min-height: 46px; border: 0; background: transparent; color: var(--muted); font-weight: 700; }
.detail-tabs button.is-active { color: var(--navy); }
.tab-indicator { position: absolute; z-index: 1; bottom: -1px; left: 5%; width: 23.333%; height: 2px; border-radius: 999px; background: var(--gold); transform: translateX(calc(var(--tab-index) * 142.857%)); transition: transform .32s var(--ease); }
.tab-panel { min-height: 178px; padding: 20px 8px 10px; }
.tab-panel:not([hidden]) { animation: tabReveal .28s var(--ease) both; }
@keyframes tabReveal { from { opacity: 0; transform: translateY(6px); } }
.tab-panel h3 { margin: 0 0 10px; color: var(--navy); font-size: 12px; }
.tab-panel > p { margin: 0; color: #596273; font-size: 12px; line-height: 1.65; }
.tab-panel ul { margin: 0; padding-left: 18px; color: #596273; font-size: 12px; line-height: 1.8; }
.fact-grid { display: grid; grid-template-columns: repeat(3, max-content); align-items: center; gap: 8px; margin-top: 16px; }
.fact-grid > [hidden] { display: none !important; }
.fact-grid span { min-height: 38px; display: inline-flex; align-items: center; gap: 5px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; color: #475467; font-size: 11px; }
.fact-grid .premium-icon { width: 16px; height: 16px; color: var(--navy); }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 8px 20px; }
.detail-actions a, .detail-actions button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s; }
.detail-actions a:hover, .detail-actions button:hover { transform: translateY(-2px); }
.detail-actions a:active, .detail-actions button:active { transform: translateY(0) scale(.98); }
.action-feedback { position: relative; }
.action-spinner { width: 16px; height: 16px; display: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: actionSpin .7s linear infinite; }
.action-feedback.is-loading { pointer-events: none; }
.action-feedback.is-loading .action-spinner { display: inline-block; }
.action-feedback.is-loading .action-arrow { display: none; }
@keyframes actionSpin { to { transform: rotate(360deg); } }
.secondary-action { background: #f0f2f5; color: var(--navy); }
.secondary-action:hover { background: #e7e9ed; }
.primary-action { background: var(--navy); color: #fff; }
.primary-action:hover { background: var(--navy-soft); }
.primary-action .premium-icon { width: 17px; height: 17px; }
.map-preview { position: relative; height: 350px; overflow: hidden; margin: 0 8px 20px; border-radius: var(--radius-panel); background: #eef0eb; }
.tile-map { position: absolute; inset: 0; overflow: hidden; background: #e8ece6; }
.map-tiles { position: absolute; top: 50%; left: 50%; width: 768px; height: 768px; will-change: transform; }
.map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; filter: saturate(.72) contrast(.96) brightness(1.04); }
.map-center-pin { position: absolute; z-index: 2; top: 50%; left: 50%; width: 44px; height: 44px; display: grid; place-items: center; border: 6px solid rgba(212,175,55,.22); border-radius: 50%; background: var(--navy); color: #fff; box-shadow: 0 7px 18px rgba(15,23,42,.25); transform: translate(-50%, -50%); }
.map-center-pin .premium-icon { width: 18px; height: 18px; }
.map-attribution { position: absolute; z-index: 3; right: 7px; bottom: 7px; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.88); color: #475467; font-size: 8px; text-decoration: none; }
.map-card { position: absolute; z-index: 3; top: 41%; left: 38%; width: 222px; display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-float); }
.map-card img { width: 54px; height: 42px; border-radius: 6px; object-fit: cover; }
.map-card img.is-image-unavailable { display: none; }
.map-card span { min-width: 0; display: grid; gap: 4px; }
.map-card strong, .map-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-card strong { color: var(--navy); font-size: 10px; }
.map-card small { color: var(--muted); font-size: 8px; }
.drawer-backdrop { display: none; }
.toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; width: min(360px, calc(100vw - 32px)); min-height: 66px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 30px; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: var(--navy); color: #fff; box-shadow: var(--shadow-float); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(14px) scale(.98); transition: opacity .25s, visibility .25s, transform .28s var(--ease); }
.toast.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.toast-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--navy); }
.toast-mark::before { content: "✓"; font-size: 15px; font-weight: 900; }
.toast.is-info .toast-mark::before { content: "i"; }
.toast-copy { min-width: 0; display: grid; gap: 3px; }
.toast-copy strong { font-size: 12px; }
.toast-copy small { overflow: hidden; color: #d8dee9; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.toast button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; }
.toast button:hover { background: rgba(255,255,255,.16); }
.toast button .premium-icon { width: 14px; height: 14px; }

/* Contact Agent modal */
.contact-modal { position: fixed; z-index: 85; inset: 0; }
.contact-modal[hidden] { display: none; }
.contact-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .22s var(--ease); }
.contact-modal-card { position: absolute; top: 50%; left: 50%; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; padding: 26px 26px 22px; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); opacity: 0; transform: translate(-50%, -46%) scale(.97); transition: opacity .22s var(--ease), transform .22s var(--ease); }
.contact-modal.is-open .contact-modal-backdrop { opacity: 1; }
.contact-modal.is-open .contact-modal-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.contact-modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--canvas); color: #667085; cursor: pointer; }
.contact-modal-close .premium-icon { width: 15px; height: 15px; }
.contact-modal-card h3 { margin: 0 0 6px; color: var(--navy); font-size: 20px; letter-spacing: -.02em; }
.contact-modal-sub { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.contact-modal-sub strong { color: var(--navy); }
#contact-agent-form { display: grid; gap: 13px; }
.contact-field { display: grid; gap: 6px; }
.contact-field label { color: #344054; font-size: 12px; font-weight: 700; }
.contact-field label span { color: var(--muted); font-weight: 500; }
.contact-field input, .contact-field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; resize: none; }
.contact-field input:focus, .contact-field textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 23, 42, .08); }
.contact-form-error { margin: 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 12px; font-weight: 600; }
.contact-submit { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: background .2s; }
.contact-submit:hover { background: var(--navy-soft); }
.contact-submit .action-spinner { display: none; }
.contact-submit.is-sending .action-spinner { display: inline-block; }
.contact-submit:disabled { opacity: .7; cursor: wait; }

@media (max-width: 1480px) {
    .app-header { grid-template-columns: 190px minmax(340px, 1fr) minmax(240px, 340px) auto; gap: 14px; padding-inline: 20px; }
    .brand { width: 160px; }
    .brand img { width: 150px; }
    .mode-link { padding-inline: 13px; }
    .workspace { grid-template-columns: 270px minmax(560px, 1fr) minmax(390px, 32vw); }
    .property-card { min-height: 350px; }
    .detail-gallery { height: 270px; grid-template-columns: minmax(0, 1fr) 92px; }
    .detail-save { right: 108px; }
}

@media (max-width: 1160px) {
    .workspace { grid-template-columns: minmax(0, 1fr) minmax(350px, 43vw); }
    .listing-pane { padding-inline: 16px; }
    .listing-grid { gap: 16px; }
    .detail-pane { padding: 14px; }
    .filter-rail { position: fixed; z-index: 70; top: 0; left: 0; width: min(360px, 90vw); height: 100vh; transform: translateX(-102%); box-shadow: var(--shadow-float); transition: transform .35s var(--ease); }
    .filter-rail.is-open { transform: translateX(0); }
    .filter-heading .drawer-close { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border-radius: 50%; background: var(--canvas); color: var(--navy); }
    .filter-heading #clear-filters { margin-left: auto; }
    .mobile-filter-trigger { width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; gap: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #fff; }
    .mobile-filter-trigger span { display: none; }
    .mobile-filter-trigger .premium-icon { width: 18px; height: 18px; }
    .drawer-backdrop { position: fixed; z-index: 65; inset: 0; background: rgba(15, 23, 42, .36); opacity: 0; pointer-events: none; display: block; transition: opacity .25s; }
    .drawer-backdrop.is-visible { opacity: 1; pointer-events: auto; }
}

@media (max-width: 880px) {
    .workspace { display: block; min-height: calc(100vh - 64px); }
    .listing-pane { min-height: calc(100vh - 64px); padding: 18px 16px 50px; }
    .listing-skeleton { top: 64px; right: 16px; left: 16px; }
    .results-bar { display: flex; }
    .detail-pane { position: fixed; z-index: 80; inset: 0; width: 100%; height: 100vh; padding: 16px; transform: translateX(102%); border: 0; transition: transform .38s var(--ease); }
    .detail-pane.is-open { transform: translateX(0); }
    .detail-close { position: fixed; z-index: 8; top: 27px; left: 27px; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--navy); box-shadow: var(--shadow-float); }
    .detail-gallery { height: 42vh; min-height: 290px; }
}

@media (max-width: 620px) {
    .brand { width: auto; }
    .brand img { height: 32px; width: auto; }
    .mobile-filter-trigger { width: 42px; min-height: 42px; flex: 0 0 42px; padding: 0; }
    .results-bar { align-items: flex-end; }
    .results-bar h2 { white-space: nowrap; }
    .sort-control { display: grid; gap: 4px; }
    .sort-control select { width: 124px; padding-left: 8px; font-size: 11px; }
    .listing-grid { grid-template-columns: 1fr; gap: 16px; }
    .listing-skeleton { grid-template-columns: 1fr; gap: 16px; }
    .property-card { min-height: 360px; }
    .detail-gallery { grid-template-columns: 1fr; }
    .gallery-strip { display: none; }
    .detail-save { right: 14px; }
    .detail-summary { display: grid; gap: 10px; }
    #detail-price { justify-self: start; }
    .detail-actions { position: sticky; z-index: 5; bottom: -16px; margin: 0 -8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
    .fact-grid { grid-template-columns: repeat(2, max-content); }
    .map-card { left: 30%; width: 205px; }
    .toast { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
