:root {
  color-scheme: dark;
  --bg: #0e0e10; --surface: #17171a; --surface-2: #202024; --surface-3: #27272c; --line: #2b2b30;
  --text: #f4f4f5; --muted: #a1a1aa; --faint: #71717a;
  --accent: #ffdd2d; --accent-dim: #e6c21f; --accent-ink: #0e0e10; --accent-soft: rgba(255, 221, 45, .1);
  /* только для статусов */
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .12); --off: #f87171; --off-soft: rgba(248, 113, 113, .12);
  --font: "VPN Grotesk", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --side: 248px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
/* как приложение: без масштабирования щипком и двойным тапом, без «резинки» при прокрутке */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; overscroll-behavior: none; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 28px; height: 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── каркас ─────────────────────────────────────────────────────────────── */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] .i { color: var(--accent); }
.side__foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.helpcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; font-size: 13px; color: var(--muted); }
.helpcard b { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.helpcard .btn { margin-top: 10px; width: 100%; padding: 0 8px; font-size: 13px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; }
.me:hover { background: var(--surface); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.me__text { min-width: 0; font-size: 13px; line-height: 1.3; }
.me__text b { display: block; font-size: 14px; }
.me__text span { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { margin-left: var(--side); min-height: 100vh; padding: 32px 40px 64px; }
.page { max-width: 1040px; margin: 0 auto; }
.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 8px; }
  .topbar .logo { padding: 0; }
  .topbar .avatar { width: 32px; height: 32px; text-decoration: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 15;
    background: rgba(14, 14, 16, .92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--faint); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar .i { box-sizing: content-box; padding: 3px 12px; margin-block: -3px; border-radius: 999px; transition: background .15s; }
  .tabbar a[aria-current="page"] .i { color: var(--accent); background: var(--surface-3); }   /* выбранный раздел — плашка + жёлтая иконка */
  /* «Оформить» — действие, не раздел: всегда серая, отличается только формой иконки */
  .tabbar .tab-new { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--faint); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tabbar .tab-new:active { color: var(--text); }
  .tabbar .tab-new:active .i { background: var(--surface-2); }
}

/* ── типографика и общие блоки ─────────────────────────────────────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 24px; }
h1 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 0; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h3 { font-size: 15px; font-weight: 700; margin: 0; }
.sub-h { color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.section { margin-top: 36px; }
.section > h2 { margin-bottom: 14px; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-3); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn--primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--lg { min-height: 50px; font-size: 15px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; min-height: 40px; padding: 0; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--ok); background: var(--ok-soft); }
.pill--warn { color: var(--accent); background: var(--accent-soft); }
.pill--off { color: var(--off); background: var(--off-soft); }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid rgba(255, 221, 45, .25); margin-bottom: 20px; }
.banner .i { color: var(--accent); }
.banner__text { flex: 1; min-width: 0; }
.banner--off { background: var(--off-soft); border-color: rgba(248, 113, 113, .25); }
.banner--off .i { color: var(--off); }
.banner--ok { background: var(--ok-soft); border-color: rgba(74, 222, 128, .25); }
.banner--ok .i { color: var(--ok); }
@media (max-width: 560px) { .banner { flex-wrap: wrap; } .banner .btn { width: 100%; } }

/* ── подписки ──────────────────────────────────────────────────────────── */
.stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.subs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.sc { position: relative; display: flex; flex-direction: column; gap: 16px; text-align: left; padding: 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; }
.sc:hover { border-color: #3a3a40; }
.sc--off { background: transparent; }
.sc__top { display: flex; align-items: flex-start; gap: 12px; }
.dev { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.sc:not(.sc--off) .dev { color: var(--text); }
.sc__name { flex: 1; min-width: 0; }
.sc__name b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc__name span { font-size: 13px; color: var(--faint); }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.meter--warn i { background: var(--accent); }
.subs--enter { --card-enter-duration: 160ms; }
.subs--enter > article.sc { animation: subscription-enter var(--card-enter-duration) ease-out var(--card-delay) backwards; }
.subs--enter > article.sc:focus-within { animation: none; }
.subs--enter .meter i {
  transform-origin: left center;
  animation: subscription-meter 320ms ease-out calc(var(--last-card-delay) + var(--card-enter-duration)) backwards;
}
@keyframes subscription-enter { from { opacity: 0; transform: translateY(7px); } }
@keyframes subscription-meter { from { transform: scaleX(0); } }
.sc__exp { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.sc__exp b { color: var(--text); font-weight: 600; }
.sc__actions { display: flex; gap: 6px; margin-top: auto; }
.sc__actions .btn { flex: 1; min-width: 0; padding: 0 12px; }
@media (min-width: 901px) { .sc__actions .btn .i--sm { display: none; } }   /* узкая карточка: только текст */
.sc__actions .btn--icon { flex: none; padding: 0; }
.sc--add { align-items: center; justify-content: center; text-align: center; min-height: 210px; border-style: dashed; background: transparent; color: var(--muted); gap: 10px; }
.sc--add b { color: var(--accent); }
.sc--add:hover { color: var(--text); background: var(--accent-soft); }
.sc--add .dev { background: var(--accent-soft); color: var(--accent); }

.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty__icon { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty p { max-width: 420px; margin: 8px auto 22px; color: var(--muted); }
.howto { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: h; }
.howto > div { counter-increment: h; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.howto > div::before { content: counter(h); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--text); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.howto b { display: block; color: var(--text); }

.teaser { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-lg); text-decoration: none;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 221, 45, .16), transparent 55%), var(--surface); border: 1px solid var(--line); }
.teaser:hover { border-color: rgba(255, 221, 45, .4); }
.teaser .dev { background: var(--accent); color: var(--accent-ink); }
.teaser div { flex: 1; }
.teaser p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ── панели и диалоги ──────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; animation: fade .18s; }
.panel { position: fixed; z-index: 21; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .22s cubic-bezier(.2, .8, .2, 1); }
.panel__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel__head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* max-content: иначе сетка фиксированной высоты сжимает блок с overflow: hidden (список действий)
   ниже содержимого — низ обрезается, а прокручивать нечего */
.panel__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px; display: grid; grid-auto-rows: max-content; gap: 20px; align-content: start; }
.panel__foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.grab { display: none; }
@media (max-width: 640px) {
  .panel { top: auto; left: 0; width: 100%; max-height: 92vh; max-height: 92dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; animation: rise .24s cubic-bezier(.2, .8, .2, 1); }
  .grab { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--surface-3); margin: 8px auto -6px; }
}
.dialog { position: fixed; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px)); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); animation: pop .18s; }
.dialog__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.dialog__icon--off { background: var(--off-soft); color: var(--off); }
.dialog p { color: var(--muted); margin: 8px 0 0; }
.dialog__btns { display: flex; gap: 10px; margin-top: 22px; }
.dialog__btns .btn { flex: 1; }
.btn--danger { background: var(--off); border-color: var(--off); color: #1a0b0b; font-weight: 700; }
.btn--danger:hover { background: #ef5f5f; }
.scrim--top { z-index: 30; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.97); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.hero { display: flex; align-items: center; gap: 14px; }
.hero .dev { width: 52px; height: 52px; border-radius: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.fact span { display: block; font-size: 12px; color: var(--muted); }
.fact b { font-size: 15px; }
.rows { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rowbtn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: transparent; border: 0; text-align: left; cursor: pointer; text-decoration: none; color: var(--text); }
.rowbtn + .rowbtn { border-top: 1px solid var(--line); }
.rowbtn:hover { background: var(--surface-2); }
.rowbtn[disabled] { opacity: .45; cursor: not-allowed; background: transparent; }
.rowbtn > .i:first-child { color: var(--muted); }
.rowbtn__t { flex: 1; min-width: 0; }
.rowbtn__t b { display: block; font-weight: 600; }
.rowbtn__t span { display: block; font-size: 13px; color: var(--muted); }
.rowbtn .chev { color: var(--faint); }
.rowbtn--danger, .rowbtn--danger > .i:first-child { color: var(--off); }

/* ── формы ─────────────────────────────────────────────────────────────── */
.field label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 16px var(--font); }
.input:focus { border-color: var(--accent); outline: none; }
.input::placeholder { color: var(--faint); }
.input--code { font: 700 24px ui-monospace, Menlo, monospace; letter-spacing: .5em; text-align: center; }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.err { font-size: 13px; color: var(--off); margin-top: 8px; }
.opts { display: grid; gap: 10px; }
.opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt__box { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); transition: border-color .15s; }
.opt input:checked + .opt__box { border-color: var(--accent); background: var(--accent-soft); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt__row { display: flex; align-items: center; gap: 10px; }
.opt__price { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.opt__tag { position: absolute; top: 0; right: 8px; transform: translateY(-50%); padding: 3px 5px; border-radius: 6px; background: var(--surface-3); color: var(--accent); font-size: 11px; font-weight: 700; line-height: 1.3; }
.opt--featured { grid-column: 1 / -1; margin-top: 5px; }
.opt--featured .opt__box { border-color: var(--accent-dim); background: var(--surface); }
.opt--featured .opt__tag { right: 10px; padding: 4px 8px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; }
.sum { display: flex; justify-content: space-between; align-items: baseline; }
.sum b { font-size: 22px; letter-spacing: -.02em; }
.note { font-size: 12px; color: var(--faint); text-align: center; }
.note a { color: var(--muted); }
.wait { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 0; }
.wait__ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.wait__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--off-soft); color: var(--off); }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 8px; border-radius: 9px; color: var(--muted); font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; justify-content: center; align-items: center; }
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.qr { width: 220px; max-width: 100%; aspect-ratio: 1; background: #fff; border-radius: 16px; padding: 12px; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: 100%; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; font-size: 14px; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.plat { display: grid; gap: 10px; }
.plat > div { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; color: var(--muted); }
.plat b { color: var(--text); display: block; margin-bottom: 2px; }

/* ── аккаунт, рефералка, инструкция ────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.settings { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.set { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.set + .set { border-top: 1px solid var(--line); }
.set__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.set__t { flex: 1; min-width: 0; }
.set__t span { display: block; font-size: 13px; color: var(--muted); }
.set__t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .set { flex-wrap: wrap; } .set__t { flex-basis: calc(100% - 54px); } .set > .btn { margin-left: 54px; } }
.info { display: flex; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 14px; }
.info .i { color: var(--faint); }

.ref { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 221, 45, .18), transparent 60%), var(--surface); }
.ref h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.03em; line-height: 1.15; max-width: 520px; }
.ref p { color: var(--muted); max-width: 520px; margin: 10px 0 22px; }
.copy { display: flex; gap: 8px; max-width: 560px; }
.copy .input { flex: 1; font-size: 16px; min-width: 0; }   /* <16px — iOS зумит поле при фокусе */
.copy-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 480px) { .copy { flex-direction: column; } }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.tile:hover { border-color: #3a3a40; }
.tile div { flex: 1; } .tile span { display: block; font-size: 13px; color: var(--muted); }
.acc { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.acc details + details { border-top: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; gap: 12px; padding: 18px; cursor: pointer; list-style: none; font-weight: 600; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .chev { margin-left: auto; color: var(--faint); transition: transform .15s; }
.acc details[open] summary .chev { transform: rotate(90deg); }
.acc__body { padding: 0 18px 18px 50px; color: var(--muted); font-size: 14px; }
.acc__body ol { padding-left: 18px; margin: 0; display: grid; gap: 8px; }
.acc__body a { color: var(--accent); }
@media (max-width: 480px) { .acc__body { padding-left: 18px; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; gap: 10px; align-items: center;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: fade .2s; }
.toast .i { color: var(--ok); }
@media (max-width: 900px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* на телефоне «Новая подписка» — в нижнем меню, карточка-дубль не нужна */
@media (max-width: 900px) { .sc--add { display: none; } }

/* ── вход ──────────────────────────────────────────────────────────────── */
.flag { margin-right: 6px; }
.guide__t { min-width: 0; }
.guide__t h3 { font-size: 15px; }
.guide__t span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.guide .acc__body .steps { padding-left: 0; }
.guide .steps li { font-size: 14px; color: var(--muted); }
.sprite { position: absolute; width: 0; height: 0; }
.m0 { margin: 0; } .mt6 { margin-top: 6px; } .mt14 { margin-top: 14px; } .mt18 { margin-top: 18px; } .mt20 { margin-top: 20px; } .mb14 { margin-bottom: 14px; }
.inl { display: inline; } .blk { display: block; } .accent { color: var(--accent); } .strong { color: var(--text); }
.grow { flex: 1; display: flex; gap: 8px; }
.grid22 { display: grid; gap: 22px; }
.bullets { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.wait--sm { padding: 18px 0 0; } .wait--sm .wait__ring { width: 28px; height: 28px; }
.noanim { animation: none !important; }
.toast--err .i { color: var(--off); }
.qr img { display: block; width: 100%; height: 100%; }
.stack { display: grid; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check b { display: block; font-weight: 600; font-size: 14px; }
.check span span { display: block; font-size: 12px; color: var(--faint); }
.feed { display: grid; gap: 14px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; min-width: 0; }
.post__date { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--accent); }
.post__text { overflow-wrap: anywhere; }
.post__text a { color: var(--accent); }
.post__text b { font-weight: 700; }
.post__text pre { margin: 8px 0 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; white-space: pre-wrap; font: 13px ui-monospace, Menlo, monospace; }
.post__text blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.post__text .spoiler { background: var(--surface-3); color: transparent; border-radius: 4px; cursor: pointer; }
.post__text .spoiler:hover, .post__text .spoiler:focus { background: none; color: inherit; }
.post__media { display: grid; gap: 8px; margin-top: 12px; }
.post__media a { display: block; }
.post__media img { display: block; max-width: 100%; max-height: 520px; border-radius: 12px; }
.post__file { font-size: 13px; color: var(--muted); }
.feed__more { justify-self: center; }
body.is-auth .side, body.is-auth .main, body.is-auth .tabbar { display: none; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth__box { width: min(400px, 100%); }
.auth .logo { justify-content: center; padding: 0 0 18px; }
.auth h1 { font-size: 24px; text-align: center; }
.auth__sub { color: var(--muted); text-align: center; margin: 8px 0 20px; }
.auth__or { display: grid; gap: 8px; margin-top: 12px; }
.auth__msg { text-align: center; }
.auth__msg p { color: var(--muted); }
