/* The guided tour: Pixel's cursor flies to each part of the dashboard, clicks it, and says what it is. */
body.touring{overflow:hidden}
.tour{position:fixed;inset:0;z-index:70;pointer-events:none}
.tour-catch{position:absolute;inset:0;pointer-events:auto;cursor:default}
.tour-hole{position:fixed;left:50%;top:50%;width:0;height:0;border-radius:24px;box-shadow:0 0 0 200vmax rgba(3,4,7,.0);pointer-events:none;
  transition:left .45s var(--ease),top .45s var(--ease),width .45s var(--ease),height .45s var(--ease),border-radius .45s var(--ease),box-shadow .5s var(--ease)}
.tour.on .tour-hole{box-shadow:0 0 0 200vmax rgba(3,4,7,.66)}
.tour-hole::after{content:"";position:absolute;inset:-4px;border-radius:inherit;border:1.5px solid rgba(138,180,248,.85);box-shadow:0 0 0 5px rgba(66,133,244,.14),0 0 36px 6px rgba(66,133,244,.32);opacity:0;transition:opacity .5s var(--ease)}
.tour.lit .tour-hole::after{opacity:1;animation:holePulse 2.6s ease-in-out infinite}
@keyframes holePulse{50%{box-shadow:0 0 0 9px rgba(66,133,244,.06),0 0 48px 10px rgba(66,133,244,.22)}}

.tour-cursor{position:fixed;left:0;top:0;z-index:3;pointer-events:none;will-change:transform;opacity:0;transition:opacity .35s}
.tour-cursor.on{opacity:1}
.tour-cursor .arrow{width:28px;height:28px;filter:drop-shadow(0 6px 12px rgba(0,0,0,.55));transition:transform .14s var(--ease);transform-origin:4px 3px}
.tour-cursor.press .arrow{transform:scale(.84)}
.tour-tag{position:absolute;left:20px;top:22px;display:flex;align-items:center;gap:6px;height:24px;padding:0 10px 0 6px;border-radius:12px;background:var(--w-accent);color:#fff;font-size:12px;line-height:16px;font-weight:600;white-space:nowrap;box-shadow:0 6px 16px -6px rgba(66,133,244,.8)}
.tour-tag svg{width:16px;height:16px}
.tour-cursor .finger{display:none}
.tour-cursor.touch .arrow{display:none}
.tour-cursor.touch .finger{display:block;width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:9999px;background:rgba(255,255,255,.8);box-shadow:0 0 0 7px rgba(66,133,244,.3),0 8px 18px rgba(0,0,0,.45);transition:transform .14s var(--ease)}
.tour-cursor.touch.press .finger{transform:scale(.8)}
.tour-cursor.touch .tour-tag{left:18px;top:12px}
.tour-cursor.flip .tour-tag,.tour-cursor.touch.flip .tour-tag{left:auto;right:calc(100% + 6px)}
.tour-ripple{position:fixed;z-index:2;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:9999px;border:2px solid rgba(138,180,248,.95);pointer-events:none;animation:ripple .65s ease-out forwards}
@keyframes ripple{to{transform:scale(3.6);opacity:0}}
.tour-press{transform:scale(.97)!important;transition:transform .14s var(--ease)!important}

.tour-card{position:fixed;left:0;top:0;width:min(336px,calc(100vw - 32px));pointer-events:auto;border-radius:20px;padding:16px 16px 12px;
  background:rgba(15,17,23,.92);-webkit-backdrop-filter:blur(26px) saturate(160%);backdrop-filter:blur(26px) saturate(160%);
  border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 30px 60px -24px rgba(0,0,0,.85);
  opacity:0;transform:translateY(6px);transition:opacity .2s var(--ease),transform .25s var(--ease)}
.tour-card.on{opacity:1;transform:none}
.tour-card-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.tour-card-head svg{width:24px;height:24px;flex:none}
.tour-card-head b{font-size:14px;line-height:20px;font-weight:600}
.tour-card-head .tour-n{margin-left:auto;font-size:12px;line-height:16px;color:var(--w-text-3);font-variant-numeric:tabular-nums}
.tour-say{font-size:16px;line-height:24px;color:var(--w-text);min-height:48px}
.tour-say .caret{display:inline-block;width:2px;height:18px;margin-left:2px;vertical-align:-3px;background:var(--w-accent);animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}
.tour-actions{display:flex;align-items:center;gap:8px;margin-top:12px}
.tour-dots{display:flex;align-items:center;gap:4px;margin-right:auto}
.tour-dots i{width:6px;height:6px;border-radius:3px;background:rgba(255,255,255,.2);transition:width .45s var(--ease),background .45s}
.tour-dots i.on{width:18px;background:var(--w-accent)}
.tour-dots i.done{background:rgba(138,180,248,.55)}

/* intro: Pixel builds itself in the middle of the screen */
.tour-intro{position:fixed;inset:0;z-index:72;display:grid;place-items:center;pointer-events:auto;background:rgba(5,6,9,0);-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0);transition:background .9s var(--ease),backdrop-filter .9s var(--ease),-webkit-backdrop-filter .9s var(--ease),opacity .5s var(--ease)}
.tour-intro.on{background:rgba(5,6,9,.74);-webkit-backdrop-filter:blur(20px) saturate(140%);backdrop-filter:blur(20px) saturate(140%)}
.tour-intro.out{opacity:0}
.tour-intro-inner{display:flex;flex-direction:column;align-items:center;text-align:center;width:min(560px,100%);padding:24px}
.tour-stage{position:relative;width:272px;height:272px}
.tour-stage canvas,.tour-stage .pixel-fallback{position:absolute;inset:0;width:100%;height:100%}
.tour-stage::after{content:"";position:absolute;left:22%;right:22%;bottom:4%;height:12%;border-radius:9999px;background:radial-gradient(closest-side,rgba(66,133,244,.5),rgba(52,168,83,.2) 60%,transparent);filter:blur(10px);opacity:0;transition:opacity 1.2s var(--ease) .9s}
.tour-intro.on .tour-stage::after{opacity:.85}
.tour-intro h2{margin-top:8px;font-size:32px;line-height:38px;font-weight:600;letter-spacing:-.02em}
.tour-intro p{margin-top:12px;font-size:18px;line-height:28px;color:var(--w-text-2);max-width:30em;text-wrap:balance}
.tour-intro .tour-go{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:32px}
.tour-line{opacity:0;transform:translateY(12px);filter:blur(8px);transition:opacity .8s var(--ease),transform .8s var(--ease),filter .8s var(--ease)}
.tour-line.on{opacity:1;transform:none;filter:none}

@media (max-width:767px){
  .tour-card{left:16px!important;right:16px;width:auto;top:auto!important;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateY(16px)}
  .tour-card.on{transform:none}
  .tour-card.top{top:calc(12px + env(safe-area-inset-top))!important;bottom:auto}
  body.touring .sheet{max-height:calc(100svh - 236px)}
  .tour-stage{width:220px;height:220px}
  .tour-intro h2{font-size:28px;line-height:34px}
  .tour-intro p{font-size:16px;line-height:24px}
}
@media (prefers-reduced-motion:reduce){.tour-line{opacity:1;transform:none;filter:none}}

/* desktop: during the tour a sheet slides left so Pixel's card fits beside it */
@media (min-width:768px){
  body.touring .sheet-wrap{place-items:center start;padding-left:max(24px,calc((100vw - 916px) / 2));transition:padding .5s var(--ease)}
}
