/* Renter pages. Photos lead on public pages; account pages use grouped lists and a few solid panels. */
.narrow { max-width: 560px; }
.stack-lg { display: grid; gap: 22px; }
.pad { padding: 16px; }
.phone-only { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head-copy { display: grid; gap: 6px; max-width: 64ch; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-title { font-size: var(--text-lead); margin-bottom: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.split-main, .split-side { display: grid; gap: 18px; min-width: 0; }
.group-sub { padding: 0 4px; margin-top: -4px; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: var(--surface); }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--red) 86%, var(--ink)); }
.disclosure { border-top: 1px solid var(--line); padding-top: 10px; }
.disclosure summary { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-lg); cursor: pointer; font-size: var(--text-small); font-weight: 650; color: var(--accent-ink); list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary .ico { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.disclosure[open] summary .ico { transform: rotate(180deg); }
.disclosure .kv-list { margin-top: 6px; background: var(--surface-2); border-radius: var(--r-ctl); }
.notice-link { display: flex; min-height: var(--tap); }
.quote { margin: 0; padding: 12px 16px; border: 1px solid var(--line); color: var(--ink-2); font-size: var(--text-small); background: var(--surface-2); border-radius: var(--r-ctl); }

/* Photo chips: small glass labels that sit on photos. */
.photo-chip { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: var(--text-meta); font-weight: 650; pointer-events: none; }
.photo-chip .ico { width: 15px; height: 15px; }

/* Browse */
.browse-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.browse-intro > div { display: grid; gap: 8px; }
.browse-intro h1 { font-size: var(--text-display); letter-spacing: -.03em; line-height: 1.04; }
.browse-intro .skeleton-title { height: 44px; width: 340px; max-width: 80%; }
.listings-section { display: grid; gap: 18px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-main { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; }
.filter-extra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-toggle { display: none; position: relative; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sheet); color: var(--ink); flex: none; transition: transform var(--dur-fast) var(--ease-out); }
.filter-toggle:active { transform: scale(.94); }
.filter-toggle[aria-expanded="true"] { background: var(--ink); color: var(--surface); }
.filter-toggle.has-filters::after { content: ''; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.seg-label { display: inline-flex; align-items: center; padding: 0 8px 0 12px; font-size: var(--text-meta); font-weight: 650; color: var(--ink-3); }
.search-pill { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-sheet); border: 1px solid var(--line); color: var(--ink-3); }
.search-pill:focus-within { border-color: var(--focus); box-shadow: var(--ring); }
.search-pill input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); min-height: 46px; }
.search-pill input:focus { outline: none; }
.search-pill input::-webkit-search-cancel-button { cursor: pointer; }
.filters .seg { background: var(--surface); box-shadow: var(--shadow-sheet); border: 1px solid var(--line); }
.filters .seg label:has(input:checked) { background: var(--ink); color: var(--surface); box-shadow: none; }
.sort-field { width: auto; }
.sort-field select { min-height: 48px; border-radius: var(--r-pill); background-color: var(--surface); box-shadow: var(--shadow-sheet); padding-left: 18px; font-weight: 600; font-size: 16px; } /* 16px or more: iOS Safari zooms smaller focused controls */
.listing-count { margin-top: -4px; padding: 0 4px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 22px; }
.home-tile { position: relative; display: grid; gap: 14px; min-width: 0; }
.tile-photo, .feature-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r-sheet); overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-sheet); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.tile-photo img, .feature-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.tile-photo:hover img, .feature-photo:hover img { transform: scale(1.03); }
.tile-photo:active, .feature-photo:active { transform: scale(.985); }
.tile-body { display: grid; gap: 4px; padding: 0 4px; }
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tile-top h2 { font-size: var(--text-lead); }
.tile-top h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* The name's link covers the whole tile, so the photo, price and facts are one large target (the photo link is
   skipped by Tab to avoid two stops for one home). */
