/* House catalog: native server filters, a compact browse rail and one scroll surface. */
.portal-frame--houses { width: min(1120px, 100%); height: min(820px, 100%); }
.portal-frame--houses .portal-frame__header { padding: 23px 30px 20px; }
.portal-frame--houses .portal-frame__footer { padding: 10px 24px 16px; }
.houses-frame-title { margin: 0; font: 600 clamp(25px, 3.6cqi, 34px)/1.15 var(--font-display); color: var(--text-primary); }
.portal-frame--houses .portal-scroll { scrollbar-gutter: auto; scroll-padding-top: 12px; }
.is-portal .portal-scroll .houses-page { padding: 0 30px 20px; min-height: 100%; }
.houses-catalog { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-width: 0; gap: 28px; }
.houses-sidebar { padding-right: 24px; border-right: 1px solid var(--border-default); min-width: 0; }
.houses-filters { display: grid; gap: 22px; }
.houses-filter-heading { display: flex; gap: 9px; align-items: center; color: var(--gold-primary); font: 500 11px/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.houses-filter-heading .icon { width: 21px; height: 21px; flex: none; }
.houses-filters .ffield { min-width: 0; gap: 7px; }
.houses-filters .ffield__label, .houses-state legend { font: 500 10px/1.4 var(--font-ui); color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; }
.houses-filters .fselect select { min-height: 44px; height: 44px; font-size: 13px; padding-left: 10px; padding-right: 28px; background-color: #0a0a09; }
.houses-state { border: 0; padding: 0; margin: 0; min-width: 0; }
.houses-state legend { padding: 0 0 7px; }
.houses-segments { display: flex; width: 100%; padding: 3px; border: 1px solid var(--border-default); background: #080807; }
.houses-segment { position: relative; display: flex; flex: 1; min-width: 0; cursor: pointer; }
.houses-segment input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.houses-segment span { display: grid; place-items: center; width: 100%; min-height: 36px; padding: 5px 3px; color: var(--text-muted); font-size: 11px; border: 1px solid transparent; transition: background .15s, color .15s; }
.houses-segment input:checked + span { color: var(--gold-bright); background: rgb(var(--gold-rgb) / .12); border-color: rgb(var(--gold-rgb) / .3); }
.houses-segment input:focus-visible + span { outline: 2px solid var(--gold-primary); outline-offset: 1px; }
.houses-more { border-block: 1px solid var(--border-default); }
.houses-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; min-height: 44px; color: var(--text-secondary); font-size: 12px; }
.houses-more > summary::-webkit-details-marker { display: none; }
.houses-more > summary::marker { content: ''; }
.houses-more > summary .icon { width: 14px; height: 14px; }
.houses-more[open] > summary .icon { transform: rotate(180deg); }
.houses-more-fields { display: grid; gap: 14px; padding: 0 0 16px; }
.houses-search.fbtn { width: 100%; min-width: 0; min-height: 44px; padding-inline: 10px; font-size: 11px; }
.houses-auto-note { display: none; font-size: 10px; line-height: 1.5; color: var(--text-muted); margin: -12px 0 0; }
.is-enhanced .houses-auto-note { display: block; }
.houses-aside-note, .houses-detail-note { display: flex; align-items: flex-start; gap: 8px; color: var(--text-muted); font-size: 11px; line-height: 1.6; margin: 22px 0 0; }
.houses-aside-note .icon, .houses-detail-note .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--gold-muted); }
.houses-content { min-width: 0; }
.houses-kicker { display: block; color: var(--gold-primary); font: 500 10px/1.4 var(--font-ui); letter-spacing: .15em; text-transform: uppercase; }
.houses-welcome { position: relative; isolation: isolate; overflow: hidden; min-height: 224px; padding: 28px; border: 1px solid var(--border-default); background: radial-gradient(ellipse at 100% 80%, rgb(var(--gold-rgb) / .09), transparent 65%), #10100e; }
.houses-welcome::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgb(var(--gold-rgb) / .07); pointer-events: none; }
.houses-welcome-title { position: relative; margin: 18px 0 13px; max-width: 360px; color: var(--text-primary); font: 500 clamp(28px, 3.5cqi, 39px)/1.15 var(--font-display); }
.houses-note { color: var(--text-secondary); font-size: 13px; line-height: 1.65; margin: 0; overflow-wrap: anywhere; }
.houses-welcome .houses-note { max-width: 360px; position: relative; }
.houses-welcome-seal { position: absolute; z-index: -1; right: -20px; bottom: -42px; width: 210px; height: 230px; color: rgb(var(--gold-rgb) / .07); }
.houses-welcome-seal .icon { width: 100%; height: 100%; stroke-width: .7; }
.houses-cities-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.houses-small-title { margin: 0; font: 500 13px/1.4 var(--font-body); color: var(--text-primary); }
.houses-cities-heading > span { color: var(--text-muted); font-size: 10px; }
.houses-cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.houses-city-form { min-width: 0; margin: 0; }
/* fbtn is intentionally omitted; these are compact destination choices. */
.legacy .houses-city { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; height: auto; min-height: 76px; margin: 0; padding: 12px 16px; text-align: left; background: #0b0b0a; border: 1px solid var(--border-default); border-radius: 0; box-shadow: none; color: var(--gold-primary); font: 400 14px/1.3 var(--font-body); cursor: pointer; letter-spacing: 0; text-transform: none; transition: background .2s, border-color .2s; }
.legacy .houses-city:hover { background: rgb(var(--gold-rgb) / .07); border-color: var(--gold-muted); }
.houses-city > .icon { width: 23px; height: 23px; flex: none; }
.houses-city > .icon:last-child { margin-left: auto; width: 15px; height: 15px; }
.houses-city > span { min-width: 0; overflow-wrap: anywhere; color: var(--text-primary); }
.houses-city small { display: block; font-size: 10px; margin-top: 4px; color: var(--text-muted); }
.houses-results-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 10px; }
.houses-subtitle { margin: 6px 0 0; font: 500 25px/1.25 var(--font-display); color: var(--text-primary); overflow-wrap: anywhere; }
.houses-count { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.houses-results-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 11px; color: var(--text-muted); }
.houses-results-meta i { font-style: normal; color: var(--gold-muted); }
.houses-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border-default); }
.house-row[hidden], .houses-pagination[hidden] { display: none; }
.houses-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.houses-pagination .fbtn { min-width: 0; min-height: 40px; padding-inline: 12px; font-size: 10px; }
.houses-pagination .fbtn .icon { width: 13px; height: 13px; }
.houses-pagination .fbtn:disabled { opacity: .35; cursor: default; }
.houses-pagination output { font-size: 10px; color: var(--text-muted); text-align: center; }
.house-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 36px; gap: 12px; align-items: center; min-height: 78px; padding: 10px 0; border-bottom: 1px solid rgb(var(--gold-rgb) / .13); }
.house-row-icon { width: 34px; height: 38px; display: grid; place-items: center; color: var(--gold-muted); background: linear-gradient(rgb(var(--gold-rgb) / .065), transparent); }
.house-row-icon .icon { width: 24px; height: 24px; }
.house-row-title { margin: 0; font: 500 14px/1.35 var(--font-body); }
.house-row-title a { color: var(--text-primary); overflow-wrap: anywhere; }
.house-row-title a:hover { color: var(--gold-bright); }
.house-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; margin-top: 7px; }
.house-status { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; line-height: 1.4; white-space: nowrap; }
.house-status::before { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.house-status--free { color: #97b39a; }
.house-owner { font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.house-row-stats { display: grid; grid-template-columns: 58px 95px; gap: 12px; text-align: right; margin: 0; }
.house-row-stats dt, .house-detail-stats dt { color: var(--text-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; line-height: 1.4; }
.house-row-stats dd, .house-detail-stats dd { margin: 5px 0 0; color: var(--gold-primary); font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.house-row-stats dd small { color: var(--text-muted); font-size: 10px; }
.house-row-open { display: grid; place-items: center; width: 36px; height: 44px; border: 1px solid rgb(var(--gold-rgb) / .2); color: var(--gold-primary); }
.house-row-open:hover { border-color: var(--gold-muted); background: rgb(var(--gold-rgb) / .07); }
.house-row-open .icon { width: 17px; height: 17px; }
.houses-empty { grid-column: 1 / -1; min-height: 240px; padding: 44px 22px; border: 1px solid var(--border-default); text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; }
.houses-empty > .icon { width: 34px; height: 34px; color: var(--gold-muted); }
.houses-empty .houses-subtitle { font-size: 22px; margin: 0; }
.houses-empty .houses-note { max-width: 360px; }
/* The core renders the search template after a valid detail. The catalog
   remains on its own route; the detail offers a single explicit back link. */
.houses-detail ~ .houses-catalog { display: none; }
.houses-back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 24px; color: var(--gold-primary); min-height: 36px; }
.houses-back .icon { width: 17px; height: 17px; }
.house-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 30px; align-items: start; }
.house-plan { margin: 0; background: #090908; border: 1px solid var(--border-default); min-width: 0; }
.house-plan-image { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; image-rendering: pixelated; padding: 16px; }
.house-plan-placeholder { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: radial-gradient(ellipse at center, rgb(var(--gold-rgb) / .05), transparent); color: var(--text-muted); font-size: 12px; }
.house-plan-placeholder .icon { width: 75px; height: 75px; stroke-width: .8; color: var(--gold-muted); }
.house-plan figcaption { text-align: center; border-top: 1px solid var(--border-default); padding: 10px; font-size: 10px; color: var(--text-muted); }
.house-facts .houses-subtitle { font-size: 28px; margin: 14px 0 22px; }
.house-detail-stats { display: flex; flex-wrap: wrap; gap: 25px; margin: 0; padding-block: 20px; border-block: 1px solid var(--border-default); }
.house-detail-stats dd { font: 500 23px/1.3 var(--font-display); }
.house-detail-stats dd small { font: 400 12px var(--font-body); color: var(--text-muted); }
.house-tenant { margin-top: 22px; }
.house-tenant .houses-note { margin-top: 8px; }
@container (max-width: 850px) {
    .houses-catalog { grid-template-columns: 185px minmax(0, 1fr); gap: 20px; }
    .houses-sidebar { padding-right: 18px; }
    .house-row { grid-template-columns: minmax(0, 1fr) 36px; gap: 8px 12px; }
    .house-row-icon { display: none; }
    .house-row-stats { grid-column: 1; grid-row: 2; display: flex; gap: 18px; text-align: left; }
    .house-row-stats > div { display: flex; align-items: baseline; gap: 6px; }
    .house-row-stats dd { margin: 0; font-size: 13px; }
    .house-row-open { grid-column: 2; grid-row: 1 / 3; }
    .houses-welcome { padding: 22px; }
    .legacy .houses-city { padding: 12px; gap: 8px; }
    .houses-city > .icon:first-child { width: 18px; }
}
@container (max-width: 650px) {
    .is-portal .portal-scroll .houses-page { padding-inline: 18px; padding-bottom: 12px; }
    .houses-catalog { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .houses-sidebar { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--border-default); }
    .houses-filters { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
    .houses-filter-heading, .houses-aside-note { display: none; }
    .houses-town-field { grid-column: 1; grid-row: 1; }
    .houses-search.fbtn { grid-column: 2; grid-row: 1; width: auto; padding-inline: 13px; font-size: 10px; }
    .houses-state { grid-column: 1 / -1; grid-row: 2; }
    .houses-state legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .houses-segment span { min-height: 34px; font-size: 12px; }
    .houses-more { grid-column: 1 / -1; border: 0; }
    .houses-auto-note { grid-column: 1 / -1; margin: -5px 0 0; font-size: 9px; }
    .houses-more > summary { min-height: 30px; font-size: 11px; }
    .houses-more-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 0 0; gap: 12px; }
    .houses-filters .fselect select { font-size: 13px; }
    .houses-welcome { min-height: 0; padding: 20px; }
    .houses-welcome-title { font-size: 28px; margin: 12px 0 10px; }
    .houses-welcome .houses-note { font-size: 12px; }
    .houses-cities-heading { margin-top: 20px; }
    .house-row { min-height: 78px; padding-block: 8px; }
    .houses-results-header .houses-kicker { display: none; }
    .houses-results-header .houses-subtitle { margin-top: 0; }
    .houses-results-meta { margin-bottom: 10px; }
    .houses-pagination { margin-top: 12px; }
    .house-row-title { font-size: 14px; }
    .house-overview { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .house-plan { order: 2; }
    .house-plan-placeholder { min-height: 160px; gap: 16px; }
    .house-plan-placeholder .icon { width: 48px; height: 48px; }
    .houses-back { margin-bottom: 16px; }
}
@media (max-width: 1023.98px) {
    .portal-frame--houses .portal-frame__header { padding: 18px 20px 16px; }
    .portal-frame--houses .portal-frame__footer { padding: 8px 20px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
    .houses-content { animation: houses-arrive .25s ease-out both; }
    @keyframes houses-arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
