/* FR-745 · Product Tour — overlay, spotlight и подсказка.
   Затемнение рисует не отдельный слой, а сама подсветка: огромный spread
   box-shadow закрывает всё, кроме «окна» над элементом. Клики по кабинету
   перехватывает прозрачный .tour-blocker под ней. */
.tour-blocker { position: fixed; inset: 0; z-index: 199; }
/* цели нет — затемняем экран целиком */
.tour-blocker.dim { background: rgba(20, 15, 8, .55); }

.tour-spot {
  position: fixed; z-index: 200; pointer-events: none; border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(20, 15, 8, .55), 0 0 0 2px var(--accent);
  transition: top .45s ease, left .45s ease, width .45s ease, height .45s ease;
}

.tour-tip {
  position: fixed; z-index: 201; width: 340px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
  padding: 16px 18px 14px; font-family: var(--body);
}
.tour-tip__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.tour-count {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tour-skip {
  background: none; border: 0; padding: 0; font: inherit; font-size: 13px;
  color: var(--muted); text-decoration: underline; cursor: pointer;
}
.tour-skip:hover { color: var(--ink); }
.tour-tip h4 { margin: 0 0 6px; font-family: var(--head); font-size: 17px; }
.tour-tip p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.tour-bar {
  height: 3px; border-radius: 3px; background: var(--line);
  margin: 14px 0 12px; overflow: hidden;
}
.tour-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.tour-nav { display: flex; gap: 8px; justify-content: flex-end; }
.tour-nav .btn { padding: 8px 16px; font-size: 13.5px; }

/* Телефон: подсказка во всю ширину экрана с полями, кнопки — под палец. */
@media (max-width: 820px) {
  .tour-tip { width: calc(100vw - 24px); padding: 14px 16px 12px; }
  .tour-tip h4 { font-size: 16px; }
  .tour-nav .btn { flex: 1; }
}

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

/* FR-823 · пульсирующая рамка вокруг подсвеченного элемента */
.tour-spot::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit;
  border: 2px solid var(--accent); animation: tour-pulse 1.6s ease-out infinite;
}
@keyframes tour-pulse {
  0% { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}

/* FR-823 · пример рекомендации «Создание портфеля» в подсказке */
.tour-tip { max-height: calc(100vh - 24px); overflow-y: auto; }
.tour-rec {
  margin: 12px 0 0; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--bg);
}
.tour-rec__head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.tour-rec__head span { color: var(--muted); }
.tour-rec__row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 3px 0; }
.tour-rec__row b { font-family: var(--mono); font-weight: 600; }
.tour-rec__note { margin: 8px 0 0 !important; font-size: 12px !important; }

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

/* FR-823 · подсказка гаснет на время перехода между шагами */
.tour-tip { transition: opacity .22s ease; }
.tour-tip.is-moving { opacity: 0; pointer-events: none; }
.tour-rec__more { color: var(--muted); font-size: 12px; padding: 3px 0 0; }

/* FR-873 · вводный шаг: кто мы и как это работает */
.tour-tip--wide { width: 440px; }
.tour-flow {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.tour-flow li {
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  font-size: 12.5px; line-height: 1.35;
}
.tour-flow b {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); font-family: var(--mono); font-size: 12px;
}
.tour-tip p.tour-intro__note {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  color: var(--ink); font-size: 13px;
}
@media (max-width: 820px) {
  .tour-tip--wide { width: calc(100vw - 24px); }
  .tour-flow { grid-template-columns: 1fr; gap: 6px; }
  .tour-flow li { flex-direction: row; align-items: center; padding: 8px 10px; }
  .tour-flow b { flex: none; }
}
