
#tour-veil { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 21; pointer-events: none; opacity: 0; transition: opacity 500ms ease; color: rgb(0 0 0 / .45); color: color-mix(in srgb, var(--bg) 72%, transparent); }#tour-veil.on { opacity: 1; }
body.tour-intro #tour-veil, body.tour-intro #tour-spot { z-index: 23; }

#tour-spot { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 21; box-sizing: border-box; pointer-events: none; opacity: 0; transition: opacity 500ms ease; box-shadow: 0 0 0 2px var(--accent); }
#tour-spot.on { opacity: 1; }
#tour-spot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 transparent; opacity: 0; }
#tour-spot.halo::after { animation: tour-halo 520ms ease-out both; }
@keyframes tour-halo { from { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } to { opacity: 0; box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent); } }

#tour-cap { position: fixed; left: 0; top: 0; z-index: 24; display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; height: calc(var(--slot-h, 44px) - 8px); max-width: 280px; padding: 6px 14px 6px 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 15px/20px var(--font-ui); white-space: nowrap; box-shadow: 0 12px 32px rgb(0 0 0 / .28); pointer-events: none; opacity: 0; transition: opacity 200ms ease; }
#tour-cap.on { opacity: 1; }
#tour-cap.on.muted { opacity: 0; transition: none; }#tour-cap .cap-badge { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-ink); color: var(--accent); font: 600 12px/1 var(--font-mono); }
#tour-cap .cap-badge:empty { display: none; }
#tour-cap .cap-txt { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#tour-cap .cap-arrow { position: absolute; width: 12px; height: 7px; background: var(--accent); }
#tour-cap[data-side="below"] .cap-arrow { top: -6px; left: calc(var(--ax, 50%) - 6px); clip-path: polygon(50% 0, 0 100%, 100% 100%); }#tour-cap[data-side="above"] .cap-arrow { bottom: -6px; left: calc(var(--ax, 50%) - 6px); clip-path: polygon(0 0, 100% 0, 50% 100%); }
#tour-cap[data-side="right"] .cap-arrow { left: -6px; top: calc(var(--ay, 50%) - 6px); width: 7px; height: 12px; clip-path: polygon(100% 0, 100% 100%, 0 50%); }
#tour-cap[data-side="none"] .cap-arrow { display: none; }#tour-cap[data-side="left"] .cap-arrow { right: -6px; top: calc(var(--ay, 50%) - 6px); width: 7px; height: 12px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) { #tour-cap { max-width: calc(100% - 24px); } }
#tour-cap.in-slot { position: relative; left: auto; top: auto; z-index: auto; display: flex; width: max-content; margin: 0 auto; transform: none !important; box-shadow: 0 4px 10px rgb(0 0 0 / .22); }#tour-cap.in-slot[data-side="left"] { margin: 0 0 0 auto; }

.tour-tools { display: inline-flex; align-items: center; gap: 6px; }
.tour-tools[hidden], .tour-tools .tour-btn[hidden] { display: none; }
.tour-tools { transition: opacity 300ms ease; }
.tour-tools.tour-fade { opacity: 0; }.tour-btn.btn { width: 32px; min-width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
body.setup-page #up-window { position: relative; }
body.setup-page .lk-top .tour-tools { position: absolute; top: 15px; right: calc(24px + 32px + 10px); z-index: 3; }body.tour-intro .tour-tools { z-index: 24; }
@media (pointer: coarse) { body.setup-page .lk-top .tour-tools { right: calc(24px + 36px + 10px); } }@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) {
  .tour-btn.btn { width: 40px; min-width: 40px; height: 40px; }
  body.setup-page .lk-top .tour-tools { top: 10px; right: calc(16px + 40px + 10px); }
  body.setup-page.tour-intro .lk-top .tour-tools { position: fixed; top: calc(12px + 1px + 10px - 4px + env(safe-area-inset-top)); right: calc(1px + 16px + 40px + 10px - 4px); box-sizing: border-box; padding: 4px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
}

@media (max-height: 500px) and (max-width: 1000px) {
  body.setup-page.tour-intro .lk-top .tour-tools { top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); }
}

