/* «Cómo llegar» */
.ruta-boton {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 11;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(243, 234, 219, 0.55);
  border-radius: 999px;
  background: rgba(13, 10, 8, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--tinta, #f3eadb);
  font: 500 0.72rem/1 var(--sans, system-ui, sans-serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.ruta-boton svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ruta-boton:hover { background: var(--ambar, #c8894a); border-color: var(--ambar, #c8894a); color: var(--fondo, #0d0a08); }
.ruta-boton:focus-visible { outline: 2px solid var(--tinta, #f3eadb); outline-offset: 4px; box-shadow: 0 0 0 6px rgba(13, 10, 8, 0.85); }

/* La pista «Desliza» cede su sitio al botón */
.pista { display: none; }

/* Hoja */
.ruta-hoja { position: fixed; inset: 0; z-index: 200; }
.ruta-hoja__fondo {
  position: absolute;
  inset: 0;
  background: rgba(13, 10, 8, 0.6);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ruta-hoja__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(520px, 100%);
  padding: 2.4rem clamp(20px, 5vw, 40px) calc(2rem + env(safe-area-inset-bottom));
  background: #16110d;
  border: 1px solid rgba(200, 137, 74, 0.35);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  color: var(--tinta, #f3eadb);
  transform: translate(-50%, 100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ruta-hoja.visible .ruta-hoja__fondo { opacity: 1; }
.ruta-hoja.visible .ruta-hoja__panel { transform: translate(-50%, 0); }

.ruta-hoja__cerrar {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1.6rem;
  cursor: pointer;
}
.ruta-hoja__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ambar, #c8894a);
}
.ruta-hoja__titulo {
  margin-top: 0.6rem;
  font-family: var(--serif, Georgia, serif);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1;
}
.ruta-hoja__direccion { margin-top: 0.5rem; color: var(--tinta-suave, rgba(243, 234, 219, 0.72)); font-size: 0.95rem; }
.ruta-hoja__estado { margin-top: 1.4rem; min-height: 1.5em; font-size: 0.95rem; }
.ruta-hoja__estado.cargando { animation: ruta-pulso 1.2s ease-in-out infinite; }
@keyframes ruta-pulso { 50% { opacity: 0.45; } }

.ruta-hoja__apps { display: grid; gap: 0.6rem; margin-top: 1.2rem; }
.ruta-app {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(243, 234, 219, 0.3);
  border-radius: 14px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.ruta-app:first-child { background: var(--ambar, #c8894a); border-color: var(--ambar, #c8894a); color: var(--fondo, #0d0a08); }
.ruta-app:hover { border-color: var(--tinta, #f3eadb); }
.ruta-app:focus-visible, .ruta-hoja__cerrar:focus-visible { outline: 2px solid var(--tinta, #f3eadb); outline-offset: 3px; }
.ruta-hoja__nota { margin-top: 1rem; font-size: 0.78rem; color: var(--tinta-suave, rgba(243, 234, 219, 0.72)); }

@media (max-width: 760px) {
  .ruta-boton { left: auto; right: var(--margen, 16px); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ruta-hoja__panel, .ruta-hoja__fondo { transition: none; }
  .ruta-hoja__estado.cargando { animation: none; }
}

/* Ventanas bajas: la hoja se puede desplazar en lugar de salirse por arriba */
.ruta-hoja__panel { max-height: 100svh; overflow-y: auto; }

/* En la carta, la barra de secciones ocupa el pie en tableta y móvil: el botón sube y va a la derecha */
@media (max-width: 1099px) {
  .pagina-carta .ruta-boton { left: auto; right: var(--margen, 16px); transform: none; bottom: 76px; }
}
