/* Маяк VPN — общая дизайн-система (сайт и кабинет) */
:root {
  --night: #020a18;  /* = фон логотипа */
  --deep: #061634;
  --sea: #0b3b8c;
  --signal: #2f8bff;
  --signal-2: #5ea6ff;
  --beam: #ffd58a; /* только свет маяка */
  --hi: #9cc9ff;
  --ink: #e9f0ff;
  --muted: #8ea1c9;
  --faint: #5b6f99;
  --ok: #3ddc97;
  --warn: #ffb547;
  --danger: #ff5a5f;

  --glass: rgba(10, 26, 58, 0.55);
  --glass-strong: rgba(9, 22, 50, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(160, 190, 255, 0.12);
  --line-strong: rgba(160, 190, 255, 0.22);

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;

  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 24px 60px -24px rgba(0, 8, 30, 0.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--ink);
  font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: var(--signal-2); text-decoration: none; }
a:hover { color: #9cc7ff; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal-2); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(47, 139, 255, 0.4); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(34px, 6.2vw, 72px); font-weight: 700; }
h2 { font-size: clamp(26px, 3.6vw, 42px); }
h3 { font-size: 20px; font-weight: 500; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- фон: ночное небо и облака ---------- */
.sky {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 82%, rgba(22, 104, 235, 0.38), transparent 72%),
    linear-gradient(180deg, #020a18 0%, #031129 50%, #041638 100%);
}
.stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #cfe0ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 26%, #cfe0ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 36%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 53% 34%, #bcd4ff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 40%, #fff 50%, transparent 51%);
}

/* ---------- стекло ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-xl);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
}
.tile { background: var(--glass-soft); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15.5px; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; color: #fff; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: linear-gradient(180deg, #3d95ff, #1f6fe8); box-shadow: 0 10px 30px -10px rgba(47, 139, 255, .8), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { background: linear-gradient(180deg, #55a3ff, #2a7cf3); color: #fff; }
.btn-beam { background: linear-gradient(180deg, #ffffff, #d6e6ff); color: #061634; box-shadow: 0 10px 34px -12px rgba(150, 200, 255, .75), inset 0 1px 0 #fff; }
.btn-beam:hover { color: #061634; filter: brightness(1.04); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-tg { background: #229ed9; }
.btn-tg:hover { background: #2aabea; color: #fff; }
.btn-danger { background: rgba(255, 90, 95, .14); border-color: rgba(255, 90, 95, .35); color: #ffb1b3; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn svg { width: 19px; height: 19px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.chip-ok { background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .3); color: #8ff0c4; }
.chip-warn { background: rgba(140, 170, 255, .14); border-color: rgba(140, 170, 255, .34); color: #c3d2ff; }
.chip-bad { background: rgba(255, 90, 95, .12); border-color: rgba(255, 90, 95, .3); color: #ffadb0; }
.chip-beam { background: rgba(156, 201, 255, .14); border-color: rgba(156, 201, 255, .38); color: var(--hi); }
  .chip svg { width: 15px; height: 15px; flex: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

/* ---------- формы ---------- */
.field { display: grid; gap: 8px; }
.field > span { font-size: 14px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--r-md);
  background: rgba(2, 10, 28, 0.55); border: 1px solid var(--line-strong); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(47, 139, 255, .18); }
.input::placeholder { color: var(--faint); }
.code-input { font-family: var(--display); font-size: 28px; letter-spacing: .45em; text-align: center; padding-left: .45em; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { -webkit-appearance: none; appearance: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; display: block; margin: 0; padding: 0; border-radius: 99px; background: rgba(255,255,255,.12); cursor: pointer; transition: background .2s; }
.switch input:checked { background: var(--signal); }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; pointer-events: none; }
.switch:has(input:checked)::after { transform: translateX(20px); }

/* ---------- шапка ---------- */
.nav { position: sticky; top: 0; z-index: 30; padding: 14px 0; transition: background .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(2, 10, 24, .7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b { color: var(--signal); font-weight: 700; }
.nav-links { display: flex; gap: 6px; margin-left: 12px; }
.nav-links a { color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.nav-links a:hover, .nav-links a.on { color: #fff; background: rgba(255,255,255,.06); }
.nav-end { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.burger { display: none; }

/* ---------- герой ---------- */
.hero { position: relative; display: grid; place-items: center; text-align: center; padding: 56px 0 110px; overflow: hidden; isolation: isolate; }
.hero-mark { width: 230px; margin: 0 auto; filter: drop-shadow(0 20px 60px rgba(47, 139, 255, .35)); }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero h1 .glow { color: transparent; background: linear-gradient(180deg, #fff 30%, #a9c9ff); -webkit-background-clip: text; background-clip: text; }
.hero .lead { max-width: 560px; margin: 22px auto 0; color: #b9c8ea; font-size: clamp(16px, 2vw, 19px); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }

/* ---------- секции ---------- */
section { padding: 90px 0; position: relative; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head p { max-width: 460px; color: var(--muted); }

/* демо-кабинет на лендинге */
.showcase { padding: 18px; display: grid; grid-template-columns: 300px 1fr; gap: 18px; border-radius: 36px; }
.showcase > *, .showcase .col > *, .grid-2 > *, .grid-3 > *, .cab > * { min-width: 0; }
.showcase .col { display: grid; gap: 18px; align-content: start; }
.kpi { padding: 20px; border-radius: var(--r-lg); }
.kpi .big { font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1; }
.kpi .big small { font-size: 16px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi-ok { background: radial-gradient(120% 120% at 0% 0%, rgba(61, 220, 151, .32), rgba(61, 220, 151, .05) 60%); border: 1px solid rgba(61, 220, 151, .25); }
.kpi-blue { background: radial-gradient(120% 120% at 0% 0%, rgba(47, 139, 255, .38), rgba(47, 139, 255, .05) 60%); border: 1px solid rgba(47, 139, 255, .28); }
.kpi-beam { background: radial-gradient(120% 120% at 100% 0%, rgba(120, 190, 255, .3), rgba(120, 190, 255, .03) 60%); border: 1px solid rgba(120, 190, 255, .24); }
.bars { display: flex; align-items: end; gap: 6px; height: 64px; margin-top: 16px; }
.bars i { flex: 1; border-radius: 99px; background: rgba(233, 240, 255, .85); min-height: 6px; }
.key-line { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: var(--r-md); background: rgba(2, 10, 28, .55); border: 1px solid var(--line); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13.5px; }
.key-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; color: #c7d6f6; }

/* преимущества */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 28px; }
.feature .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(47, 139, 255, .14); border: 1px solid rgba(47, 139, 255, .28); color: var(--signal-2); margin-bottom: 20px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 28px; position: relative; }
.step::before { counter-increment: s; content: counter(s); font-family: var(--display); font-size: 64px; line-height: 1; font-weight: 700; color: transparent; -webkit-text-stroke: 1px rgba(160, 190, 255, .35); display: block; margin-bottom: 18px; }
.step p { color: var(--muted); margin-top: 8px; font-size: 15px; }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.plan.hot { border-color: rgba(94, 166, 255, .55); background: linear-gradient(180deg, rgba(47, 139, 255, .16), transparent 50%), var(--glass); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 70px -30px rgba(47, 139, 255, .55); }
.plan .badge { position: absolute; top: 22px; right: 22px; }
.plan .price { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1; }
.plan .price small { font-size: 18px; color: var(--muted); font-weight: 400; }
.plan .old { color: var(--faint); text-decoration: line-through; font-size: 15px; margin-left: 8px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #c6d3f0; font-size: 15px; }
.plan li { display: flex; gap: 10px; align-items: center; }
.plan li svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.plan .btn { margin-top: auto; }

/* локации */
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.loc .grow { min-width: 0; }
.loc .chip { flex: none; }
.loc { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.flag { font-size: 26px; line-height: 1; }

/* faq */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { padding: 0; border-radius: var(--r-lg); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 26px; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; transition: rotate .25s; flex: none; color: var(--muted); }
.faq details[open] summary svg { rotate: 45deg; }
.faq .ans { padding: 0 26px 24px; color: var(--muted); }

/* подвал */
footer { padding: 50px 0 120px; border-top: 1px solid var(--line); margin-top: 40px; }
.foot { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { color: var(--muted); font-size: 14.5px; }

/* ---------- авторизация ---------- */
.auth { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 30px 16px 80px; }
.auth-card { width: min(440px, 100%); padding: 34px; text-align: center; }
.auth-card .hero-mark { width: 150px; }
.auth-card h2 { font-size: 26px; margin-bottom: 8px; }
.or { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 13px; margin: 22px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tg-widget { min-height: 48px; display: flex; justify-content: center; }

/* ---------- кабинет ---------- */
.cab { display: grid; grid-template-columns: 250px 1fr; gap: 22px; padding: 14px 0 60px; align-items: start; }
.side { position: sticky; top: 86px; padding: 14px; display: grid; gap: 4px; border-radius: 28px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: var(--muted); font-weight: 500; }
.side a svg { width: 20px; height: 20px; }
.side a:hover { color: #fff; background: rgba(255,255,255,.05); }
.side a.on { color: #fff; background: linear-gradient(90deg, rgba(47, 139, 255, .25), rgba(47, 139, 255, .06)); box-shadow: inset 0 0 0 1px rgba(47, 139, 255, .3); }
.side .me { display: flex; align-items: center; gap: 12px; padding: 10px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #2f8bff, #0b3b8c); display: grid; place-items: center; font-weight: 700; font-family: var(--display); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.badge-n { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--signal); color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 700; }
.main { display: grid; gap: 22px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title h2 { font-size: clamp(24px, 3vw, 32px); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 26px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-h h3 { font-size: 18px; }

.sub-hero { padding: 30px; position: relative; overflow: hidden; border-radius: var(--r-xl); min-height: 260px; display: flex; flex-direction: column; gap: 20px; }
.sub-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 120% at 100% 100%, rgba(47, 139, 255, .45), transparent 60%), radial-gradient(60% 80% at 85% 0%, rgba(120, 190, 255, .18), transparent 70%); }
.sub-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgba(4, 18, 48, .92) 30%, rgba(4, 18, 48, .35)); }
.sub-hero { isolation: isolate; }
.sub-hero .when { font-family: var(--display); font-size: clamp(28px, 4vw, 44px); font-weight: 600; line-height: 1.05; }
.ring { --p: 50; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--signal) 0, var(--hi) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); }
.ring > div { width: 98px; height: 98px; border-radius: 50%; background: #071731; display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1; display: block; }
.meter { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--signal), #7cb8ff); }
.stat-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--muted); }
.stat-row b { color: var(--ink); font-weight: 600; }

.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; }
.row .ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(47, 139, 255, .14); color: var(--signal-2); display: grid; place-items: center; flex: none; }
.row .ic svg { width: 20px; height: 20px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: grid; gap: 14px; justify-items: center; }
.empty svg { width: 46px; height: 46px; color: var(--faint); }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 14.5px; }
.seg button.on { background: #fff; color: #061634; }

.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.platforms button { padding: 16px 10px; border-radius: var(--r-md); background: rgba(255,255,255,.04); border: 1px solid var(--line); cursor: pointer; display: grid; justify-items: center; gap: 8px; font-weight: 500; color: var(--muted); }
.platforms button svg { width: 28px; height: 28px; }
.platforms button.on { border-color: var(--signal); color: #fff; background: rgba(47, 139, 255, .12); }
.howto { display: grid; gap: 14px; counter-reset: h; }
.howto li { list-style: none; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.howto li::before { counter-increment: h; content: counter(h); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(47, 139, 255, .16); color: var(--hi); font-family: var(--display); font-weight: 600; }
.howto { padding: 0; margin: 0; }
.qr { width: 190px; height: 190px; padding: 12px; border-radius: 20px; background: rgba(2, 10, 28, .6); border: 1px solid var(--line); }

/* чат */
.chat { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; height: min(74vh, 760px); padding: 0; overflow: hidden; }
.chat-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-row textarea { flex: 1; min-width: 0; }
.chat-body { overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(78%, 560px); padding: 12px 16px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: linear-gradient(180deg, #2f8bff, #1f6fe8); border-color: transparent; border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.sys { align-self: center; background: transparent; border: 0; color: var(--faint); font-size: 13px; padding: 4px; }
.msg .meta { font-size: 11.5px; opacity: .7; margin-top: 6px; }
.msg .who { font-size: 12.5px; color: var(--hi); margin-bottom: 4px; font-weight: 600; }
.msg-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 8px; }
.msg-imgs img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.composer { padding: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.composer-row { display: flex; gap: 10px; align-items: end; }
.composer textarea { min-height: 50px; max-height: 160px; resize: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs div { position: relative; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.thumbs button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(1, 5, 14, .9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; border-radius: 16px; }

/* модалка и тосты */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(1, 5, 14, .7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: min(520px, 100%); max-height: 92vh; overflow: auto; padding: 28px; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal h3 { font-size: 22px; margin-bottom: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { padding: 14px 18px; border-radius: 16px; background: rgba(9, 22, 50, .95); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: pop .25s; display: flex; gap: 10px; align-items: center; }
.toast.err { border-color: rgba(255, 90, 95, .45); }
.toast.ok { border-color: rgba(61, 220, 151, .45); }

.methods { display: grid; gap: 10px; }
.method { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); cursor: pointer; text-align: left; }
.method.on { border-color: var(--signal); background: rgba(47, 139, 255, .12); }
.method .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.method .ic svg { width: 20px; height: 20px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

.prose { max-width: 760px; }
.prose h2 { margin-bottom: 18px; }
.prose h3 { margin: 26px 0 10px; font-size: 18px; }
.prose p, .prose li { color: #c3d0ee; margin-bottom: 10px; }

.demo-flag { position: fixed; bottom: 14px; left: 14px; z-index: 200; pointer-events: none; }
@media (max-width: 640px) { .demo-flag { bottom: 96px; } }

/* мобильная навигация кабинета */
.tabbar { display: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .cab { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; padding: 8px; gap: 4px; border-radius: 22px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .me { display: none; }
  .side a { white-space: nowrap; padding: 10px 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: minmax(0, 1fr); }
  .showcase .col.left { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .features, .steps { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .nav-end .hide-sm { display: none; }
  .hero { padding: 24px 0 70px; }
  .hero-mark { width: 170px; }
  .hero-cta .btn { width: 100%; }
  .card, .feature, .step, .plan { padding: 22px; }
  .sub-hero { padding: 22px; }
  .grid-3 { grid-template-columns: 1fr; }
  .showcase { padding: 12px; border-radius: 28px; }
  .showcase .col.left { grid-template-columns: 1fr; }
  .side { display: none; }
  .tabbar { background: var(--glass-strong); display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; padding: 6px; border-radius: 24px; justify-content: space-around;
    padding-bottom: calc(6px + env(safe-area-inset-bottom) * .5); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border-radius: 16px; color: var(--muted); font-size: 11px; flex: 1; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: #fff; background: rgba(47, 139, 255, .2); }
  .tabbar .badge-n { position: absolute; top: 2px; right: 18%; min-width: 18px; height: 18px; font-size: 11px; }
  .cab { padding-bottom: 110px; }
  .chat { height: calc(100vh - 220px); }
  .msg { max-width: 88%; }
  .modal { padding: 22px; border-radius: 26px; }
  .auth-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- облака на фоне (canvas) ---------- */
#clouds { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- маяк: лучи вращаются вокруг вертикальной оси лампы ---------- */
.lighthouse { position: relative; width: 230px; margin: 0 auto 6px; isolation: isolate; }
.lighthouse .hero-mark { position: relative; z-index: 2; }
/* лампа на логотипе: 50% по ширине, 27% по высоте */
.rays { position: absolute; left: 50%; top: 27%; width: 0; height: 0; z-index: 3; perspective: 2400px; pointer-events: none; }
.ray { position: absolute; top: -26px; height: 52px; width: min(46vw, 560px); transform-style: preserve-3d;
  animation: spin 9s linear infinite; mix-blend-mode: screen; }
.ray.r { left: 0; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 236, 190, .95), rgba(255, 213, 138, .55) 18%, rgba(255, 213, 138, .14) 60%, transparent);
  clip-path: polygon(0 44%, 100% 0, 100% 100%, 0 56%); }
.ray.l { right: 0; transform-origin: 100% 50%;
  background: linear-gradient(270deg, rgba(255, 236, 190, .95), rgba(255, 213, 138, .55) 18%, rgba(255, 213, 138, .14) 60%, transparent);
  clip-path: polygon(100% 44%, 0 0, 0 100%, 100% 56%); }
@keyframes spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
/* вспышка, когда луч смотрит прямо на зрителя */
.flash { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 205, .95) 0, rgba(255, 213, 138, .45) 25%, transparent 65%);
  opacity: 0; animation: flash 9s linear infinite; mix-blend-mode: screen; }
@keyframes flash { 0%, 15%, 35%, 65%, 85%, 100% { opacity: 0; transform: scale(.6); } 25%, 75% { opacity: 1; transform: scale(1.15); } }
@media (max-width: 640px) { .lighthouse { width: 170px; } .ray { width: 44vw; height: 40px; top: -20px; } }
@media (prefers-reduced-motion: reduce) { .ray, .flash { display: none; } }

/* ---------- баланс и автопродление (низ обзора кабинета) ---------- */
.wallet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; padding: 0; overflow: hidden; }
.wallet .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(47, 139, 255, .16); color: var(--hi); flex: none; }
.wallet .ic svg { width: 22px; height: 22px; }
.wallet-bal { display: flex; align-items: center; gap: 16px; padding: 24px 26px; flex-wrap: wrap; }
.wallet-sum { font-size: 30px; line-height: 1.1; margin-top: 2px; }
.wallet-act { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.wallet-auto { display: flex; align-items: center; gap: 16px; padding: 24px 26px; border-left: 1px solid var(--line); cursor: pointer; background: rgba(255, 255, 255, .02); }
.wallet-auto:has(input:checked) { background: linear-gradient(90deg, rgba(61, 220, 151, .08), transparent 70%); }
.wallet-auto:has(input:disabled) { cursor: default; opacity: .75; }
.wallet-auto .grow { flex: 1; min-width: 0; }


@media (max-width: 860px) {
  .wallet { grid-template-columns: 1fr; }
  .wallet-auto { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .wallet-bal, .wallet-auto { padding: 20px; }
  .wallet-act { margin-left: 0; width: 100%; }
  .wallet-act .btn { flex: 1; }
  .main .grid-2[style] { grid-template-columns: 1fr !important; gap: 14px; }
}
.method .grow { flex: 1; min-width: 0; }
.method > svg { width: 20px; height: 20px; flex: none; color: var(--signal-2); }
.method[disabled] { cursor: not-allowed; }
.field { min-width: 0; }
.field > * { min-width: 0; }
.field > span .chip { flex: none; align-self: start; }

/* ---------- установка: платформа и приложения ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.setup { padding: 24px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.setup-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.setup-h h3 { font-size: 22px; font-weight: 600; }
.plat-pick { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; min-width: 170px; border-radius: 14px;
  background: rgba(2, 10, 28, .55); border: 1px solid rgba(94, 166, 255, .55); box-shadow: 0 0 0 4px rgba(47, 139, 255, .08); cursor: pointer; }
.plat-pick > svg { width: 18px; height: 18px; flex: none; color: var(--ink); }
.plat-pick .chev { width: 14px; height: 14px; rotate: 90deg; color: var(--muted); }
.plat-pick select { appearance: none; -webkit-appearance: none; flex: 1; background: transparent; border: 0; color: var(--ink); font-size: 15px; outline: none; cursor: pointer; padding: 0; }
.plat-pick select option { background: #0a1630; color: var(--ink); }
.plat-pick:focus-within { border-color: var(--signal-2); }
.app-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab { position: relative; overflow: hidden; height: 56px; padding: 0 18px; border-radius: 14px; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line-strong); color: var(--ink); display: flex; align-items: center; }
.app-tab .nm { position: relative; z-index: 1; font-weight: 700; font-size: 16px; }
.app-tab .wm { position: absolute; right: -4px; top: 50%; translate: 0 -50%; font-family: var(--display); font-weight: 700; font-size: 46px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(160, 190, 255, .28); letter-spacing: -0.04em; pointer-events: none; }
.app-tab .rec { position: absolute; top: 7px; left: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal-2); box-shadow: 0 0 8px var(--signal-2); }
.app-tab:hover { border-color: rgba(94, 166, 255, .45); }
.app-tab.on { border-color: rgba(94, 166, 255, .75); background: linear-gradient(90deg, rgba(47, 139, 255, .28), rgba(47, 139, 255, .06)); box-shadow: inset 3px 0 0 var(--signal-2), 0 0 24px -8px rgba(47, 139, 255, .6); }
.app-tab.on .nm { color: #bfe0ff; }
.app-tab.on .wm { -webkit-text-stroke-color: rgba(190, 220, 255, .5); }
.setup-body { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.setup-body.with-qr { grid-template-columns: minmax(0, 1fr) 220px; align-items: start; }
.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: sv; }
.steps-v li { position: relative; padding: 0 0 22px 50px; display: grid; gap: 8px; }
.steps-v li::before { counter-increment: sv; content: counter(sv); position: absolute; left: 0; top: -4px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(47, 139, 255, .16); color: var(--hi); font-family: var(--display); font-weight: 600; font-size: 15px; }
.steps-v li::after { content: ''; position: absolute; left: 16px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.steps-v li:last-child { padding-bottom: 0; }
.steps-v li:last-child::after { display: none; }
.steps-v li.sv-warn::before { content: '!'; counter-increment: none; background: rgba(255, 90, 95, .14); color: #ffadb0; }
.steps-v li.sv-warn p { color: #ffc9cb; overflow-wrap: anywhere; }
.sv-h b { font-size: 16px; }
.sv-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.setup-qr { display: grid; gap: 10px; justify-items: center; text-align: center; }
@media (max-width: 860px) { .setup-body.with-qr { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .setup { padding: 18px; }
  .app-tabs { grid-auto-columns: minmax(124px, 1fr); }
  .plat-pick { min-width: 0; flex: 1; }
}

.note { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: rgba(34, 158, 217, .1); border: 1px solid rgba(34, 158, 217, .35); }
.note > svg { width: 22px; height: 22px; color: #5cc3f2; flex: none; margin-top: 2px; }
.note p { margin-top: 4px; }
.tg-note { margin: 12px 14px 0; align-items: center; flex-wrap: wrap; }
.chat.has-note { grid-template-rows: auto auto 1fr auto; }
.seg button svg { width: 16px; height: 16px; display: inline; vertical-align: -3px; margin-right: 4px; }
.empty > h3 { color: var(--ink); }
.empty > svg:first-child { color: #5cc3f2; }

/* ---------- телефон: ничего не шире экрана ---------- */
.sub-hero > * { min-width: 0; max-width: 100%; }
.key-line { min-width: 0; max-width: 100%; }
.row .grow { min-width: 0; }
@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .row .grow { flex: 1 1 150px; }
  /* переключатели периодов/фильтров — одной строкой с прокруткой, а не блоком в 4 строки */
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; white-space: nowrap; }
  .page-title { gap: 10px; }
  .page-title .btn { min-height: 40px; }
  .key-line .btn { padding: 0 12px; }
  .switch { width: 52px; height: 30px; }
  .switch::after { width: 22px; height: 22px; }
  .switch:has(input:checked)::after { transform: translateX(22px); }
  .toggle-row { gap: 12px; }
  .toggle-row > span:first-child { min-width: 0; flex: 1; }
  .modal .seg { width: 100%; }
  /* демо-плашка не закрывает интерфейс */
  .demo-flag { animation: demo-hide 6s forwards; }
  @keyframes demo-hide { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
}
.list { grid-template-columns: minmax(0, 1fr); }
.list > * { min-width: 0; }
/* iPhone увеличивает страницу при фокусе на поле со шрифтом меньше 16px — не даём ему это делать */
@media (max-width: 860px) { input, select, textarea, .input { font-size: 16px !important; } .code-input { font-size: 26px !important; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.badge-n[hidden] { display: none; }
/* подсказка над полем ввода (закрытый тикет): длинный текст в placeholder на телефоне обрезался */
.composer-hint { order: -1; margin: 0; text-align: center; }