body.is-going.tour-show #up-window { position: fixed; left: 50%; right: auto; top: auto; bottom: 16px; margin: 0; transform: translateX(-50%); width: min(720px, calc(100vw - 32px)); min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding: 10px 14px;
  border-radius: 16px; z-index: 22; animation: tour-dock-in 180ms ease-out 300ms both; }
body.is-going.tour-show #up-window > .top, body.is-going.tour-show #up-window > .foot { display: none; }
body.is-going.tour-show #up-window > .lk-top, body.is-going.tour-show #up-window > .lk-main, body.is-going.tour-show .lk-main > .lk-preview { display: contents; }
body.is-going.tour-show .lk-main > .lk-controls, body.is-going.tour-show .lk-preview > :not(.setup-status) { display: none !important; }body.is-going.tour-show #up-window > .lk-go { display: block; grid-column: 1 / -1; grid-row: 2; position: static; padding: 10px 0 0; border: 0; background: none; }body.is-going.tour-show #up-window > .lk-go::before, body.is-going.tour-show .lk-go .pop-slot, body.is-going.tour-show .lk-go #btn-go { display: none; }
body.is-going.tour-show .lk-go #status-note { margin: 0; text-align: left; font-size: 12.5px; }
body.is-going.tour-show .lk-go:has(#status-note:empty) { display: none; }
body.is-going.tour-show .lk-top .wel-steps { grid-column: 1; grid-row: 1; padding: 0; }
body.is-going.tour-show .lk-top .rail { display: flex; gap: 6px; padding-bottom: 0; }body.is-going.tour-show .lk-top .rail-step { min-width: 0; max-width: none; padding: 0; }
body.is-going.tour-show .lk-top .rail::before { display: none; }body.is-going.tour-show .lk-top .rail .rail-step .rail-lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.is-going.tour-show .lk-preview .setup-status { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
body.is-going.tour-show .lk-preview #status { min-height: 0; margin: 0; font-size: 12.5px; }
body.is-going.tour-show .lk-top .tour-tools { grid-column: 3; grid-row: 1; position: static; }
body.is-going.tour-show .welcome-page .toast, body.is-going.tour-show .toast { z-index: 40; }
@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) {
  body.is-going.tour-show #up-window { left: 8px; right: 8px; width: auto; transform: none; bottom: calc(8px + env(safe-area-inset-bottom)); min-height: 0; align-self: auto; }
}
@media (max-width: 700px) {  body.is-going.tour-show #up-window { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 8px 12px 10px; }
  body.is-going.tour-show .lk-preview .setup-status { grid-column: 1 / -1; grid-row: 2; }
  body.is-going.tour-show .lk-top .tour-tools { grid-column: 2; grid-row: 1; }
  body.is-going.tour-show #up-window > .lk-go { grid-row: 3; padding-top: 0; }
}
@media (min-width: 701px) and (max-height: 500px) and (max-width: 1000px) {  body.is-going.tour-show #up-window { column-gap: 12px; padding: 6px 12px; }
}
@keyframes tour-dock-in { from { opacity: 0; } to { opacity: 1; } }
body.tour-undock #up-window { opacity: 0 !important; animation: none !important; }.tour-frame { position: fixed; z-index: 23; box-sizing: border-box; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--win-shadow); pointer-events: none; animation: tour-out 0s 700ms forwards; }
body.tour-show #ghost .g-blur, body.tour-unfog #ghost .g-blur { transition-duration: 600ms; }
body.tour-unfog #ghost .g-blur { filter: none; }body.tour-unfog #ghost::after { opacity: 0; }

body.tour-intro #tour-veil, body.tour-intro #tour-spot, body.tour-intro #tour-cap, body.tour-show #tour-veil, body.tour-show #tour-spot, body.tour-show #tour-cap { animation: tour-out 0s 22s forwards; }@keyframes tour-out { to { opacity: 0; } }
body.tour-paused #tour-veil, body.tour-paused #tour-spot, body.tour-paused #tour-spot::after, body.tour-paused #tour-cap, body.tour-paused .tour-pulse, body.tour-paused .tour-frame,
body.tour-paused #tour-fx *, body.tour-paused #tour-rv, body.tour-paused #tour-rv *, body.tour-paused #ghost, body.tour-paused #ghost * { animation-play-state: paused !important; }

#btn-go.tour-pulse { animation: tour-pulse 1400ms ease-out 3; }
@keyframes tour-pulse { from { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent); } to { box-shadow: 0 0 0 20px color-mix(in srgb, var(--accent) 0%, transparent); } }
#btn-go.tour-ring { outline: 2px solid var(--accent); outline-offset: 3px; }

