/* Обучение при первом входе и мелкие детали движения (см. motion.js).

   Подача — как у презентаций на apple.com: плоский фон без градиентов,
   крупный плотный заголовок, короткий серый подзаголовок и «герой» по
   центру — живые стикеры из каталога. Текст появляется из лёгкого
   размытия, стикеры — с небольшим подъёмом и масштабом.

   Всё появление сделано отдельными свойствами translate / scale / filter,
   а не transform и opacity: те два ставит motion.js при свайпе, и анимация
   появления не должна с ними спорить. */

body.ob-open { overflow: hidden; }

.ob {
    --ob-ease: cubic-bezier(0.28, 0.11, 0.32, 1);
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card);
    color: var(--text);
    font-family: var(--font-body);
    padding-top: calc(var(--safe-top, 0px) + var(--content-top, 0px));
    padding-bottom: max(var(--safe-bottom, 0px), env(safe-area-inset-bottom, 0px));
    animation: ob-in 0.7s var(--ob-ease) both;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
body.dark .ob { background: #000; }
.ob--leave { animation: ob-out 0.55s var(--ob-ease) both; pointer-events: none; }
@keyframes ob-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ob-out { to { opacity: 0; scale: 1.03; } }

/* ---- шапка: точки по центру, «Пропустить» справа ---- */
.ob-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 20px;
}
.ob-dots { display: flex; gap: 6px; }
.ob-dots i {
    display: block;
    width: 6px; height: 6px;
    border-radius: 3px;
    background: var(--text);
    cursor: pointer;
}
.ob-skip {
    position: absolute;
    right: 12px;
    border: 0; background: none;
    color: var(--brand);
    font: inherit; font-size: 17px;
    padding: 10px 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.ob--last .ob-skip { opacity: 0; pointer-events: none; }

/* ---- слайд: текст сверху, герой снизу ---- */
.ob-track { position: relative; flex: 1; min-height: 0; }
.ob-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    max-width: 520px;
    margin: 0 auto;
    padding: 18px 28px 0;
    will-change: transform;
}
.ob-copy { text-align: center; }
.ob-eyebrow {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--brand);
}
.ob-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(30px, 9vw, 44px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
}
.ob-sub {
    margin: 14px auto 0;
    max-width: 340px;
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.012em;
    color: var(--hint);
}

/* Текст появляется лесенкой: подъём и проявление из размытия. */
.ob-eyebrow, .ob-title, .ob-sub {
    translate: 0 18px;
    filter: blur(8px);
    transition: translate 0.9s var(--ob-ease), filter 0.9s var(--ob-ease);
}
.ob-slide--on .ob-eyebrow,
.ob-slide--on .ob-title,
.ob-slide--on .ob-sub { translate: 0 0; filter: blur(0); }
.ob-slide--on .ob-title { transition-delay: 0.07s; }
.ob-slide--on .ob-sub { transition-delay: 0.14s; }

.ob-stage {
    position: relative;
    flex: 1;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ob-hero { position: relative; width: 100%; height: 100%; }
.ob-hero > * { will-change: transform; }

/* Заглушка на время загрузки стикера — ровный серый круг, без мигания. */
.ob-sticker {
    position: relative;
    aspect-ratio: 1;
}

.ob-sticker svg { display: block; }

/* Появление героев — пружиной: элемент выпрыгивает чуть больше нужного
   и оседает, как стикер, брошенный в чат. Пока слайд не активен, герои
   спрятаны; анимация запускается заново при каждом заходе на слайд. */
@keyframes ob-pop {
    0%   { opacity: 0; scale: 0.4; translate: 0 40px; rotate: -8deg; }
    55%  { opacity: 1; scale: 1.08; translate: 0 -6px; rotate: 2deg; }
    78%  { scale: 0.97; translate: 0 2px; rotate: -1deg; }
    100% { opacity: 1; scale: 1; translate: 0 0; rotate: 0deg; }
}
@keyframes ob-rise {
    0%   { opacity: 0; translate: 0 60px; scale: 0.9; }
    60%  { opacity: 1; translate: 0 -6px; scale: 1.02; }
    100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes ob-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -10px; }
}

