/* MyFav School guided tours: a spotlight on the target and a card beside it, a bottom sheet on phones.
   Kit tokens only, so light and dark both work. Quiet motion: a short fade, nothing that loops. */
.tour-block{position:fixed;inset:0;z-index:100;background:transparent}
.tour-block.dim{background:var(--scrim)}
.tour-spot{position:fixed;z-index:101;border-radius:12px;box-shadow:0 0 0 200vmax var(--scrim);outline:2px solid var(--accent);pointer-events:none;transition:top .2s var(--ease),left .2s var(--ease),width .2s var(--ease),height .2s var(--ease)}
.tour-spot[hidden]{display:none}

.tour-card{position:fixed;z-index:102;left:0;top:0;width:min(360px,calc(100vw - 32px));padding:16px 18px 16px;border-radius:16px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--sh-2);color:var(--ink);font-family:var(--f);opacity:0;transform:translateY(4px);transition:opacity .16s,transform .2s var(--ease)}
.tour-card.on{opacity:1;transform:none}
.tour-card.unplaced{visibility:hidden}
.tour-card:focus{outline:none}
.tour-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tour-card.wait [data-tn],.tour-card.wait [data-tb]{opacity:.45;pointer-events:none}
.tour-meta{display:flex;align-items:center;gap:6px;min-height:24px;padding-right:44px;font-size:13px;color:var(--dim);font-variant-numeric:tabular-nums}
.tour-meta .pg{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tour-close{position:absolute;top:6px;right:6px}
.tour-card h2{margin-top:4px;font-size:17px;font-weight:500;line-height:1.35;color:var(--ink)}
.tour-card .tx{margin-top:6px;font-size:15px;line-height:1.5;color:var(--ink-2)}
.tour-keys{margin-top:10px;font-size:13px;color:var(--faint)}
.tour-rail{height:2px;margin:16px 0 14px;border-radius:2px;background:var(--line);overflow:hidden}
.tour-rail i{display:block;height:100%;width:0;background:var(--accent);transition:width .2s var(--ease)}
.tour-f{display:flex;align-items:center;gap:8px}
.tour-f .sp{flex:1}
.tour-f [hidden]{display:none}
.tour-f .btn,.tour-f .btn2{padding:0 14px}
.tour-f .btn2[data-ts]{border-color:transparent;background:transparent;color:var(--dim)}
.tour-f .btn2[data-ts]:hover{background:var(--hover);color:var(--ink)}

/* phones: a bottom sheet; it moves to the top when the target sits low (the tab bar) */
@media (max-width:640px){
  .tour-card{left:0!important;right:0;top:auto!important;bottom:0;width:100%;border-width:1px 0 0;border-radius:16px 16px 0 0;padding:14px max(16px,env(safe-area-inset-right,0px)) calc(14px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));transform:translateY(8px)}
  .tour-card.at-top{top:0!important;bottom:auto;border-width:0 0 1px;border-radius:0 0 16px 16px;padding-top:calc(14px + env(safe-area-inset-top,0px))}
  .tour-close{top:4px;right:max(8px,env(safe-area-inset-right,0px))}
  .tour-card.at-top .tour-close{top:calc(4px + env(safe-area-inset-top,0px))}
  .tour-f .btn{flex:1}
}
@media (prefers-reduced-motion:reduce){.tour-spot,.tour-card,.tour-rail i{transition:none}.tour-card{transform:none}}

/* confetti when a tour finishes (adapted from MGT) */
.mf-conf{position:fixed;inset:0;z-index:1200;pointer-events:none;overflow:hidden;contain:strict}
.mf-conf i{position:absolute;top:-24px;display:block;border-radius:2px;opacity:0;will-change:transform,opacity}
