/* Map interaction only. Page figures keep their authored dimensions. */
a.m4-map-link { display: block; position: relative; width: fit-content; max-width: 100%; cursor: zoom-in; }
a.m4-map-link:focus-visible { outline: 3px solid #245f69; outline-offset: 4px; }
a.m4-map-link::after { content: "Enlarge map"; display: block; padding: .2rem 0; text-align: right; color: #245f69; font: 600 .8rem system-ui, sans-serif; }
.m4-map-dialog { box-sizing: border-box; width: calc(100vw - 24px); max-width: none; height: calc(100dvh - 24px); max-height: none; padding: 0; border: 1px solid #aab9b4; border-radius: 8px; background: #fffdf7; color: #252b2d; }
.m4-map-dialog[open] { display: flex; flex-direction: column; }
.m4-map-dialog::backdrop { background: rgb(15 27 29 / 80%); }
.m4-map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid #aab9b4; font: 14px system-ui, sans-serif; }
.m4-map-toolbar strong { margin-right: auto; color: #193f4a; }
.m4-map-toolbar button { background: #f7f5ee; color: #193f4a; border: 1px solid #aab9b4; border-radius: 4px; padding: .35rem .6rem; cursor: pointer; }
.m4-map-toolbar button:focus-visible { outline: 3px solid #245f69; outline-offset: 2px; }
.m4-map-toolbar button:disabled { opacity: .45; cursor: default; }
.m4-map-scale { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.m4-map-stage { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: none; }
.m4-map-stage.is-zoomed { cursor: grab; }
.m4-map-stage.is-dragging { cursor: grabbing; user-select: none; }
.m4-map-canvas { display: grid; place-items: center; width: max-content; min-width: 100%; min-height: 100%; padding: 16px; box-sizing: border-box; }
.m4-map-canvas img { display: block; max-width: none !important; max-height: none !important; height: auto !important; margin: 0; user-select: none; }
.m4-map-caption { margin: 0; padding: .6rem .8rem; max-height: 15vh; overflow: auto; border-top: 1px solid #aab9b4; font: 13px/1.4 system-ui, sans-serif; }
@media (max-width: 600px) { .m4-map-dialog { width: 100vw; height: 100dvh; border-radius: 0; } .m4-map-toolbar { gap: .35rem; } }