.tile-top h2 a::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-sheet); }
.home-tile .tile-photo { z-index: 1; } /* the photo stays its own (same) link above the stretched area */
.tile-top h2 a:focus-visible { outline: none; }
.tile-top h2 a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 4px; }
.home-tile:hover .tile-photo img { transform: scale(1.03); }
.tile-price { display: grid; justify-items: end; text-align: right; line-height: 1.1; flex: none; }
.tile-price strong { font-size: var(--text-lead); font-weight: 700; }
.tile-price small { color: var(--ink-3); font-size: var(--text-meta); }
.tile-addr { color: var(--ink-2); font-size: var(--text-small); }
.tile-specs { color: var(--ink-3); font-size: var(--text-small); }
.tile-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.home-feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.feature-photo { border-radius: var(--r-photo); aspect-ratio: 4 / 3; }
.feature-body { display: grid; gap: 8px; align-content: center; justify-items: start; }
.feature-body .tile-tags { margin: 0 0 4px; }
.feature-body h2 { font-size: var(--text-h1); letter-spacing: -.02em; }
.feature-body .tile-addr { font-size: var(--text-body); }
.feature-price { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 0; }
.feature-price strong { font-size: 32px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.feature-price small { color: var(--ink-3); font-size: var(--text-small); }
.feature-specs { color: var(--ink-2); font-size: var(--text-body); font-weight: 550; }
.feature-copy { color: var(--ink-2); max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-body .feature-cta { margin-top: 14px; min-height: 52px; padding: 0 28px; font-size: 17px; }
.feature-next { max-width: 40ch; }

/* Listing detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 40px; row-gap: 24px; align-items: start; }
.detail > .detail-head, .detail > .gallery, .detail > .detail-main, .detail > .loading-block { grid-column: 1; }
.detail-head { display: grid; gap: 8px; }
.detail-head .tile-tags { margin: 0; }
.detail-head h1 { font-size: var(--text-display); letter-spacing: -.03em; line-height: 1.04; }
.gallery { position: relative; border-radius: var(--r-photo); overflow: hidden; background: var(--surface-3); }
.gallery > .photo-pending { aspect-ratio: 21 / 9; min-height: 240px; }
.gallery-track { display: grid; gap: 8px; height: clamp(320px, 40vw, 500px); }
.gallery-track:focus-visible { outline-offset: -4px; }
.shot { position: relative; margin: 0; min-height: 0; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.gallery-n2 .gallery-track { grid-template-columns: 3fr 2fr; }
.gallery-n3 .gallery-track { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-n3 .shot:first-child { grid-row: span 2; }
.gallery-n4 .gallery-track { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-n4 .shot:first-child { grid-row: span 2; }
.gallery-n4 .shot:nth-child(2) { grid-column: span 2; }
.gallery-n5 .gallery-track { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-n5 .shot:first-child { grid-row: span 2; }
.gallery .shot-overflow { display: none; }
.gallery.is-expanded .gallery-track { height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 240px; }
.gallery.is-expanded .shot:first-child { grid-row: auto; grid-column: span 2; }
.gallery.is-expanded .shot:nth-child(2) { grid-column: auto; }
.more-photos { position: absolute; right: 12px; bottom: 12px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-pill); font-size: var(--text-small); font-weight: 650; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; display: none; min-height: 30px; align-items: center; padding: 0 11px; border-radius: var(--r-pill); font-size: var(--text-pill); font-weight: 650; font-variant-numeric: tabular-nums; }
.apply-card { grid-column: 2; grid-row: 1 / span 3; align-self: start; position: sticky; top: calc(var(--bar-h) + var(--bar-gap) + 20px); display: grid; gap: 16px; padding: 24px; border-radius: var(--r-photo); }
.apply-card .kv-list li { padding: 11px 0; }
.apply-card .btn { min-height: 52px; font-size: 17px; }
/* Secondary listing actions: labeled rows under the one primary button, never a second or third big button. */
.action-list { margin: 0 -8px; border-top: 1px solid var(--line); padding-top: 6px; }
.action-list > li + li { border-top: 0; }
.action-list .row { min-height: 60px; padding: 8px; border-radius: var(--r-ctl); }
.action-list > li:first-child > .row, .action-list > li:last-child > .row { border-radius: var(--r-ctl); }
.action-list .row-title { font-size: var(--text-body); }
.apply-price { display: grid; gap: 2px; }
.apply-price strong { font-size: 34px; font-weight: 750; letter-spacing: -.025em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.apply-price small { color: var(--ink-3); font-size: var(--text-small); }
.apply-price-sm strong { font-size: 24px; }
.detail-main { display: grid; gap: 28px; min-width: 0; }
.facts { gap: 8px; }
.facts { gap: 8px 22px; }
.facts .chip { min-height: 32px; padding: 0; background: none; color: var(--ink); font-size: var(--text-body); font-weight: 550; }
.facts .chip .ico { width: 20px; height: 20px; color: var(--accent-ink); }
.detail-section { display: grid; gap: 12px; }
.prose { color: var(--ink-2); font-size: var(--text-lead); line-height: 1.6; max-width: 65ch; }
.amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 16px; padding: 10px 18px; }
.amenities li { display: flex; align-items: center; gap: 10px; min-height: 42px; font-weight: 550; }
.amenities .ico { color: var(--green); }
.question-list .row-title { font-weight: 550; }
.q-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--text-meta); font-weight: 700; flex: none; }

