/* A contained image viewer keeps the whole map visible, with optional zoom for its labels. */
html.map-viewer-open{overflow:hidden;padding-inline-end:var(--map-scrollbar-width,0px)}
html.map-viewer-open body{overflow:hidden}
.map-viewer{position:fixed;inset:0;margin:auto;width:min(1100px,calc(100% - 32px));height:min(960px,calc(100vh - 32px));height:min(960px,calc(100dvh - 32px));max-width:none;max-height:none;padding:0;border:1px solid #c5dce4;border-radius:12px;background:#fff;color:var(--ink);overflow:hidden}
.map-viewer[open]{display:flex;flex-direction:column}
.map-viewer::backdrop{background:#102b36d9;backdrop-filter:blur(3px)}
.map-viewer-header{display:flex;flex:none;align-items:center;gap:16px;padding:14px 20px;border-bottom:1px solid var(--line)}
.map-viewer-header h2{flex:1;min-width:0;font-size:clamp(1.125rem,2.2vw,1.5rem);line-height:1.3;text-wrap:balance}
.map-viewer-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--blue-dark);font:400 28px/1 Arial,sans-serif}
.map-viewer-viewport{display:flex;flex:1 1 auto;min-width:0;min-height:0;padding:16px;background:#eff7f9;overflow:auto;overscroll-behavior:contain}
.map-viewer-canvas{flex:none;margin:auto;background:#fff}
.map-viewer-canvas img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;user-select:none}
.map-viewer-status{max-width:40ch;margin:auto;text-align:center;overflow-wrap:normal}
.map-viewer-controls{display:flex;flex:none;align-items:center;justify-content:center;gap:10px;padding:12px 20px;border-top:1px solid var(--line);background:#fff}
.map-viewer-controls button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--blue-dark);font:400 26px/1 Arial,sans-serif}
.map-viewer-controls button:disabled{opacity:.4;cursor:default}
@media(hover:hover) and (pointer:fine){.map-viewer-controls button:not(:disabled):hover,.map-viewer-close:hover{background:var(--soft);border-color:var(--blue-dark)}}
.map-viewer-zoom{min-width:4ch;font-size:.875rem;font-weight:600;font-variant-numeric:tabular-nums;text-align:center}
.map-viewer :focus-visible{outline:3px solid var(--red-dark);outline-offset:3px}
.map-viewer-viewport:focus-visible{outline-offset:-4px}
.map-viewer--wide{width:min(1600px,calc(100% - 32px));height:min(760px,calc(100vh - 32px));height:min(760px,calc(100dvh - 32px))}
@media(max-width:430px),(max-height:500px){
 .map-viewer{width:calc(100% - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);border-radius:8px}
 .map-viewer-header{padding:8px 12px;gap:12px}
 .map-viewer-header h2{font-size:1rem}
 .map-viewer-viewport{padding:8px}
 .map-viewer-controls{padding:8px 12px;gap:8px}
}
@media(max-width:600px){
 html.large-text body[class] .map-viewer-header h2{font-size:min(1rem,10vw)}
}
@media print{.map-viewer{display:none!important}html.map-viewer-open,html.map-viewer-open body{overflow:visible}}
