/* Welcome tour (js/tour.js): a dimmed page with a prism-ringed spotlight on one part of the shell,
   and a card in the dialog's style beside it. Above sheets and dialogs, below toasts. */
.tour { position: fixed; inset: 0; z-index: 1100; font-family: var(--font-sans); }
.tour-block { position: absolute; inset: 0; }

/* the scrim (the dialog backdrop's colour) with a cut-out that follows the ring */
.tour-scrim { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tour-scrim > rect { fill: rgba(9, 9, 11, .6); }
.tour-cut { x: 50%; y: 50%; width: 0; height: 0; transition: x .3s var(--ease-standard), y .3s var(--ease-standard), width .3s var(--ease-standard), height .3s var(--ease-standard); }
/* the spotlight's prism ring and glow */
.tour-hole { position: fixed; pointer-events: none; border-radius: 12px; box-shadow: var(--shadow-prism-glow); transition: top .3s var(--ease-standard), left .3s var(--ease-standard), width .3s var(--ease-standard), height .3s var(--ease-standard); }
.tour-hole::before { content: ""; position: absolute; inset: 0; padding: 2px; border-radius: inherit; background: var(--prism); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: tourPulse 2.4s var(--ease-standard) infinite; }
.tour-hole[data-empty]::before { opacity: 0; animation: none; }
@keyframes tourPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* the card: the dialog panel's surface, border and shadow */
.tour-card { position: fixed; top: 50%; left: 50%; width: 360px; max-width: calc(100vw - 24px); box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 16px; background: var(--surface-3); color: var(--fg-1); border: 1px solid var(--border-default); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-surface-3); transition: top .3s var(--ease-standard), left .3s var(--ease-standard); }
.tour-card[data-kind="welcome"] { width: 420px; padding: 28px 28px 20px; text-align: center; box-shadow: var(--shadow-surface-3), var(--shadow-prism-glow); }
.tour-card:focus { outline: none; }
/* progress: a thin prism line along the top edge */
.tour-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; border-radius: calc(var(--radius) + 2px) calc(var(--radius) + 2px) 0 0; }
.tour-bar i { display: block; height: 100%; width: 0; background: var(--prism); transition: width .3s var(--ease-standard); }
.tour-x { top: 10px; right: 10px; }
.tour-c { display: flex; flex-direction: column; gap: 6px; animation: tourIn .22s var(--ease-standard); }
@keyframes tourIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tour-n { font-size: var(--text-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.tour-c h2 { margin: 0; padding-inline-end: 28px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--text-lg); line-height: var(--text-lg-lh); font-weight: 600; letter-spacing: -.01em; }
.tour-card[data-kind="welcome"] h2 { justify-content: center; padding-inline-end: 0; font-size: 20px; }
.tour-tag { font-size: var(--text-2xs); font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-muted); color: var(--fg-2); letter-spacing: 0; }
.tour-b { display: flex; flex-direction: column; gap: 10px; font-size: var(--text-sm); line-height: var(--text-sm-lh); color: var(--fg-2); }
.tour-b p { margin: 0; }
.tour-b b { color: var(--fg-1); font-weight: 600; }
.tour-b kbd { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border: 1px solid var(--border-default); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-1); font-family: var(--font-mono); font-size: 11px; color: var(--fg-1); }
.tour-note { font-size: var(--text-xs); color: var(--fg-3); }
.tour-mark { align-self: center; display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 14px; background: var(--surface-1); position: relative; isolation: isolate; box-shadow: var(--shadow-prism-glow); }
.tour-mark::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: var(--prism); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tour-mark img { width: 28px; height: 28px; }

/* the pages of a nav group: icon, name and one line each */
.tour-l { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tour-l li { display: flex; gap: 10px; padding: 7px 8px; border-radius: 6px; background: color-mix(in srgb, var(--surface-1) 70%, transparent); }
.tour-l .ic { display: inline-flex; margin-top: 2px; color: var(--accent-violet); }
.tour-l .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tour-l b { font-size: var(--text-sm); font-weight: 600; }
.tour-l small { font-size: var(--text-xs); line-height: var(--text-xs-lh); color: var(--fg-3); }

.tour-f { display: flex; align-items: center; justify-content: flex-end; gap: var(--gap); margin-top: 2px; }
.tour-card[data-kind="welcome"] .tour-f { justify-content: center; margin-top: 8px; }
.tour-skip { margin-inline-end: auto; }

/* a small pointer from the card to the ringed area */
.tour-card[data-side="right"]::after, .tour-card[data-side="bottom"]::after { content: ""; position: absolute; width: 10px; height: 10px; background: var(--surface-3); border: 1px solid var(--border-default); }
.tour-card[data-side="right"]::after { left: -6px; top: calc(var(--arrow, 24px) - 5px); border-width: 0 0 1px 1px; transform: rotate(45deg); }
.tour-card[data-side="bottom"]::after { top: -6px; left: calc(var(--arrow, 24px) - 5px); border-width: 1px 0 0 1px; transform: rotate(45deg); }

/* on a phone the card sits along the bottom edge */
@media (max-width: 560px) {
  .tour-card, .tour-card[data-kind="welcome"] { top: auto !important; left: 12px !important; right: 12px; bottom: 12px; width: auto; }
  .tour-card::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-cut, .tour-card, .tour-bar i { transition: none; }
  .tour-hole::before, .tour-c { animation: none; }
}
