.server-map-dialog {
  width: calc(100vw - 24px); max-width: none;
  height: calc(100vh - 24px); height: calc(100dvh - 24px);
  max-height: none; overflow: hidden;
}
.map-workspace { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.map-workspace:fullscreen { width: 100vw; height: 100vh; background: #111e27; }
.server-map-dialog > header { padding: 14px 24px; }
.map-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 24px; flex-shrink: 0; border-bottom: 1px solid #334954; }
.map-toolbar .server-button { min-width: 48px; min-height: 44px; padding: 8px 16px; font-size: 16px; }
.map-toolbar [data-map-zoom] { font-size: 24px; padding: 2px 14px; }
.map-toolbar [aria-pressed="true"] { border-color: #f8734f; background: #3b2924; }
.map-toolbar output { min-width: 50px; text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }
.map-viewport { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; touch-action: none; background: #08151d; cursor: grab; user-select: none; }
.map-viewport:active { cursor: grabbing; }
.map-viewport:focus-visible { outline: 2px solid #f8734f; outline-offset: -3px; }
.map-plane { position: absolute; top: 0; left: 0; width: 1000px; transform-origin: 0 0; will-change: transform; }
.map-plane > img { display: block; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.map-plane > .map-grid { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; fill: none; stroke: none; stroke-width: 0; pointer-events: none; }
.map-grid path { fill: none; stroke: #fff9; stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-grid text { font-family: Arial, sans-serif; font-weight: 600; fill: #fff; stroke: #07131ce6; stroke-width: 2.5px; paint-order: stroke; text-anchor: middle; dominant-baseline: middle; vector-effect: non-scaling-stroke; }
.map-load-state { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; color: #c1d0dc; background: #08151d; }
.map-footer { flex-shrink: 0; padding: 10px 24px; border-top: 1px solid #334954; color: #c3d3df; font-size: 14px; line-height: 1.6; }
.map-footer p + p { color: #9fb7c9; }
@media (max-width: 650px) {
  .server-map-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .server-map-dialog > header, .map-toolbar { padding: 10px 12px; }
  .map-toolbar { gap: 8px; }
  .map-toolbar .server-button { padding-inline: 12px; }
  .map-footer { padding: 8px 12px; font-size: 12px; }
}

/* Inline viewer: full image without JS, progressively enhanced zoom and pan. */
.server-map-inline { overflow: hidden; border: 1px solid #294552; border-radius: 4px; background: #0a1a24; }
.server-map-inline .map-workspace { min-width: 0; }
.server-map-inline .map-viewport { flex: none; aspect-ratio: 1; touch-action: pan-y pinch-zoom; cursor: default; }
.server-map-inline .map-plane { position: static; width: 100%; height: auto; will-change: auto; }
.server-map-inline .map-plane > img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.server-map-inline.is-interactive .map-plane { position: absolute; width: 1000px; height: 1000px; will-change: transform; }
.server-map-inline.is-interactive .map-plane > img { height: 100%; aspect-ratio: auto; }
.server-map-inline .map-viewport.is-zoomed { cursor: grab; touch-action: none; }
.server-map-inline .map-viewport.is-zoomed:active { cursor: grabbing; }
.server-map-inline .map-toolbar { padding: 10px; gap: 6px; background: #10212c; }
.server-map-inline .map-toolbar .server-button { font-size: 12px; min-height: 40px; min-width: 40px; padding: 7px 10px; }
.server-map-inline .map-toolbar [data-map-zoom] { font-size: 22px; padding: 0 9px; }
.server-map-inline .map-toolbar output { min-width: 28px; font-size: 12px; }
.server-map-inline .map-toolbar [data-map-fullscreen] { margin-left: auto; }
.server-map-inline .map-footer { padding: 10px 13px; font-size: 11px; line-height: 1.6; background: #10202a; }
.server-map-inline .map-workspace:fullscreen { padding: 0; }
.server-map-inline .map-workspace:fullscreen .map-viewport { flex: 1 1 0; aspect-ratio: auto; touch-action: none; }
@media (max-width: 600px) { .server-map-inline .map-toolbar .server-button { min-height: 44px; min-width: 44px; } }
