/* ==========================================================================
   Economy VPN — мини-апп «Орбита», версия 4.
   Палитра и манера — по образцу владельца (vmeboost): глубокий тёмно-синий,
   спокойные поверхности с тонкой рамкой, ОДИН акцент — голубой (синий → бирюза).
   Без разноцветных плиток, фиолетового и искр. Анимации сохранены, но тише.
   ========================================================================== */

:root {
    --bg:      #0a131f;
    --bg-2:    #0d1a2b;
    --card:    #101d2d;          /* карточки */
    --card-2:  #14243a;          /* нажатое, вложенное */
    --tile-ic: #15304a;          /* квадрат под иконкой */
    --edge:    rgba(160, 200, 240, .09);
    --edge-2:  rgba(160, 200, 240, .16);

    --text:    #f2f6fb;
    --text-2:  #93a3b8;
    --text-3:  #8494ab;          /* было #64748b — 3.6:1, не проходило WCAG AA */

    --acc-a:   #1f8fe8;          /* градиент кнопки: синий → */
    --acc-b:   #3cc8f0;          /*                    бирюза */
    --acc:     #38b6f2;          /* иконки, ссылки, циферблат */
    --acc-soft: rgba(56, 182, 242, .13);
    --ok:      #3ecf8e;
    --ok-soft: rgba(62, 207, 142, .13);
    --alarm:   #f2646e;
    --alarm-soft: rgba(242, 100, 110, .13);

    --r-xl: 22px; --r-l: 18px; --r-m: 16px; --r-s: 11px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.45, .64, 1);

    --safe-t: max(env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px));
    --safe-b: env(safe-area-inset-bottom);
    --tab-h: 72px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
    font-family: 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    font-size: 16px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum' 1, 'cv11' 1;
    min-height: 100dvh; overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
svg { display: block; }
b { font-weight: 600; }

/* ── Фон: ровный тёмно-синий, едва заметный свет сверху ── */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none;
       background: radial-gradient(120% 50% at 50% 0%, #10233a 0%, transparent 70%), var(--bg); }
.sky i { display: none; }

/* ── Каркас и появление ── */
.app { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; min-height: 100dvh; }
.screen { padding: calc(var(--safe-t) + 10px) 16px calc(var(--tab-h) + var(--safe-b) + 30px);
          animation: screenIn .4s var(--ease) both; }
.screen.back { animation-name: screenBack; }
.screen.none, .screen.none .rise { animation: none; }
@keyframes screenIn   { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes screenBack { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Общая поверхность ── */
.tile, .list, .plan, .pays, .dev, .howto, .period, .ghost, .path {
    background: var(--card);
    border: 1px solid var(--edge);
}

/* ── Верх ── */
.top { display: flex; align-items: center; gap: 12px; height: 54px; margin-bottom: 2px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff;
             background: linear-gradient(135deg, var(--acc-a), var(--acc-b)); }
.logo-mark svg { width: 17px; height: 17px; }
.logo small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-top: -2px; }
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
         background: var(--card); border: 1px solid var(--edge-2);
         transition: transform .2s var(--spring), background .2s; }
.round:active { transform: scale(.9); background: var(--card-2); }
.round svg { width: 19px; height: 19px; }
.round.me { font-size: 15px; font-weight: 700; color: var(--acc); }

.title-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 20px; }
.title-row h1 { flex: 1; margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }

/* ── Циферблат дней ── */
.orbit-wrap { position: relative; display: grid; place-items: center; height: 300px; }
.orbit { position: absolute; width: 290px; height: 290px; overflow: visible; }
.orbit .tick { stroke: rgba(160, 200, 240, .13); stroke-width: 2.2; stroke-linecap: round; transition: stroke .35s; }
.orbit .tick.on { stroke: var(--acc); }
.orbit .tick.major { stroke-width: 2.8; }
.orbit .track { fill: none; stroke: var(--edge); stroke-width: 1; }
.orbit .sat { transform-origin: 150px 150px; animation: orbit 18s linear infinite; }
.orbit .sat circle:first-child { fill: var(--acc-b); }
@keyframes orbit { to { transform: rotate(360deg); } }
.spark { display: none; }