/* Auth */
.auth { display: grid; place-items: start center; padding: 8px 0 24px; }
.auth-card { width: min(100%, 460px); display: grid; gap: 22px; padding: 30px; border-radius: var(--r-photo); }
.auth-wide .auth-card { width: min(100%, 560px); }
.auth-mark { justify-self: center; }
.auth-copy { display: grid; gap: 6px; text-align: center; }
.auth-copy .lede { font-size: 16px; }
.auth-card .btn-primary { min-height: 52px; font-size: 16px; }
.auth-alt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-sheet); background: var(--surface-2); transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.auth-alt:hover { background: var(--surface-3); }
.auth-alt:active { transform: scale(.985); }
.auth-alt > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.auth-alt strong { font-size: var(--text-small); }
.auth-alt small { color: var(--ink-3); }
.auth-alt .chev { width: 18px; height: 18px; color: var(--ink-4); }
.auth-foot { text-align: center; font-size: var(--text-small); color: var(--ink-3); }

/* Applications */
.app-card { display: grid; gap: 16px; }
.app-top { display: flex; align-items: center; gap: 14px; }
.app-thumb { width: 72px; height: 54px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-3); }
.app-thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-thumb .photo-pending { min-height: 0; }
.app-thumb .photo-pending strong { display: none; }
.app-thumb .photo-pending .ico { width: 20px; height: 20px; }
.app-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.app-title h2 { font-size: var(--text-lead); }
.app-copy { color: var(--ink-2); font-size: var(--text-small); }
.apply-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.apply-summary { position: sticky; top: calc(var(--bar-h) + var(--bar-gap) + 20px); display: grid; gap: 14px; padding: 14px 14px 18px; border-radius: var(--r-photo); }
.apply-summary-photo { aspect-ratio: 4 / 3; border-radius: var(--r-sheet); overflow: hidden; background: var(--surface-3); }
.apply-summary-photo img { width: 100%; height: 100%; object-fit: cover; }
.apply-summary-copy { display: grid; gap: 4px; padding: 0 6px; }
.summary-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.apply-summary > .meta { padding: 0 6px; }
.apply-form { display: grid; gap: 18px; min-width: 0; }
.applying-as { padding: 0 4px; }
.form-section { display: grid; gap: 16px; margin: 0; padding: 22px; border: 0; border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow-sheet); min-width: 0; }
.form-section legend { float: left; width: 100%; padding: 0; font-size: var(--text-lead); font-weight: 650; }
.form-section legend + * { clear: both; }
.apply-form > .btn-primary { min-height: 54px; font-size: 16px; }

