/* vector-map.css */
.vector-map-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.vector-map-tools button{min-width:34px;min-height:34px;padding:6px 12px;border:1px solid var(--control-border);border-radius:999px;background:var(--surface);color:var(--ink);font:500 13px Arial,sans-serif;cursor:pointer}
.vector-map-tools button[aria-pressed=true]{background:var(--action-bg);color:var(--action-ink)}
.vector-map-note{font-size:13px;line-height:1.5;color:var(--muted);margin:10px 0}
.vector-map-pin{display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;cursor:pointer}
.vector-map-pin>span{display:block;width:18px;height:20px;border-radius:5px;background:#176b65;position:relative;box-shadow:0 1px 3px #0005;pointer-events:none}
html[data-theme=dark] .vector-map-pin>span{background:#82cec3}
.vector-map-pin:focus-visible,.vector-map-tools button:focus-visible{outline:3px solid var(--teal);outline-offset:4px}
.maplibregl-popup{z-index:5}
.maplibregl-popup-content{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:20px;max-height:320px;overflow:auto}
.maplibregl-popup-content section+section{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.maplibregl-popup-close-button{width:44px;height:44px;font-size:24px;color:var(--ink)}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-top-color:var(--surface)}
.maplibregl-ctrl-group{background:var(--surface);border:1px solid var(--control-border)}
.maplibregl-ctrl-group button{width:34px;height:34px;min-width:34px;min-height:34px;padding:0}
.maplibregl-ctrl-group button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-position:center;background-repeat:no-repeat}
.maplibregl-ctrl-group button:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
html[data-theme=dark] .maplibregl-ctrl-icon{filter:invert(1)}
.maplibregl-ctrl-attrib{background:var(--surface);color:var(--muted);max-width:calc(100% - 10px)}
.maplibregl-ctrl-attrib a{color:var(--teal)}
@media(max-width:600px){.vector-map-tools button{flex:0 1 auto}.maplibregl-popup{max-width:calc(100vw - 44px)!important}.maplibregl-ctrl-attrib{font-size:10px}}
@media print{.vector-map-tools,.maplibregl-control-container{display:none}}

.maplibregl-popup .map-thumbnail{max-width:100%;height:auto}

/* Compact map tag: no scrolling shell, no image, no camera movement. */
.property-map-tag{position:absolute;z-index:650;box-sizing:border-box;padding:12px 36px 8px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:0 3px 14px #0003;font:14px/1.3 Arial,sans-serif;overflow:visible;max-height:none;text-align:left;cursor:default}
.property-map-tag strong{display:block;font-size:14px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.property-map-tag p{margin:4px 0 0;font-size:12px;line-height:16px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.property-map-tag a{display:flex;align-items:center;min-height:36px;padding:0;font-size:13px;line-height:18px;font-weight:700;color:var(--teal);white-space:nowrap}
.property-map-tag-close{position:absolute;right:2px;top:2px;display:grid;place-items:center;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:0;background:transparent;color:var(--ink);font:22px/1 Arial,sans-serif;cursor:pointer}
.property-map-tag a:focus-visible,.property-map-tag-close:focus-visible{outline:2px solid var(--teal);outline-offset:1px}

.property-map-tag-gallery{position:relative;height:104px;margin:0 -22px 8px -4px;border-radius:6px;overflow:hidden;touch-action:none;background:var(--line)}
.property-map-tag-gallery img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;pointer-events:none}
.property-map-tag-gallery button{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;min-width:32px;min-height:36px;width:32px;height:36px;border:0;border-radius:5px;padding:0;background:#202124dd;color:#fff;font:25px/1 Arial,sans-serif;cursor:pointer}
.property-map-photo-previous{left:4px}.property-map-photo-next{right:4px}
.property-map-tag-count{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);padding:2px 6px;border-radius:4px;background:#202124dd;color:#fff;font-size:10px}
.property-map-tag:has(.property-map-tag-gallery){padding-top:34px}
.property-map-tag-gallery:focus-visible,.property-map-tag-gallery button:focus-visible{outline:2px solid var(--teal);outline-offset:1px}

.property-map-tag-gallery img[hidden]{display:none}
.property-map-tag-gallery[data-photo-failed=true]::before{content:'Photo unavailable';position:absolute;inset:0;display:grid;place-items:center;font-size:12px;color:var(--ink)}

.vector-map-pin>span::before,.property-map-pin.building-pin>span::before{content:'';position:absolute;inset:3px;background:#fff;mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M3 1h10v14H9v-4H7v4H3V1zm2 2v2h2V3H5zm4 0v2h2V3H9zM5 7v2h2V7H5zm4 0v2h2V7H9z'/%3E%3C/svg%3E")}
html[data-theme=dark] .vector-map-pin>span::before,html[data-theme=dark] .property-map-pin.building-pin>span::before{background:#102523}
.property-map-pin.building-pin>span{position:relative;display:block;width:18px;height:20px;border:0;border-radius:5px;background:#176b65;box-shadow:0 1px 3px #0005}
html[data-theme=dark] .property-map-pin.building-pin>span{background:#82cec3}

/* Portfolio-only polish; detail maps retain the approved v57 appearance. */
.portfolio-map .property-map-tag{border-radius:8px;box-shadow:0 2px 4px #0002,0 8px 20px #0002}
.portfolio-map .property-map-tag-gallery button{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;min-width:44px;min-height:44px;width:44px;height:44px;border:0;border-radius:8px;padding:0;background:transparent;color:#fff;cursor:pointer}
.portfolio-map .property-map-tag-gallery button::before{content:'';display:block;width:9px;height:9px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);filter:drop-shadow(0 1px 2px #000) drop-shadow(0 0 1px #000)}
.portfolio-map .property-map-tag-gallery button.property-map-photo-next::before{transform:rotate(225deg)}
.portfolio-map .property-map-tag-gallery button:hover::before{filter:drop-shadow(0 1px 3px #000) drop-shadow(0 0 2px #000)}
/* A shared modest radius for the map's immediate search/filter/theme controls. */
html[data-theme] .listings-page :is(.search-input-wrap,#toggle-filters,.browse-toolbar .view-toggle,.filter-bar select,.location-controls input,.location-tools button),html[data-theme] .listings-page .theme-control select{border-radius:8px}
.portfolio-map .maplibregl-ctrl-attrib.maplibregl-compact{min-height:24px;padding:2px 24px 2px 2px;border-radius:5px}
.portfolio-map .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show){padding:0;width:24px;height:24px}
.portfolio-map .maplibregl-ctrl-attrib-button{width:24px;height:24px}

/* header-controls.css */
/* Shared directory header: navigation replaces the regional label. */
html[data-theme] .listings-page .masthead {max-width:1500px;margin-inline:auto;display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding-block:18px}
html[data-theme] .listings-page .masthead .header-nav {display:flex;flex:1;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:4px 20px;width:auto;max-width:none;margin:0 0 0 auto;padding:0;border:0;font-size:14px;line-height:1.25}
html[data-theme] .listings-page .header-nav a {min-height:44px;padding:10px 0;font-weight:650;color:var(--ink);white-space:nowrap}
html[data-theme] .listings-page .header-nav a:hover,html[data-theme] .listings-page .header-nav a[aria-current] {color:var(--teal)}
html[data-theme] .listings-page .masthead .header-contact {font-size:13px;white-space:nowrap;margin-left:0}
@media(max-width:1150px){html[data-theme] .listings-page .masthead .header-nav{order:4;flex-basis:100%;justify-content:flex-start;margin:0;gap:0 22px}html[data-theme] .listings-page .masthead .theme-control{margin-left:auto}}
@media(max-width:600px){html[data-theme] .listings-page .masthead{gap:10px;padding-block:12px}html[data-theme] .listings-page .masthead .header-nav{flex-wrap:nowrap;overflow-x:auto;gap:0 20px;max-width:100%;scrollbar-width:thin}html[data-theme] .listings-page .header-nav a{font-size:13px;flex-shrink:0}}
@media print{.header-nav,.theme-control{display:none!important}}

/* directory-layout.css */
/* The directory's three explicit modes share one map and one property list. */
#directory-results{min-width:0}
#directory-results [hidden]{display:none!important}
#directory-results[data-view=combined]{display:grid;grid-template-columns:minmax(300px,.88fr) minmax(0,1.12fr);gap:28px;align-items:start}
#directory-results[data-view=combined] #map-panel{grid-column:2;grid-row:1;position:sticky;top:24px;min-width:0}
#directory-results[data-view=combined] #property-map{height:min(70svh,740px);min-height:480px}
#directory-results[data-view=combined] #listings{grid-column:1;grid-row:1;grid-template-columns:1fr;min-width:0;gap:24px}
#directory-results[data-view=combined] .media{aspect-ratio:16/9}
#directory-results[data-view=combined] .card h3{font-size:24px}
#directory-results[data-view=map] #map-panel{position:static}
#directory-results[data-view=map] #property-map{height:min(72svh,760px);min-height:480px}
.listings-page .view-toggle button{white-space:nowrap}
@media(max-width:1000px){
 #directory-results[data-view=combined]{grid-template-columns:minmax(250px,.9fr) minmax(0,1.1fr);gap:20px}
 #directory-results[data-view=combined] .card h3{font-size:21px}
 #directory-results[data-view=combined] .property-facts{flex-wrap:wrap}
}
@media(max-width:760px){
 #directory-results[data-view=combined]{display:flex;flex-direction:column;gap:24px}
 #directory-results[data-view=combined] #map-panel{position:static;width:100%;order:0}
 #directory-results[data-view=combined] #listings{width:100%;order:1}
 #directory-results[data-view=combined] #property-map{height:48svh;min-height:320px;max-height:420px}
 #directory-results[data-view=map] #property-map{height:65svh;min-height:360px;max-height:620px}
 .listings-page .browse-toolbar{flex-wrap:wrap;gap:10px}
 .listings-page .browse-toolbar .view-toggle{flex:1;min-width:248px}
 .listings-page .browse-toolbar .view-toggle button{flex:1;min-width:0;padding-inline:10px}
}

/* Use the screen, with quiet gutters rather than a centered fixed-width canvas. */
html[data-theme] .listings-page{--directory-gutter:clamp(16px,2vw,32px)}
html[data-theme] .listings-page .masthead,
html[data-theme] .listings-page .intro,
html[data-theme] .listings-page .collection{max-width:none;width:100%;padding-inline:var(--directory-gutter)}
html[data-theme] .listings-page .masthead{min-height:64px;padding-block:10px;gap:10px 16px}
html[data-theme] .listings-page .intro{padding-block:14px 12px}
html[data-theme] .listings-page .intro h1{font-size:clamp(26px,2.6vw,36px);line-height:1.15}
html[data-theme] .listings-page .catalog-controls{margin-bottom:8px}
html[data-theme] .listings-page .section-heading{padding:8px 0}
html[data-theme] .listings-page .listing-freshness{margin:0 0 10px}
@media(min-width:761px){
 #directory-results[data-view=combined]{grid-template-columns:minmax(300px,min(42%,var(--directory-card-column,356px))) minmax(0,1fr);gap:20px}
 #directory-results[data-view=combined] #property-map,
 #directory-results[data-view=map] #property-map{height:var(--directory-map,calc(100svh - 270px));min-height:300px;max-height:none}
 #directory-results[data-view=combined] #map-panel{top:calc(var(--site-header-height,64px) + 16px);z-index:0}
 #directory-results .media{width:100%;max-height:var(--directory-photo,260px)}
 html[data-theme] .listings-page #directory-results .card-body{padding:14px 18px 0}
 html[data-theme] .listings-page #directory-results .listing-meta{margin-bottom:8px}
 html[data-theme] .listings-page #directory-results .card h3{font-size:22px;margin-bottom:6px;line-height:1.2}
 html[data-theme] .listings-page #directory-results .address{margin-bottom:10px}
 html[data-theme] .listings-page #directory-results .property-facts{padding-top:10px;margin-bottom:8px;gap:14px}
 html[data-theme] .listings-page #directory-results .availability{margin-bottom:10px}
 html[data-theme] .listings-page #directory-results .card-action{padding:10px 0;min-height:44px}
 #directory-results #map-status{margin:6px 0 2px;font-size:13px}
}
@media(max-width:760px){
 html[data-theme] .listings-page .masthead{padding-block:10px}
 html[data-theme] .listings-page .intro{padding-block:12px}
 /* Stacking stays readable on phones; do not squeeze two panels into one screen. */
 #directory-results .media{max-height:none}
}

/* Stable edge-to-edge previews open the complete uncropped image in a viewer. */
html[data-theme] .listings-page #directory-results .media{aspect-ratio:16/9;background:var(--surface-alt)}
html[data-theme] .listings-page #directory-results .media img,
html[data-theme] .listings-page #directory-results .card:hover .media img{object-fit:cover;object-position:center;transform:none}
@media(min-width:761px){
 html[data-theme] .listings-page #directory-results .card-body{padding:10px 16px 0}
 html[data-theme] .listings-page #directory-results .listing-meta{margin-bottom:5px;gap:8px}
 html[data-theme] .listings-page #directory-results .card h3{font-size:20px;line-height:1.2;margin-bottom:4px}
 html[data-theme] .listings-page #directory-results .address{font-size:13px;line-height:1.4;margin-bottom:7px}
 html[data-theme] .listings-page #directory-results .property-facts{padding-top:8px;margin-bottom:5px;gap:12px}
 html[data-theme] .listings-page #directory-results .property-facts .fact-label{margin-bottom:3px}
 html[data-theme] .listings-page #directory-results .property-facts strong{font-size:17px;line-height:1.3}
 html[data-theme] .listings-page #directory-results .availability{font-size:12px;line-height:1.4;margin-bottom:7px}
 html[data-theme] .listings-page #directory-results .card-action{padding:8px 0;min-height:40px}
}

/* Results insertion/removal must never anchor the viewport to the lower page. */
html[data-theme] .listings-page{overflow-anchor:none}

/* Optional location controls stay readable and operable on narrow screens. */
.listings-page .location-controls{min-width:0;flex-wrap:wrap}
.listings-page .location-controls input{min-width:0;max-width:100%;flex:1 1 180px}
.listings-page .location-controls button,.listings-page .place-results button{min-height:44px;white-space:normal}
.listings-page .location-attribution{flex-basis:100%;font-size:11px;color:var(--muted);margin-top:8px}
.listings-page .location-attribution summary{cursor:pointer;min-height:32px}
.listings-page .location-attribution p{max-width:600px;margin:6px 0}
.listings-page footer{flex-wrap:wrap}
@media(max-width:600px){.listings-page .location-controls input{flex-basis:100%;width:100%}.listings-page .place-results button{width:100%;text-align:left}.listings-page .location-tools{padding:16px}}

/* sticky-header.css */
/* In-flow sticky headers retain the initial viewport budget and native tab order. */
html {--site-header-height:64px;--site-brand-header-height:64px}
html[data-theme] body > :is(.masthead,.portal-header,.geo-header){position:sticky;top:0;z-index:1000;background:var(--surface,#fff);isolation:isolate}
html[data-theme] body > .geo-nav{position:sticky;top:var(--site-brand-header-height);z-index:999;background:var(--surface,#fff)}
:is(.listings-page,.property-page,.geo-page) :is([id],a,button,input,select,textarea,[tabindex]){scroll-margin-top:calc(var(--site-header-height) + 16px)}
/* Nav stays one touch-friendly row rather than consuming a phone's viewport. */
@media(max-width:760px){html{--site-header-height:120px}html[data-theme] body > .geo-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap}html[data-theme] body > .geo-nav a{flex-shrink:0;min-height:44px}}
@media print{html[data-theme] body > :is(.masthead,.portal-header,.geo-header,.geo-nav){position:static}html{--site-header-height:0px}}
