/* Обучение внутри системы (tour.js): подсказки и баннер экрана. Только токены design.css — своей палитры
   у обучения нет (docs/onboarding.md, раздел 2); кнопки — .btn системы дизайна. */
.tour-spot {
  position: fixed; z-index: 1001; pointer-events: none; border-radius: var(--radius);
  /* Рамка видна и без цвета: светлое кольцо внутри тёмного, вокруг — затемнение страницы с прорезью. */
  box-shadow: 0 0 0 2px hsl(var(--light)), 0 0 0 4px hsl(var(--dark)), 0 0 0 9999px hsl(var(--dark) / .55);
  transition: left .2s ease-out, top .2s ease-out, width .2s ease-out, height .2s ease-out;
}
.tour-pop {
  position: fixed; z-index: 1002; width: min(360px, 90vw); max-height: 50vh; overflow-y: auto;
  padding: 16px; background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}
.tour-pop:focus { outline: none; }
.tour-pop.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-pop.phone { left: 5vw; right: 5vw; width: 90vw; top: auto; bottom: 8px; }
.tour-pop.phone.at-top { top: 56px; bottom: auto; }
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tour-counter { font-size: 12px; color: hsl(var(--muted-foreground)); }
.tour-skip { font-size: 13px; color: hsl(var(--muted-foreground)); }
.tour-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.tour-text { margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.tour-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tour-pop.phone .btn { min-height: 44px; }
.tour-pop.phone .tour-skip { min-height: 44px; padding: 0 4px; }
.tour-arrow {
  position: absolute; width: 12px; height: 12px; background: hsl(var(--card));
  border: 1px solid hsl(var(--border)); transform: rotate(45deg);
}
.tour-arrow.up { top: -7px; border-right: 0; border-bottom: 0; }
.tour-arrow.down { bottom: -7px; border-left: 0; border-top: 0; }

/* Баннер экрана: полоса под шапкой в тёплом тоне --muted, работу не блокирует. */
.tour-banner {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 10px 12px;
  background: hsl(var(--muted)); color: hsl(var(--foreground)); border-radius: var(--radius); font-size: 14px;
}
.tour-banner-mark {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-size: 12px; font-weight: 800;
}
.tour-banner-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.tour-banner-text { margin: 0; line-height: 20px; }
.tour-banner-show { font-size: 14px; text-decoration: underline; }
.tour-banner-close {
  flex: none; width: 28px; height: 28px; margin: -4px -4px -4px 0; padding: 0; border: 0; border-radius: var(--radius);
  background: transparent; color: hsl(var(--muted-foreground)); font-size: 18px; line-height: 1; cursor: pointer;
}
.tour-banner-close:hover { background: hsl(var(--border)); color: hsl(var(--foreground)); }
.tour-banner-close:focus-visible, .tour-help-top:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring) / .5); }
@media (max-width: 767px) {
  .tour-banner-close { width: 44px; height: 44px; margin: -12px -12px -12px 0; }
  .tour-banner-show { min-height: 44px; margin: -10px 0; } /* касание 44px без лишней высоты полосы */
}

/* Кнопка «?» в шапке телефона (на компьютере — значок рядом с настройками в левой панели). */
.tour-help-top {
  display: none; margin-left: auto; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0;
  background: transparent; color: hsl(var(--foreground)); cursor: pointer; place-items: center;
}
@media (max-width: 767px) { .tour-help-top { display: grid; } }

@media (prefers-reduced-motion: reduce) {
  .tour-spot { transition: none; }
}

/* «?» в левой панели — тот же значок, что шестерёнка рядом (.icon-btn), но это кнопка: без фона браузера. */
#tour-help { background: transparent; padding: 0; cursor: pointer; }
#tour-help:hover { background: hsl(0 0% 100% / .08); }

/* Чек-лист первого дня над лентой: компактная карточка, пункты в строку с переносом. */
.tour-checklist {
  margin: 0 0 16px; padding: 12px 16px; background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}
.tour-checklist-head { display: flex; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.tour-checklist-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.tour-checklist-count { font-size: 13px; color: hsl(var(--muted-foreground)); }
.tour-checklist-head .btn { margin-left: auto; }
.tour-checklist-items { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.tour-checklist-items li { display: flex; align-items: center; gap: 8px; }
.tour-checklist-items li.done { color: hsl(var(--muted-foreground)); text-decoration: line-through; }
.tour-checklist-items .btn-link { font-size: 13px; text-decoration: underline; }
.tour-checklist-items a { color: inherit; }
.tour-checklist-mark {
  flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid hsl(var(--border)); font-size: 11px; font-weight: 800;
}
.tour-checklist-items li.done .tour-checklist-mark { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.tour-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 767px) {
  .tour-checklist-items { flex-direction: column; }
  .tour-checklist-items li { min-height: 32px; }
}
