:root {
  --blue: #2478f0;
  --blue-deep: #0753b4;
  --text: #142033;
  --muted: #6d788c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #dfefff;
  color: var(--text);
}

a,
button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

.map-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(223, 242, 255, 0.95) 0%, rgba(247, 251, 255, 0.98) 52%, #ffffff 100%);
}

.map-header {
  z-index: 2;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid rgba(36, 120, 240, 0.12);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.map-header h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.map-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.map-stage.is-dragging {
  cursor: grabbing;
}

.map-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  flex: 0 0 auto;
  transform-origin: center center;
  will-change: transform;
  box-shadow: 0 16px 40px rgba(20, 53, 92, 0.18);
}

.map-actions {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(36, 120, 240, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.map-actions button {
  min-width: 0;
  min-height: 40px;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.map-actions button:first-child,
.map-actions button:last-child {
  background: var(--blue);
  color: #fff;
}

.map-actions button:disabled {
  opacity: 0.45;
}

@media (min-width: 680px) {
  .map-shell {
    width: 430px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(20, 53, 92, 0.08), 0 20px 60px rgba(20, 53, 92, 0.2);
  }
}
