/* First-run tour with Tikt the train (onboarding.js). docs/STYLE.md "Mascot": flat SBB palette, no gradient,
   glow or emoji; the only playful motion in the app, and all of it off with prefers-reduced-motion. */

html.tour-open { overflow: hidden; }
.tour { position: fixed; inset: 0; z-index: 80; opacity: 0; transition: opacity 260ms var(--ease); }
.tour.in { opacity: 1; }
.tour.out { opacity: 0; pointer-events: none; transition-delay: 120ms; }
.tour-dim { position: absolute; inset: 0; }

/* Spotlight: a hole in the dim layer around the element being explained. */
.tour-spot { position: fixed; pointer-events: none; border: 2px solid #fff; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.55);
  transition: left 380ms var(--ease), top 380ms var(--ease), width 380ms var(--ease), height 380ms var(--ease), border-radius 380ms var(--ease); }
.tour-spot.off { left: 50% !important; top: 50% !important; width: 0 !important; height: 0 !important; border-color: transparent; }

.tour-guide { position: fixed; left: 0; top: 0; display: flex; flex-direction: column; gap: 6px;
  transition: transform 460ms var(--ease); will-change: transform; }
.tour-guide[data-side="above"] { flex-direction: column-reverse; }

/* The rail Tikt drives on. */
.tour-track { position: relative; height: 92px; }
.tour-rail { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.85); }
.tour-guide[data-side="center"] .tour-rail { left: 15%; right: 15%; }

/* ---------- Tikt on the tour (the mascot itself: tikt.css) ---------- */
.tour .tikt { position: absolute; left: 0; bottom: 2px; width: 84px; cursor: pointer; transform: translateX(var(--mx, 0px));
  transition: transform 520ms cubic-bezier(0.45, 0, 0.25, 1); --tikt-panto: #dcdcdc; }
.tour.out .tikt { transition-duration: 700ms; }
.tour .tikt-svg { width: 84px; }

/* ---------- speech bubble ---------- */
.tour-bubble { position: relative; background: var(--white); color: var(--charcoal); border: 1px solid var(--cloud); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px 16px 12px; }
.tour-bubble::before { content: ""; position: absolute; left: calc(var(--tail, 50%) - 8px); top: -8px; width: 14px; height: 14px;
  background: var(--white); border-left: 1px solid var(--cloud); border-top: 1px solid var(--cloud); transform: rotate(45deg);
  transition: left 460ms var(--ease); }
.tour-guide[data-side="above"] .tour-bubble::before { top: auto; bottom: -8px; transform: rotate(225deg); }
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-count { font-size: 12px; color: var(--metal); font-variant-numeric: tabular-nums; }
.tour-skip { border: 0; background: none; padding: 6px 0 6px 8px; min-height: 32px; font-size: 13px; color: var(--metal); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.tour-skip:hover { color: var(--charcoal); }
.tour-bubble h2 { margin: 2px 0 4px; font-size: 17px; font-weight: 700; }
.tour-bubble p { margin: 0; font-size: 15px; min-height: 3em; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tour-foot .btn { height: 40px; }
.tour-back { margin-left: auto; }
.tour-back[hidden] + .tour-next { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  .tour, .tour-guide, .tour-spot, .tour .tikt { transition: none !important; }
}