.sphere {
    position: relative; width: 172px; height: 172px; border-radius: 50%;
    display: grid; place-items: center;
    background: radial-gradient(circle at 50% 35%, #142a44, var(--card) 70%);
    border: 1px solid var(--edge-2);
    box-shadow: 0 20px 50px -24px rgba(31, 143, 232, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.sphere::before { /* тонкое голубое кольцо внутри — «мягкое свечение», едва заметно дышит */
    content: ''; position: absolute; inset: 8px; border-radius: 50%;
    border: 1.5px solid rgba(56, 182, 242, .35);
    animation: halo 3.6s ease-in-out infinite;
}
@keyframes halo { 50% { border-color: rgba(56, 182, 242, .12); transform: scale(.97); } }
.sphere::after { display: none; }
.sphere .days { position: relative; text-align: center; line-height: 1; }
.sphere .days b { display: block; font-size: 62px; font-weight: 700; letter-spacing: -.045em; }
.sphere .days span { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-top: 6px; }

.is-off .orbit .sat { display: none; }
.is-off .sphere { box-shadow: 0 20px 50px -26px rgba(242, 100, 110, .4); }
.is-off .sphere::before { border-color: rgba(242, 100, 110, .3); animation: none; }
.is-off .sphere .days b { color: var(--text-3); }

/* ── Статус ── */
.status { text-align: center; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
         font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
         color: var(--ok); background: var(--ok-soft); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.badge.bad { color: var(--alarm); background: var(--alarm-soft); }
.badge.bad i { animation: none; }
.status h2 { margin: 12px 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.status p  { margin: 0 auto; max-width: 320px; font-size: 15.5px; color: var(--text-2); }
.status p b { color: var(--text); }

/* ── Кнопки ── */
.cta {
    position: relative; overflow: hidden; isolation: isolate;
    width: 100%; min-height: 56px; margin-top: 22px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 16.5px; font-weight: 600; color: #fff;
    background: linear-gradient(90deg, var(--acc-a), var(--acc-b));
    box-shadow: 0 10px 26px -14px rgba(56, 182, 242, .8);
    transition: transform .18s var(--spring), filter .2s;
}
.cta svg { width: 19px; height: 19px; }
.cta:active { transform: scale(.97); filter: brightness(.95); }
.cta::before { /* мягкий блик раз в несколько секунд */
    content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-18deg);
    animation: shine 5s var(--ease) 1.5s infinite;
}
@keyframes shine { 0% { left: -60%; } 35%, 100% { left: 140%; } }
.cta.pulse { animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 10px 26px -12px rgba(56, 182, 242, 1), 0 0 0 5px rgba(56, 182, 242, .12); } }
.cta .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .3); transform: scale(0); animation: ripple .55s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.ghost {
    width: 100%; min-height: 54px; margin-top: 10px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 16px; font-weight: 600; color: var(--text);
    background: var(--card-2); border-color: var(--edge-2);
    transition: transform .18s var(--spring), background .2s;
}
.ghost:active { transform: scale(.97); background: #182b44; }
.ghost svg { width: 18px; height: 18px; }
.link { display: block; margin: 18px auto 0; font-size: 15px; font-weight: 600; color: var(--acc); }

/* ── Секции ── */
.section { margin-top: 28px; }
.section > h3 { margin: 0 4px 12px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: baseline; justify-content: space-between; }
.section > h3 small { font-size: 13.5px; font-weight: 500; color: var(--text-3); }

/* ── 3 шага ── */
.path { position: relative; padding: 4px 14px; border-radius: var(--r-l); }
.path::before { content: ''; position: absolute; left: 33px; top: 32px; bottom: 32px; width: 2px; border-radius: 1px;
                background: linear-gradient(180deg, var(--acc) 0 33%, var(--edge-2) 33%); }
.step { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 0; }
.step .dot { position: relative; z-index: 1; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center;
             font-size: 15px; font-weight: 700; background: var(--card); border: 2px solid var(--edge-2); color: var(--text-2); }
.step .dot svg { width: 18px; height: 18px; }
.step.done .dot { background: var(--acc); border-color: var(--acc); color: #fff; }
.step.done .dot path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s var(--ease) .45s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.step.now .dot { border-color: var(--acc); color: var(--acc); animation: nowRing 2.2s ease-out infinite; }
@keyframes nowRing { 0% { box-shadow: 0 0 0 0 rgba(56, 182, 242, .45); } 100% { box-shadow: 0 0 0 10px rgba(56, 182, 242, 0); } }
.step-body { flex: 1; min-width: 0; text-align: left; }
.step-body b { display: block; font-size: 16px; font-weight: 600; }
.step-body span { display: block; font-size: 14px; color: var(--text-2); }
.step.done .step-body b { color: var(--text-2); }
.step .go { font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); padding: 8px 14px; border-radius: 999px; transition: transform .18s var(--spring); }
.step:active .go { transform: scale(.92); }

/* ── Плитки: одноцветные иконки на тёмных квадратах ── */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; min-height: 118px; padding: 15px; border-radius: var(--r-l);
        text-align: left; display: flex; flex-direction: column; justify-content: space-between;
        transition: transform .2s var(--spring), background .2s, border-color .2s; }
.tile:active { transform: scale(.96); background: var(--card-2); border-color: var(--edge-2); }
.tile .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--acc); background: var(--tile-ic);
            transition: transform .35s var(--spring); }
