/* These overrides apply only to an explicitly embedded map. Keep the DOM:
   camera labels still read the navigation and bottom-control rectangles. */
html[data-embed=true],html[data-embed=true] body{height:100%;overflow:hidden}
html[data-embed=true] #experience{height:100%;min-height:0}
html[data-embed=true] .map-ui>header,html[data-embed=true] .intro{display:none}
/* Standalone touch navigation leaves the React host behind. Keep a native
   return link in the map and in the top-layer building dialog. */
.standalone-map-exit{position:absolute;z-index:8;top:max(16px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right));display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 16px 0 9px;border:1px solid #ffffff80;border-radius:999px;background:#213b38;color:#f0f3f1;font:13px/1.2 Futura,sans-serif;box-shadow:0 4px 18px #193b3820;white-space:nowrap;text-decoration:none;touch-action:manipulation}
.standalone-map-exit>span:first-child{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#f0f3f1;color:#213b38;font-size:22px;line-height:1}
.standalone-map-exit:focus-visible{outline:3px solid #92772c;outline-offset:3px}
html[data-embed=true] .standalone-map-exit{display:none}
html:not([data-embed=true]) .map-ui>header .back,body.selected #map-exit{display:none}
#detail .standalone-map-exit{right:auto;left:max(16px,env(safe-area-inset-left));z-index:5}
html:not([data-embed=true]) #detail .showroom-heading{top:max(84px,calc(env(safe-area-inset-top) + 68px))}
body[data-preview=true] .standalone-map-exit{display:none}
html[data-embed=true] .navigation-tools{top:22px;right:22px}
html[data-embed=true] .bottom-bar{right:22px;bottom:74px}
html[data-embed=true] footer{left:22px;right:auto;bottom:18px}
html[data-embed=true] #building-results{max-height:max(100px,calc(100svh - 250px))}
html[data-embed=true] #about{max-height:calc(100% - 32px);overflow:auto}
/* The live scene owns its information controls. Credits stay visible and the
   existing native About dialog keeps focus/keyboard handling unchanged. */
footer .map-credits{display:flex;flex-wrap:wrap;gap:4px 14px;min-width:0}
footer .map-credits a{text-decoration:underline;text-underline-offset:3px}
footer #about-open{display:grid;place-items:center;min-width:44px;min-height:44px}
footer .map-info-mark{display:grid;place-items:center;width:24px;height:24px;border:1px solid #879e9588;border-radius:50%;background:transparent;font:13px/1 Futura,sans-serif}
/* Sources belong together at the lower-left edge, with no permanent surface.
   Scope this to the map UI: the building summary has its own unrelated footer. */
.map-ui > footer{right:auto;max-width:calc(100% - 32px);background:transparent;padding:0;border:0;box-shadow:none}
.map-ui > footer #about-open{order:0}
.map-ui > footer .map-credits{order:1}
.map-ui > footer #map-help{order:2;margin-right:0}
/* A separate capture-only URL leaves the rendered 3D scene untouched. */
body[data-preview=true] .map-ui{visibility:hidden!important;pointer-events:none!important}
body[data-preview=true] .map-ui *{pointer-events:none!important}
@media(max-width:760px){
  html[data-embed=true] .navigation-tools{top:22px;left:18px;right:18px}
  html[data-embed=true] .bottom-bar{right:18px}
  html[data-embed=true] footer{left:18px;right:auto}
  footer{display:grid;grid-template-columns:44px minmax(0,1fr);gap:2px 10px}
  footer #about-open{grid-column:1;grid-row:1/3}
  footer #map-help,footer .map-credits{grid-column:2;margin:0}
}