body.tour-show .rail[data-beat] .rail-step .rail-dot { background: var(--chip); color: var(--muted); }
body.tour-show .rail[data-beat] .rail-step .rail-dot::after { content: none; }
body.tour-show .rail[data-beat] .rail-step .rail-lbl { color: var(--muted); font-weight: 400; }
body.tour-show .rail[data-beat="3"] .rail-step:nth-child(3) .rail-dot, body.tour-show .rail[data-beat="4"] .rail-step:nth-child(4) .rail-dot, body.tour-show .rail[data-beat="5"] .rail-step:nth-child(5) .rail-dot,
body.tour-show .rail[data-beat="6"] .rail-step:nth-child(6) .rail-dot { background: var(--accent); color: var(--accent-ink); }
body.tour-show .rail[data-beat="3"] .rail-step:nth-child(-n+2) .rail-dot, body.tour-show .rail[data-beat="4"] .rail-step:nth-child(-n+3) .rail-dot, body.tour-show .rail[data-beat="5"] .rail-step:nth-child(-n+4) .rail-dot,
body.tour-show .rail[data-beat="6"] .rail-step:nth-child(-n+5) .rail-dot, body.tour-show .rail[data-beat] .rail-step.tour-ticked .rail-dot { background: var(--accent-soft); color: transparent; }
body.tour-show .rail[data-beat="3"] .rail-step:nth-child(-n+2) .rail-dot::after, body.tour-show .rail[data-beat="4"] .rail-step:nth-child(-n+3) .rail-dot::after, body.tour-show .rail[data-beat="5"] .rail-step:nth-child(-n+4) .rail-dot::after,
body.tour-show .rail[data-beat="6"] .rail-step:nth-child(-n+5) .rail-dot::after, body.tour-show .rail[data-beat] .rail-step.tour-ticked .rail-dot::after {
  content: ''; position: absolute; left: 50%; top: 45%; width: 5px; height: 9px; box-sizing: border-box; border: solid var(--accent); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }

#tour-fx { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
#tour-fx .tour-tap { position: fixed; width: 0; height: 0; }
#tour-fx .tour-tap-dot, #tour-fx .tour-tap-ring { position: absolute; left: 0; top: 0; opacity: 0; box-sizing: border-box; border-radius: 50%; }
#tour-fx .tour-tap-dot { width: 12px; height: 12px; background: var(--accent); }
#tour-fx .tour-tap-ring { width: 48px; height: 48px; border: 2px solid var(--accent); }
#tour-fx .g-chip { position: fixed; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px rgb(0 0 0 / .3); }
#tour-fx .g-file { position: fixed; width: 18px; height: 22px; box-sizing: border-box; padding: 5px 3px; border: 2px solid var(--accent); border-radius: 3px; background: var(--panel); display: flex; flex-direction: column; justify-content: space-between; opacity: 0; }
#tour-fx .g-file i { display: block; height: 2px; border-radius: 1px; background: var(--accent); }
#tour-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#ghost .btn.is-pressed { transform: scale(.93); filter: brightness(.85); transition: transform 150ms ease; }
#ghost .g-seam { position: absolute; width: 0; border-left: 2px dashed var(--accent); transform-origin: 50% 0; pointer-events: none; z-index: 2; }
#ghost .g-more-menu { opacity: 0; pointer-events: none; transform-origin: 100% 0; }
#ghost .g-more-menu.g-open { opacity: 1; }
#ghost .cue-list { position: relative; }

