/* Обучение новичка: затемнение с «дыркой» вокруг подсвеченного элемента.
   Дырку делает не маска, а тень радиусом в экран — так работает и в старых Safari. */
.tour {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;   /* без inset: Safari до 14.1 его не знает */
  z-index: 90;
  opacity: 0;
  transition: opacity .22s ease;
}
.tour.is-on { opacity: 1; }
.tour.is-hiding { opacity: 0; }

/* ловит тапы мимо подсветки и уводит на следующий шаг */
.tour-veil {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: background .2s ease;
}
/* шаг без подсветки: затемнение делать нечему, красим саму вуаль */
.tour.is-plain .tour-veil { background: rgba(0, 0, 0, .74); }

.tour-spot {
  position: absolute;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, .74);
  border: 2px solid rgba(255, 255, 255, .9);
  pointer-events: none;
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
/* лёгкая пульсация, чтобы взгляд сразу попадал в нужное место */
.tour-spot::after {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: inherit;
  border: 2px solid rgba(255, 10, 75, .55);
  animation: tour-pulse 1.6s ease-out infinite;
}
@keyframes tour-pulse {
  0%   { transform: scale(.94); opacity: .9; }
  70%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* первый шаг — про свайп: стрелка вверх по центру экрана */
.tour-swipe {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 62px;
  height: 62px;
  margin-left: -31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  animation: tour-float 1.5s ease-in-out infinite;
  pointer-events: none;
}
.tour-swipe svg { width: 30px; height: 30px; }
@keyframes tour-float {
  0%, 100% { transform: translateY(10px); opacity: .55; }
  50%      { transform: translateY(-10px); opacity: 1; }
}

.tour-card {
  position: absolute;
  left: 16px;
  right: 16px;
  max-width: 340px;
  margin: 0 auto;
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: var(--surface, #1c1c1e);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  color: var(--fg, #fafafa);
}
.tour-card.is-centered { top: 50%; transform: translateY(-50%); }
.tour-card.is-bottom { top: auto; bottom: calc(var(--tabbar-h, 58px) + var(--safe-b, 0px) + 24px); }

.tour-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}
.tour-card p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted, rgba(250, 250, 250, .6));
}

.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-dots { display: flex; gap: 6px; }
.tour-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
}
.tour-dots i.is-on {
  width: 18px;
  border-radius: 3px;
  background: var(--accent, #e30045);
}

.tour-buttons { display: flex; align-items: center; gap: 8px; }
.tour-skip {
  padding: 8px 10px;
  border: 0;
  background: none;
  color: var(--muted, rgba(250, 250, 250, .6));
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.tour-next {
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-gradient, linear-gradient(135deg, #ff0a4b, #8f0050));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

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