.tile:active .ic { transform: scale(.9); }
.tile .ic svg { width: 20px; height: 20px; }
.tile b { display: block; font-size: 16px; font-weight: 600; margin-top: 12px; }
.tile span { display: block; font-size: 13.5px; color: var(--text-2); }
.tile .num { position: absolute; top: 15px; right: 15px; font-size: 14px; font-weight: 700; color: var(--text-2); }

/* ── Список ── */
.list { border-radius: var(--r-l); overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 15px; transition: background .2s; }
.item + .item { border-top: 1px solid var(--edge); }
button.item:active { background: var(--card-2); }
.item .ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; color: var(--acc); background: var(--tile-ic); }
.item .ic svg { width: 20px; height: 20px; }
.item .tx { flex: 1; min-width: 0; }
.item .tx b { display: block; font-size: 16px; font-weight: 600; }
.item .tx span { display: block; font-size: 13.5px; color: var(--text-2); }
.item .chev { width: 17px; height: 17px; color: var(--text-3); transition: transform .2s var(--ease); }
button.item:active .chev { transform: translateX(3px); }
.item .val { font-size: 17px; font-weight: 700; color: var(--text-2); }
.item .round { width: 38px; height: 38px; }

/* ── Тариф ── */
.plan { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 20px;
        background: radial-gradient(90% 70% at 100% 0%, rgba(56, 182, 242, .14), transparent 60%), var(--card);
        border-color: var(--edge-2); }
.plan::before { content: ''; position: absolute; inset: -50%; pointer-events: none;
                background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .05) 50%, transparent 58%);
                animation: cardShine 8s var(--ease) 1s infinite; }
@keyframes cardShine { 0% { transform: translateX(-40%); } 45%, 100% { transform: translateX(40%); } }
.plan .name { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
              letter-spacing: .03em; text-transform: uppercase; color: var(--acc); padding: 5px 11px; border-radius: 999px; background: var(--acc-soft); }
.plan .name svg { width: 14px; height: 14px; flex: 0 0 14px; }
.plan .price { position: relative; margin: 16px 0 2px; display: flex; align-items: baseline; gap: 8px; }
.plan .price b { font-size: 58px; font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.plan .price span { font-size: 17px; font-weight: 500; color: var(--text-2); }
.plan .sub { position: relative; color: var(--text-2); font-size: 14.5px; }
.plan ul { position: relative; list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--edge); display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--acc); margin-top: 2px; }

.periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.period { position: relative; padding: 15px 8px 13px; border-radius: var(--r-m); text-align: center;
          transition: transform .25s var(--spring), border-color .2s, background .2s; }
.period:active { transform: scale(.95); }
.period b { display: block; font-size: 15px; font-weight: 600; }
.period span { display: block; font-size: 14px; color: var(--text-2); margin-top: 2px; }
.period em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 700;
             padding: 2px 8px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); white-space: nowrap; }
.period.on { border-color: var(--acc); background: var(--acc-soft); animation: pick .35s var(--spring); }
@keyframes pick { 0% { transform: scale(.95); } }

