/* ==========================================================================
   Tour — a spotlight on one part of the page and a card that explains it (moey.js).
   ========================================================================== */
.tour {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: visible;
  background: none;
  border: 0;
}
.tour:not(:popover-open) { display: none; }
.tour-backdrop { position: fixed; inset: 0; }               /* catches clicks outside the card */
.tour-spot {
  position: fixed;
  pointer-events: none;
  border-radius: var(--mo-radius-card);
  box-shadow: 0 0 0 2px var(--mo-bg-surface), 0 0 0 100vmax rgb(0 0 0 / .55);
  transition: left .3s var(--mo-ease), top .3s var(--mo-ease), width .3s var(--mo-ease), height .3s var(--mo-ease), opacity .2s;
}
.tour-card {
  position: fixed;
  display: grid;
  gap: .375rem;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 1rem 1rem .75rem;
  color: var(--mo-fg-body);
  background: var(--mo-bg-raised);
  border-radius: var(--mo-radius-overlay);
  box-shadow: var(--mo-shadow-overlay);
  outline: none;
  transition: left .3s var(--mo-ease), top .3s var(--mo-ease);
}
.tour-step { font-size: .75rem; font-weight: var(--mo-font-weight-medium); color: var(--mo-fg-3); }
.tour-title { margin: 0; font-size: 1rem; font-weight: var(--mo-font-weight-semibold); }
.tour-text { font-size: .875rem; line-height: 1.5; color: var(--mo-fg-2); }
.tour-text > :last-child { margin-bottom: 0; }
.tour-actions { display: flex; gap: .375rem; align-items: center; margin-top: .5rem; }
.tour-actions > .spacer { flex: 1; }
.tour-actions [data-tour="skip"] { margin-inline-start: -.5rem; }
/* Phones: the card docks to the bottom (or the top when the part is low on the screen) */
@media (width < 576px) {
  .tour-card { inset: auto .75rem calc(.75rem + env(safe-area-inset-bottom)); width: auto; }
  .tour-card.is-top { inset: calc(.75rem + env(safe-area-inset-top)) .75rem auto; }
  .tour-actions .btn { min-height: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
