/* ── MAP PAGE ── */
.map-main {
  padding: 0;
  min-height: calc(100vh - 50px);
  display: flex;
  flex-direction: column;
  position: relative;
}

.map-main::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("/assets/tiles/desert_tile_64x64-5c28a26d.png");
  background-size: 512px 512px;
  opacity: 0.5;
  background-repeat: repeat;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: -1;
}

.map-main > * {
  position: relative;
  z-index: 1;
}

.map-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0px 40px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  background-color: var(--bg);

}

.map-container-wrapper {
  overflow-x: auto;
  margin-bottom: 28px;
  display: flex;
  justify-content: safe center;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

.map-container {
  display: grid;
  grid-template-columns: 512px 256px 512px;
  align-items: start;
}

.map-tile {
  image-rendering: pixelated;
  display: block;
}

.map-tile-wrapper {
  position: relative;
}

.map-step-name {
  position: absolute;
  bottom: 80%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 25px;
  font-weight: 700;
  font-family: 'Press Start 2P', serif;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
}
.map-step-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 256px;
  height: 256px;
  padding: 60px 40px;
  box-sizing: border-box;
}

.map-step-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.map-step-art {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform: translateY(-4px);
  object-fit: contain;
  image-rendering: pixelated;
  background: black;
}

.map-main .footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 40px 24px;
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  bottom: 0;
}
.map-main .footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.map-main .footer-links a:hover { color: var(--teal); }
.map-main .footer-links a svg { width: 13px; height: 13px; }
