:root {
  --bg: #07141a;
  --bg-2: #0b1f27;
  --card: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 255, 255, 0.10);
  --text: #eef6f4;
  --muted: #9db3b0;
  --brand: #10a37f;
  --brand-2: #0a6f86;
  --accent: #ffc43d;
  --ok: #3ddc97;
  --radius: 22px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(16, 163, 127, 0.35), transparent 60%),
    radial-gradient(700px 480px at 110% 10%, rgba(10, 111, 134, 0.35), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
}

/* ---------- шапка ---------- */
.hero { text-align: center; padding: 0 0 18px; }
.hero__icon {
  width: 76px; height: 76px; border-radius: 19px;
  box-shadow: 0 18px 40px -12px rgba(16, 163, 127, 0.55), 0 0 0 1px rgba(255,255,255,0.08);
}
.hero h1 {
  margin: 12px 0 4px;
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
}
.hero p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 15.5px; line-height: 1.45; }

/* ---------- преимущества ---------- */
.section-title {
  margin: 28px 4px 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f8784;
}
.features { display: grid; gap: 10px; margin: 0; }
/* место под плавающую стрелку-подсказку, чтобы она не закрывала текст */
body.has-pointer .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.has-pointer-top .wrap { padding-top: calc(90px + env(safe-area-inset-top)); }
.feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
}
.feature__ico {
  flex: 0 0 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(16,163,127,0.35), rgba(10,111,134,0.35));
  color: var(--ok);
}
.feature b { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.feature span { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- карточка установки ---------- */
.card {
  position: relative;
  padding: 22px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.card p:last-child { margin-bottom: 0; }
.card .lead { color: var(--text); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 20px;
  border: 0; border-radius: 16px; cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 800; letter-spacing: 0.01em;
  color: #06231c; text-decoration: none;
  background: linear-gradient(135deg, #3ee0a8, var(--brand));
  box-shadow: 0 14px 30px -12px rgba(16, 163, 127, 0.8), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(0.98); filter: brightness(0.95); }
.btn--ghost {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  box-shadow: inset 0 0 0 1px var(--card-border);
  font-weight: 700; font-size: 15px; min-height: 48px;
}
.btn + .btn { margin-top: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.steps { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li {
  counter-increment: s;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.18); border: 1px solid var(--card-border); border-radius: 14px;
  font-size: 15px; line-height: 1.4;
}
.steps li::before {
  content: counter(s);
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #06231c; background: var(--accent);
}
.kbd {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid var(--card-border);
  font-weight: 700; white-space: nowrap;
}
.kbd svg { width: 16px; height: 16px; }

.note {
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,196,61,0.10); border: 1px solid rgba(255,196,61,0.28);
  color: #ffe3a3; font-size: 14px; line-height: 1.45;
}

.done { text-align: center; }
.done__badge {
  width: 64px; height: 64px; margin: 2px auto 14px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #5cf0b5, var(--brand));
  color: #06231c; box-shadow: 0 12px 30px -10px rgba(61,220,151,.8);
}
.done__badge svg { width: 32px; height: 32px; }

.linkbox {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 6px 6px 14px; margin-bottom: 12px;
  border-radius: 14px; background: rgba(0,0,0,0.25); border: 1px solid var(--card-border);
}
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text); }
.linkbox button {
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px; color: var(--text); background: rgba(255,255,255,0.1);
}

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2); border-top-color: var(--ok);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* стрелка-подсказка к кнопке Safari */
.pointer {
  position: fixed; z-index: 10;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #2a1d00;
  box-shadow: 0 10px 30px -6px rgba(255,196,61,.7);
  animation: bob 1.1s ease-in-out infinite;
}
.pointer svg { width: 28px; height: 28px; }
.pointer--bottom { left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); margin-left: -28px; }
.pointer--bottom-right { right: 18px; bottom: calc(14px + env(safe-area-inset-bottom)); }
.pointer--top-right { right: 18px; top: calc(14px + env(safe-area-inset-top)); }
.pointer--top-right svg { transform: rotate(180deg); }
@keyframes bob { 50% { translate: 0 8px; } }
.pointer--top-right { animation-name: bob-up; }
@keyframes bob-up { 50% { translate: 0 -8px; } }

.foot { margin-top: 26px; text-align: center; color: #6f8784; font-size: 12.5px; line-height: 1.5; }

/* ---------- приложение ---------- */
.appbar {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 2px 18px;
}
.appbar img { width: 40px; height: 40px; border-radius: 11px; }
.appbar b { font-size: 19px; font-weight: 800; }
.appbar span { display: block; color: var(--muted); font-size: 13px; }

.stage {
  display: flex; gap: 14px; align-items: center;
  padding: 16px; margin-bottom: 10px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 18px;
}
.stage__num {
  flex: 0 0 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800;
  background: rgba(255,255,255,0.08); color: var(--muted);
}
.stage--active { border-color: rgba(61,220,151,0.45); background: rgba(16,163,127,0.12); }
.stage--active .stage__num { background: var(--brand); color: #06231c; }
.stage b { display: block; font-size: 16px; margin-bottom: 2px; }
.stage span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.tag {
  margin-left: auto; flex: none;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,0.07);
}

[hidden] { display: none !important; }
