/* ============ KotAppStore ============ */
:root {
  --bg: #0b0b0f;
  --bg-2: #111116;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);
  --text: #f1f2f8;
  --muted: #a1a3b0;
  --dim: #6c6e7c;
  --a1: #f43f5e;
  --a2: #fb8a5c;
  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --glow: rgba(244, 63, 94, .42);
  --ok: #3ddc84;
  --danger: #ff5d6c;
  --warn: #ffb547;
  --r: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* фон: медленно плавающие пятна света */
.bg-glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-glow span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(110px); opacity: .1; animation: float 26s ease-in-out infinite alternate; }
.bg-glow span:nth-child(1) { background: #e11d48; top: -30vmax; left: -20vmax; }
.bg-glow span:nth-child(2) { background: #4f5d8a; opacity: .14; top: 5vmax; right: -28vmax; animation-duration: 32s; animation-delay: -8s; }
.bg-glow span:nth-child(3) { background: #c2410c; bottom: -40vmax; left: 30vw; opacity: .07; animation-duration: 38s; }
@keyframes float { to { transform: translate(6vmax, 4vmax) scale(1.12); } }

/* ============ шапка ============ */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); background: rgba(11, 11, 15, .62); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; filter: drop-shadow(0 6px 16px rgba(244, 63, 94, .45)); transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-200deg); }
.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.account { margin-left: auto; }
.nav + .account { margin-left: 0; }
.account-box { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); animation: pop-in .4s var(--spring); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); flex: none; }
.avatar svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.who { font-size: 14px; font-weight: 600; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ кнопки ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--text);
  border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 14px; padding: 11px 18px;
  cursor: pointer; text-decoration: none; white-space: nowrap; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .24); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary { border: 0; color: #fff; background: var(--grad); box-shadow: 0 8px 24px -6px rgba(244, 63, 94, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 12px 32px -6px rgba(244, 80, 100, .75), inset 0 1px 0 rgba(255, 255, 255, .25); }
/* блик, пробегающий по кнопке */
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: none; }
.btn-primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn-lg { padding: 15px 24px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-text { font: inherit; font-size: 14px; font-weight: 600; color: #ff9aa6; background: none; border: 0; padding: 6px 8px; cursor: pointer; border-radius: 8px; }
.btn-text:hover { background: var(--surface-2); }
.spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: rot .7s linear infinite; }
.btn.loading .spin { display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ============ герой ============ */
main { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; min-height: calc(100vh - 64px); padding: 40px 0 60px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #ffd3d8; padding: 6px 12px; border-radius: 999px; background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .3); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.035em; margin: 22px 0 18px; font-weight: 800; }
.grad { background: linear-gradient(100deg, #ff5a6e, #ffb070 45%, #ff5a6e 90%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: -200% center; } }
.lead { font-size: 18px; color: var(--muted); max-width: 540px; margin: 0 0 30px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: rgba(61, 220, 132, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%233ddc84' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ============ iPhone-демо (цикл 12 с) ============ */
.phone-wrap { position: relative; display: flex; justify-content: center; perspective: 1400px; }
.phone {
  --T: 12s;
  position: relative; width: 286px; height: 590px; border-radius: 52px; padding: 12px;
  background: linear-gradient(145deg, #3a2a30, #170f12 40%, #382a2f);
  box-shadow: 0 0 0 1.5px #4a3a40, 0 40px 80px -20px rgba(0, 0, 0, .8), 0 0 120px -30px rgba(244, 63, 94, .55), inset 0 0 0 2px #0d0e14;
  animation: bob 7s ease-in-out infinite;
  transform: rotateY(-12deg) rotateX(4deg);
}
@keyframes bob { 50% { transform: rotateY(-8deg) rotateX(2deg) translateY(-12px); } }
.phone-shadow { position: absolute; bottom: -30px; left: 50%; width: 220px; height: 30px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); animation: shadow 7s ease-in-out infinite; }
@keyframes shadow { 50% { transform: translateX(-50%) scale(.85); opacity: .7; } }
.island { position: absolute; top: 22px; left: 50%; width: 92px; height: 27px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 5; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 41px; overflow: hidden; background: linear-gradient(180deg, #1a1216, #110b0e); font-size: 12px; }
.sbar { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 6px 26px 0 30px; z-index: 4; font-size: 13px; }
.sicons { display: flex; gap: 4px; align-items: center; }
.sicons i { display: block; width: 14px; height: 9px; border-radius: 2px; background: #fff; opacity: .9; }
.sicons i:first-child { width: 15px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.sicons i:last-child { width: 22px; border-radius: 3px; }

.ph-app { position: absolute; inset: 0; padding: 52px 14px 0; animation: ph-app var(--T) infinite; }
.ph-top { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.ph-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 30px; }
.ph-bal { position: relative; width: 52px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 10px; font-weight: 700; }
.ph-bal em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; }
.ph-bal .b1 { animation: ph-b1 var(--T) infinite; }
.ph-bal .b2 { opacity: 0; color: #ff9aa6; animation: ph-b2 var(--T) infinite; }
@keyframes ph-b1 { 0%, 9% { opacity: 1; transform: none; } 11%, 97% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; } }
@keyframes ph-b2 { 0%, 9% { opacity: 0; transform: translateY(6px); } 11%, 96% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
.ph-caret { display: inline-block; width: 1px; height: 13px; margin-left: 2px; background: var(--a1); vertical-align: -2px; animation: ph-caret 1s steps(1) infinite; }
@keyframes ph-caret { 50% { opacity: 0; } }
.ph-chips { display: flex; gap: 6px; height: 24px; margin-bottom: 12px; overflow: hidden; }
.ph-chips span { flex: none; font-size: 10px; font-weight: 600; line-height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #a5a8b8; }
.ph-chips .on { background: var(--grad); color: #fff; }
.ph-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; justify-content: space-around; padding-top: 9px; background: rgba(18, 18, 24, .94); border-top: 1px solid rgba(255, 255, 255, .06); }
.ph-tabbar span { display: grid; justify-items: center; gap: 2px; font-size: 9px; font-weight: 600; color: #6e7182; }
.ph-tabbar i { font-style: normal; font-size: 15px; line-height: 1; }
.ph-tabbar .on { color: var(--a1); }
.ph-search { height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #7d8299; display: flex; align-items: center; padding: 0 10px; margin-bottom: 12px; }
.ph-row { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 10px; margin-bottom: 7px; border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .05); }
.ph-row img { width: 36px; height: 36px; border-radius: 9px; }
.ph-row div { flex: 1; min-width: 0; line-height: 1.2; }
.ph-row b { display: block; font-size: 13px; }
.ph-row small { color: #3ddc84; font-size: 10.5px; }
.ph-btn { position: relative; font-size: 10.5px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--grad); color: #fff; overflow: hidden; min-width: 72px; text-align: center; }
.ph-target .ph-btn { animation: ph-press var(--T) infinite; }
.ph-btn-label { animation: ph-label var(--T) infinite; display: inline-block; }
.ph-btn-load { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 9px; opacity: 0; animation: ph-load-show var(--T) infinite; }
.ph-btn-load i { display: block; height: 4px; width: 100%; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.ph-btn-load i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); animation: ph-load var(--T) infinite; }

.ph-sheet { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 16px 14px 14px; border-radius: 26px; background: rgba(52, 36, 42, .92); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .1); text-align: center; transform: translateY(115%); animation: ph-sheet var(--T) infinite; z-index: 2; }
.ph-sheet img { width: 44px; height: 44px; border-radius: 11px; margin: 0 auto 8px; }
.ph-sheet b { display: block; font-size: 13.5px; }
.ph-sheet small { display: block; color: #a3a8bf; margin: 2px 0 12px; }
.ph-sheet-btn { display: block; padding: 10px; border-radius: 14px; background: var(--grad); font-weight: 700; color: #fff; }

.ph-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; animation: ph-dim var(--T) infinite; z-index: 3; }
.ph-alert { position: absolute; left: 34px; right: 34px; top: 222px; border-radius: 16px; background: rgba(58, 44, 50, .96); text-align: center; overflow: hidden; opacity: 0; transform: scale(1.15); animation: ph-alert var(--T) infinite; z-index: 3; }
.ph-alert p { margin: 0; padding: 16px 14px; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.ph-alert-btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255, 255, 255, .12); }
.ph-alert-btns span { padding: 11px 0; color: #4d9dff; font-size: 13px; }
.ph-alert-btns span + span { border-left: 1px solid rgba(255, 255, 255, .12); font-weight: 700; }
.ph-alert-ok { animation: ph-ok var(--T) infinite; }

.ph-home { position: absolute; inset: 0; padding: 62px 20px 0; opacity: 0; animation: ph-home var(--T) infinite; background: radial-gradient(120% 80% at 20% 0%, #3a2340, transparent 60%), radial-gradient(100% 70% at 100% 100%, #5a2a36, transparent 55%), #121218; z-index: 1; }
.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.ph-grid > i { display: block; aspect-ratio: 1; border-radius: 13px; background: rgba(255, 255, 255, .14); }
.ph-newapp { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ph-newicon { position: relative; width: 100%; aspect-ratio: 1; border-radius: 13px; overflow: hidden; animation: ph-icon var(--T) infinite; }
.ph-newicon img { width: 100%; height: 100%; animation: ph-icon-img var(--T) infinite; }
.ph-newicon svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ph-newicon circle { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 82; stroke-dashoffset: 82; animation: ph-ring var(--T) infinite; }
.ph-newapp small { font-size: 9px; position: relative; height: 12px; width: 100%; text-align: center; white-space: nowrap; }
.ph-newapp em { left: 50% !important; right: auto !important; transform: translateX(-50%); }
.ph-newapp em { font-style: normal; position: absolute; inset: 0; }
.ph-newapp .l1 { animation: ph-l1 var(--T) infinite; }
.ph-newapp .l2 { opacity: 0; animation: ph-l2 var(--T) infinite; }
.ph-dock { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 70px; border-radius: 28px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 11px 16px; }
.ph-dock i { border-radius: 13px; background: rgba(255, 255, 255, .22); }

/* «палец» */
.tap { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 6px rgba(255, 255, 255, .18); opacity: 0; z-index: 6; animation: ph-tap var(--T) infinite; left: 197px; top: 330px; }

/* тайминг цикла:
   0–9%   каталог; 9% тап по «Установить» у ВКонтакте
   10–36% загрузка в кнопке; 37% всплывает шторка «ссылка готова»; 47% тап по ней
   50–62% системный запрос iOS; 59% тап «Установить»
   63–93% рабочий стол: иконка с кольцом загрузки → «ВКонтакте»; 95–100% возврат */
@keyframes ph-tap {
  0%, 6% { opacity: 0; left: 197px; top: 330px; transform: scale(1.4); }
  8% { opacity: 1; transform: scale(1); }
  10% { opacity: 0; transform: scale(.8); left: 197px; top: 330px; }
  44% { opacity: 0; left: 131px; top: 522px; transform: scale(1.4); }
  46% { opacity: 1; transform: scale(1); left: 131px; top: 522px; }
  48% { opacity: 0; transform: scale(.8); left: 131px; top: 522px; }
  56% { opacity: 0; left: 183px; top: 306px; transform: scale(1.4); }
  58% { opacity: 1; transform: scale(1); left: 183px; top: 306px; }
  60%, 100% { opacity: 0; transform: scale(.8); left: 183px; top: 306px; }
}
@keyframes ph-press { 0%, 8% { transform: scale(1); } 9% { transform: scale(.9); } 11%, 100% { transform: scale(1); } }
@keyframes ph-label { 0%, 9% { opacity: 1; } 10%, 96% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes ph-load-show { 0%, 9% { opacity: 0; } 10%, 38% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes ph-load { 0%, 10% { transform: scaleX(0); } 36%, 100% { transform: scaleX(1); } }
@keyframes ph-sheet { 0%, 37% { transform: translateY(115%); } 41%, 48% { transform: translateY(0); } 52%, 100% { transform: translateY(115%); } }
@keyframes ph-dim { 0%, 49% { opacity: 0; } 51%, 61% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes ph-alert { 0%, 49% { opacity: 0; transform: scale(1.15); } 52%, 60% { opacity: 1; transform: scale(1); } 62%, 100% { opacity: 0; transform: scale(.95); } }
@keyframes ph-ok { 0%, 57% { background: transparent; } 58%, 59% { background: rgba(255, 255, 255, .12); } 60%, 100% { background: transparent; } }
@keyframes ph-app { 0%, 61% { opacity: 1; transform: none; } 63%, 96% { opacity: 0; transform: scale(.94); } 99%, 100% { opacity: 1; transform: none; } }
@keyframes ph-home { 0%, 61% { opacity: 0; transform: scale(1.06); } 64%, 94% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: scale(1.04); } }
@keyframes ph-icon { 0%, 64% { transform: scale(0); } 68% { transform: scale(1.1); } 70%, 87% { transform: scale(1); } 89% { transform: scale(1.12); } 91%, 100% { transform: scale(1); } }
@keyframes ph-icon-img { 0%, 86% { filter: brightness(.45) saturate(.5); } 89%, 100% { filter: none; } }
@keyframes ph-ring { 0%, 68% { stroke-dashoffset: 82; opacity: 1; } 86% { stroke-dashoffset: 0; opacity: 1; } 88%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes ph-l1 { 0%, 87% { opacity: 1; } 89%, 100% { opacity: 0; } }
@keyframes ph-l2 { 0%, 87% { opacity: 0; } 89%, 100% { opacity: 1; } }

/* ============ секции ============ */
.section { padding: 70px 0 20px; }
.section-head { margin-bottom: 30px; max-width: 640px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; margin: 0 0 10px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-card { position: relative; padding: 26px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .4s var(--ease), border-color .3s, background .3s; }
.how-card:nth-child(2) { --d: .1s; }
.how-card:nth-child(3) { --d: .2s; }
.how-card:hover { transform: translateY(-4px); border-color: rgba(244, 90, 110, .35); background: rgba(244, 63, 94, .06); }
.how-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(244, 63, 94, .15); border: 1px solid rgba(244, 63, 94, .3); margin-bottom: 18px; }
.how-ico svg { width: 22px; height: 22px; fill: none; stroke: #ff9aa6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.how-n { position: absolute; top: 14px; right: 20px; font-size: 54px; font-weight: 800; letter-spacing: -.04em; color: rgba(255, 255, 255, .05); }
.how-card h3 { margin: 0 0 8px; font-size: 18px; }
.how-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ============ каталог ============ */
.catalog-bar { position: sticky; top: 61px; z-index: 10; padding: 10px 20px 4px; margin: 0 -20px; transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.catalog-bar.stuck { background: rgba(11, 11, 15, .78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom-color: var(--border); }
.stick-sentinel { height: 1px; }
.searchbar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; border-radius: 18px; background: rgba(22, 22, 28, .9); border: 1px solid var(--border-2); backdrop-filter: blur(12px); transition: border-color .25s, box-shadow .25s; cursor: text; }
.searchbar:focus-within { border-color: rgba(244, 90, 110, .6); box-shadow: 0 0 0 4px rgba(244, 63, 94, .15); }
.searchbar svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: inherit; font-size: 16px; }
.searchbar input::placeholder { color: var(--dim); }
.count { font-size: 13px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 10px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: all .25s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip .n { margin-left: 6px; font-size: 12px; opacity: .6; }
.chip.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(244, 63, 94, .7); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; padding-top: 10px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; min-height: 196px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--border);
  animation: card-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms);
  transition: transform .35s var(--ease), border-color .3s, background .3s, box-shadow .35s;
}
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(244, 90, 110, .16), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-5px); border-color: rgba(244, 90, 110, .35); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); }
.card:hover::before { opacity: 1; }
.card .icon { width: 60px; height: 60px; border-radius: 15px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 24px; color: var(--muted); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6); transition: transform .45s var(--spring); }
.card:hover .icon { transform: scale(1.08) rotate(-3deg); }
.card .name { flex: 1; font-weight: 650; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.card .tag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--warn); background: rgba(255, 181, 71, .1); padding: 2px 7px; border-radius: 6px; }
.card .btn { width: 100%; padding: 10px; font-size: 14px; border-radius: 12px; }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 30px 0; text-align: center; }
.extra { margin-top: 28px; }
.extra h3 { font-size: 18px; margin: 0 0 12px; }

/* ============ вопросы ============ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: border-color .3s, background .3s; }
.faq details[open] { border-color: rgba(244, 90, 110, .3); background: rgba(244, 63, 94, .05); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); animation: fade-down .4s var(--ease); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } }
.footer { text-align: center; color: var(--dim); font-size: 13px; padding: 60px 20px 40px; }

/* ============ модальные окна ============ */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(4, 5, 10, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .3s var(--ease); }
.modal.closing { animation: fade .25s var(--ease) reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 440px; padding: 30px 26px 24px; border-radius: 28px; background: linear-gradient(180deg, #18181e, #121217); border: 1px solid var(--border-2); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03) inset; animation: sheet-in .5s var(--spring); }
.modal.closing .sheet { animation: sheet-out .25s var(--ease) forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(16px) scale(.97); } }
.sheet h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.02em; }
.sheet-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); margin-bottom: 16px; box-shadow: 0 10px 30px -8px rgba(244, 63, 94, .7); }
.sheet-ico svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.x { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 13px; transition: transform .3s var(--ease), color .2s; }
.x:hover { color: var(--text); transform: rotate(90deg); }
.callout { margin: 8px 0 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: #ffc9cf; background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .25); }
.field { display: block; margin-top: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input { width: 100%; font: inherit; color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid var(--border-2); border-radius: 14px; padding: 13px 15px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.field input:focus { border-color: rgba(244, 90, 110, .7); box-shadow: 0 0 0 4px rgba(244, 63, 94, .15); background: rgba(255, 255, 255, .07); }
.field input[readonly] { opacity: .55; }
#code { font-size: 22px; letter-spacing: .5em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.code-box { animation: fade-down .45s var(--ease); }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.error { margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: #ffb3ba; background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .25); animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* установка: кольцо прогресса вокруг иконки */
.sheet-install { text-align: left; }
.ring-wrap { position: relative; width: 132px; height: 132px; margin: 6px auto 16px; }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: rgba(255, 255, 255, .07); }
.ring-fg { stroke: url(#rg); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .6s var(--ease); filter: drop-shadow(0 0 6px rgba(244, 80, 100, .7)); }
.ring-wrap.spinning .ring { animation: rot 1.4s linear infinite; }
.ring-wrap.spinning .ring-fg { stroke-dashoffset: 250; }
.ring-icon { position: absolute; inset: 18px; width: 96px; height: 96px; border-radius: 24px; object-fit: cover; background: var(--surface-2); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); animation: pop-in .6s var(--spring); }
.ring-done { position: absolute; right: 4px; bottom: 4px; width: 38px; height: 38px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; box-shadow: 0 0 0 4px #16161b, 0 8px 20px -4px rgba(61, 220, 132, .6); transform: scale(0); }
.ring-done svg { width: 22px; height: 22px; fill: none; stroke: #062a14; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.ring-wrap.done .ring-done { animation: pop-in .5s var(--spring) forwards; }
.ring-wrap.done .ring-done svg { animation: draw .4s .25s var(--ease) forwards; }
.ring-wrap.done .ring-fg { stroke: var(--ok); filter: drop-shadow(0 0 8px rgba(61, 220, 132, .6)); }
.ring-wrap.failed .ring-fg { stroke: var(--danger); filter: none; }
@keyframes pop-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.stages { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 4px; }
.stages li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; color: var(--dim); transition: color .3s, background .3s; }
.stages li span { flex: 1; }
.stages li em { font-style: normal; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stages li i { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); flex: none; transition: all .3s var(--ease); }
.stages li.active { color: var(--text); background: rgba(244, 63, 94, .08); }
.stages li.active i { border-color: rgba(244, 90, 110, .3); border-top-color: #ff6b7c; animation: rot .8s linear infinite; }
.stages li.done { color: var(--muted); }
.stages li.done i { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23062a14' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; animation: pop-in .35s var(--spring); }
.stages li.fail { color: #ffb3ba; }
.stages li.fail i { border-color: var(--danger); background: var(--danger); }
.status { margin-top: 12px; font-size: 14px; text-align: center; min-height: 0; }
.status:empty { display: none; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.bad { color: #ffb3ba; padding: 10px 12px; border-radius: 12px; background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .25); }
.ready { margin-top: 18px; animation: fade-down .5s var(--ease); }
.qr { display: flex; justify-content: center; margin-top: 10px; }
.qr img { width: 210px; height: 210px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 6px rgba(244, 63, 94, .15), 0 20px 50px -15px rgba(244, 63, 94, .6); animation: pop-in .5s var(--spring); }

/* ============ адаптив ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 36px; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta, .ticks { justify-content: center; }
  .phone { transform: none; animation: bob-flat 7s ease-in-out infinite; }
  @keyframes bob-flat { 50% { transform: translateY(-10px); } }
  .how { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .topbar-in { padding: 10px 16px; }
  main { padding: 0 16px; }
  .catalog-bar { margin: 0 -16px; padding-left: 16px; padding-right: 16px; top: 57px; }
  .brand span { display: none; }
  .who { max-width: 130px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 16px; }
  .cta { flex-direction: column; width: 100%; }
  .cta .btn { width: 100%; }
  .nav + .account, .account { margin-left: auto; }
  .phone { width: 250px; height: 516px; border-radius: 46px; padding: 10px; }
  .phone .screen { border-radius: 37px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { min-height: 176px; padding: 13px; }
  .card .icon { width: 52px; height: 52px; border-radius: 13px; }
  .sheet { padding: 26px 20px 20px; border-radius: 24px; }
  .section { padding-top: 54px; }
}
/* в мобильной версии телефон меньше — демо масштабируем целиком */
@media (max-width: 560px) {
  .phone .screen { width: 262px; height: 566px; transform: scale(.874); transform-origin: top left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- мини-анимация установки на iPhone (12 с, только transform/opacity — плавно и на телефонах) ---------- */
.iosd { display: flex; align-items: center; gap: 16px; margin: 16px 0 6px; text-align: left; }
.iosd-phone { flex: none; position: relative; width: 136px; height: 276px; padding: 6px; border-radius: 30px; background: linear-gradient(145deg, #2c2c34, #141418); box-shadow: inset 0 0 0 1.5px #44444e, inset 0 0 0 3px #0c0c0f, 0 18px 40px -18px rgba(0, 0, 0, .9); }
.iosd-phone::after { content: ''; position: absolute; top: 12px; left: 50%; width: 38px; height: 11px; margin-left: -19px; border-radius: 8px; background: #000; z-index: 9; }
.iosd-screen { position: relative; width: 124px; height: 264px; border-radius: 24px; overflow: hidden; background: #000; font-family: -apple-system, 'SF Pro Text', Inter, system-ui, sans-serif; }
.iosd-screen > * { position: absolute; inset: 0; }
.iosd-sb { position: absolute; top: 9px; left: 14px; font-size: 8px; font-weight: 700; }

/* Safari со страницей установки */
.iosd-safari { z-index: 2; background: #f5f5f7; color: #111; transform-origin: 50% 100%; animation: iosd-safari 12s infinite; }
.iosd-big { position: absolute; top: 50px; left: 36px; width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.iosd-screen .iosd-safari b { color: #111; position: absolute; top: 110px; left: 6px; right: 6px; text-align: center; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iosd-screen .iosd-safari small { position: absolute; top: 127px; left: 0; right: 0; text-align: center; font-size: 7.5px; color: #8a8a90; }
.iosd-get { position: absolute; top: 146px; left: 20px; width: 84px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; font-weight: 700; font-size: 9px; box-shadow: 0 6px 14px -6px rgba(244, 63, 94, .8); animation: iosd-press1 12s infinite; }
.iosd-url { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 22px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: #666; font-size: 7.5px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* системное окно iOS */
.iosd-dim { z-index: 3; background: rgba(0, 0, 0, .32); opacity: 0; animation: iosd-dim 12s infinite; }
.iosd-screen > .iosd-alert { z-index: 4; inset: auto; left: 7px; top: 96px; width: 110px; border-radius: 12px; overflow: hidden; background: rgba(240, 240, 245, .97); color: #111; text-align: center; opacity: 0; animation: iosd-alert 12s infinite; }
.iosd-screen .iosd-alert p { height: 54px; color: #111; margin: 0; max-width: none; box-sizing: border-box; padding: 10px 9px 0; display: block; font-size: 8.2px; font-weight: 600; line-height: 1.3; overflow: hidden; }
.iosd-screen .iosd-alert div { display: flex; height: 28px; margin: 0; border-top: .5px solid rgba(60, 60, 67, .3); }
.iosd-screen .iosd-alert div span { flex: 1; display: grid; place-items: center; font-size: 8.5px; color: #0a84ff; }
.iosd-alert .ok { font-weight: 700; border-left: .5px solid rgba(60, 60, 67, .3); animation: iosd-press2 12s infinite; }

/* экран «Домой» */
.iosd-home { z-index: 1; color: #fff; background: radial-gradient(120% 80% at 20% 0%, #5b2a86 0%, transparent 60%), linear-gradient(170deg, #2a1236 0%, #9b2445 60%, #f0703f 100%); animation: iosd-home 12s infinite; }
.iosd-grid { position: absolute; top: 34px; left: 12px; right: 12px; display: grid; grid-template-columns: repeat(3, 26px); justify-content: space-between; row-gap: 12px; }
.iosd-grid > i { width: 26px; height: 26px; border-radius: 7px; margin-bottom: 11px; background: linear-gradient(145deg, var(--c1), var(--c2)); opacity: .9; }
.iosd-grid > i:nth-child(1) { --c1: #34d399; --c2: #059669; }
.iosd-grid > i:nth-child(2) { --c1: #60a5fa; --c2: #2563eb; }
.iosd-grid > i:nth-child(3) { --c1: #fbbf24; --c2: #f59e0b; }
.iosd-grid > i:nth-child(4) { --c1: #f9fafb; --c2: #d1d5db; }
.iosd-grid > i:nth-child(6) { --c1: #a78bfa; --c2: #7c3aed; }
.iosd-grid > i:nth-child(7) { --c1: #fb7185; --c2: #e11d48; }
.iosd-grid > i:nth-child(8) { --c1: #22d3ee; --c2: #0891b2; }
.iosd-grid > i:nth-child(9) { --c1: #4ade80; --c2: #16a34a; }
.iosd-app { position: relative; width: 26px; display: flex; flex-direction: column; align-items: center; }
.iosd-ic { position: relative; width: 26px; height: 26px; animation: iosd-pop 12s infinite; }
.iosd-ic img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.iosd-shade { position: absolute; inset: 0; border-radius: 7px; background: rgba(0, 0, 0, .55); animation: iosd-shade 12s infinite; }
.iosd-ic svg { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; fill: none; stroke: rgba(255, 255, 255, .95); animation: iosd-shade 12s infinite; }
.iosd-ic svg .o { stroke-width: 1.3; }
.iosd-ic svg .p { stroke-width: 7; stroke-dasharray: 22; stroke-dashoffset: 22; transform: rotate(-90deg); transform-origin: 9px 9px; animation: iosd-pie 12s infinite; }
.iosd-app small { position: relative; width: 44px; height: 10px; margin-top: 2px; font-size: 6.5px; }
.iosd-app em { position: absolute; inset: 0; font-style: normal; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iosd-app .l1 { animation: iosd-shade 12s infinite; }
.iosd-app .l2 { animation: iosd-l2 12s infinite; }
.iosd-dock { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: space-around; background: rgba(255, 255, 255, .2); }
.iosd-dock i { width: 24px; height: 24px; border-radius: 7px; background: rgba(255, 255, 255, .75); }
.iosd-dock i:nth-child(1) { background: #34c759; } .iosd-dock i:nth-child(2) { background: #0a84ff; } .iosd-dock i:nth-child(3) { background: #ff9f0a; }

/* касание пальцем */
.iosd-screen > .iosd-tap { z-index: 8; inset: auto; left: 62px; top: 159px; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(255, 255, 255, .55); border: 1.5px solid rgba(0, 0, 0, .12); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; animation: iosd-tap 12s infinite; }

/* шаги справа: активный подсвечен, под ним полоска времени */
.iosd-steps { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.iosd-steps li { position: relative; padding-left: 30px; counter-increment: s; opacity: .45; animation: iosd-s1 12s infinite; }
.iosd-steps li:nth-child(2) { animation-name: iosd-s2; }
.iosd-steps li:nth-child(3) { animation-name: iosd-s3; }
.iosd-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.iosd-steps b { display: block; font-size: 13.5px; line-height: 1.3; color: var(--text); }
.iosd-steps span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.iosd-steps i { display: block; height: 2px; margin-top: 7px; border-radius: 2px; background: linear-gradient(90deg, var(--a1), var(--a2)); transform-origin: 0 50%; transform: scaleX(0); animation: iosd-b1 12s linear infinite; }
.iosd-steps li:nth-child(2) i { animation-name: iosd-b2; }
.iosd-steps li:nth-child(3) i { animation-name: iosd-b3; }

/* сценарий: 0–31% Safari и окно iOS · 31–38% Safari сворачивается · 38–79% загрузка · 79–100% готово */
@keyframes iosd-safari { 0% { opacity: 0; transform: none; } 3%, 31% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.5, 0, .2, 1); } 37% { opacity: 0; transform: scale(.18) translateY(30px); } 97% { opacity: 0; transform: scale(.18) translateY(30px); } 98%, 100% { opacity: 0; transform: none; } }
@keyframes iosd-home { 0%, 4% { opacity: 1; transform: none; } 5%, 31% { opacity: 0; transform: scale(1.1); animation-timing-function: cubic-bezier(.2, .7, .2, 1); } 38%, 100% { opacity: 1; transform: none; } }
@keyframes iosd-press1 { 0%, 9% { transform: none; } 10.5% { transform: scale(.92); } 12.5%, 100% { transform: none; } }
@keyframes iosd-dim { 0%, 13% { opacity: 0; } 16%, 29% { opacity: 1; } 32%, 100% { opacity: 0; } }
@keyframes iosd-alert { 0%, 13% { opacity: 0; transform: scale(1.15); animation-timing-function: cubic-bezier(.2, .9, .3, 1.15); } 16.5%, 29% { opacity: 1; transform: none; } 32%, 100% { opacity: 0; transform: scale(.97); } }
@keyframes iosd-press2 { 0%, 25.5% { background: transparent; } 26.5%, 28.5% { background: rgba(60, 60, 67, .14); } 30%, 100% { background: transparent; } }
@keyframes iosd-tap {
  0%, 6% { opacity: 0; left: 62px; top: 159px; transform: scale(1.5); }
  9% { opacity: 1; transform: none; }
  10.5% { opacity: 1; transform: scale(.82); }
  13% { opacity: 0; left: 62px; top: 159px; transform: scale(1.15); }
  14% { opacity: 0; left: 90px; top: 164px; transform: scale(1.5); }
  22% { opacity: 0; left: 90px; top: 164px; transform: scale(1.5); }
  25% { opacity: 1; left: 90px; top: 164px; transform: none; }
  26.5% { opacity: 1; transform: scale(.82); }
  29.5%, 100% { opacity: 0; left: 90px; top: 164px; transform: scale(1.15); }
}
@keyframes iosd-shade { 0%, 3% { opacity: 0; } 4%, 78% { opacity: 1; } 81%, 100% { opacity: 0; } }
@keyframes iosd-l2 { 0%, 3% { opacity: 1; } 4%, 78% { opacity: 0; } 81%, 100% { opacity: 1; } }
@keyframes iosd-pie { 0%, 40% { stroke-dashoffset: 22; } 50% { stroke-dashoffset: 16; } 64% { stroke-dashoffset: 9; } 77%, 100% { stroke-dashoffset: 0; } }
@keyframes iosd-pop { 0%, 79% { transform: none; } 82% { transform: scale(1.16); } 85.5%, 100% { transform: none; } }
@keyframes iosd-s1 { 0%, 32% { opacity: 1; } 35%, 100% { opacity: .45; } }
@keyframes iosd-s2 { 0%, 32% { opacity: .45; } 35%, 79% { opacity: 1; } 82%, 100% { opacity: .45; } }
@keyframes iosd-s3 { 0%, 79% { opacity: .45; } 82%, 97% { opacity: 1; } 100% { opacity: .45; } }
@keyframes iosd-b1 { 0% { transform: scaleX(0); opacity: 1; } 32% { transform: scaleX(1); opacity: 1; } 35%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes iosd-b2 { 0%, 32% { transform: scaleX(0); opacity: 1; } 79% { transform: scaleX(1); opacity: 1; } 82%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes iosd-b3 { 0%, 79% { transform: scaleX(0); opacity: 1; } 97% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .iosd *, .iosd-steps li, .iosd-steps i { animation: none !important; }
  .iosd-safari, .iosd-dim, .iosd-screen > .iosd-alert, .iosd-shade, .iosd-ic svg, .iosd-app .l1, .iosd-screen > .iosd-tap { opacity: 0; }
  .iosd-steps li { opacity: 1; }
}
@media (max-width: 380px) { .iosd { gap: 12px; } .iosd-steps b { font-size: 12.5px; } .iosd-steps span { font-size: 11px; } }

/* ---------- полоска «Откройте в Safari» ---------- */
.safari-bar { position: relative; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #2a1117; border-bottom: 1px solid rgba(244, 63, 94, .35); color: #ffd2d8; font-size: 13px; line-height: 1.35; }
.safari-bar > span { flex: 1; min-width: 0; }
.safari-bar b { color: #fff; }
.safari-bar .btn { flex: none; }
.safari-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #ffd2d8; font: inherit; cursor: pointer; }
@media (max-width: 420px) { .safari-bar { flex-wrap: wrap; } .safari-bar > span { flex-basis: calc(100% - 40px); } }

/* QR-код в виде встроенного SVG */
.qr svg { width: 210px; height: 210px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 6px rgba(244, 63, 94, .15), 0 20px 50px -15px rgba(244, 63, 94, .6); animation: pop-in .5s var(--spring); transition: opacity .3s, filter .3s; }
.qr.stale svg { opacity: .25; filter: blur(2px); }
.qr-wait { width: 210px; height: 210px; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .05); }

/* узкие экраны: анимация установки — телефон над шагами */
@media (max-width: 360px) {
  .iosd { flex-direction: column; align-items: stretch; gap: 14px; }
  .iosd-phone { align-self: center; }
}
/* кнопки внутри текста страниц могут переноситься, а не вылезать за край */
.prose .btn { white-space: normal; max-width: 100%; text-align: center; overflow-wrap: anywhere; }

/* окно, открытое сразу при загрузке страницы, — без анимации появления (иначе кабинет «мигает») */
.no-modal-anim .modal:not(.closing), .no-modal-anim .modal:not(.closing) .sheet { animation: none !important; }
.safari-bar { transition: height .4s ease, padding .4s ease, opacity .3s ease, border-color .4s ease; overflow: hidden; }
.safari-bar.hiding { height: 0 !important; padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-color: transparent; }