.pays { border-radius: var(--r-l); overflow: hidden; }
.pay { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 15px; text-align: left; transition: background .2s; }
.pay + .pay { border-top: 1px solid var(--edge); }
.pay:active { background: var(--card-2); }
.pay .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--acc); background: var(--tile-ic); }
.pay .ic svg { width: 20px; height: 20px; }
.pay .tx { flex: 1; } .pay .tx b { display: block; font-weight: 600; } .pay .tx span { font-size: 13.5px; color: var(--text-2); }
.pay .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--edge-2); display: grid; place-items: center; transition: border-color .2s; }
.pay .tick::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); transform: scale(0); transition: transform .3s var(--spring); }
.pay.on .tick { border-color: var(--acc); }
.pay.on .tick::after { transform: scale(1); }

/* ── Подключение ── */
.progress { display: flex; gap: 6px; margin: -6px 0 24px; }
.progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--card-2); overflow: hidden; position: relative; }
.progress i.on::after { content: ''; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(90deg, var(--acc-a), var(--acc-b)); animation: fill .55s var(--ease) both; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } }
.ask { text-align: center; margin-bottom: 20px; }
.ask .big { width: 76px; height: 76px; margin: 4px auto 16px; border-radius: 24px; display: grid; place-items: center; color: var(--acc);
            background: var(--tile-ic); border: 1px solid var(--edge-2);
            animation: pop .55s var(--spring) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.ask .big svg { width: 34px; height: 34px; }
.ask h2 { margin: 0 0 6px; font-size: 25px; font-weight: 700; letter-spacing: -.025em; }
.ask p { margin: 0 auto; max-width: 320px; color: var(--text-2); }
.devs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dev { padding: 18px 12px 15px; border-radius: var(--r-l); text-align: center; transition: transform .25s var(--spring), border-color .2s, background .2s; }
.dev:active { transform: scale(.95); }
.dev svg { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--text-2); transition: transform .35s var(--spring), color .2s; }
.dev b { display: block; font-size: 16px; font-weight: 600; }
.dev span { display: block; font-size: 13px; color: var(--text-3); }
.dev.on { border-color: var(--acc); background: var(--acc-soft); }
.dev.on svg { color: var(--acc); transform: scale(1.1); }
.howto { padding: 0; margin: 0; counter-reset: s; border-radius: var(--r-l); overflow: hidden; }
.howto li { list-style: none; counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 14px 15px; font-size: 15px; }
.howto li + li { border-top: 1px solid var(--edge); }
.howto li::before { content: counter(s); flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; color: var(--acc); background: var(--tile-ic); }
.howto li span { padding-top: 2px; }

/* ── Вкладки ── */
.tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding: 8px 12px calc(var(--safe-b) + 10px);
        background: linear-gradient(180deg, transparent, rgba(10, 19, 31, .95) 35%); }
.tabs-in { position: relative; max-width: 430px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr);
           height: 62px; padding: 5px; border-radius: 22px;
           background: rgba(16, 29, 45, .92); border: 1px solid var(--edge-2);
           backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
           box-shadow: 0 16px 34px -18px #000; }
.tabs .pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 17px;
              background: var(--acc-soft); border: 1px solid rgba(56, 182, 242, .3);
              transition: transform .45s var(--spring); }
.tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
       font-size: 12px; font-weight: 600; color: var(--text-3); transition: color .25s; }
.tab svg { width: 22px; height: 22px; transition: transform .4s var(--spring); }
.tab.on { color: var(--text); }
.tab.on svg { color: var(--acc); animation: tabPop .45s var(--spring); }
@keyframes tabPop { 0% { transform: scale(.75); } }
.tab:active svg { transform: scale(.85); }

/* ── Тост ── */
.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); transform: translateX(-50%);
         max-width: calc(100% - 32px); display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px;
         font-size: 15px; font-weight: 600; background: var(--card-2); border: 1px solid var(--edge-2); box-shadow: 0 18px 36px -14px #000;
         animation: toastIn .4s var(--spring) both; }
.toast svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.94); } }

/* ── Оплачено ── */
.done { text-align: center; padding-top: 44px; position: relative; }
.done .medal { position: relative; width: 112px; height: 112px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center;
               background: var(--ok-soft); border: 1.5px solid rgba(62, 207, 142, .45); animation: pop .55s var(--spring) both; }
