/* dashboard/tour.css — the guided tour (tour.js). Brand tokens only (theme.css).
   The caption card sits above the runner panel (z-index 1000); the highlight is a
   cut-out in a dimmed layer; neither takes clicks, so the page stays usable.
   Phone (<= 640px): the card docks at the bottom and the runner panel's bottom
   sheet is lifted above it (--tour-dock, set by tour.js to the card's height). */
.tour { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.tour-spot {
  position: fixed; display: none; border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(10, 18, 30, 0.5);
  outline: 2px solid var(--accent); outline-offset: 0;
  pointer-events: none;
}
.tour-card {
  position: fixed; box-sizing: border-box; width: 340px; max-width: calc(100vw - 16px);
  padding: 14px 16px 12px; background: var(--surface-raised); color: var(--text);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); pointer-events: auto;
}
.tour-card:focus { outline: none; }
.tour-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tour-card--center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tour-card--dock {
  left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); top: auto;
  width: auto; max-width: none; max-height: 46vh; max-height: 46dvh; overflow-y: auto;
}
.tour-step { margin: 0 0 4px; font: 600 0.72rem/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.tour-step:empty { display: none; }
.tour-title { margin: 0 0 6px; font: 700 1.1rem/1.25 var(--font-headline); color: var(--text-strong); }
.tour-body { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.5; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tour-nav { display: inline-flex; gap: 8px; margin-left: auto; }
.tour-card button {
  min-height: 40px; padding: 8px 14px; border-radius: var(--radius-sm);
  font: 700 0.85rem/1.2 var(--font-body); cursor: pointer;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
}
.tour-card .tour-next { background: var(--accent-fill); color: var(--on-accent); }
.tour-card .tour-skip { border-color: transparent; color: var(--text-muted); font-weight: 600; }
.tour-card button:disabled { opacity: 0.4; cursor: default; }
.tour-card button:hover:not(:disabled), .tour-card button:focus-visible { filter: brightness(1.1); outline: 2px solid var(--accent); outline-offset: 2px; }

/* the runner panel's phone sheet makes room for the docked card */
@media (max-width: 640px) {
  html.tour-on .rp-sheet {
    margin-bottom: var(--tour-dock, 0px);
    max-height: calc(88vh - var(--tour-dock, 0px)); max-height: calc(88dvh - var(--tour-dock, 0px));
  }
}

/* the first-visit offer */
.tour-offer {
  position: fixed; z-index: 900; left: 16px; bottom: 16px; width: min(340px, calc(100vw - 32px));
  box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 14px; background: var(--surface-raised); color: var(--text);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.tour-offer__hint { flex: 1 1 100%; margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--text-dim); }
.tour-offer button {
  min-height: 40px; padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font: 700 0.85rem/1.2 var(--font-body); border: 1px solid var(--accent);
}
.tour-offer__go { background: var(--accent-fill); color: var(--on-accent); }
.tour-offer__no { background: transparent; color: var(--text-muted); border-color: transparent !important; font-weight: 600 !important; }
.tour-offer button:hover, .tour-offer button:focus-visible { filter: brightness(1.1); outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .tour-offer { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: no-preference) { .tour-card, .tour-spot { transition: left .15s, top .15s, width .15s, height .15s; } }
