.map-screen {
  height: 100svh;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.map-body {
  position: relative;
  min-height: 0;
  border-block: 2px solid #080605;
}
.map-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
  cursor: grab;
  background: #181714;
}
.map-view:active { cursor: grabbing; }
.map-view:focus-visible { outline-offset: -3px; }
.map-terrain {
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  transform-origin: top left;
  pointer-events: none;
}
.map-markers { position: absolute; inset: 0; pointer-events: none; }
.map-marker {
  position: absolute;
  top: 0;
  left: 0;
  border: 2px solid #151515;
  box-shadow: 0 0 0 1px #dadada;
  padding: 0;
  width: 28px;
  height: 28px;
  background: #333;
  pointer-events: auto;
  cursor: pointer;
}
.map-marker img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.map-marker[aria-pressed="true"] { box-shadow: 0 0 0 2px #ffff55; z-index: 2; }
.map-marker.is-pinned::after {
  content: "";
  position: absolute;
  left: 7px;
  top: -8px;
  border-width: 0 5px 6px;
  border-style: solid;
  border-color: transparent transparent #ffff55;
  transform: rotate(var(--bearing));
  transform-origin: 50% 20px;
}
.map-controls, .map-coords { position: absolute; z-index: 3; left: 10px; }
.map-controls { top: 10px; display: flex; gap: 4px; }
.map-controls .menu-button { min-width: 38px; }
.map-coords { bottom: 10px; padding: 4px 8px; background: #000b; font-size: 13px; }
.map-profile {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  width: min(244px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  overflow: auto;
  padding: 10px;
  background: #151515 url(assets/menu-dirt.png) repeat 0 0 / 64px 64px;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px #6c625a;
}
.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.profile-header h2 { font-size: 16px; overflow-wrap: anywhere; }
.profile-header .menu-button { min-height: 32px; }
.skin-preview { display: block; width: 96px; height: 96px; margin: 4px auto; image-rendering: pixelated; }
.profile-stats { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; font-size: 13px; margin: 4px 0 10px; }
.profile-stats dd { margin: 0; text-align: right; }
.cape-profile { border-top: 1px solid #82776e; padding-top: 6px; text-align: center; }
.cape-profile h3, .cape-profile p { font-size: 13px; }
.cape-preview { width: 30px; height: 48px; margin-top: 5px; image-rendering: pixelated; }
@media (max-width: 600px) {
  .map-profile { top: auto; bottom: 10px; max-height: 72%; }
  .map-screen .screen-footer .menu-button { width: auto; }
}