.done .medal svg { width: 54px; height: 54px; }
.done .medal path { fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s var(--ease) .4s forwards; }
.burst { position: absolute; left: 50%; top: 100px; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; width: 8px; height: 8px; color: var(--acc); opacity: 0; animation: fly 1s var(--ease) var(--d, .3s) forwards; }
.burst i:nth-child(3n) { color: var(--ok); }
.burst i svg { width: 100%; height: 100%; }
@keyframes fly { 0% { opacity: 1; transform: translate(0, 0) scale(.4); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1) rotate(90deg); } }
.done h2 { font-size: 30px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.025em; }
.done p { color: var(--text-2); margin: 0 auto; max-width: 300px; }
.done p b { color: var(--text); }

/* превью: переключатель сценариев (в проде нет) */
.devbar { position: fixed; z-index: 50; top: 8px; right: 8px; display: flex; gap: 4px; font: 600 11px/1 Inter, sans-serif; opacity: .55; }
.devbar:hover { opacity: 1; }
.devbar a { color: var(--text-2); text-decoration: none; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .5); }
.devbar a.on { background: var(--acc); color: #fff; }

/* скриншоты: сразу конечное состояние */
.nofx *, .nofx *::before, .nofx *::after { animation: none !important; transition: none !important; }
.nofx .step.done .dot path, .nofx .done .medal path { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Выбор приложения (Happ / Incy) ── */
.apps { display: grid; gap: 10px; }
.appopt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 15px; border-radius: var(--r-l); text-align: left;
       background: var(--card); border: 1px solid var(--edge); transition: transform .25s var(--spring), border-color .2s, background .2s; }
.appopt:active { transform: scale(.97); }
.appopt img { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; background: var(--card-2); object-fit: cover; }
.appopt .tx { flex: 1; min-width: 0; }
.appopt .tx b { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.appopt .tx b em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--acc); background: var(--acc-soft); padding: 2px 8px; border-radius: 999px; }
.appopt .tx span { display: block; font-size: 14px; color: var(--text-2); }
.appopt .tick { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid var(--edge-2); display: grid; place-items: center; transition: border-color .2s; }
.appopt .tick::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); transform: scale(0); transition: transform .3s var(--spring); }
.appopt.on { border-color: var(--acc); background: var(--acc-soft); }
.appopt.on .tick { border-color: var(--acc); }
.appopt.on .tick::after { transform: scale(1); }

/* ── Предупреждение App Store ── */
.warn { margin-top: 14px; padding: 14px 15px 8px; border-radius: var(--r-l); background: rgba(242, 166, 60, .1); border: 1px solid rgba(242, 166, 60, .35); }
.warn b { display: block; font-size: 15.5px; font-weight: 700; color: #ffc46b; }
.warn span { display: block; margin-top: 4px; font-size: 14px; color: var(--text-2); }
.warn button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 11px 0; font-size: 14.5px; font-weight: 600; color: var(--text); border-top: 1px solid rgba(242, 166, 60, .2); margin-top: 8px; }
.warn button + button { margin-top: 0; }
.warn button svg { width: 16px; height: 16px; color: #ffc46b; }

/* ── Подсказка ── */
.note { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; padding: 13px 15px; border-radius: var(--r-l); background: var(--card); border: 1px solid var(--edge); font-size: 14.5px; color: var(--text-2); }
.note svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--acc); margin-top: 1px; }
.cta svg:last-child:not(:first-child) { width: 18px; height: 18px; }

/* ── Ключ, поле, QR ── */
.keybox { padding: 13px 15px; border-radius: var(--r-l); background: var(--card); border: 1px dashed var(--edge-2); }
.keybox span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.keybox span svg { width: 14px; height: 14px; }
.keybox code { display: block; margin-top: 6px; font: 500 13px/1.45 ui-monospace, Menlo, Consolas, monospace; color: var(--acc); word-break: break-all; }
.field { width: 100%; padding: 15px 16px; border-radius: var(--r-m); border: 1px solid var(--edge-2); background: var(--card); color: var(--text);
         font: 600 17px/1.2 Inter, sans-serif; outline: none; transition: border-color .2s, box-shadow .2s; }
