.page-mapa { max-width: 1100px; }

.ruta-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.ruta-head h1 { margin: 0.2rem 0 0.4rem; }

.mapa-shell {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--bg-elevated);
}

.mapa-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 90%, var(--bg-soft));
}

.btn-map {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}

.mapa-progress {
  margin-left: auto;
  font-size: 0.88rem;
}

.mapa-ruta {
  width: 100%;
  height: min(62vh, 520px);
  border-radius: 0;
  border: none;
  overflow: hidden;
  box-shadow: none;
  background: var(--bg-soft);
}

.mapa-ruta-preview {
  height: min(42vh, 320px);
}

.mapa-shell-preview {
  margin-top: 0.35rem;
}

.mapa-shell:fullscreen {
  background: var(--bg);
  border-radius: 0;
}
.mapa-shell:fullscreen .mapa-ruta {
  height: calc(100vh - 58px);
}

.ruta-hint {
  margin: 0.35rem 0 0;
  max-width: 36rem;
  font-size: 0.9rem;
}


.ruta-panels {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.perfil-box,
.wp-box {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.perfil-box h2,
.wp-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

#perfil-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-soft) 70%, var(--bg-elevated));
}

.wp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  max-height: 320px;
  overflow: auto;
}

.wp-item {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.wp-item:hover { background: var(--accent-soft); }
.wp-item strong { display: block; }
.wp-item span,
.wp-item em {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  margin-top: 0.15rem;
}

.mapa-admin-preview {
  margin: 1rem 0 1.5rem;
  height: min(48vh, 420px);
}
.mapa-admin-hint { margin-top: -0.75rem; margin-bottom: 1.25rem; }


@media (max-width: 860px) {
  .ruta-panels { grid-template-columns: 1fr; }
  .mapa-ruta { height: 48vh; }
}
