/* Обучение по шагам. Цвета берутся из сайта или кабинета, чтобы подсказки
   выглядели частью страницы, а не чужим окном. */
.tour { --ta: var(--brand, var(--accent, #1b3a2b)); --tg: var(--gold, #c9a227); --tink: var(--ink, var(--text, #1f2c29));
        position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; visibility: hidden; font-family: inherit; }
.tour.on { visibility: visible; }
.tour-catch { position: absolute; inset: 0; pointer-events: auto; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(14, 26, 21, .62); pointer-events: none;
             transition: left .45s cubic-bezier(.2,.8,.2,1), top .45s cubic-bezier(.2,.8,.2,1), width .45s cubic-bezier(.2,.8,.2,1), height .45s cubic-bezier(.2,.8,.2,1), opacity .3s; opacity: 0; }
.tour.on .tour-hole { opacity: 1; }
.tour.noel .tour-hole { box-shadow: 0 0 0 200vmax rgba(14, 26, 21, .62); }
.tour-ring { position: absolute; inset: -3px; border-radius: inherit; border: 3px solid var(--tg); animation: tourRing 1.6s ease-out infinite; }
.tour.noel .tour-ring { display: none; }
@keyframes tourRing { 0% { box-shadow: 0 0 0 0 rgba(255, 214, 102, .7); } 70% { box-shadow: 0 0 0 14px rgba(255, 214, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 214, 102, 0); } }

.tour-arrow { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: visible; color: #ffd666; pointer-events: none; }
.tour-path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dashoffset: var(--len, 600);
             filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.tour-arrow.draw .tour-path { animation: tourDraw .65s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes tourDraw { to { stroke-dashoffset: 0; } }

.tour-card { position: fixed; pointer-events: auto; background: #fff; color: var(--tink); border-radius: 20px; padding: 16px 18px 14px;
             box-shadow: 0 24px 60px -18px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.04); opacity: 0; transform: translateY(10px) scale(.97);
             transition: opacity .3s, transform .35s cubic-bezier(.2,.9,.3,1.25), left .45s cubic-bezier(.2,.8,.2,1), top .45s cubic-bezier(.2,.8,.2,1); }
.tour-card.show { opacity: 1; transform: none; }
.tour-card.nudge { animation: tourNudge .45s; }
@keyframes tourNudge { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.tour-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tour-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, #fff4d6, #ffe3a3); flex: none; animation: tourBob 2.4s ease-in-out infinite; }
@keyframes tourBob { 50% { transform: translateY(-3px) rotate(-4deg); } }
.tour-dots { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: #e2e5e3; transition: width .3s, background .3s; }
.tour-dots i.was { background: color-mix(in srgb, var(--ta) 45%, #fff); }
.tour-dots i.on { width: 20px; background: var(--ta); }
.tour-mute, .tour-x { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 15px; color: #8a938f; margin: 0; padding: 0; box-shadow: none; display: grid; place-items: center; }
.tour-mute:hover, .tour-x:hover { background: #f1f3f2; }
.tour-t { margin: 0 0 4px; font-size: 19px; line-height: 1.25; font-weight: 800; color: var(--tink); font-family: inherit; }
.tour-p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.5; color: #4b5753; }
.tour-btns { display: flex; align-items: center; gap: 8px; }
.tour-btns span { flex: 1; }
.tour-btns button { margin: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; padding: 10px 16px; font-size: 15px; box-shadow: none; }
.tour-skip { background: transparent; border: 0; color: #8a938f; padding: 10px 4px !important; font-weight: 600 !important; text-decoration: underline; text-underline-offset: 3px; }
.tour-back { background: #f1f3f2; border: 0; color: var(--tink); }
.tour-next { background: var(--ta); border: 0; color: #fff; min-width: 108px; box-shadow: 0 8px 18px -8px var(--ta) !important; }
.tour-next:focus-visible { outline: 3px solid var(--tg); outline-offset: 2px; }

/* Палец, который «нажимает» */
.tour-finger { position: fixed; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; opacity: 0;
               transition: left .75s cubic-bezier(.45,.05,.2,1), top .75s cubic-bezier(.45,.05,.2,1), opacity .25s; }
.tour-finger.on { opacity: 1; }
.tour-finger span { position: absolute; left: -8px; top: -4px; font-size: 38px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); transition: transform .15s; transform-origin: 30% 10%; }
.tour-finger.press span { transform: scale(.82) translateY(3px); }
.tour-finger i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #ffd666; opacity: 0; }
.tour-finger.press i { animation: tourTap .6s ease-out; }
@keyframes tourTap { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }

/* Поле, в которое «печатают» пример */
.tour-typing { caret-color: transparent; background-image: linear-gradient(90deg, rgba(255, 214, 102, .18), rgba(255, 214, 102, .05)) !important;
               box-shadow: 0 0 0 3px rgba(255, 214, 102, .55) !important; }

/* Кнопка «Обучение» */
.tour-fab { position: fixed; left: 14px; bottom: 14px; z-index: 70; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px; margin: 0;
            border-radius: 99px; border: 1px solid rgba(0,0,0,.08); background: #fff; color: #1f2c29; font: inherit; font-size: 14px; cursor: pointer;
            box-shadow: 0 10px 24px -12px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s; }
.tour-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(0,0,0,.4); }
.tour-fab span { font-size: 18px; }
.tour-fab b { font-weight: 700; }
@media (max-width: 700px) {
  .tour-fab { height: 40px; width: 40px; padding: 0; justify-content: center; }
  .tour-fab b { display: none; }
  .tour-card { border-radius: 18px; padding: 14px 16px 12px; }
  .tour-t { font-size: 18px; }
  .tour-p { font-size: 15px; }
}
@media print { .tour, .tour-fab { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-card, .tour-finger { transition: none; }
  .tour-ring, .tour-ava { animation: none; }
}