/* 1 — три стикера: главный по центру, два поменьше по бокам */
.ob-hero--trio .ob-sticker { position: absolute; top: 50%; left: 50%; opacity: 0; }
.ob-sticker--main {
    width: min(58vw, 230px);
    margin: calc(min(58vw, 230px) / -2) 0 0 calc(min(58vw, 230px) / -2);
    z-index: 2;
}
.ob-sticker--side {
    width: min(30vw, 120px);
    margin: calc(min(30vw, 120px) / -2) 0 0 calc(min(30vw, 120px) / -2);
}
.ob-hero--trio .ob-sticker--l { left: 17%; top: 24%; }
.ob-hero--trio .ob-sticker--r { left: 83%; top: 78%; }
.ob-slide--on .ob-hero--trio .ob-sticker {
    animation: ob-pop 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both, ob-float 4s ease-in-out 1s infinite;
}
.ob-slide--on .ob-hero--trio .ob-sticker--l { animation-delay: 0.18s, 1.3s; }
.ob-slide--on .ob-hero--trio .ob-sticker--r { animation-delay: 0.32s, 1.6s; }
/* Мягкая тень-эллипс под главным стикером: он «висит» над полом. */
.ob-shadow {
    position: absolute;
    left: 50%; top: calc(50% + min(29vw, 115px));
    width: min(36vw, 140px); height: 6px;
    margin-left: calc(min(36vw, 140px) / -2);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.10);
    box-shadow: 0 0 18px 10px rgba(0, 0, 0, 0.10);
    opacity: 0;
}
body.dark .ob-shadow { background: rgba(0, 0, 0, 0.5); box-shadow: 0 0 18px 10px rgba(0, 0, 0, 0.5); }
.ob-slide--on .ob-shadow { opacity: 1; transition: opacity 0.8s ease 0.4s; }

/* 2 — карточки магазина: скруглённые углы, оверлеи автора, лайков, цены */
.ob-hero--market {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: center;
    max-width: 340px;
    margin: 0 auto;
}
.ob-mk {
    position: relative;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 1px 0 var(--sep), 0 10px 28px rgba(0, 0, 0, 0.08);
    padding: 6px;
    opacity: 0;
}
body.dark .ob-mk { background: #1C1C1E; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.ob-mk__art {
    aspect-ratio: 1;
    border-radius: 17px;
    background: var(--bg);
    display: grid;
    place-items: center;
    overflow: hidden;
}
body.dark .ob-mk__art { background: #2C2C2E; }
.ob-mk__art .ob-sticker { width: 88%; }
.ob-mk__author, .ob-mk__likes, .ob-mk__price {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 980px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}
.ob-mk__author {
    left: 12px; bottom: 12px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
}
.ob-mk__likes {
    left: 12px; top: 12px;
    color: #FF2D55;
    background: rgba(255, 255, 255, 0.82);
}
.ob-mk__likes svg { width: 12px; height: 12px; fill: currentColor; }
.ob-mk__price {
    right: 12px; top: 12px;
    color: #fff;
    background: var(--brand);
}
.ob-slide--on .ob-mk {
    animation: ob-rise 0.85s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    animation-delay: calc(var(--i) * 0.09s);
}
.ob-slide--on .ob-mk__likes,
.ob-slide--on .ob-mk__price {
    animation: ob-pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    animation-delay: calc(0.5s + var(--i) * 0.09s);
}
.ob-slide--on .ob-mk:first-child .ob-mk__likes svg { animation: ob-beat 1.4s ease-in-out 1.4s infinite; }
@keyframes ob-beat { 0%, 100% { scale: 1; } 12% { scale: 1.35; } 24% { scale: 1; } }

/* Поддержка — сцена в айфоне. Один цикл = 6 секунд:
   0–35%  набор собирается, полоса бежит;
   38%    полоса краснеет и дёргается, сверху падает уведомление об ошибке;
   55%    снизу выезжает карточка @RHINO;
   72%    касание по карточке;
   92%    всё гаснет, круг начинается заново. */
.ob-hero--support { display: grid; place-items: center; }
.ob-phone {
    position: relative;
    width: min(56vw, 210px);
    aspect-ratio: 9 / 18.5;
    max-height: 100%;
    padding: 9px;
    border-radius: 40px;
    background: #1D1D1F;
    box-shadow: inset 0 0 0 2px #3A3A3C, 0 24px 50px rgba(0, 0, 0, 0.22);
    opacity: 0;
}
.ob-slide--on .ob-phone { animation: ob-rise 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.ob-phone__island {
    position: absolute;
    top: 16px; left: 50%;
    width: 64px; height: 18px;
    margin-left: -32px;
    border-radius: 12px;
    background: #000;
    z-index: 3;
}
.ob-phone__screen {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 31px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
body.dark .ob-phone__screen { background: #111; }
.ob-ph-sticker { width: 62%; aspect-ratio: 1; }
.ob-ph-bar {
    width: 64%;
    height: 6px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--text) 10%, transparent);
    overflow: hidden;
}
.ob-ph-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); }

