.tour {
  position: fixed; inset: 0;
  z-index: 500; /* above the topbar (50), chat button (90) and dialogs (100); below toasts (1000) */
  display: grid; place-items: center; padding: var(--space-3);
}
.tour__scrim { position: absolute; inset: 0; background: var(--color-scrim); animation: tour-fade 0.2s ease; }
.tour__card {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5) var(--space-4) var(--space-4);
  text-align: center;
  animation: tour-rise 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tour--closing .tour__card { animation: tour-fall 0.18s ease forwards; }
.tour--closing .tour__scrim { animation: tour-fade 0.18s ease reverse forwards; }

.tour__skip { position: absolute; top: var(--space-2); right: var(--space-2); min-height: 32px; padding-inline: var(--space-3); font-size: 0.85rem; color: var(--color-muted); }

.tour__art {
  width: 64px; height: 64px; margin: 0 auto var(--space-3);
  display: grid; place-items: center; border-radius: var(--radius-full);
  color: var(--color-primary); background: var(--color-accent);
}
.tour__art svg { width: 30px; height: 30px; }

.tour__dots { display: flex; justify-content: center; gap: 6px; margin-bottom: var(--space-3); }
.tour__dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--color-border); transition: all 0.2s ease; }
.tour__dots span.is-on { width: 20px; background: var(--color-primary); }

.tour__greeting { margin: 0 0 var(--space-1); font-weight: 700; color: var(--color-primary); }
.tour__title { margin: 0 0 var(--space-2); font-size: 1.35rem; }
.tour__intro { margin: 0 auto var(--space-3); color: var(--color-muted); line-height: 1.55; }

.tour__list { margin: 0 0 var(--space-3); padding: 0; list-style: none; text-align: left; display: grid; gap: var(--space-2); }
.tour__list li { padding: var(--space-2) var(--space-3); background: var(--color-surface-2); border-radius: var(--radius); line-height: 1.5; font-size: 0.95rem; color: var(--color-text-2); overflow-wrap: anywhere; }
.tour__list strong { color: var(--color-text); }
.tour__list--ordered { counter-reset: tour; }
.tour__list--ordered li { counter-increment: tour; }
.tour__list--ordered li::before { content: counter(tour) ". "; font-weight: 700; color: var(--color-primary); }

.tour__note { margin: 0 0 var(--space-3); font-size: 0.85rem; color: var(--color-muted); }

.tour__actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.tour__actions .btn { min-height: var(--tap); }

@keyframes tour-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tour-rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes tour-fall { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) {
  .tour__scrim, .tour__card, .tour--closing .tour__card, .tour--closing .tour__scrim { animation: none; }
}