.field::placeholder { color: var(--text-3); font-weight: 500; }
.field:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.field.code { text-align: center; letter-spacing: .3em; font-size: 22px; text-transform: uppercase; }
.qr { margin: 14px auto 0; width: min(240px, 100%); aspect-ratio: 1; padding: 12px; border-radius: 18px; background: #fff; animation: pop .4s var(--spring) both; }
.qr img { width: 100%; height: 100%; display: block; }

/* ── Шторка снизу ── */
.sheet-bg { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
            background: rgba(4, 9, 16, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { width: 100%; max-width: 460px; padding: 10px 18px calc(var(--safe-b) + 20px); border-radius: 24px 24px 0 0;
         background: var(--card); border: 1px solid var(--edge-2); border-bottom: 0; animation: sheetUp .38s var(--ease) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet .grab { display: block; width: 40px; height: 5px; border-radius: 3px; margin: 0 auto 16px; background: var(--edge-2); }
.sheet h3 { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sheet p { margin: 0 0 16px; font-size: 15px; color: var(--text-2); }
.sheet .cta { margin-top: 12px; }

/* ── Тост: был зажат в узкий столбик (left:50% + transform сжимали ширину) ── */
.toast { left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: 428px; transform: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.94); } }

/* ==========================================================================
   Исправления по ревью (16.11.2026)
   ========================================================================== */
/* 1. Контраст: белый текст на кнопках ≥ 4.5:1 — градиент чуть глубже (#0b5fc0 → #0f7ab8) */
:root { --btn-a: #0b5fc0; --btn-b: #0f7ab8; }
.cta, .step .go, .period em { background: linear-gradient(90deg, var(--btn-a), var(--btn-b)); }
.cta { box-shadow: 0 10px 26px -14px rgba(31, 143, 232, .8), inset 0 1px 0 rgba(255, 255, 255, .14); }
.cta.danger { background: linear-gradient(90deg, #b3303b, #c43c48); box-shadow: 0 10px 26px -14px rgba(242, 100, 110, .7); }
.dev span { color: var(--text-2); }

/* 3. Видимый фокус для клавиатуры */
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.field:focus-visible { outline: none; }

/* 4–5. Тост поверх шторки; у ошибок свой значок и цвет */
.toast { z-index: 70; }
.toast.err { border-color: rgba(242, 100, 110, .45); }
.toast.err svg { color: var(--alarm); }
.toast span { min-width: 0; }

/* поле с ошибкой прямо под полем */
.field.err { border-color: var(--alarm); box-shadow: 0 0 0 3px var(--alarm-soft); animation: shake .35s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.field-err { min-height: 20px; margin: 6px 4px 0; font-size: 14px; font-weight: 600; color: var(--alarm); }

/* вкладки теперь вне #app, подпись — отдельный span */
.tab span { display: block; }

/* 16. Карточки устройств: содержимое сверху, иконки на одной высоте */
.dev { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.dev svg { flex: 0 0 auto; }

/* 17. Ссылки в предупреждении — по левому краю */
.warn button { text-align: left; gap: 10px; }
.warn button svg { flex: 0 0 16px; }

/* 21. Переносы на узких экранах */
.logo { min-width: 0; }
.logo-tx { min-width: 0; }
.logo small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.period b { white-space: nowrap; font-size: 14.5px; }

/* 22. Кликабельные области не меньше 44 px */
.link { padding: 11px 16px; min-height: 44px; margin-top: 8px; }
.round, .item .round { width: 44px; height: 44px; }

/* 25. Одинаковая высота кнопок */
.ghost { min-height: 56px; }
.done-btn { margin-top: 18px; color: var(--ok); border-color: rgba(62, 207, 142, .35); }
.done-btn svg { color: var(--ok); }

/* шапка вкладок «Тариф» и «Помощь»: заголовок + аватар */
.title-row .round.me { flex: 0 0 auto; }

/* вводный текст экранов */
.lead { margin: -6px 2px 18px; font-size: 15.5px; color: var(--text-2); }
.lead b { color: var(--text); }

/* FAQ — раскрывающиеся вопросы */
.faq details { display: block; padding: 0; }
.faq summary { display: flex; align-items: center; gap: 14px; padding: 14px 15px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .25s var(--ease); }
.faq details[open] summary .chev { transform: rotate(90deg); }
.faq details p { margin: -4px 15px 14px 69px; font-size: 14.5px; color: var(--text-2); animation: rise .3s var(--ease) both; }
.faq .ic, .item .ic { flex: 0 0 40px; }

/* 15. «Уменьшить движение»: без задержек появления */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-delay: 0s !important; } }
.nofx *, .nofx *::before, .nofx *::after { animation-delay: 0s !important; }
