/* Модуль «Приложение клиента»: живой телефон, смена бренда, лента настоящих экранов, мини-виджеты.
   Разметка — resources/views/site/modules/app.blade.php, сценарий — app.js */
.apx, .apf {
    --b: #2f5bd8;
    --b-soft: color-mix(in srgb, var(--b) 12%, #fff);
    --b-mid: color-mix(in srgb, var(--b) 35%, #fff);
    --b-deep: color-mix(in srgb, var(--b) 72%, #000);
    --ae: cubic-bezier(.2, .7, .2, 1);
}
.apx-head { max-width: 780px; }
.apx-head .lead { margin-top: 18px; }

/* ── Сцена ── */
.apx-stage { position: relative; margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 32px; border-radius: 24px; border: 1px solid var(--line-card); overflow: hidden;
    background-color: #fafaf9; background-image: radial-gradient(circle, #e0e0db 1px, transparent 1.3px); background-size: 18px 18px; }
.apx-glow { position: absolute; left: 50%; top: 50%; width: 620px; height: 620px; margin: -310px 0 0 -310px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--b) 30%, transparent), transparent 65%); transition: background .8s; pointer-events: none; }

/* Вкладки */
.apx-tabs { position: relative; display: flex; flex-direction: column; gap: 4px; }
.apx-tabs button { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-radius: 12px; text-align: left; transition: background .25s, box-shadow .25s; }
.apx-tabs button:hover { background: rgba(255, 255, 255, .7); }
.apx-tabs button[aria-selected='true'] { background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 19, .05), 0 8px 24px rgba(20, 20, 19, .07); }
.apx-tab-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-card); color: var(--ink-2); transition: background .3s, color .3s, border-color .3s; }
.apx-tabs button[aria-selected='true'] .apx-tab-ico { background: var(--b); border-color: var(--b); color: #fff; }
.apx-tab-t { min-width: 0; }
.apx-tab-t b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.apx-tab-t small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.apx-tab-bar { position: absolute; left: 58px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; }
.apx-tabs button[aria-selected='true'] .apx-tab-bar { opacity: 1; background: var(--line); }
.apx-tab-bar i { display: block; height: 100%; background: var(--b); transform: scaleX(0); transform-origin: left; }

/* ── Телефон ── */
.apx-phone-wrap { position: relative; justify-self: center; }
.apx-phone {
    position: relative; width: 320px; height: 664px; border-radius: 50px; background: #f4f4f2; overflow: hidden; font-size: 12px; color: var(--ink);
    box-shadow: 0 0 0 9px #18181a, 0 0 0 10.5px #3a3a3e, 0 40px 90px rgba(20, 20, 19, .28); user-select: none;
}
.apx-island { position: absolute; left: 50%; top: 10px; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #0c0c0d; z-index: 30; }
.apx-sbar { position: absolute; left: 0; right: 0; top: 0; height: 44px; padding: 0 26px 0 30px; display: flex; align-items: center; justify-content: space-between; z-index: 20; font-size: 13px; }
.apx-sbar span { display: flex; gap: 4px; align-items: center; }
.apx-screens { position: absolute; left: 0; right: 0; top: 44px; bottom: 64px; }
.apx-scr { position: absolute; inset: 0; padding: 6px 14px 10px; display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateX(26px) scale(.985); transition: opacity .45s var(--ae), transform .55s var(--ae); pointer-events: none; overflow: hidden; }
.apx-scr.is-on { opacity: 1; transform: none; }
.apx-scr.is-out { opacity: 0; transform: translateX(-26px) scale(.985); }
.apx-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; padding: 6px 8px 14px; display: flex; justify-content: space-around; background: rgba(255, 255, 255, .92); border-top: 1px solid var(--line); z-index: 10; }
.apx-nav span { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; color: #a3a39e; transition: color .3s; }
.apx-nav small { font-size: 9.5px; }
.apx-nav span.on { color: var(--b); }
.apx-home-ind { position: absolute; left: 50%; bottom: 6px; width: 110px; height: 4px; margin-left: -55px; border-radius: 3px; background: #141413; z-index: 12; }
.apx-wipe { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--b); z-index: 40; pointer-events: none; opacity: 0; transform: scale(0); }
.apx-wipe.is-go { animation: apx-wipe .9s var(--ae); }
@keyframes apx-wipe { 0% { opacity: .9; transform: scale(0); } 55% { opacity: .55; transform: scale(30); } 100% { opacity: 0; transform: scale(34); } }

/* Логотипы бренда */
.apx-logo { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--b) 80%, #fff), var(--b) 55%, var(--b-deep)); box-shadow: 0 4px 10px color-mix(in srgb, var(--b) 35%, transparent); transition: background .5s; }
.apx-logo-xs { width: 18px; height: 18px; border-radius: 5px; box-shadow: none; }

/* Push */
.apx-push { position: absolute; left: 10px; right: 10px; top: 46px; z-index: 35; display: flex; gap: 9px; padding: 10px 11px; border-radius: 18px; background: rgba(250, 250, 250, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(0, 0, 0, .2); transform: translateY(-140%); opacity: 0; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1), opacity .3s; }
.apx-push.is-on { transform: none; opacity: 1; }
.apx-push .apx-logo { width: 34px; height: 34px; border-radius: 9px; }
.apx-push > div { min-width: 0; flex: 1; }
.apx-push small { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.apx-push small b { font-weight: 600; }
.apx-push small em { font-style: normal; }
.apx-push > div > b { display: block; font-size: 12.5px; line-height: 1.3; margin-top: 1px; }
.apx-push > div > span { display: block; font-size: 11.5px; line-height: 1.3; color: var(--ink-2); }

/* Общие элементы экранов */
.apx-h { display: flex; flex-direction: column; padding-top: 4px; }
.apx-h b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.apx-h small { font-size: 11.5px; color: var(--muted); }
.apx-av { --h: 210; width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; font-style: normal; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 70% 90%); }
.apx-av-lg { width: 44px; height: 44px; font-size: 13px; border-radius: 14px; }
.apx-chips { display: flex; gap: 5px; overflow: hidden; }
.apx-chips span { height: 26px; padding: 0 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line-card); display: inline-flex; align-items: center; font-size: 11.5px; white-space: nowrap; }
.apx-chips span.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.apx-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 12px; background: var(--b); color: #fff; font-weight: 600; font-size: 13px; transition: background .4s, transform .15s; overflow: hidden; }
.apx-btn-sm { height: 32px; border-radius: 9px; font-size: 12px; }
.is-press { transform: scale(.94) !important; }

/* Главная */
.apx-top { display: flex; align-items: center; gap: 10px; }
.apx-top > div { flex: 1; min-width: 0; }
.apx-top small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apx-top b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.apx-bell { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; border: 1px solid var(--line-card); }
.apx-mcard { position: relative; padding: 14px; border-radius: 18px; color: #fff; overflow: hidden; background: linear-gradient(135deg, var(--b) 0%, var(--b-deep) 100%); transition: background .6s; }
.apx-mcard::after { content: ''; position: absolute; right: -40px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.apx-mcard small { font-size: 10.5px; opacity: .8; }
.apx-mcard > b { display: block; font-size: 18px; font-weight: 700; margin-top: 1px; }
.apx-mc-days { position: absolute; right: 14px; top: 14px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .2); z-index: 1; }
.apx-mc-bar { display: block; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 10px 0; overflow: hidden; }
.apx-mc-bar i { display: block; height: 100%; width: 38%; background: #fff; border-radius: inherit; }
.apx-mc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.apx-mc-btns span { height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 600; }
.apx-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.apx-tile { padding: 11px; border-radius: 15px; background: #fff; border: 1px solid var(--line-card); transition: box-shadow .3s, transform .2s; }
.apx-tile > span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--b-soft); color: var(--b); margin-bottom: 8px; transition: background .5s, color .5s; }
.apx-tile b { display: block; font-size: 12.5px; }
.apx-tile small { font-size: 10.5px; color: var(--muted); }
.apx-tile.is-hl { box-shadow: 0 0 0 2px var(--b); }
.apx-load { padding: 11px 12px; border-radius: 15px; background: #fff; border: 1px solid var(--line-card); }
.apx-load-h { display: flex; justify-content: space-between; align-items: center; }
.apx-load-h small { font-size: 11px; color: var(--muted); }
.apx-load-h em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 1px 7px; border-radius: 999px; }
.apx-load > b { display: block; font-size: 15px; margin: 2px 0 8px; }
.apx-load > b small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.apx-bars { display: flex; align-items: flex-end; gap: 4px; height: 46px; }
.apx-bars i { flex: 1; border-radius: 3px; background: var(--b-mid); height: calc(var(--v) * 2px); transform-origin: bottom; transition: background .5s; }
.apx-bars i.now { background: var(--b); }
.apx-scr.is-on .apx-bars i { animation: apx-grow .7s var(--d) var(--ae) both; }
@keyframes apx-grow { from { transform: scaleY(0); } }

.apx-class { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 15px; background: #fff; border: 1px solid var(--line-card); }
.apx-class time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.apx-class div { flex: 1; min-width: 0; }
.apx-class b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apx-class small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apx-class span { height: 26px; padding: 0 10px; border-radius: 8px; background: var(--b); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; transition: background .5s; }

/* Вход */
.apx-seg { display: flex; padding: 3px; border-radius: 11px; background: #e9e9e6; margin-top: 4px; }
.apx-seg span { flex: 1; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.apx-seg span.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.apx-qr-card { padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line-card); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.apx-qr-who { align-self: stretch; display: flex; align-items: center; gap: 8px; }
.apx-qr-who div { flex: 1; min-width: 0; }
.apx-qr-who b { display: block; font-size: 12.5px; }
.apx-qr-who small { font-size: 10.5px; color: var(--muted); }
.apx-qr-who em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 2px 7px; border-radius: 999px; }
.apx-qr { position: relative; width: 196px; height: 196px; }
.apx-qr svg { width: 100%; height: 100%; display: block; }
.apx-qr svg rect { fill: #141413; }
.apx-qr.is-flip svg { animation: apx-qrflip .5s var(--ae); }
@keyframes apx-qrflip { 0% { opacity: 1; filter: none; } 40% { opacity: .1; filter: blur(3px); } 100% { opacity: 1; filter: none; } }
.apx-qr-logo { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid #fff; border-radius: 10px; }
.apx-qr-t { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); }
.apx-qr-t b { font-variant-numeric: tabular-nums; color: var(--ink); }
.apx-ring { width: 18px; height: 18px; transform: rotate(-90deg); }
.apx-ring circle { fill: none; stroke: #e6e6e2; stroke-width: 3; }
.apx-ring circle + circle { stroke: var(--b); stroke-dasharray: 100; stroke-dashoffset: 0; stroke-linecap: round; }
.apx-qr-hint { font-size: 10.5px; color: var(--muted); }
.apx-ok { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(244, 244, 242, .94); backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s; }
.apx-ok > span { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: #22a35a; color: #fff; transform: scale(.4); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 0 0 0 rgba(34, 163, 90, .35); }
.apx-ok b { font-size: 17px; }
.apx-ok small { font-size: 11.5px; color: var(--muted); }
.apx-ok.is-on { opacity: 1; }
.apx-ok.is-on > span { transform: none; animation: apx-pulse 1.4s .4s; }
@keyframes apx-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 163, 90, .45); } 100% { box-shadow: 0 0 0 26px rgba(34, 163, 90, 0); } }

/* Шкафчик */
.apx-lk-legend { display: flex; gap: 12px; font-size: 11px; color: var(--ink-2); }
.apx-lk-legend span { display: flex; align-items: center; gap: 5px; }
.apx-lk-legend i { width: 10px; height: 10px; border-radius: 3px; }
.apx-lk-legend i.f { border: 1.5px solid var(--b); }
.apx-lk-legend i.b { background: #dcdcd7; }
.apx-lockers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.apx-lockers span { height: 50px; border-radius: 10px; background: #fff; border: 1.5px solid var(--b-mid); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; transition: background .35s, color .35s, border-color .35s, transform .3s; }
.apx-lockers span::before { content: ''; position: absolute; top: 9px; left: 50%; width: 10px; height: 3px; margin-left: -5px; border-radius: 2px; background: currentColor; opacity: .3; }
.apx-lockers span.b { background: #e8e8e4; border-color: #e8e8e4; color: #a3a39e; }
.apx-lockers span.is-pick { background: var(--b); border-color: var(--b); color: #fff; transform: scale(1.08); box-shadow: 0 6px 16px color-mix(in srgb, var(--b) 40%, transparent); }
.apx-lk-btn { position: relative; margin-top: auto; height: 46px; border-radius: 13px; background: var(--b); color: #fff; font-weight: 600; font-size: 13px; overflow: hidden; transition: background .4s, transform .15s; }
.apx-lk-btn > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .4s var(--ae), opacity .3s; }
.apx-lk-b { transform: translateY(100%); opacity: 0; }
.apx-lk-b b { font-variant-numeric: tabular-nums; }
.apx-lk-btn.is-got { background: #1f7a45; }
.apx-lk-btn.is-got .apx-lk-a { transform: translateY(-100%); opacity: 0; }
.apx-lk-btn.is-got .apx-lk-b { transform: none; opacity: 1; }

/* Магазин */
.apx-plan { position: relative; padding: 12px 14px; border-radius: 15px; background: #fff; border: 1.5px solid var(--line-card); transition: border-color .3s, box-shadow .3s; }
.apx-plan em { display: inline-block; font-style: normal; font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; background: var(--b-soft); color: var(--b); margin-bottom: 3px; }
.apx-plan b { display: block; font-size: 13.5px; }
.apx-plan span { font-size: 11px; color: var(--muted); }
.apx-plan strong { font-size: 16px; color: var(--ink); }
.apx-radio { position: absolute; right: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 1.5px solid #cfcfca; transition: border .3s; }
.apx-plan.is-pick { border-color: var(--b); box-shadow: 0 0 0 3px var(--b-soft); }
.apx-plan.is-pick .apx-radio { border: 5.5px solid var(--b); }
.apx-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 14px 14px; border-radius: 22px 22px 0 0; background: #fff; box-shadow: 0 -12px 30px rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: 10px; transform: translateY(105%); transition: transform .5s var(--ae); z-index: 3; }
.apx-sheet.is-on { transform: none; }
.apx-grab { align-self: center; width: 38px; height: 4px; border-radius: 3px; background: #ddd; }
.apx-sheet small { font-size: 11.5px; color: var(--muted); }
.apx-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.apx-methods span { height: 50px; border-radius: 11px; border: 1.5px solid var(--line-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; transition: border-color .3s, background .3s; }
.apx-methods span.is-pick { border-color: var(--b); background: var(--b-soft); color: var(--b); }
.apx-btn .a, .apx-btn .b { transition: transform .4s var(--ae), opacity .3s; display: flex; align-items: center; gap: 6px; }
.apx-btn .b { position: absolute; transform: translateY(150%); opacity: 0; }
.apx-btn.is-done { background: #1f7a45; }
.apx-btn.is-done .a { transform: translateY(-150%); opacity: 0; }
.apx-btn.is-done .b { transform: none; opacity: 1; }

/* Тренеры */
.apx-tr { display: flex; gap: 10px; padding: 11px; border-radius: 15px; background: #fff; border: 1px solid var(--line-card); flex-wrap: wrap; }
.apx-tr-i { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.apx-tr-i b { font-size: 13px; display: flex; align-items: center; gap: 5px; }
.apx-tr-i b em { font-style: normal; font-size: 9px; padding: 1px 5px; border-radius: 4px; background: var(--ink); color: #fff; }
.apx-tr-i small { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.apx-tr-i small .i { color: #e5a00d; fill: #e5a00d; }
.apx-tr-x { position: relative; flex-basis: 100%; height: 32px; }
.apx-tr-x > * { position: absolute; inset: 0; transition: opacity .35s, transform .4s var(--ae); }
.apx-slots { display: flex; gap: 5px; opacity: 0; transform: translateY(8px); pointer-events: none; }
.apx-slots span { flex: 1; border-radius: 9px; border: 1.5px solid var(--line-card); display: grid; place-items: center; font-size: 11px; font-weight: 600; transition: background .3s, color .3s, border-color .3s; }
.apx-slots span.is-pick { background: var(--b); border-color: var(--b); color: #fff; }
.apx-tr-ok { display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 600; opacity: 0; transform: translateY(8px); }
.apx-tr-x.s1 .apx-btn { opacity: 0; transform: translateY(-8px); }
.apx-tr-x.s1 .apx-slots { opacity: 1; transform: none; }
.apx-tr-x.s2 .apx-btn, .apx-tr-x.s2 .apx-slots { opacity: 0; transform: translateY(-8px); }
.apx-tr-x.s2 .apx-tr-ok { opacity: 1; transform: none; }

/* Лента */
.apx-stories { display: flex; gap: 10px; }
.apx-stories > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.apx-stories .apx-av { width: 44px; height: 44px; font-size: 13px; box-shadow: 0 0 0 2px #f4f4f2, 0 0 0 4px var(--b); transition: box-shadow .5s; }
.apx-scr.is-on .apx-stories .apx-av { animation: apx-story .6s var(--d) var(--ae) both; }
@keyframes apx-story { from { transform: scale(.5); opacity: 0; } }
.apx-stories .apx-av span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--b); transition: background .5s; }
.apx-stories small { font-size: 9.5px; color: var(--ink-2); }
.apx-post { padding: 11px; border-radius: 16px; background: #fff; border: 1px solid var(--line-card); display: flex; flex-direction: column; gap: 8px; }
.apx-post-h { display: flex; align-items: center; gap: 8px; }
.apx-post-h b { display: block; font-size: 12.5px; }
.apx-post-h small { font-size: 10.5px; color: var(--muted); }
.apx-post p { font-size: 11.5px; line-height: 1.45; }
.apx-post-img { position: relative; height: 128px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; color: rgba(255, 255, 255, .9);
    background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--b) 70%, #fff), transparent 55%), linear-gradient(140deg, #1a1d33, var(--b-deep)); transition: background .6s; }
.apx-post-img span { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.apx-post-img em { position: absolute; left: 10px; bottom: 9px; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .35); }
.apx-react { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.apx-react > span { height: 24px; padding: 0 8px; border-radius: 999px; background: var(--chip); display: inline-flex; align-items: center; gap: 4px; }
.apx-react small { margin-left: auto; color: var(--muted); font-size: 10.5px; }
.apx-react [data-apx-like].is-liked { background: #fde8ec; color: #d6264a; }
.apx-react [data-apx-like].is-liked .i { fill: #d6264a; animation: apx-heart .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes apx-heart { 40% { transform: scale(1.6); } }

/* Алия */
.apx-scr-chat { padding: 0; gap: 0; }
.apx-chat-h { display: flex; align-items: center; gap: 9px; padding: 8px 14px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.apx-al { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #8b6cf0, #5a3fd0); }
.apx-chat-h b { display: block; font-size: 14px; }
.apx-chat-h small { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.apx-chat-h small i { width: 6px; height: 6px; border-radius: 50%; background: #22a35a; }
.apx-chat { flex: 1; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; overflow: hidden; }
.apx-m { max-width: 84%; padding: 8px 11px; border-radius: 15px; font-size: 11.5px; line-height: 1.42; display: none; animation: apx-msg .4s var(--ae) both; }
.apx-m.is-on { display: block; }
@keyframes apx-msg { from { opacity: 0; transform: translateY(10px); } }
.apx-m.in { align-self: flex-end; background: var(--b); color: #fff; border-bottom-right-radius: 5px; transition: background .5s; }
.apx-m.out { align-self: flex-start; background: #fff; border: 1px solid var(--line-card); border-bottom-left-radius: 5px; }
.apx-m.typing.is-on { display: flex; gap: 4px; align-self: flex-start; background: #fff; border: 1px solid var(--line-card); }
.apx-m.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8b6cf0; opacity: .4; animation: apx-dot 1.1s infinite; }
.apx-m.typing i:nth-child(2) { animation-delay: .15s; }
.apx-m.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes apx-dot { 30% { opacity: 1; transform: translateY(-3px); } }
.apx-m.card.is-on { display: flex; align-items: center; gap: 9px; align-self: flex-start; width: 84%; background: #fff; border: 1px solid var(--line-card); box-shadow: 0 6px 16px rgba(0, 0, 0, .06); }
.apx-m.card > span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #f1edfd; color: #6a4fd0; flex: none; }
.apx-m.card div { flex: 1; min-width: 0; }
.apx-m.card b { display: block; font-size: 12px; }
.apx-m.card small { font-size: 10.5px; color: var(--muted); }
.apx-m.card em { position: relative; height: 28px; min-width: 82px; padding: 0 10px; border-radius: 8px; background: var(--b); color: #fff; font-style: normal; font-size: 11px; font-weight: 600; display: grid; place-items: center; overflow: hidden; transition: background .4s, transform .15s; }
.apx-m.card em span { grid-area: 1 / 1; display: flex; align-items: center; gap: 3px; transition: transform .35s var(--ae), opacity .3s; }
.apx-m.card em .b { transform: translateY(150%); opacity: 0; }
.apx-m.card em.is-done { background: #1f7a45; }
.apx-m.card em.is-done .a { transform: translateY(-150%); opacity: 0; }
.apx-m.card em.is-done .b { transform: none; opacity: 1; }
.apx-chat-in { margin: 0 12px 4px; height: 38px; border-radius: 19px; background: #fff; border: 1px solid var(--line-card); display: flex; align-items: center; justify-content: space-between; padding: 0 5px 0 14px; color: var(--ph); font-size: 11.5px; }
.apx-chat-in i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--b); color: #fff; transition: background .5s; }

/* Касание */
.apx-tap { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(20, 20, 19, .18); border: 2px solid rgba(255, 255, 255, .8); z-index: 50; opacity: 0; transform: scale(.4); pointer-events: none; }
.apx-tap.is-go { animation: apx-tap .55s ease-out; }
@keyframes apx-tap { 0% { opacity: 0; transform: scale(1.3); } 30% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.5); } }

/* Бренд клуба */
.apx-brand { position: relative; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line-card); box-shadow: 0 8px 24px rgba(20, 20, 19, .06); max-width: 320px; justify-self: start; }
.apx-cap { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.apx-cap-2 { margin-top: 18px; }
.apx-brand-t { margin: 6px 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.apx-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.apx-swatches button { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 11px; border: 1.5px solid var(--line-card); text-align: left; transition: border-color .25s, background .25s; }
.apx-swatches button:hover { background: var(--hover-soft); }
.apx-swatches button[aria-pressed='true'] { border-color: var(--sw); background: color-mix(in srgb, var(--sw) 7%, #fff); }
.apx-swatches .apx-logo { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.apx-swatches b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apx-store { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--b) 18%, #e9ecf5), #dfe3ee); transition: background .6s; }
.apx-home-grid { display: grid; grid-template-columns: repeat(4, 44px); gap: 10px; }
.apx-home-grid i { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .55); }
.apx-appicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--b) 75%, #fff), var(--b) 50%, var(--b-deep)); box-shadow: 0 6px 16px color-mix(in srgb, var(--b) 45%, transparent); transition: background .5s; }
.apx-store .apx-appicon.is-pop { animation: apx-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes apx-pop { 0% { transform: scale(.4); } }
.apx-store > b { font-size: 12.5px; }

.apx-ctl { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.apx-ctl .btn { gap: 6px; }

@media (max-width: 1279px) {
    .apx-stage { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
    .apx-brand { grid-column: 1 / -1; max-width: none; justify-self: stretch; display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 0 24px; align-items: center; }
    .apx-brand .apx-cap-2 { display: none; }
    .apx-brand .apx-store { margin: 0; grid-row: 1 / 4; grid-column: 3; }
    .apx-brand .apx-swatches { grid-column: 2; grid-row: 1 / 4; }
}
@media (max-width: 1023px) {
    .apx-stage { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 28px; gap: 24px; }
    .apx-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
    .apx-tabs::-webkit-scrollbar { display: none; }
    .apx-tabs li { flex: none; }
    .apx-tabs button { padding: 7px 12px 9px 7px; gap: 8px; }
    .apx-tab-ico { width: 28px; height: 28px; border-radius: 8px; }
    .apx-tab-t small { display: none; }
    .apx-tab-t b { font-size: 13.5px; white-space: nowrap; }
    .apx-tab-bar { left: 8px; right: 8px; bottom: 3px; }
    .apx-brand { display: block; }
    .apx-brand .apx-cap-2 { display: flex; }
    .apx-brand .apx-store { margin-top: 10px; }
}
@media (max-width: 767px) {
    .apx-stage { margin-top: 28px; border-radius: 18px; }
    .apx-swatches { grid-template-columns: 1fr 1fr; }
    .apx-brand { padding: 14px; }
}
@media (max-width: 380px) {
    .apx-phone { transform: scale(.92); transform-origin: top center; margin-bottom: -52px; }
}

/* ── Настоящие экраны: лента ── */
.apr-view { margin-top: 36px; overflow: hidden; padding: 10px 0 24px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); outline: none; }
.apr-track { display: flex; width: max-content; animation: apr-go 70s linear infinite; animation-play-state: paused; }
.apr.is-on .apr-track { animation-play-state: running; }
.apr-view:hover .apr-track, .apr-view:focus .apr-track { animation-play-state: paused; }
@keyframes apr-go { to { transform: translateX(-50%); } }
.apr-item { margin: 0 22px 0 0; flex: none; width: 214px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.apr-item:nth-child(even) { margin-top: 28px; }
.apr-phone { width: 214px; border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 0 0 6px #18181a, 0 0 0 7px #3a3a3e, 0 22px 50px rgba(20, 20, 19, .2); transition: transform .3s var(--ae); }
.apr-item:hover .apr-phone { transform: translateY(-6px); }
.apr-phone img { width: 100%; height: auto; }
.apr-item figcaption { font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* ── Особенности: мини-виджеты ── */
.apf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.apf-card { border: 1px solid var(--line-card); border-radius: 16px; background: #fff; overflow: hidden; padding-bottom: 22px; }
.apf-wide { grid-column: span 2; }
.apf-card h3 { display: flex; align-items: center; gap: 8px; margin: 20px 20px 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.apf-card h3 .i { color: var(--accent); }
.apf-card > p { margin: 0 20px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.apf-vis { position: relative; height: 210px; padding: 18px; overflow: hidden; border-bottom: 1px solid var(--line);
    background-color: #fafaf9; background-image: radial-gradient(circle, #e0e0db 1px, transparent 1.3px); background-size: 16px 16px; }
.apf .apf-vis *, .apf .apf-vis *::before, .apf .apf-vis *::after { animation-play-state: paused; }
.apf.is-on .apf-vis *, .apf.is-on .apf-vis *::before, .apf.is-on .apf-vis *::after { animation-play-state: running; }

/* Покупка */
.apf-buy .apf-vis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.apf-plan { position: relative; padding: 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--b), var(--b-deep)); box-shadow: 0 14px 30px color-mix(in srgb, var(--b) 30%, transparent); }
.apf-plan small { font-size: 12px; opacity: .8; }
.apf-plan b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.apf-paid { position: absolute; right: -6px; bottom: -12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #22a35a; color: #fff; font-size: 12px; font-weight: 600; animation: apf-paid 6s infinite; }
@keyframes apf-paid { 0%, 70% { opacity: 0; transform: scale(.5); } 76%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.apf-methods { display: flex; flex-direction: column; gap: 7px; }
.apf-methods span { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1.5px solid var(--line-card); font-size: 13px; font-weight: 500; animation: apf-m 6s var(--d) infinite; }
@keyframes apf-m { 0%, 25%, 100% { border-color: var(--line-card); color: var(--ink); } 4%, 20% { border-color: var(--b); color: var(--b); background: var(--b-soft); } }

/* Заморозка */
.apf-cal { background: #fff; border: 1px solid var(--line-card); border-radius: 14px; padding: 12px; }
.apf-cal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; }
.apf-cal-h em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 11px; font-weight: 600; color: #0b7487; background: #e2f3f6; padding: 2px 7px; border-radius: 999px; }
.apf-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.apf-days i { height: 24px; display: grid; place-items: center; font-style: normal; font-size: 11px; border-radius: 6px; color: var(--ink-2); }
.apf-days i.in { animation: apf-day 5s var(--d) infinite; }
@keyframes apf-day { 0%, 8% { background: transparent; color: var(--ink-2); } 14%, 88% { background: #cfeef3; color: #0b5563; } 100% { background: transparent; } }

/* QR */
.apf-qr .apf-vis { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.apf-qrbox { position: relative; width: 132px; height: 132px; padding: 12px; }
.apf-qrbox svg[data-apf-qr] { width: 100%; height: 100%; }
.apf-qrbox svg[data-apf-qr] rect { fill: #141413; }
.apf-qring { position: absolute; inset: 0; width: 100%; height: 100%; }
.apf-qring rect { fill: #fff; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 100; animation: apf-ring 20s linear infinite; }
.apf-qrbox svg[data-apf-qr] { position: relative; z-index: 1; }
@keyframes apf-ring { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 100; } }
.apf-sec { font-size: 13px; font-variant-numeric: tabular-nums; }

/* Загрузка */
.apf-ld-h { display: flex; align-items: baseline; gap: 6px; }
.apf-ld-h b { font-size: 34px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.apf-ld-h small { font-size: 12px; color: var(--muted); }
.apf-bars { display: flex; align-items: flex-end; gap: 4px; height: 100px; margin-top: 6px; }
.apf-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: #cfdaf7; height: calc(var(--v) * 5px); transform-origin: bottom; animation: apf-bar 3.5s var(--d) ease-in-out infinite alternate; }
.apf-bars i.now { background: var(--accent); }
@keyframes apf-bar { from { transform: scaleY(.88); } to { transform: scaleY(1.04); } }
.apf-hours { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 4px; }

/* Push */
.apf-push .apf-vis { display: flex; flex-direction: column; gap: 7px; }
.apf-pn { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 13px; background: rgba(255, 255, 255, .95); border: 1px solid var(--line-card); box-shadow: 0 6px 16px rgba(20, 20, 19, .06); animation: apf-pn 5.6s var(--d) infinite; }
.apf-pn .apx-logo-xs { width: 22px; height: 22px; border-radius: 6px; }
.apf-pn div { flex: 1; min-width: 0; }
.apf-pn b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apf-pn small { font-size: 11px; color: var(--muted); }
.apf-pn em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--warn); background: var(--warn-soft); padding: 2px 6px; border-radius: 999px; }
.apf-pn[data-held] { opacity: .55; border-style: dashed; animation-name: apf-pn-held; }
@keyframes apf-pn { 0% { opacity: 0; transform: translateY(-12px); } 8%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes apf-pn-held { 0% { opacity: 0; transform: translateY(-12px); } 8%, 90% { opacity: .55; transform: none; } 100% { opacity: 0; } }
.apf-cap { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: auto; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; }

/* Бренд */
.apf-brand .apf-vis { display: flex; align-items: center; justify-content: center; background-image: none; background: linear-gradient(160deg, #e7ebf5, #dde2ee); }
.apf-icons { display: flex; gap: 26px; }
.apf-ic { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: apf-ic 3.2s var(--d) infinite; }
.apf-ic .apx-appicon { width: 64px; height: 64px; border-radius: 17px; }
.apf-ic small { font-size: 12px; font-weight: 600; color: var(--ink-2); }
@keyframes apf-ic { 0%, 30%, 100% { transform: none; } 12% { transform: translateY(-10px) scale(1.06); } }

/* Языки */
.apf-langs .apf-vis { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.apf-words { position: relative; width: 100%; height: 50px; }
.apf-words b { position: absolute; inset: 0; text-align: center; font-size: 38px; font-weight: 700; letter-spacing: -.03em; opacity: 0; animation: apf-word 6s var(--d) infinite; }
@keyframes apf-word { 0% { opacity: 0; transform: translateY(16px); } 5%, 28% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; transform: translateY(-16px); } }
.apf-lsw { position: relative; display: flex; padding: 3px; border-radius: 10px; background: #e9e9e6; }
.apf-lsw span { position: relative; z-index: 1; width: 46px; height: 28px; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.apf-lsw i { position: absolute; left: 3px; top: 3px; width: 46px; height: 28px; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); animation: apf-lsw 6s infinite; }
@keyframes apf-lsw { 0%, 30% { transform: none; } 34%, 63% { transform: translateX(46px); } 67%, 97% { transform: translateX(92px); } 100% { transform: none; } }

/* Сообщество */
.apf-comm .apf-vis { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; }
.apf-live { position: relative; height: 174px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #3b2f6e, #15132a); display: grid; place-items: center; color: rgba(255, 255, 255, .85); }
.apf-live-b { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: #e0473f; color: #fff; font-size: 11px; font-weight: 700; }
.apf-live-b i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: apf-blink 1s infinite; }
@keyframes apf-blink { 50% { opacity: .2; } }
.apf-live-w { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .35); color: #fff; font-size: 11px; }
.apf-live-av { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.apf-hearts { position: absolute; right: 16px; bottom: 10px; width: 20px; height: 120px; }
.apf-hearts i { position: absolute; bottom: 0; left: 0; color: #ff5d7a; opacity: 0; animation: apf-heart 3s var(--d) infinite; }
.apf-hearts i .i { fill: #ff5d7a; }
@keyframes apf-heart { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), -110px) scale(1.1); } }
.apf-stories { display: flex; flex-wrap: wrap; gap: 12px; }
.apf-stories > span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.apf-stories .apx-av { width: 48px; height: 48px; font-size: 14px; box-shadow: 0 0 0 2px #fafaf9, 0 0 0 4px var(--accent); animation: apf-story 4s var(--d) infinite; }
@keyframes apf-story { 0%, 20%, 100% { box-shadow: 0 0 0 2px #fafaf9, 0 0 0 4px var(--accent); } 10% { box-shadow: 0 0 0 2px #fafaf9, 0 0 0 4px #e0532a; transform: scale(1.06); } }
.apf-stories small { font-size: 11px; color: var(--ink-2); }

/* Оплаты */
.apf-pay .apf-vis { display: flex; flex-direction: column; gap: 6px; }
.apf-ccard { position: relative; height: 54px; border-radius: 11px; padding: 10px 12px; color: #fff; font: 600 13px/1 ui-monospace, Menlo, monospace; background: linear-gradient(135deg, #2b2b2e, #4a4a52); display: flex; align-items: flex-end; margin-bottom: 4px; }
.apf-ccard i { position: absolute; right: 12px; top: 10px; width: 26px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, #e6c27a, #b8913f); }
.apf-prow { display: grid; grid-template-columns: 44px 1fr auto; gap: 6px; align-items: center; padding: 6px 9px; border-radius: 9px; background: #fff; border: 1px solid var(--line-card); font-size: 12px; animation: apf-row 5s var(--d) infinite; }
.apf-prow time { color: var(--faint); font-variant-numeric: tabular-nums; }
.apf-prow span { color: var(--ink-2); }
.apf-prow[data-done] span { color: var(--ok); font-weight: 600; }
.apf-prow b { font-variant-numeric: tabular-nums; }
@keyframes apf-row { 0% { opacity: 0; transform: translateX(10px); } 8%, 100% { opacity: 1; transform: none; } }

@media (max-width: 1279px) {
    .apf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .apf-grid { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
    .apf-wide { grid-column: auto; }
    .apf-icons { gap: 12px; }
    .apf-ic .apx-appicon { width: 54px; height: 54px; }
    .apf-ic small { font-size: 11px; }
    .apf-comm .apf-vis { grid-template-columns: 130px minmax(0, 1fr); }
    .apf-stories { gap: 8px; }
    .apf-stories .apx-av { width: 40px; height: 40px; }
    .apr-item, .apr-phone { width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
    .apf-vis *, .apf-vis *::before, .apf-vis *::after, .apx-scr *, .apx-wipe { animation: none !important; }
    .apf-paid, .apf-words b:first-child { opacity: 1; transform: none; }
    .apf-days i.in { background: #cfeef3; color: #0b5563; }
    .apf-hearts { display: none; }
    .apr-track { animation: none; }
    .apr-view { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .apr-track > [aria-hidden='true'] { display: none; }
    .apx-scr, .apx-push { transition: none; }
}