/* Account frame */
.account { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.account-rail { position: sticky; top: calc(var(--bar-h) + var(--bar-gap) + 20px); }
.account-rail nav { display: grid; gap: 2px; }
.account-rail a { display: flex; align-items: center; gap: 12px; min-height: var(--tap-lg); padding: 0 10px; border-radius: var(--r-ctl); font-size: var(--text-body); font-weight: 600; color: var(--ink-2); transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.account-rail .nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Group captions and attention counts, shared by the rail and the phone drawer. */
.nav-caption { display: block; padding: 18px 10px 6px; font-size: var(--text-meta); font-weight: 650; color: var(--ink-3); }
.nav-count { flex: none; padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--text-pill); font-weight: 700; line-height: 1.3; white-space: nowrap; }
.account-rail a:hover { color: var(--ink); background: var(--tint); }
.account-rail a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sheet); }
.rail-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--ink-3); flex: none; }
.rail-ico .ico { width: 19px; height: 19px; }
.account-rail a.active .rail-ico { background: var(--accent-soft); color: var(--accent-ink); }
.account-main { min-width: 0; }
.account-back { margin-bottom: 16px; }

/* Overview */
.dash-head { display: grid; gap: 6px; margin-bottom: 22px; }
.dash-head h1 { font-size: var(--text-display); letter-spacing: -.03em; line-height: 1.04; }
.dash-head .lede { max-width: 56ch; }
.status-list .row { min-height: 72px; }
.status-list .row-title { font-size: var(--text-lead); }
.row-status { display: flex; margin-top: 6px; }
.dash { display: grid; grid-template-columns: minmax(0, 760px); gap: 24px; align-items: start; }
.dash-main, .dash-side, .dash-empty { display: grid; gap: 22px; min-width: 0; }
.dash-empty { max-width: 640px; }
.home-hero { display: grid; gap: 12px; border-radius: var(--r-photo); }
.home-hero-photo { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-photo); overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-sheet); }
.home-hero-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.home-hero:hover img { transform: scale(1.02); }
.home-hero-copy { display: grid; gap: 2px; padding: 0 4px; }
.home-hero-copy strong { font-size: var(--text-title); letter-spacing: -.01em; }
.home-hero-copy small { color: var(--ink-3); font-size: var(--text-small); }
.home-hero .photo-chip { left: 14px; bottom: 14px; }
.home-hero-plain { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 16px 20px; background: var(--surface); border-radius: var(--r-sheet); box-shadow: var(--shadow-sheet); }
.home-hero-plain .home-hero-copy { padding: 0; }
.lease-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-meta); font-weight: 600; white-space: nowrap; }
.lease-chip .ico { width: 15px; height: 15px; }
.app-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.app-row .track { grid-column: 1 / -1; }
.avatar-sm { width: 38px; height: 38px; font-size: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.avatar-you { background: var(--surface-3); color: var(--ink-2); }

/* Rent and payments */
.rent-hero { display: grid; gap: 14px; padding: 24px; border-radius: var(--r-photo); }
.rent-hero-main { display: grid; gap: 2px; }
.rent-hero-main strong { font-size: 44px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rent-hero-main span:last-child { color: var(--ink-2); font-weight: 550; }
.rent-hero-kv { background: var(--surface-2); border-radius: var(--r-ctl); }
.row-end .btn-sm { min-height: var(--tap); }
.row-action { display: block; margin-top: 10px; }
.row-action .btn { min-height: 46px; }

/* Repairs */
.request-list > li + li { border-top: 1px solid var(--line); }
.request { display: grid; gap: 10px; padding: 16px 18px; }
.request-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.request-copy { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-strip a { display: block; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-ctl); overflow: hidden; background: var(--surface-3); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.photo-remove::after { content: ''; position: absolute; inset: -4px; }
.photo-remove .ico { width: 16px; height: 16px; }
.photo-add { display: grid; place-items: center; align-content: center; gap: 6px; aspect-ratio: 1; border-radius: var(--r-ctl); border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-meta); font-weight: 650; transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.photo-add:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.photo-add:active { transform: scale(.96); }
.photo-add .ico { width: 24px; height: 24px; }
.photo-add.is-busy { opacity: .6; cursor: progress; }
.form-home { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.form-home .ico { width: 18px; height: 18px; color: var(--accent-ink); }

/* Messages */
.thread.panel { padding: 0; }
.thread { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: min(calc(100dvh - 250px), 680px); min-height: 420px; padding: 0; overflow: hidden; border-radius: var(--r-photo); }
.thread-list { display: flex; flex-direction: column; gap: 8px; padding: 20px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface-2); }
.thread-day { align-self: center; margin: 8px 0 4px; }
.thread-day span { display: inline-block; padding: 3px 12px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-3); font-size: var(--text-pill); font-weight: 600; box-shadow: var(--shadow-sheet); }
.bubble { align-self: flex-start; max-width: min(78%, 520px); display: grid; gap: 4px; }
.bubble p { padding: 11px 15px; border-radius: 20px 20px 20px 6px; background: var(--surface); box-shadow: 0 1px 2px var(--tint); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { color: var(--ink-3); font-size: var(--text-meta); padding: 0 6px; }
.bubble.mine { align-self: flex-end; justify-items: end; }
.bubble.mine p { background: var(--accent-fill); color: var(--on-accent); border-radius: 20px 20px 6px 20px; }
.thread-empty { margin: auto; }
.thread-compose { border-top: 1px solid var(--line); background: var(--surface); padding: 12px; }
.compose { display: grid; gap: 10px; }
.compose-home { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.compose-home select { min-height: var(--tap); padding-top: 8px; padding-bottom: 8px; border-radius: var(--r-pill); }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row textarea { flex: 1; min-height: 48px; max-height: 168px; padding: 12px 16px; border-radius: 24px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 16px; line-height: 1.4; resize: none; }
.compose-row textarea:focus { outline: none; background: var(--surface); border-color: var(--focus); box-shadow: var(--ring); }
.send-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); flex: none; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.send-btn:hover { background: var(--accent-fill-press); }
.send-btn:active { transform: scale(.92); }
.send-btn .ico { width: 21px; height: 21px; }
.compose-empty { padding: 4px; }

/* Condition reports */
.rooms { display: grid; gap: 16px; margin-top: 18px; }
.room { display: grid; gap: 16px; }
.room-head { display: flex; align-items: flex-end; gap: 10px; }
.room-name { flex: 1; }
.room-name input { font-weight: 650; }
.room-remove { color: var(--ink-3); }
.room-remove:hover { color: var(--red); background: var(--red-soft); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 7px; font-size: var(--text-small); font-weight: 600; }
.cond-seg label { padding: 0 10px; }
.cond-seg .cond-good:has(input:checked) { background: var(--green); color: var(--surface); }
.cond-seg .cond-needs-attention:has(input:checked) { background: var(--accent-fill); color: var(--on-accent); }
.add-room { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: var(--r-sheet); border: 1.5px dashed var(--line-2); color: var(--ink-2); font-weight: 650; transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.add-room:hover { background: var(--surface); color: var(--ink); }
.add-room:active { transform: scale(.985); }
.form-actions-end { justify-content: flex-end; }
.form-actions-end .btn { min-height: 50px; padding: 0 24px; }

/* Lease and guide */
.lease { display: grid; gap: 16px; margin-bottom: 22px; }
.lease-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0 4px; }
.lease-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.lease-grid .group:nth-child(2) { grid-row: span 2; }
.guide-row { align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
.guide-text { font-weight: 500; line-height: 1.5; }
.settings { display: grid; gap: 22px; max-width: 680px; }

/* Showings and questions: listing actions, the time picker (inline radio chips, never a bottom picker), and the
   guest request page. */
.visit-actions { display: grid; gap: 10px; }
.visit-hint { padding: 0 2px; }
.visit-hint:empty { display: none; }
.request-switch { margin-bottom: 2px; }
.manual-path > div { display: grid; gap: 6px; justify-items: start; }
/* An inline action inside help text: the line keeps its height, the tap area is grown to 44px around it. */
.inline-action { position: relative; display: inline; min-height: 0; padding: 0; }
.inline-action::after { content: ''; position: absolute; inset: -14px -8px; }
.manual-path .btn { margin-top: 4px; }
.zone-note { margin-top: -8px; }
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; overscroll-behavior-x: contain; }
.day-chip, .time-chip { position: relative; cursor: pointer; transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.day-chip input, .time-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.day-chip { flex: none; display: grid; justify-items: center; gap: 1px; min-width: 92px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--line); scroll-snap-align: start; }
.day-chip:hover, .time-chip:hover { border-color: var(--line-2); }
.day-chip:active, .time-chip:active { transform: scale(.97); }
.day-dow { font-size: var(--text-meta); font-weight: 650; color: var(--ink-3); }
.day-date { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.day-count { font-size: var(--text-pill); color: var(--ink-3); }
.day-chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.day-chip:has(input:checked) .day-dow, .day-chip:has(input:checked) .day-count { color: color-mix(in srgb, var(--surface) 78%, transparent); }
.day-chip:has(input:focus-visible), .time-chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; margin-top: 10px; }
.time-chip { display: flex; align-items: center; justify-content: center; min-height: var(--tap-lg); padding: 0 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.time-chip:has(input:checked) { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.slot-summary { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-small); }
.slot-summary .ico { width: 18px; height: 18px; color: var(--accent-ink); }
.slot-summary strong { color: var(--ink); }
.slot-loading { display: flex; gap: 8px; }
.skeleton-chip { width: 92px; height: 76px; flex: none; }
.slot-empty { display: grid; gap: 12px; }
.guest-rest { display: grid; gap: 18px; min-width: 0; }
.guest-rest > .btn-primary { min-height: 54px; font-size: 16px; }
.consent { padding: 4px 4px 0; }
.fine-print { padding: 0 4px; margin-top: -6px; }
.request-head .page-head-copy { justify-items: start; }
.request-head .pill { margin-bottom: 4px; }
.request-status { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.request-main { min-width: 0; }
.request-main .kv-list .link { min-height: 0; }
.request-notice { color: var(--ink-2); line-height: 1.5; padding: 0 4px; max-width: 62ch; }
.ref-card { position: sticky; top: calc(var(--bar-h) + var(--bar-gap) + 20px); display: grid; gap: 12px; border-radius: var(--r-photo); }
.ref-card h2 { font-size: var(--text-lead); }
.ref-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-ctl); background: var(--surface-2); }
.ref-code { flex: 1; min-width: 0; font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.ref-row .btn { flex: none; }
.notice .link { min-height: 0; }
.prescreen-box:empty { display: none; }
.prescreen-note { margin-top: -6px; }
.prescreen .req, .prescreen .muted { font-weight: 500; color: var(--ink-3); }
.prescreen textarea { min-height: 76px; }
.prescreen fieldset.field legend { margin-bottom: 9px; }
.choice-list { display: grid; gap: 8px; }
.choice-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid transparent; cursor: pointer; font-size: var(--text-body); line-height: 1.35; transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.choice-row:hover { border-color: var(--line-2); }
.choice-row input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent-fill); }
.choice-row:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); }
.choice-row:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The choice group is a .field, so undo the text-input look on its radios. */
.choice-row input, .choice-row input:hover, .choice-row input:focus { min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; }
.choice-row input:focus-visible { outline: none; }
.prescreen-broken .btn { margin-top: 4px; }
.clear-answer { justify-self: start; min-height: var(--tap); margin-top: 2px; font-size: var(--text-small); }
.prefix-field { display: flex; align-items: flex-start; gap: 4px; border-radius: var(--r-ctl); border: 1px solid transparent; background: var(--surface-2); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.prefix-field:focus-within { background: var(--surface); border-color: var(--focus); box-shadow: var(--ring); }
.input-prefix { flex: none; margin: 11px 0 0 10px; padding: 2px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--text-meta); font-weight: 700; line-height: 1.5; }
.prefix-field textarea, .prefix-field textarea:hover, .prefix-field textarea:focus { flex: 1; min-width: 0; background: transparent; border-color: transparent; box-shadow: none; padding-left: 6px; }
.field-error { color: var(--red); font-size: var(--text-meta); font-weight: 600; }
.field-note { color: var(--accent-ink); font-weight: 600; }
.prescreen-q.has-error textarea, .prescreen-q.has-error .prefix-field { border-color: var(--red); background-color: var(--red-soft); }
.prescreen-q.has-error .choice-row { border-color: var(--red-line); }
.prescreen-q.has-error .prefix-field textarea { border-color: transparent; background-color: transparent; }
.apply-summary-photo .photo-pending { min-height: 0; }