.ob-ph-toast {
    position: absolute;
    top: 40px; left: 8px; right: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    font-size: 11px;
    line-height: 1.25;
    translate: 0 -140%;
    opacity: 0;
}
body.dark .ob-ph-toast { background: #2C2C2E; }
.ob-ph-toast__ic {
    flex: none;
    display: grid; place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #FF3B30;
    color: #fff;
    font-style: normal;
    font-weight: 900;
    font-size: 13px;
}

.ob-ph-help {
    position: absolute;
    left: 8px; right: 8px; bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    translate: 0 130%;
}
body.dark .ob-ph-help { background: #2C2C2E; }
.ob-ph-help__ava {
    flex: none;
    display: grid; place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--brand);
}
.ob-ph-help__ava svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ob-ph-help__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ob-ph-help__body b { font-size: 9.5px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ob-ph-help__body small { font-size: 10px; color: var(--brand); font-weight: 700; }
.ob-ph-help__go {
    flex: none;
    width: 7px; height: 7px;
    margin-right: 4px;
    border-top: 2px solid var(--hint);
    border-right: 2px solid var(--hint);
    transform: rotate(45deg);
}
.ob-ph-tap {
    position: absolute;
    left: 60%; top: 50%;
    width: 26px; height: 26px;
    margin: -13px 0 0 -13px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.9);
    opacity: 0;
}

.ob-slide--on .ob-ph-bar i     { animation: ob-ph-bar 6s ease-in-out 0.6s infinite; }
.ob-slide--on .ob-ph-bar       { animation: ob-ph-shake 6s linear 0.6s infinite; }
.ob-slide--on .ob-ph-toast     { animation: ob-ph-toast 6s cubic-bezier(0.2, 0.9, 0.3, 1) 0.6s infinite; }
.ob-slide--on .ob-ph-help      { animation: ob-ph-help 6s cubic-bezier(0.2, 0.9, 0.3, 1) 0.6s infinite; }
.ob-slide--on .ob-ph-tap       { animation: ob-ph-tap 6s ease 0.6s infinite; }
.ob-slide--on .ob-ph-sticker   { animation: ob-ph-dim 6s ease 0.6s infinite; }

@keyframes ob-ph-bar {
    0%   { width: 0; background: var(--brand); }
    34%  { width: 72%; background: var(--brand); }
    38%  { width: 72%; background: #FF3B30; }
    92%  { width: 72%; background: #FF3B30; opacity: 1; }
    100% { width: 72%; background: #FF3B30; opacity: 0; }
}
@keyframes ob-ph-shake {
    0%, 37%, 45%, 100% { translate: 0 0; }
    39% { translate: -5px 0; }
    41% { translate: 5px 0; }
    43% { translate: -3px 0; }
}
@keyframes ob-ph-toast {
    0%, 37%  { translate: 0 -140%; opacity: 0; }
    43%      { translate: 0 6%; opacity: 1; }
    47%, 88% { translate: 0 0; opacity: 1; }
    95%, 100% { translate: 0 -140%; opacity: 0; }
}
@keyframes ob-ph-help {
    0%, 52%  { translate: 0 130%; }
    60%      { translate: 0 -6%; }
    64%, 88% { translate: 0 0; }
    72%      { scale: 1; }
    74%      { scale: 0.96; }
    77%      { scale: 1; }
    95%, 100% { translate: 0 130%; }
}
@keyframes ob-ph-tap {
    0%, 66%  { opacity: 0; scale: 1.4; }
    70%      { opacity: 1; scale: 1; }
    74%      { opacity: 1; scale: 0.8; box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); }
    82%      { opacity: 0; scale: 1; box-shadow: 0 0 0 16px transparent; }
    100%     { opacity: 0; }
}
@keyframes ob-ph-dim {
    0%, 36%  { opacity: 1; filter: none; }
    40%, 90% { opacity: 0.35; filter: grayscale(1); }
    100%     { opacity: 1; filter: none; }
}

/* 3 — сцена «пополнение в два касания» */
.ob-scene {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.ob-scene > * { opacity: 0; }
.ob-slide--on .ob-scene > .ob-bal { animation: ob-pop 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.ob-slide--on .ob-scene > .ob-methods { animation: ob-rise 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) 0.2s both; }
.ob-slide--on .ob-scene > .ob-paybtn { animation: ob-rise 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) 0.32s both; }
.ob-slide--on .ob-scene > .ob-finger { opacity: 1; }

/* Карточка баланса */
.ob-bal {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(78vw, 300px);
    padding: 16px 20px;
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 1px 0 var(--sep), 0 18px 40px rgba(0, 0, 0, 0.09);
}
body.dark .ob-bal { background: #1C1C1E; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.ob-bal__icon { width: 60px; height: 60px; flex: none; }
.ob-bal__body { display: flex; align-items: baseline; gap: 6px; }
/* Счётчик — текстовым шрифтом с моноширинными цифрами: у дисплейного
   цифры разной ширины, и при подсчёте число «прыгало» по строке. */
.ob-bal__num {
    font-family: var(--font-body);
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    min-width: 3.4ch;
    transition: color 0.4s ease;
}
.ob-bal__body small { font-size: 15px; font-weight: 700; color: var(--hint); }
.ob-scene.is-done .ob-bal__num { color: #34C759; animation: ob-num 1.4s ease 0.9s forwards; }
@keyframes ob-num { to { color: var(--text); } }
.ob-scene.is-done .ob-bal { animation: ob-bump 0.6s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes ob-bump { 40% { scale: 1.06; } 100% { scale: 1; } }

/* «+500» всплывает над карточкой */
.ob-bal__plus {
    position: absolute;
    right: 16px; top: -10px;
    padding: 2px 12px 4px;
    border-radius: 980px;
    background: #34C759;
    color: #fff;
    font-family: var(--font-hand);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    opacity: 0;
}
.ob-scene.is-done .ob-bal__plus { animation: ob-plus 1.6s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes ob-plus {
    0%   { opacity: 0; translate: 0 10px; scale: 0.6; }
    25%  { opacity: 1; translate: 0 -16px; scale: 1.1; }
    70%  { opacity: 1; translate: 0 -22px; scale: 1; }
    100% { opacity: 0; translate: 0 -34px; scale: 1; }
}

/* Звёзды разлетаются из карточки */
.ob-burst { position: absolute; left: 44px; top: 50%; width: 0; height: 0; pointer-events: none; }
.ob-burst i {
    position: absolute;
    left: -9px; top: -9px;
    width: 18px; height: 18px;
    background: url(/static/icons/brands/star.svg) center / contain no-repeat;
    opacity: 0;
}
.ob-burst i:nth-child(1) { --a: 0deg; --d: 70px; --s: 0.60; }
.ob-burst i:nth-child(2) { --a: 30deg; --d: 88px; --s: 0.75; }
.ob-burst i:nth-child(3) { --a: 60deg; --d: 106px; --s: 0.90; }
.ob-burst i:nth-child(4) { --a: 90deg; --d: 70px; --s: 1.05; }
.ob-burst i:nth-child(5) { --a: 120deg; --d: 88px; --s: 0.60; }
.ob-burst i:nth-child(6) { --a: 150deg; --d: 106px; --s: 0.75; }
.ob-burst i:nth-child(7) { --a: 180deg; --d: 70px; --s: 0.90; }
.ob-burst i:nth-child(8) { --a: 210deg; --d: 88px; --s: 1.05; }
.ob-burst i:nth-child(9) { --a: 240deg; --d: 106px; --s: 0.60; }
.ob-burst i:nth-child(10) { --a: 270deg; --d: 70px; --s: 0.75; }
.ob-burst i:nth-child(11) { --a: 300deg; --d: 88px; --s: 0.90; }
.ob-burst i:nth-child(12) { --a: 330deg; --d: 106px; --s: 1.05; }
.ob-scene.is-done .ob-burst i { animation: ob-burst 1.1s cubic-bezier(0.15, 0.8, 0.3, 1) both; }
@keyframes ob-burst {
    0%   { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(0.2); }
    15%  { opacity: 1; }
    100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(var(--s)) rotate(180deg); }
}

/* Способы оплаты — круглые логотипы; выбранный получает синее кольцо */
.ob-methods { display: flex; gap: 14px; }
.ob-m {
    position: relative;
    width: 54px; height: 54px;
    border-radius: 17px;
    background: var(--card);
    box-shadow: 0 1px 0 var(--sep), 0 8px 20px rgba(0, 0, 0, 0.07);
    transition: scale 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.25s ease;
}
body.dark .ob-m { background: #1C1C1E; }
.ob-m img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.ob-m .ob-m__star { padding: 11px; background: #FFF4D6; border-radius: inherit; }
body.dark .ob-m .ob-m__star { background: rgba(255, 184, 0, 0.16); }
.ob-m.is-on {
    scale: 1.12;
    box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px var(--brand), 0 12px 26px rgba(0, 113, 227, 0.25);
}

/* Кнопка оплаты: нажатие — вдавливается, успех — галочка вместо суммы */
.ob-paybtn {
    position: relative;
    display: grid;
    place-items: center;
    width: min(60vw, 220px);
    height: 50px;
    border-radius: 980px;
    background: var(--brand);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    transition: scale 0.2s ease, background 0.35s ease, width 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.ob-scene:not(.is-picked) .ob-paybtn { background: color-mix(in srgb, var(--brand) 35%, var(--card)); }
.ob-scene.is-paying .ob-paybtn { scale: 0.94; }
.ob-scene.is-done .ob-paybtn { width: 50px; background: #34C759; scale: 1; }
.ob-paybtn__text { transition: opacity 0.2s ease; }
.ob-scene.is-done .ob-paybtn__text { opacity: 0; }
.ob-paybtn__ok {
    position: absolute;
    width: 12px; height: 22px;
    margin-top: -4px;
    border: solid #fff;
    border-width: 0 3.5px 3.5px 0;
    rotate: 45deg;
    scale: 0;
    transition: scale 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.15s;
}
.ob-scene.is-done .ob-paybtn__ok { scale: 1; }

/* Палец: полупрозрачный круг с волной при касании */
.ob-finger {
    position: absolute;
    left: 0; top: 0;
    width: 34px; height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0 !important;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s ease, scale 0.15s ease;
    z-index: 3;
}
body.dark .ob-finger { background: rgba(255, 255, 255, 0.25); }
.ob-finger.is-visible { opacity: 1 !important; }
.ob-finger.is-tap { scale: 0.8; }
.ob-finger::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--brand);
    opacity: 0;
}
.ob-finger.is-tap::after { animation: ob-ripple 0.55s ease-out; }
@keyframes ob-ripple { from { opacity: 0.9; scale: 1; } to { opacity: 0; scale: 2.4; } }

/* ---- низ: кнопка-таблетка и текстовые ссылки ---- */
.ob-foot {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 28px 22px;
    display: grid;
}
.ob-foot > * { grid-area: 1 / 1; align-self: end; }
.ob-btn {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 980px;
    padding: 0 24px;
    background: var(--brand);
    color: #fff;
    font: inherit; font-size: 17px; font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.2s ease, scale 0.15s ease, opacity 0.35s ease, translate 0.45s var(--ob-ease);
}
.ob-btn:hover { background: var(--brand-ink); }
.ob-btn:active { scale: 0.97; }
.ob-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; }
.ob-link {
    border: 0; background: none;
    color: var(--brand);
    font: inherit; font-size: 17px;
    letter-spacing: -0.01em;
    cursor: pointer;
    padding: 4px 0;
}
.ob-link::after { content: " \203A"; }
.ob-link:hover { text-decoration: underline; }
.ob-final {
    opacity: 0;
    translate: 0 16px;
    pointer-events: none;
    transition: opacity 0.4s ease, translate 0.6s var(--ob-ease);
}
.ob--last .ob-final { opacity: 1; translate: 0 0; pointer-events: auto; }
.ob--last .ob-next { opacity: 0; translate: 0 -10px; pointer-events: none; }

/* ---- «Как это работает» в разделе «Ещё» ---- */
.ob-replay {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 0;
    font: inherit; font-weight: 600;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.ob-replay span:nth-child(2) { flex: 1; }
.ob-replay__icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--bg);
    overflow: hidden;
    flex: none;
}
.ob-replay i {
    width: 8px; height: 8px;
    border-top: 2px solid var(--hint);
    border-right: 2px solid var(--hint);
    transform: rotate(45deg);
}

/* Бережный режим: без размытия при появлении — это самый дорогой
   эффект на слабых телефонах. Остаются подъём и масштаб. */
body.lite .ob * { filter: none !important; }
body.lite .ob-mk__author, body.lite .ob-mk__likes, body.lite .ob-mk__price {
    backdrop-filter: none; -webkit-backdrop-filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .ob, .ob *, .ob *::before, .ob *::after { animation: none !important; transition: none !important; }
    .ob-eyebrow, .ob-title, .ob-sub, .ob-sticker, .ob-mk, .ob-phone, .ob-scene > *:not(.ob-finger), .ob-mk__likes, .ob-mk__price {
        opacity: 1 !important;
        translate: none !important; scale: none !important; filter: none !important;
    }
}


/* ---- фон: узор из контуров стикеров набора ----
   Как обои чатов Telegram: контуры нарисованы маской, а цвет берётся из
   темы, поэтому узор одинаково тихий и на белом, и на чёрном. Ширина
   больше экрана — при перелистывании он медленно едет (самый дальний
   план параллакса). */
.ob-pattern {
    position: absolute;
    top: 0; bottom: 0;
    left: -20%;
    width: 160%;
    pointer-events: none;
    background: var(--text);
    opacity: 0.07;
    -webkit-mask: url(/static/onboarding/pattern.png) 0 0 / 300px 300px repeat;
    mask: url(/static/onboarding/pattern.png) 0 0 / 300px 300px repeat;
    will-change: transform;
}
body.dark .ob-pattern { opacity: 0.1; }
.ob-head, .ob-track, .ob-foot { position: relative; z-index: 1; }

/* ---- слайд выбора языка ---- */
.ob-stage--lang {
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 28px;
    overflow-y: auto;
}
.ob-langs {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 360px;
}
.ob-langs--more { grid-template-columns: 1fr 1fr; }
.ob-langs--more[hidden] { display: none; }
.ob-lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px;
    border: 1.5px solid var(--sep);
    border-radius: 16px;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, scale 0.15s ease;
}
.ob-langs--more .ob-lang { min-height: 46px; font-size: 15px; padding: 0 14px; }
.ob-lang:active { scale: 0.97; }
.ob-lang i {
    flex: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--sep);
    transition: border 0.2s ease, background 0.2s ease;
}
.ob-lang--on { border-color: var(--brand); }
.ob-lang--on i { border: 6px solid var(--brand); }
.ob-lang--other i {
    border: 0;
    border-radius: 0;
    width: 8px; height: 8px;
    border-top: 2px solid var(--hint);
    border-right: 2px solid var(--hint);
    transform: rotate(135deg);
    transition: transform 0.3s var(--ob-ease);
}
.ob--more-langs .ob-lang--other i { transform: rotate(-45deg); }
.ob-slide--lang .ob-sub { margin-top: 8px; font-size: 15px; }

.ob-paybtn__text { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.ob-paybtn__text img { width: 20px; height: 20px; }

/* ---- пошаговая подсказка (tour.js) ---- */
.tour { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.tour__spot {
    position: absolute;
    left: 0; top: 0;
    border-radius: 22px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 3px var(--brand);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), width 0.35s ease, height 0.35s ease, opacity 0.3s ease;
    animation: tour-pulse 1.8s ease-in-out infinite;
}
@keyframes tour-pulse {
    0%, 100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 3px var(--brand); }
    50%      { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 7px color-mix(in srgb, var(--brand) 55%, transparent); }
}
.tour__tip {
    position: absolute;
    left: 16px; right: 16px; top: 0;
    max-width: 420px;
    margin: 0 auto;
    padding: 14px 16px 12px;
    border-radius: 22px;
    background: var(--card);
    color: var(--text);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
}
.tour__tip--in { animation: tour-tip 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
@keyframes tour-tip { from { opacity: 0; scale: 0.9; } to { opacity: 1; scale: 1; } }
.tour__hand { display: block; font-family: var(--font-hand); font-size: 20px; font-weight: 700; color: var(--brand); transform: rotate(-2deg); }
.tour__title { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.tour__text { margin: 4px 0 12px; font-size: 14px; line-height: 1.4; color: var(--hint); }
.tour__row { display: flex; justify-content: space-between; align-items: center; }
.tour__skip { border: 0; background: none; color: var(--hint); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 2px; }
.tour__next {
    border: 0;
    padding: 10px 20px;
    border-radius: 980px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}
.tour--wait .tour__spot { opacity: 0; }
.tour--wait .tour__tip { opacity: 0; pointer-events: none; }
.tour--leave { opacity: 0; transition: opacity 0.3s ease; }

/* «Палец» — появляется, если человек застрял на шаге */
.tour__finger {
    position: absolute;
    left: 0; top: 0;
    width: 40px; height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
}
.tour--nudge .tour__finger { opacity: 1; animation: tour-tap 1.3s ease-in-out infinite; }
.tour__finger::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid var(--brand);
    opacity: 0;
}
.tour--nudge .tour__finger::after { animation: tour-ripple 1.3s ease-out infinite; }
@keyframes tour-tap { 0%, 100% { scale: 1; } 40% { scale: 0.78; } 60% { scale: 0.82; } }
@keyframes tour-ripple { 0%, 35% { opacity: 0; scale: 1; } 45% { opacity: 1; } 100% { opacity: 0; scale: 2.4; } }
.tour--nudge .tour__hand { color: #FF9F0A; }
.tour--wait .tour__finger { opacity: 0 !important; }

/* Слайд обучения «Уровни и Pass» */
.ob-hero--levels { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.ob-lvl { display: flex; align-items: center; gap: 14px; width: 270px; padding: 16px; border-radius: 24px;
    background: #0b0b0d; color: #fff; box-shadow: 0 20px 44px rgba(0,0,0,.28); }
.ob-lvl__badge { position: relative; flex: none; width: 60px; height: 60px; border-radius: 18px; background: #fff; color: #0b0b0d; overflow: hidden; }
.ob-lvl__badge b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 30px; font-weight: 900; }
.ob-lvl__body { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.ob-lvl__limit { position: relative; display: flex; align-items: center; gap: 6px; height: 28px; }
.ob-lvl__limit svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ob-lvl__limit b { position: absolute; left: 30px; font-family: var(--font-display); font-size: 24px; font-weight: 900; }
.ob-lvl__limit small { margin-left: 46px; font-size: 13px; opacity: .55; font-weight: 700; }
.ob-lvl__bar { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.ob-lvl__bar i { display: block; height: 100%; width: 30%; border-radius: 4px; background: #fff; animation: ob-lvl-bar 4s ease-in-out infinite; }
.ob-lvl__a { animation: ob-lvl-a 4s ease-in-out infinite; }
.ob-lvl__b { opacity: 0; transform: translateY(100%); animation: ob-lvl-b 4s ease-in-out infinite; }
@keyframes ob-lvl-bar { 0%, 10% { width: 30%; } 45% { width: 100%; } 55%, 100% { width: 8%; } }
@keyframes ob-lvl-a { 0%, 45% { opacity: 1; transform: none; } 55%, 92% { opacity: 0; transform: translateY(-100%); } 100% { opacity: 1; transform: none; } }
@keyframes ob-lvl-b { 0%, 45% { opacity: 0; transform: translateY(100%); } 55%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(100%); } }
.ob-pass { display: flex; gap: 10px; }
.ob-pass__cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 78px; height: 92px;
    border-radius: 20px; background: var(--card, #fff); color: var(--text, #000); box-shadow: 0 10px 26px rgba(0,0,0,.12);
    animation: ob-pass-pop 4s ease-in-out infinite; }
.ob-pass__cell:nth-child(2) { animation-delay: .25s; }
.ob-pass__cell:nth-child(3) { animation-delay: .5s; }
.ob-pass__cell img { width: 34px; height: 34px; object-fit: contain; }
.ob-pass__cell svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ob-pass__cell b { font-size: 14px; font-weight: 800; }
.ob-pass__cell--gold { background: #0b0b0d; color: #c4a46a; box-shadow: inset 0 0 0 1.5px rgba(196,164,106,.7), 0 0 24px rgba(196,164,106,.35); }
.ob-pass__cell--gold img { width: 60px; height: auto; }
@keyframes ob-pass-pop { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-8px); } 80% { transform: none; } }
