/* ============================================================
   tour — tutorial de bienvenida (coachmarks nativos)
   Overlay full-screen con foco recortado + tarjeta-guía. Sigue
   el sistema v5: superficies oscuras, acento teal, mono caps.
   ============================================================ */

.tour {
  position: fixed;
  inset: 0;
  z-index: 1500; /* sobre bottom-tab (150) y modales (1000); bajo page-loader (2000) */
  display: none;
}

.tour.-open { display: block; }

/* Capa que oscurece todo. El recorte de foco se logra con un box-shadow
   gigante: el "hueco" queda transparente y el resto, atenuado. */
.tour__spotlight {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(8, 11, 10, 0.82);
  /* Solo animamos el oscurecido (box-shadow), nunca la geometría: el recorte
     tiene que coincidir EXACTO con el elemento iluminado, sin barridos ni lag
     que lo dejen "desfasado por pixeles". */
  transition: box-shadow 0.2s ease;
}

/* Con foco activo: anillo de acento alrededor del elemento iluminado. */
.tour__spotlight.-on {
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 0 9999px rgba(8, 11, 10, 0.82),
    0 0 24px rgba(10, 219, 198, 0.35);
}

/* Atrapa los clics fuera de la tarjeta (→ siguiente paso). */
.tour__catcher {
  position: fixed;
  inset: 0;
}

/* ── Tarjeta-guía ───────────────────────────────────────── */

.tour__card {
  position: fixed;
  width: min(380px, calc(100vw - 28px));
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  /* Sin transición de posición: la tarjeta aparece donde toca, sin barridos. */
  animation: tour-pop 0.18s ease both;
}

.tour__card.-centered {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes tour-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
}
.tour__card.-centered { animation: tour-pop-centered 0.22s ease both; }
@keyframes tour-pop-centered {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.98); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tour__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tour__eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.tour__close {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color 0.15s ease;
}
.tour__close:hover { color: var(--fg); }

/* ── Pasos ──────────────────────────────────────────────── */

.tour__stage { min-height: 132px; }

.tour__step[hidden] { display: none; }

.tour__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--line);
}

.tour__title {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink-bright);
  margin: 0 0 8px;
}

.tour__body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}

/* ── Pie: dots + acciones + hint ────────────────────────── */

.tour__foot { margin-top: 18px; }

.tour__dots {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.tour__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease, width 0.2s ease;
}
.tour__dot.-on {
  width: 18px;
  border-radius: 3px;
  background: var(--accent);
}

.tour__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tour__back { flex: 0 0 auto; }
.tour__next { flex: 1 1 auto; }

.tour__hint {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: center;
}

/* En pantallas chicas la tarjeta anclada se pega al borde inferior seguro. */
@media (max-width: 480px) {
  .tour__card { width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .tour__spotlight,
  .tour__card { transition: none; animation: none; }
}
