/* The guided tour (js/tour.js): the page dimmed a little, the control lit up, a small card beside it.
   On phones the card is a sheet at the bottom (or the top, when the control is low). */
.tour-dim { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: none; }
.tour-dim.on { display: block; }
.tour-dim svg { display: block; }
.tour-dim path { fill: rgb(0 0 0 / .40); pointer-events: auto; }
.tour-ring { position: fixed; z-index: 1001; pointer-events: none; display: none; border-radius: 12px; box-shadow: 0 0 0 2px var(--apple-blue), 0 0 0 6px color-mix(in srgb, var(--apple-blue) 28%, transparent); transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease; }
.tour-ring.on { display: block; }
.tour-card { position: fixed; z-index: 1002; display: none; width: 340px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; padding: 14px 16px 14px; border-radius: 16px; background: var(--elev); color: var(--label); box-shadow: 0 18px 50px rgb(0 0 0 / .30), 0 0 0 1px var(--hair); font-size: 14.5px; line-height: 1.45; }
.tour-card.on { display: block; }
.tour-card.nudge { animation: tour-nudge .35s ease; }
@keyframes tour-nudge { 30% { transform: translateX(-5px); } 70% { transform: translateX(5px); } }
.tour-card h3 { margin: 2px 26px 4px 0; font-size: 17px; letter-spacing: -.01em; }
.tour-card p { margin: 0 0 6px; color: var(--label2); }
.tour-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--apple-blue); text-transform: none; }
.tour-skip { margin-left: auto; margin-right: 26px; border: 0; background: none; padding: 0; font: inherit; color: var(--label2); cursor: pointer; }
.tour-x { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--fill); color: var(--label2); cursor: pointer; }
.tour-keys { margin: 6px 0 8px; padding: 0 0 0 18px; color: var(--label2); }
.tour-keys li { margin: 3px 0; } .tour-keys b { color: var(--label); font-weight: 600; white-space: nowrap; } .tour-keys b svg { vertical-align: -2px; }
.tour-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tour-card.sheet { width: auto; max-width: none; border-radius: 20px; padding: 14px 16px 16px; }
/* The small chip a returning visitor sees on a screen they haven't toured yet */
.tour-chip { position: fixed; z-index: 900; left: 50%; top: 64px; transform: translateX(-50%); width: max-content; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--elev); box-shadow: 0 8px 28px rgb(0 0 0 / .22), 0 0 0 1px var(--hair); font-size: 13.5px; font-weight: 500; max-width: calc(100vw - 24px); animation: tour-in .25s ease; }
.tour-chip .tour-x { position: static; width: 24px; height: 24px; flex: none; }
.tour-chip .btn { white-space: nowrap; }
body.phone .tour-chip { top: 70px; }
@keyframes tour-in { from { opacity: 0; transform: translate(-50%, -6px); } }
/* Welcome back: a small card in the corner, nothing dimmed */
.tour-wb { position: fixed; z-index: 900; right: 16px; bottom: 16px; width: 330px; max-width: calc(100vw - 24px); padding: 14px 16px; border-radius: 16px; background: var(--elev); box-shadow: 0 18px 50px rgb(0 0 0 / .28), 0 0 0 1px var(--hair); font-size: 14.5px; line-height: 1.45; animation: tour-up .25s ease; }
.tour-wb h3 { margin: 0 26px 4px 0; font-size: 17px; } .tour-wb p { margin: 0; color: var(--label2); }
@keyframes tour-up { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 759px) {
  .tour-chip { top: calc(60px + env(safe-area-inset-top)); }
  .tour-wb { left: 12px; right: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } .tour-card.nudge, .tour-chip, .tour-wb { animation: none; } }

.tour-sp { flex: 1; }
.tour-sr { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Bigger targets for Skip and close (the drawn button stays small), notes above the tour, welcome back clear of Messages */
.tour-card .tour-x::after, .tour-wb .tour-x::after { content: ""; position: absolute; inset: -9px; }
.tour-skip { padding: 12px 8px; margin-block: -12px; }
body.touring .fb-toast { z-index: 1003 !important; }
.tour-wb.left { right: auto; left: 260px; }