/* Welcome page with no open homes: a short hero and one calm empty state. The header buttons are the ways in. */
.welcome-hero { display: grid; gap: 10px; max-width: 760px; margin-bottom: 24px; }
.welcome-hero h1 { font-size: var(--text-display); letter-spacing: -.03em; line-height: 1.06; }
.welcome-empty { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.welcome-empty .empty-art { margin: 0; flex: none; }
.welcome-empty h2 { font-size: var(--text-title); margin-bottom: 4px; }
.welcome-empty p { color: var(--ink-3); max-width: 60ch; }

@media (max-width: 1100px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .account { grid-template-columns: 248px minmax(0, 1fr); gap: 28px; }
  .account-rail .nav-label { white-space: normal; }
  .detail { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 28px; }
}

@media (max-width: 900px) {
  .welcome-empty { align-items: flex-start; }
  .phone-only { display: block; }
  .page-head { margin-bottom: 18px; }
  .browse-intro { margin-bottom: 18px; align-items: flex-start; flex-direction: column; }
  .filters { gap: 8px; }
  .filter-main { flex-basis: 100%; }
  .filter-toggle { display: grid; }
  .filter-extra { display: none; flex-basis: 100%; gap: 8px; }
  .filters.is-open .filter-extra { display: flex; }
  .filters .seg { flex: 1 1 100%; }
  .filters .seg label { flex: 1; padding: 0 8px; }
  .sort-field { flex: 1 1 100%; }
  .tile-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .home-feature { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .feature-body { gap: 8px; }
  .feature-body h2 { font-size: 24px; }
  .feature-body { justify-items: stretch; }
  .feature-body .feature-cta { width: 100%; }
  .feature-price strong { font-size: 30px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .panel { padding: 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  /* A row with an action (a charge's pay button): the button spans the row under the title and amount, so its label
     never pushes the card past the screen edge. */
  .row:has(.row-action) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px; }
  .row:has(.row-action) > .row-main { display: contents; }
  .row:has(.row-action) > .row-icon { grid-row: 1 / span 2; align-self: center; }
  .row:has(.row-action) .row-title { grid-column: 2; grid-row: 1; }
  .row:has(.row-action) .row-meta { grid-column: 2; grid-row: 2; }
  .row:has(.row-action) > .row-end { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .row:has(.row-action) .row-action { grid-column: 1 / -1; grid-row: 3; }

  .detail { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .detail .gallery { order: -1; margin: 0 calc(var(--gutter) * -1 + 6px); border-radius: var(--r-photo); overflow: visible; background: none; }
  .gallery-track { display: flex; height: auto; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border-radius: var(--r-photo); }
  .gallery-track::-webkit-scrollbar { display: none; }
  .shot, .gallery .shot-overflow { display: block; flex: 0 0 100%; aspect-ratio: 4 / 3; scroll-snap-align: center; border-radius: var(--r-photo); }
  .gallery.is-expanded .gallery-track { display: flex; }
  .gallery .more-photos { display: none; }
  .gallery-count { display: inline-flex; }
  .gallery > .photo-pending { aspect-ratio: 4 / 3; border-radius: var(--r-photo); }
  .detail-head h1 { font-size: 30px; }
  .apply-card { position: static; align-self: stretch; padding: 20px; } /* full width even when its hint is one short line */
  .detail-main { gap: 24px; }
  .prose { font-size: 16px; }

  .auth { padding-top: 0; }
  .auth-card { padding: 22px 18px; gap: 18px; }
  .auth-mark { display: none; }

  .apply-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .apply-summary { position: static; grid-template-columns: 96px minmax(0, 1fr); align-items: center; padding: 10px; gap: 12px; border-radius: var(--r-sheet); }
  .apply-summary-photo { border-radius: 12px; }
  .apply-summary-copy { padding: 0; gap: 2px; }
  .apply-summary-copy h2 { font-size: 16px; }
  .apply-summary > .meta { grid-column: 1 / -1; padding: 0 4px 4px; }
  .apply-price-sm strong { font-size: 18px; }
  .request-status { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ref-card { position: static; }
  .day-strip { margin: 0 -18px; padding: 2px 18px 6px; scroll-padding: 0 18px; scrollbar-width: none; }
  .day-strip::-webkit-scrollbar { display: none; }
  .time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .time-chip { padding: 0 6px; white-space: nowrap; } /* "11:00 AM" stays on one line in a third of a phone */
  .request-actions { display: grid; }
  .apply-summary-photo .photo-pending strong { display: none; }
  /* Question and showing pages on a phone: a one-row summary so the form starts in the first screen. */
  .request-layout { gap: 16px; }
  .request-layout .apply-summary { grid-template-columns: 76px minmax(0, 1fr); padding: 8px 12px 8px 8px; gap: 12px; }
  .request-layout .apply-summary-photo { aspect-ratio: 1; border-radius: 12px; }
  .request-layout .apply-summary-copy h2 { font-size: 17px; line-height: 1.25; }
  .request-layout .summary-specs { display: none; }
  .request-layout .apply-price-sm { display: flex; align-items: baseline; gap: 6px; }
  .request-layout .apply-price-sm small { font-size: var(--text-meta); }
  .request-layout .guest-form { gap: 16px; }
  .page-head:has(+ .request-layout) { margin-bottom: 16px; }
  .request-actions .btn { width: 100%; }
  .form-section { padding: 18px; }

  .account { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .account-rail { display: none; }
  .account-back { margin-bottom: 14px; }
  .dash-head h1 { font-size: 32px; }
  .dash-head { margin-bottom: 18px; }
  .dash, .dash-main, .dash-side { gap: 22px; }
  .home-hero-photo { aspect-ratio: 2 / 1; }
  .home-hero { gap: 10px; }
  .home-hero-copy strong { font-size: 18px; }
  .home-hero-plain { grid-template-columns: 1fr; justify-items: start; }
  .rent-hero-main strong { font-size: 38px; }
  .thread { height: calc(100dvh - 236px); min-height: 380px; border-radius: var(--r-sheet); }
  .thread-list { padding: 14px; }
  .bubble { max-width: 86%; }
  .lease-grid { grid-template-columns: minmax(0, 1fr); }
  .lease-grid .group:nth-child(2) { grid-row: auto; }
  .form-actions-end .btn { flex: 1; }
}
