dialog.map-dialog { width: min(48rem, calc(100vw - 1.5rem)); max-width: 100%; max-height: 92dvh; overflow-y: auto; }
.house-map { margin: 0 0 1rem; }
.map-tools, .map-zoom { display: flex; flex-wrap: wrap; gap: .4rem; }
.map-tools { margin: .5rem 0; }
.map-tools .btn, .map-zoom .btn { min-height: 2.75rem; }
.map-tools button[aria-pressed="true"] { outline: 2px solid var(--theme-focus); outline-offset: -2px; font-weight: 700; }
.map-frame { position: relative; overflow: hidden; border: 1px solid var(--theme-button-border); border-radius: .5rem; background: #5b6366; }
.map-frame canvas { display: block; width: 100%; height: clamp(13rem, 38dvh, 26rem); touch-action: none; cursor: crosshair; }
.map-frame canvas:focus-visible { outline: 3px solid var(--theme-focus); outline-offset: -3px; }
.map-zoom { position: absolute; right: .5rem; top: .5rem; flex-direction: column; }
.map-zoom .btn { min-width: 2.75rem; font-size: 1.2rem; background: var(--theme-button-bg); color: var(--theme-button-text); }
.map-attribution, .map-status, .map-edit-status { margin: .4rem 0; }
.outline-profile { flex: 1 1 10rem; }
.outline-profile summary { cursor: pointer; }
.outline-profile svg { display: block; width: 10rem; height: 6rem; margin: .25rem 0; }
.outline-profile polygon { stroke: var(--theme-focus); stroke-width: 2; fill: var(--theme-focus); fill-opacity: .15; }
@media (max-width: 540px) {
  dialog.map-dialog { width: calc(100vw - .75rem); max-height: 95dvh; }
  .map-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-tools .btn { white-space: normal; }
}
