/* The app tour (induction.js): a slideshow dialog on Home for a new account's first visit, and from "App tour" in the
   profile menu and the feature search. A card over the page (a sheet from the bottom on phones): a picture over a pale
   sky like the page heads, the step, title, text and tips, then dots and Back / Next. The buttons are Home's .dbtn. */

.tour {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0; border: 0; overflow: hidden;
  background: #fff; color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet), 0 24px 64px rgb(var(--navy-rgb) / .22);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
.tour[open] { animation: tour-in var(--dur-slow) var(--ease-out); }
.tour::backdrop { background: rgb(var(--navy-rgb) / .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes tour-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.tour-frame { position: relative; display: flex; flex-direction: column; max-height: inherit; }

/* Skip, over the picture's top right */
.tour-skip {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: var(--navy); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 3px rgb(var(--navy-rgb) / .12);
}
.tour-skip:hover { background: var(--glass-solid); }
.tour-skip[hidden] { display: none; }
/* A finger's 44 px (iOS Safari 2026-11-08: it was 36). The dots below stay 20 px wide: Back, Next, swiping and the arrow
   keys do the same, so they are the equivalent the 44 px rule allows */
@media (max-width: 600px), (pointer: coarse) { .tour-skip { min-height: 44px; } }

/* The slides sit side by side; the track slides to the current one */
/* The track takes the viewport's height through flex, not height: 100% (the frame has only a max-height, so a
   percentage would be the content's height): on a short screen (a phone on its side) each slide then scrolls */
.tour-viewport { display: flex; overflow: hidden; flex: 1 1 auto; min-height: 0; touch-action: pan-y; }
.tour-track { display: flex; align-items: stretch; flex: 1 0 100%; min-width: 0; transition: transform var(--dur-slow) var(--ease-sheet); will-change: transform; }
.tour-instant .tour-track { transition: none; }
.tour-slide { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }

.tour-picture {
  position: relative; flex: none;
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  height: 240px; padding: 52px 20px 0;
  /* the pale sky over cool snow of the page heads (resort.css) */
  background: linear-gradient(180deg, #cfe2f6 0%, #e7f0fa 55%, var(--snow) 100%);
  border-bottom: 1px solid var(--separator-soft);
}
.tour-art { display: block; width: 100%; max-width: 390px; height: 100%; overflow: visible; }

.tour-copy { padding: 20px 28px 4px; }
.tour-count { margin: 0 0 6px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tour-title { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.2; letter-spacing: var(--tracking-title); color: var(--navy); }
.tour-title:focus { outline: none; }
.tour-body { margin: 8px 0 0; font-size: var(--text-base); line-height: 1.5; color: var(--muted); }
.tour-tips { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.tour-tips li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: var(--text-base); line-height: 1.45; color: var(--text); }
.tour-tips svg {
  width: 22px; height: 22px; padding: 4px; border-radius: 50%;
  background: rgb(var(--accent-rgb) / .1);
  fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.tour-final { margin: 14px 0 0; }
.tour-final[hidden] { display: none; }
.tour-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Dots and the buttons */
.tour-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px 22px; }
.tour-dots { display: flex; align-items: center; gap: 2px; }
.tour-dot { position: relative; width: 20px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.tour-dot::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 4px;
  background: rgb(var(--navy-rgb) / .2);
  transition: width var(--dur) var(--ease-out), margin var(--dur) var(--ease-out), background var(--dur-fast) var(--ease);
}
.tour-dot:hover::before { background: rgb(var(--navy-rgb) / .4); }
.tour-dot[aria-current="step"] { width: 30px; }
.tour-dot[aria-current="step"]::before { width: 22px; margin-left: -11px; background: var(--accent); }
.tour-nav { display: flex; gap: 8px; }
.tour-nav .dbtn { min-width: 92px; border-radius: 999px; }
.tour-nav .dbtn[hidden] { display: none; }
.tour button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Phones: a sheet from the bottom, the buttons full width under the dots */
@media (max-width: 599px) {
  .tour { width: 100%; max-width: none; max-height: 94dvh; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .tour[open] { animation-name: tour-up; }
  @keyframes tour-up { from { transform: translateY(40px); opacity: .4; } }
  .tour-picture { height: 190px; padding: 48px 16px 0; }
  .tour-copy { padding: 18px 20px 4px; }
  .tour-title { font-size: 21px; }
  .tour-body, .tour-tips li { font-size: 14.5px; }
  .tour-foot { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 20px max(18px, env(safe-area-inset-bottom)); }
  .tour-dots { justify-content: center; }
  .tour-nav .dbtn { flex: 1; }
}
@media (max-height: 640px) and (min-width: 600px) { .tour-picture { height: 170px; } }
/* Short phones: a smaller picture and the whole height, so the words fit without scrolling */
@media (max-height: 700px) and (max-width: 599px) {
  .tour { max-height: 100dvh; }
  .tour-picture { height: 136px; padding-top: 44px; }
  .tour-copy { padding-top: 14px; }
  .tour-tips { gap: 6px; margin-top: 10px; }
}

/* ---------- The pictures ---------- */
.tour-art text { font-family: var(--font); }
.ta-far { fill: #dfe9f5; }
.ta-mtn { fill: #fff; }
.ta-mtn-shade { fill: #dce6f2; }
.ta-slope { fill: #fff; }
.ta-case { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.ta-piste { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.ta-piste.green { stroke: var(--piste-green); }
.ta-piste.blue { stroke: var(--piste-blue); }
.ta-piste.red { stroke: var(--piste-red); }
.ta-piste.black { stroke: var(--piste-black); }
.ta-lift { fill: none; stroke: var(--lift); stroke-width: 1.6; }
.ta-lift-thin { fill: none; stroke: var(--lift); stroke-width: 1.2; }
.ta-seat { fill: var(--navy); }
.ta-station { fill: var(--lift); stroke: #fff; stroke-width: 1.5; }
.ta-pin { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.ta-pin-dot { fill: #fff; }
.ta-pin-sm { fill: var(--accent); }

.ta-bar, .ta-sheet, .ta-popcard, .ta-offline, .ta-card {
  fill: #fff; stroke: rgb(var(--navy-rgb) / .1); stroke-width: 1;
  filter: drop-shadow(0 4px 10px rgb(var(--navy-rgb) / .12));
}
.ta-pill { fill: var(--fill-2); }
.ta-text { fill: var(--text); font-size: 12px; font-weight: 600; }
.ta-chev { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ta-row { fill: none; }
.ta-row.on { fill: rgb(var(--accent-rgb) / .1); }
.ta-star { fill: rgb(var(--navy-rgb) / .14); }
.ta-star.on { fill: var(--caution); }
.ta-line { fill: rgb(var(--navy-rgb) / .2); }
.ta-line.soft { fill: rgb(var(--navy-rgb) / .1); }
.ta-line.on { fill: var(--accent); }
.ta-dotpin { fill: var(--muted); }
.ta-tap { fill: rgb(var(--navy-rgb) / .78); stroke: #fff; stroke-width: 2; }

.ta-sun { fill: #ffc93c; }
.ta-rays { fill: none; stroke: #f5a300; stroke-width: 2.2; stroke-linecap: round; }
.ta-bus { fill: var(--accent); }
.ta-win { fill: #dcebfb; }
.ta-wheel { fill: var(--navy); stroke: #fff; stroke-width: 1.5; }
.ta-head.a, .ta-body.a { fill: #7a52c7; }
.ta-head.b, .ta-body.b { fill: #1f9d55; }
.ta-cloud { fill: var(--glacier); stroke: var(--glacier-edge); stroke-width: 1.5; }
.ta-arrow { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.ta-map { fill: var(--snow); stroke: rgb(var(--navy-rgb) / .1); }
.ta-forest { fill: rgb(77 122 88 / .22); }
.ta-glow { fill: none; stroke: var(--selection); stroke-width: 14; stroke-linecap: round; opacity: .55; }
.ta-route { fill: none; stroke: var(--accent-map); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 5; }
.ta-badge.red { fill: var(--piste-red); }

.ta-phone { fill: var(--navy); }
.ta-screen { fill: #fff; }
.ta-gauge-bg { fill: none; stroke: var(--fill-2); stroke-width: 6; stroke-linecap: round; }
.ta-gauge { fill: none; stroke: var(--accent-map); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 80; stroke-dashoffset: 0; }
.ta-big { fill: var(--navy); font-size: 22px; font-weight: 700; text-anchor: middle; }
.ta-unit { fill: var(--muted); font-size: 9px; font-weight: 600; text-anchor: middle; }
.ta-rec { fill: var(--sos); }
.ta-rec-dot { fill: #fff; }
.ta-skier-head { fill: var(--navy); }
.ta-skier-body { fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ta-speed { fill: none; stroke: rgb(var(--navy-rgb) / .28); stroke-width: 2; stroke-linecap: round; }

.ta-friend { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 2px 4px rgb(var(--navy-rgb) / .25)); }
.ta-friend.a { fill: #7a52c7; }
.ta-friend.b { fill: #1f9d55; }
.ta-initial { fill: #fff; font-size: 12px; font-weight: 700; text-anchor: middle; }
.ta-me-halo { fill: rgb(10 132 255 / .2); }
.ta-me { fill: var(--accent-map); stroke: #fff; stroke-width: 2.5; }
.ta-sos { fill: var(--sos); filter: drop-shadow(0 4px 10px rgb(var(--sos-rgb) / .35)); }
.ta-sos-text { fill: #fff; font-size: 15px; font-weight: 800; letter-spacing: .04em; text-anchor: middle; }
.ta-arrow-w { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.ta-iconbtn { fill: var(--fill-2); }
.ta-glass { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; }
.ta-field { fill: var(--fill); }
.ta-chip { fill: var(--accent); }
.ta-chip.soft { fill: rgb(var(--navy-rgb) / .14); }
.ta-key { fill: #fff; stroke: rgb(var(--navy-rgb) / .2); stroke-width: 1.2; filter: drop-shadow(0 2px 0 rgb(var(--navy-rgb) / .15)); }
.ta-keytext { fill: var(--navy); font-size: 15px; font-weight: 700; text-anchor: middle; }
.ta-keytext.sm { font-size: 11px; }

/* The ring that points at what the slide is about */
.tour-ping { fill: rgb(var(--accent-rgb) / .14); stroke: var(--accent); stroke-width: 2; opacity: .7; transform-box: fill-box; transform-origin: center; }
.tour-ping.red { fill: rgb(var(--sos-rgb) / .14); stroke: var(--sos); }
.tour-ping.blue { fill: rgb(10 132 255 / .14); stroke: var(--accent-map); }

/* ---------- Motion: only on the slide shown, and never when the device or Settings asks for stillness ---------- */
.ta-chair, .ta-lifted, .ta-pop, .ta-skier, .ta-speed, .ta-rec-dot { transform-box: fill-box; transform-origin: center; }
.ta-chair { transform: translate(126px, 112px); }
.tour-slide.is-current .tour-ping { animation: tour-ping 2.2s var(--ease-out) infinite; }
.tour-slide.is-current .ta-chair { animation: tour-chair 6s linear infinite; }
.tour-slide.is-current .ta-lifted { animation: tour-lift 3.2s var(--ease) infinite; }
.tour-slide.is-current .ta-route { animation: tour-dash 1.4s linear infinite; }
.tour-slide.is-current .ta-pop { animation: tour-pop .6s var(--ease-out) .25s both; }
.tour-slide.is-current .ta-gauge { animation: tour-gauge 3s var(--ease) infinite alternate; }
.tour-slide.is-current .ta-skier { animation: tour-skier 3s var(--ease) infinite alternate; }
.tour-slide.is-current .ta-speed { animation: tour-speed .9s linear infinite; }
.tour-slide.is-current .ta-rec-dot { animation: ski-pulse 1.6s var(--ease) infinite; }

@keyframes tour-ping { 0% { transform: scale(.7); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes tour-chair { from { transform: translate(104px, 170px); } to { transform: translate(146px, 44px); } }
@keyframes tour-lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes tour-dash { to { stroke-dashoffset: -22; } }
@keyframes tour-pop { from { transform: translateY(10px) scale(.92); opacity: 0; } }
@keyframes tour-gauge { from { stroke-dashoffset: 46; } to { stroke-dashoffset: 0; } }
@keyframes tour-skier { from { transform: translate(-8px, -6px); } to { transform: translate(14px, 6px); } }
@keyframes tour-speed { from { transform: translateX(6px); opacity: 0; } 50% { opacity: 1; } to { transform: translateX(-6px); opacity: 0; } }
@keyframes ski-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .55; } }

.tour-still, .tour-still * { animation: none !important; }
.tour-still .tour-track, .tour-still .tour-dot::before { transition: none; }
