/* PEAK's tour (app/peak/tour.php, assets/js/peak-tour.js, PB35): the coach mark over a step's snapshot – the page
   dimmed around its target, and a small card. PEAK's own tokens (the snapshot carries c2.css); motion only without
   prefers-reduced-motion, transform and opacity only. */
html[data-tour] { --pk-tour-dim: rgb(5 8 16 / 0.62); }
html[data-tour][data-theme="light"] { --pk-tour-dim: rgb(10 20 40 / 0.5); }
.pk-tour-dim { position: fixed; inset: 0; z-index: 1000; background: var(--pk-tour-dim); }
.pk-tour-spot {
  position: fixed; z-index: 1000; border-radius: var(--pk-r-2, 14px); pointer-events: none;
  box-shadow: 0 0 0 9999px var(--pk-tour-dim), 0 0 0 2px var(--pk-p-ink), 0 0 0 7px color-mix(in srgb, var(--pk-p-ink) 25%, transparent);
}
.pk-tour-card {
  position: fixed; z-index: 1001; width: 380px; padding: 18px 18px 16px; border-radius: var(--pk-r-3, 24px);
  background: var(--pk-surface); color: var(--pk-ink); box-shadow: 0 0 0 1px var(--pk-line), 0 24px 60px rgb(0 0 0 / 0.4);
  font-family: var(--pk-f-body, system-ui);
}
.pk-tour-card.is-center { left: 50%; top: 50%; translate: -50% -50%; width: min(420px, calc(100vw - 32px)); padding: 24px; }
.pk-tour-kicker { display: flex; align-items: center; gap: 8px; margin: 0 44px 6px 0; color: var(--pk-ink-2); font-size: 0.8125rem; font-weight: 600; }
.pk-tour-tag { padding: 2px 8px; border-radius: var(--pk-r-pill, 999px); background: var(--pk-surface-2); color: var(--pk-ink-2); font-size: 0.75rem; font-weight: 700; }
.pk-tour-card h2 { margin: 0 0 6px; font: 700 1.25rem/1.2 var(--pk-f-display, system-ui); letter-spacing: -0.01em; }
.pk-tour-card p { margin: 0; }
#pk-tour-text { color: var(--pk-ink-2); }
.pk-tour-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pk-tour-hint { margin-right: auto; color: var(--pk-ink-2); font-size: 0.8125rem; }
.pk-tour-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--pk-r-pill, 999px);
  background: var(--pk-surface-2); color: var(--pk-ink); font-weight: 600; text-decoration: none;
}
.pk-tour-btn.is-primary { background: var(--pk-p-solid); color: var(--pk-p-on); }
.pk-tour-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--pk-ink-2); font-size: 1.25rem; cursor: pointer;
}
.pk-tour-close:hover { background: var(--pk-surface-2); }
.pk-tour :focus-visible { outline: 3px solid var(--pk-p-ink); outline-offset: 2px; }
@media (max-width: 600px) {
  .pk-tour-card:not(.is-center) { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
  .pk-tour-actions { flex-wrap: wrap; }
}
@media (pointer: coarse) { .pk-tour-hint { display: none; } }

/* The ski map's pictures (the map itself needs its script): the one for the page's theme */
.pk-tour-map { display: block; width: 100%; height: 100%; object-fit: cover; }
html[data-tour]:not([data-theme="light"]) .pk-tour-map.is-light, html[data-tour][data-theme="light"] .pk-tour-map.is-dark { display: none; }

/* PEAK's own invitation on Home and the entries (app/peak/home_c2.php, peak_home.php, profile_c2.php) */
.pk-tour-invite { max-width: min(420px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: var(--pk-r-3, 24px); background: var(--pk-surface); color: var(--pk-ink); box-shadow: 0 0 0 1px var(--pk-line), 0 24px 60px rgb(0 0 0 / 0.4); }
.pk-tour-invite::backdrop { background: rgb(5 8 16 / 0.62); }
.pk-tour-invite h2 { margin: 12px 0 6px; font: 700 1.25rem/1.2 var(--pk-f-display, system-ui); }
.pk-tour-invite p { margin: 0; color: var(--pk-ink-2); }
.pk-tour-invite form { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.pk-tour-invite button { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--pk-r-pill, 999px); background: var(--pk-surface-2); color: var(--pk-ink); font: inherit; font-weight: 600; cursor: pointer; }

@media (prefers-reduced-motion: no-preference) {
  .pk-tour-card, .pk-tour-invite[open] { animation: pk-tour-in 220ms var(--pk-ease-out, ease-out) both; }
  .pk-tour-spot, .pk-tour-dim { animation: pk-tour-fade 220ms var(--pk-ease-out, ease-out) both; }
  .pk-tour-btn { transition: transform var(--pk-dur-press, 120ms) var(--pk-ease-out, ease-out); }
  .pk-tour-btn:active { transform: scale(0.96); }
}
@keyframes pk-tour-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes pk-tour-fade { from { opacity: 0; } }
