header.home-header {
  display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:20px;
  height:72px; padding:0 22px; background:white; color:#27362e; border-bottom:1px solid #e3e8e4;
}
.home-header nav { grid-column:2; grid-row:1; justify-content:safe center; display:flex; align-items:center; gap:clamp(8px,1vw,20px); overflow-x:auto; min-width:0; }
.home-header nav button { flex:none; padding:10px 1px; background:transparent; color:#47534d; border:0; border-radius:0; font-size:14px; }
.home-header nav button[aria-pressed=true] { color:#09794c; box-shadow:inset 0 -2px currentColor; }
header.home-header .home-brand {
  grid-column:1; grid-row:1; justify-self:start; display:flex; gap:7px;
  align-items:center; color:#172e22; font-size:clamp(15.3px,1.8vw,18px); font-weight:700; white-space:nowrap;
}
.home-header .home-brand .brand-icon { width:25.515px; height:29.16px; }


.home-brand i { background:#108052;color:white;border-radius:6px; }
header.home-header .home-account { justify-self:end;border:1px solid #dce4dd;border-radius:24px;padding:8px 15px;font-size:13px;white-space:nowrap; }
@media(max-width:1150px){
  header.home-header {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:0 10px;height:auto;padding:8px 14px 0;}

  header.home-header .home-account {grid-column:1;grid-row:1;justify-self:start;}
  .home-header nav {grid-row:2;grid-column:1/-1;gap:17px;padding-top:4px;}
  .home-header + main {height:calc(100dvh - 90px);}
}
@media(max-width:760px){.home-header + main {height:auto;}}

main.space-browser { display:grid;grid-template-columns:clamp(270px,23vw,360px) minmax(0,1fr);background:white;min-height:0; }
.space-browser:has(#spaceDetail:not([hidden])) { grid-template-columns:clamp(270px,23vw,360px) clamp(285px,24vw,400px) minmax(0,1fr); }
#mapViewport {position:relative;min-width:0;min-height:0;overflow:hidden;}
#mapViewport > #map {position:absolute;inset:0;width:100%;height:100%;min-height:0;}
.results-panel,#spaceDetail { min-width:0;overflow:auto;background:white;padding:16px;border-right:1px solid #dce4df; }
.results-panel h1 {font-size:24px;letter-spacing:-1px;}
.results-panel .sectiontitle {margin:14px 0 4px;padding-top:12px;}
.summary-card {display:flex;align-items:center;gap:12px;width:100%;min-height:94px;padding:12px 4px;text-align:left;border:0;border-bottom:1px solid #e1e7e3;border-radius:0;background:white;color:#243b31;}

.summary-card img {width:80px;height:80px;object-fit:cover;border-radius:5px;}
.summary-card>span {display:grid;gap:3px;min-width:0;}
.summary-card strong {font-size:16px;}
.summary-card span span {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#59685f;font-size:12px;font-weight:400;}
.detail-bar {display:flex;align-items:center;justify-content:space-between;padding-bottom:12px;border-bottom:1px solid #dde5df;}
#detailBody {display:grid;gap:10px;padding-top:14px;}
#detailBody img {width:100%;aspect-ratio:1.7;object-fit:cover;border-radius:6px;}
#detailBody a.primary {display:block;text-align:center;text-decoration:none;margin:0;}
#detailBody>a:last-child:not(.primary) {color:#506b5b;font-size:13px;}
@media(max-width:850px){
  main.space-browser,.space-browser:has(#spaceDetail:not([hidden])) {display:flex;flex-direction:column;height:auto;position:relative;}
  .space-browser #mapViewport {order:-1;height:38dvh;min-height:230px;}
  #spaceDetail:not([hidden]) {position:fixed;inset:0;z-index:20;padding:16px;overscroll-behavior:contain;}
  body:has(#spaceDetail:not([hidden])) {overflow:hidden;}
}
#openRequest {background:#176649;color:white;border:0;width:100%;font-size:13.5px;font-weight:400;}
.request-caption {font-size:12px;margin:6px 0 12px;color:#52665a;}
#requestDialog {margin:auto;max-height:90dvh;overflow:auto;}
#requestDialog h2 {font-size:20px;}
#requestForm textarea {resize:vertical;width:100%;padding:10px;font:inherit;border:1px solid #c8d2ca;border-radius:7px;}
#requestMessage:not(:empty) {margin-top:14px;font-size:14px;}
.results-panel .search-controls { margin-top:0; }
#spaceQuery::placeholder, #spaceCategory { font-size:90%; }
.results-panel .request-footer { margin-top:16px; }

.search-controls .category-field { position: relative; }
.category-field #spaceCategory { appearance: none; padding-right: 32px; }
.category-field::after {
  content: ""; position: absolute; top: 50%; right: 13px;
  width: 6px; height: 6px; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
#map { --marker-color:#3266D5; }
.space-marker,.space-count {display:flex;align-items:center;cursor:pointer;box-sizing:border-box;font-family:inherit;}
.space-marker {width:max-content;max-width:180px;height:28px;padding-right:8px;gap:4px;background:white;color:#18231e;border-radius:16px;box-shadow:0 1px 4px #21362938;}
.space-symbol,.space-count {display:grid;place-items:center;border-radius:50%;}
.space-symbol {width:28px;height:28px;flex:none;background:var(--marker-color);}
.space-symbol svg {width:17px;height:17px;}
.space-name {font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.space-count {width:42px;height:42px;background:var(--marker-color);color:white;border:2px solid white;box-shadow:0 1px 5px #21362942;font-size:16px;font-weight:750;}
#detailBody button.primary {margin:0;font-weight:400;}
.detail-gallery,.detail-videos {display:grid;gap:6px;}
.detail-gallery {grid-template-columns:repeat(4,minmax(0,1fr));}
#detailBody .detail-gallery img {aspect-ratio:1;display:block;}
.detail-videos {grid-template-columns:repeat(3,minmax(0,1fr));}
.detail-videos button {position:relative;padding:0;border:0;background:#172321;border-radius:5px;overflow:hidden;}
#detailBody .detail-videos img {display:block;aspect-ratio:16/9;border-radius:0;}
.detail-videos button::after {content:'▶';position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);background:#172321cc;border-radius:50%;color:white;line-height:24px;width:24px;font-size:12px;text-align:center;}
#tourDialog.video-player {height:auto;width:min(960px,96vw,calc((92dvh - 40px)*16/9));}
#tourDialog.video-player #tourFrame {display:block;flex:none;height:auto;aspect-ratio:16/9;background:black;}

.area-label {display:inline-block;white-space:nowrap;padding:3px 7px;background:white;border-radius:8px;color:#236747;font-size:12px;}

.detail-gallery button {display:block;min-width:0;padding:0;border:0;background:transparent;border-radius:6px;cursor:zoom-in;}
#tourDialog [hidden] {display:none!important;}
#detailPhotoPreview {display:block;width:100%;flex:1;min-height:0;object-fit:contain;background:#171b19;}
#detailBody .report-link {justify-self:start;align-self:start;width:fit-content;padding:4px 0;border:0;background:none;color:#56675e;font-size:12px;font-weight:400;text-decoration:underline;cursor:pointer;}
#reportDialog {width:min(420px,92vw);max-height:90dvh;margin:auto;padding:20px;overflow:auto;}
#reportDialog h2 {font-size:18px;}
#reportForm textarea {width:100%;box-sizing:border-box;resize:vertical;font:inherit;padding:8px;}
#reportForm[hidden] {display:none;}
#openFeedback {min-height:36px;padding:4px 12px;color:#486053;background:transparent;border:0;text-decoration:underline;font-size:13px;}
#feedbackDialog {width:min(420px,92vw);margin:auto;max-height:90dvh;overflow:auto;padding:20px;}
#feedbackDialog h2 {font-size:18px;}
#feedbackForm label {display:grid;gap:6px;margin:14px 0;}
#feedbackForm textarea {width:100%;padding:8px;font:inherit;resize:vertical;}
#feedbackForm[hidden] {display:none;}
.home-actions {grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:6px;}
@media(max-width:760px){
  header.home-header {grid-template-columns:auto minmax(0,1fr);}
  header.home-header .home-brand {grid-column:1;justify-self:start;gap:4px;}
  .home-actions {grid-column:2;}
}
#mapResults[hidden],#mapGuide[hidden]{display:none}
#mapGuide {color:#233e32;line-height:1.6;word-break:keep-all}
#mapGuide h2 {font-size:16px;margin:0}
.guide-features {margin:4px 0;padding:0;list-style:none}
.guide-features li {padding:14.52px 0}
.guide-features li+li {border-top:1px solid #e7ebe8}
.feature-camera {--ink:#21614a;--tint:#e3f3e9}
.feature-plan {--ink:#235680;--tint:#e5effa}
.feature-pin {--ink:#855124;--tint:#fff0dc}
.feature-call {--ink:#17636b;--tint:#def1f2}
.feature-web {--ink:#68448a;--tint:#f2eafa}
.guide-features svg {flex:none;box-sizing:border-box;width:32px;height:32px;padding:7px;border-radius:8px;background:var(--tint);color:var(--ink);fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#mapGuide h3 {display:flex;align-items:center;gap:8px;margin:0 0 6px;color:var(--ink);font-size:14px}
#mapGuide p {margin:1px 0 0;font-size:13px;color:#45534d}
#mapGuide .feature-plan p+p {margin-top:6px}
.feature-plan strong {color:var(--ink)}
#mapGuide details {margin:10px 0;color:#285a62;font-size:13px}
#mapGuide summary {cursor:pointer;font-weight:650;padding:3px 0}
#mapGuide details[open] p {margin:5px 0}
#toggleMapGuide[aria-expanded=true] {background:#dfefd4;color:#233e32}
#mapGuide #closeMapGuide {
  width:fit-content;
  min-height:26px;
  padding:3px 8px;
  font-size:12px;
  line-height:18px;
  border-radius:4px;
}
