.ski-map {
  background: #eaf2f5;
  isolation: isolate;
  touch-action: none;
}

.ski-map-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.ski-map-canvas.is-dragging {
  cursor: grabbing;
}

.ski-map-canvas.is-inspecting:not(.is-dragging) {
  cursor: crosshair;
}

@media (min-width: 550px) and (max-height: 500px) {
  #map-details { grid-area: 2 / 2; }
}

.ski-map-canvas:focus-visible {
  outline: 2px solid #006b78;
  outline-offset: -3px;
}

.ski-map-target {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid #006b78;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ski-map-canvas:focus-visible + .ski-map-target:not([hidden]) { display: block; }

.ski-map-compass,
.ski-map-scale {
  position: absolute;
  display: grid;
  justify-items: center;
  pointer-events: none;
  color: #183f57;
  font: 750 10px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.ski-map-compass {
  right: 12px;
  top: 12px;
  gap: 3px;
  width: 29px;
  padding: 5px 0;
  background: #f7fbfce8;
  border: 1px solid #68859b44;
  border-radius: 8px;
}

.ski-map-scale {
  left: 14px;
  bottom: 70px;
  gap: 3px;
  padding: 5px 6px;
  border-radius: 4px;
  background: #f7fbfce8;
}

.ski-map-scale i {
  height: 4px;
  border: 1px solid #183f57;
  border-top: 0;
}

.ski-map-notice {
  position: absolute;
  left: 50%;
  bottom: 70px;
  max-width: min(280px, 66%);
  margin: 0;
  padding: 6px 8px;
  transform: translateX(-50%);
  background: #f7fbfc;
  color: #183f57;
  border: 1px solid #68859b44;
  border-radius: 6px;
  font: 650 11px/1.35 system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
}

.ski-map-scale[hidden],
.ski-map-notice[hidden] {
  display: none;
}

@media (max-width: 375px) and (min-height: 501px) {
  .map-stage { --map-rail-top: 43px; }
  .map-stage .ski-map-compass {
    top: 5px;
    gap: 2px;
    padding-block: 3px;
  }
  .map-actions {
    top: var(--map-rail-top);
    gap: 2px;
  }
  .map-actions button { height: 44px; }
  .map-actions #map-feature-search { max-width: min(11rem, calc(100vw - 74px)); }

  .map-stage:has(.map-guidance:not([hidden])):has(#map-feature-search:not([hidden])) .map-info {
    padding-top: 52px;
  }
  .map-stage:has(.map-guidance:not([hidden])):has(#map-feature-search:not([hidden])) .map-heading {
    position: absolute;
    clip-path: inset(50%);
  }
  .map-stage:has(.map-guidance:not([hidden])) #map-feature-search {
    top: calc(12px - var(--map-rail-top));
    bottom: auto;
  }
}

@media (min-width: 550px) and (max-width: 849px) and (max-height: 340px) {
  .map-info { right: calc(263px + env(safe-area-inset-right)); }
  .map-actions {
    top: 66px;
    display: flex;
    align-items: center;
  }
  .zoom-actions { display: flex; }
  .zoom-actions button:first-child { border-radius: 9px 0 0 9px; }
  .zoom-actions button:last-child {
    border-top: 1px solid #b3c8d2;
    border-left: 0;
    border-radius: 0 9px 9px 0;
  }
  .map-actions #map-feature-search {
    right: auto;
    bottom: calc(100% + 7px);
    left: 0;
    max-width: 100%;
  }
}