#tour-rv { position: fixed; left: 0; top: 0; z-index: 25; box-sizing: border-box; width: 320px; overflow: hidden; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 18px 48px rgb(0 0 0 / .4);
  color: var(--ink); font: 400 11px/1.3 var(--font-ui); opacity: 0; pointer-events: none; }
#tour-rv.is-on { opacity: 1; }
#tour-rv .trv-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
#tour-rv .trv-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
#tour-rv .trv-url { position: relative; flex: 1 1 auto; height: 16px; margin-left: 6px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
#tour-rv .trv-link { position: absolute; left: 7px; top: 50%; width: 8px; height: 8px; margin-top: -4px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--line-strong); }
#tour-rv .trv-url.has-link .trv-link { border-color: var(--accent); background: var(--accent); }
#tour-rv .trv-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; }
#tour-rv .trv-title { font: 500 10px/1 var(--font-mono); color: var(--muted); }
#tour-rv .trv-pill { padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 10px/1 var(--font-ui); }
#tour-rv .trv-body { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; padding: 4px 10px 6px; }
#tour-rv .trv-pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--video); }
#tour-rv .trv-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
#tour-rv .trv-line { position: absolute; left: 3px; right: 3px; bottom: 3px; text-align: center; color: var(--sub-color, white); font: 600 6.5px/1.15 var(--font-ui); text-shadow: 0 0 2px rgb(0 0 0 / .85); }
#tour-rv .trv-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
#tour-rv .trv-col b { display: block; margin-bottom: 3px; color: var(--muted); font: 500 9px/1 var(--font-mono); }
#tour-rv .trv-col p { margin: 0 0 4px; padding: 3px 5px; border-radius: 5px; background: var(--chip); font-size: 10px; line-height: 1.25; }
#tour-rv .trv-fix { border-radius: 3px; }
#tour-rv .trv-fix.is-mark { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
#tour-rv .trv-fix.has-caret::after { content: ''; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--accent); }
#tour-rv .trv-fix.is-fixed, #tour-rv.is-fixed .trv-fix { color: var(--accent); }
#tour-rv .trv-done { display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; margin: 4px 10px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel-2); font: 600 11px/1 var(--font-ui); }
#tour-rv .trv-done svg { width: 12px; height: 12px; opacity: 0; }
#tour-rv .trv-done.is-done { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
#tour-rv .trv-done.is-done svg { opacity: 1; animation: tour-tick 280ms ease-out both; stroke-dasharray: 24; }
@keyframes tour-tick { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) {
  #tour-rv { width: 280px; }
  #tour-rv .trv-body { grid-template-columns: 84px minmax(0, 1fr); }
}
@media (max-height: 500px) {  #tour-rv .trv-pic { display: none; }
  #tour-rv .trv-body { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  #tour-veil, #tour-spot { transition: opacity 150ms linear; }
  .tour-tools { transition: opacity 150ms linear; }
  #tour-spot::after { animation: none !important; }
  #tour-cap { transition: opacity 150ms linear; }
  #tour-fx * { animation: none !important; transition: none !important; }
  #tour-rv { animation: none !important; transition: opacity 200ms linear; }
  #ghost, #ghost *, #ghost::after, #ghost .g-blur { transition: none !important; }
  #ghost .btn.is-pressed { transform: none; transition: none; }
  .tour-pulse { animation: none !important; }
  .tour-frame { display: none; }
  #up-window { transition: none; }
  body.is-going.tour-show #up-window { animation: tour-dock-in 150ms linear both; }
}
body.tour-still, body.tour-still * { transition: none !important; animation: none !important; }
