/* ═══════════════════════════════════════════════════════════════
   Aura — Liquid Glass UI
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  color-scheme: dark;
  --bg: #07060d;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, .72);
  --text-3: rgba(255, 255, 255, .46);
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(255, 255, 255, .13);
  --glass-edge: rgba(255, 255, 255, .14);
  --glass-spec: rgba(255, 255, 255, .34);
  --glass-shadow: 0 10px 36px -8px rgba(0, 0, 0, .5);
  --sheet-bg: rgba(28, 24, 42, .62);
  --field-bg: rgba(255, 255, 255, .06);
  --blur: 24px;

  --accent: #ff4d7e;
  --accent-2: #a855f7;
  --accent-3: #6366f1;
  --grad: linear-gradient(135deg, #ff4d7e 0%, #c04df9 50%, #6366f1 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --info: #60a5fa;
  --chart: #a78bfa;

  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 13px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.5, .64, 1);

  --top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f8;
  --text: #0d0b16;
  --text-2: rgba(13, 11, 22, .68);
  --text-3: rgba(13, 11, 22, .44);
  --glass: rgba(255, 255, 255, .38);
  --glass-strong: rgba(255, 255, 255, .7);
  --glass-edge: rgba(255, 255, 255, .75);
  --glass-spec: rgba(255, 255, 255, .95);
  --glass-shadow: 0 10px 34px -10px rgba(60, 40, 120, .28);
  --sheet-bg: rgba(250, 249, 255, .72);
  --field-bg: rgba(255, 255, 255, .55);
  --chart: #7c3aed;
}

html { min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100%; background: transparent; overflow-x: hidden; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─────────── Living background ─────────── */

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.blob { position: absolute; border-radius: 50%; will-change: transform; pointer-events: none; }
.b1 { width: 80vmax; height: 80vmax; top: -34vmax; left: -28vmax; background: radial-gradient(circle, rgba(255, 46, 126, .55), transparent 62%); animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 75vmax; height: 75vmax; top: 4vh; right: -34vmax; background: radial-gradient(circle, rgba(124, 58, 237, .6), transparent 62%); animation: drift2 30s ease-in-out infinite alternate; }
.b3 { width: 80vmax; height: 80vmax; bottom: -42vmax; left: -18vmax; background: radial-gradient(circle, rgba(14, 165, 233, .42), transparent 62%); animation: drift3 34s ease-in-out infinite alternate; }
.b4 { width: 46vmax; height: 46vmax; bottom: 8vh; right: -12vmax; background: radial-gradient(circle, rgba(251, 146, 60, .28), transparent 62%); animation: drift1 38s ease-in-out infinite alternate-reverse; }
html[data-theme="light"] .b1 { background: radial-gradient(circle, rgba(255, 77, 140, .5), transparent 62%); }
html[data-theme="light"] .b2 { background: radial-gradient(circle, rgba(139, 92, 246, .5), transparent 62%); }
html[data-theme="light"] .b3 { background: radial-gradient(circle, rgba(34, 211, 238, .45), transparent 62%); }
html[data-theme="light"] .b4 { background: radial-gradient(circle, rgba(251, 146, 60, .35), transparent 62%); }

.bg-art {
  position: absolute; inset: -15%;
  background: center / cover no-repeat;
  filter: blur(70px) saturate(1.9) brightness(.95);
  opacity: 0; transform: scale(1.15);
  transition: opacity 1.4s var(--ease), transform 2.5s var(--ease);
}
.bg-art.on { opacity: .55; transform: scale(1); }
html[data-theme="light"] .bg-art { filter: blur(70px) saturate(1.5) brightness(1.15); }
html[data-theme="light"] .bg-art.on { opacity: .45; }

.bg-noise {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(0, 0, 0, .35)); }
html[data-theme="light"] .bg::after { background: none; }

@keyframes drift1 { to { transform: translate(14vw, 12vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-16vw, 18vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(12vw, -14vh) scale(1.08); } }

/* ─────────── Liquid Glass material ─────────── */

.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(165deg, var(--glass-strong) 0%, var(--glass) 55%, var(--glass) 100%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(185%);
  backdrop-filter: blur(var(--blur)) saturate(185%);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 0 var(--glass-spec),
    inset 0 -1px 1px 0 rgba(255, 255, 255, .06),
    inset 0 0 18px 0 rgba(255, 255, 255, .03),
    var(--glass-shadow);
}
/* Кромка: преломлённый свет по контуру */
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg,
    rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .14) 22%, rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, .2) 84%, rgba(255, 255, 255, .5) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* Блик сверху */
.glass::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none;
  background: radial-gradient(140% 70% at 30% -20%, rgba(255, 255, 255, .16), transparent 55%);
}
html[data-theme="light"] .glass::after { background: radial-gradient(140% 70% at 30% -20%, rgba(255, 255, 255, .7), transparent 55%); }

/* Преломление (Chromium): backdrop-filter: url(#liquid-*) выставляется из liquid.js */
.liquid-on [data-liquid] { transition: backdrop-filter .2s; }

/* ─────────── Layout ─────────── */

.app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: calc(var(--top) + 10px) 16px calc(var(--bottom) + 116px); }

.topbar {
  position: sticky; top: calc(var(--top) + 10px); z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px; padding: 0 8px 0 10px; border-radius: 999px; margin-bottom: 8px;
  --blur: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -3px 8px rgba(0, 0, 0, .18), 0 6px 18px -4px rgba(192, 77, 249, .7);
}
.logo svg { width: 20px; height: 20px; }
.brand b { display: block; font-size: 17px; letter-spacing: -.01em; }
.brand span { display: block; font-size: 12px; color: var(--text-3); margin-top: -2px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(135deg, #6366f1, #22d3ee);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 4px 12px rgba(0, 0, 0, .3); position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .crown {
  position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--warn); color: #3b2500; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}
.avatar .crown svg { width: 11px; height: 11px; }

.view { display: none; }
.view.active { display: block; animation: viewIn .5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px) scale(.985); filter: blur(4px); } }

.hero { padding: 22px 6px 4px; }
.hero h1 { font-size: 31px; line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
.hero p { color: var(--text-2); margin-top: 10px; font-size: 15px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.section-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 12px; gap: 12px; }
.section-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--text-3); font-size: 13px; }

.rise { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ─────────── Buttons ─────────── */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 650; font-size: 15px;
  transition: transform .35s var(--spring), opacity .2s, filter .2s; user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(.955); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-primary {
  color: #fff; background: var(--grad); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 8px rgba(40, 0, 80, .25), 0 10px 26px -8px rgba(192, 77, 249, .75);
}
.btn-primary::before { /* глянец */
  content: ""; position: absolute; left: 2px; right: 2px; top: 1px; height: 52%;
  border-radius: 999px 999px 60% 60% / 999px 999px 30% 30%;
  background: linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)); pointer-events: none;
}
.btn-primary::after { /* пробегающий блик */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); animation: sheen 4.5s var(--ease) infinite; pointer-events: none;
}
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }

.btn-glass {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--glass-spec), inset 0 0 0 1px var(--glass-edge), 0 6px 18px -8px rgba(0, 0, 0, .4);
}
.btn-danger { color: #fff; background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 22px -8px rgba(225, 29, 72, .7); }
.btn-ok { color: #04281c; background: linear-gradient(135deg, #6ee7b7, #34d399); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 22px -8px rgba(52, 211, 153, .6); }
.btn-big { width: 100%; height: 56px; font-size: 16.5px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: var(--text-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 1px var(--glass-edge);
  transition: transform .35s var(--spring), background .2s, color .2s;
}
html[data-theme="light"] .icon-btn { background: rgba(255, 255, 255, .6); }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 19px; height: 19px; }

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

/* ─────────── Search field ─────────── */

.search {
  display: flex; align-items: center; gap: 6px; margin: 20px 0 16px;
  height: 62px; padding: 7px 7px 7px 18px; border-radius: 999px;
  transition: box-shadow .3s var(--ease), transform .4s var(--spring);
}
.search.focus { box-shadow: inset 0 1px 0 var(--glass-spec), 0 0 0 4px rgba(192, 77, 249, .22), 0 12px 40px -10px rgba(192, 77, 249, .55); }
.search .lead { color: var(--text-3); display: grid; }
.search .lead svg { width: 20px; height: 20px; }
.search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; font-size: 16px; }
.search input::placeholder { color: var(--text-3); }
.search .go { width: 48px; height: 48px; padding: 0; }
.search.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ─────────── Cards ─────────── */

.card { padding: 18px; border-radius: var(--r-xl); }
.card + .card, .stack > * + * { margin-top: 12px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title h3 svg { width: 18px; height: 18px; color: var(--text-3); }
.muted { color: var(--text-3); font-size: 13px; }

.announce { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); margin-top: 14px; }
.announce .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(251, 191, 36, .18); color: var(--warn); }
.announce .ico svg { width: 18px; height: 18px; }
.announce p { font-size: 14px; color: var(--text-2); white-space: pre-line; }
.announce .x { margin-left: auto; width: 30px; height: 30px; }

/* How it works */
.steps-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.how { padding: 14px 12px; border-radius: var(--r-md); }
.how .n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--glass-spec); margin-bottom: 10px;
}
.how b { display: block; font-size: 13.5px; line-height: 1.25; }
.how span { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.3; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--glass-edge);
}
html[data-theme="light"] .chip { background: rgba(255, 255, 255, .55); }
.chip svg { width: 13px; height: 13px; }
.chip.ok { color: var(--ok); background: rgba(52, 211, 153, .12); }
.chip.err { color: var(--err); background: rgba(251, 113, 133, .12); }
.chip.warn { color: var(--warn); background: rgba(251, 191, 36, .12); }
.chip.info { color: var(--info); background: rgba(96, 165, 250, .12); }
.chip.accent { color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }

/* ─────────── Track preview ─────────── */

.track { padding: 12px 12px 16px; border-radius: 34px; }
.cover-wrap { position: relative; aspect-ratio: 16 / 9; }
.cover-glow {
  position: absolute; inset: 10% 8% -8%; z-index: 0; border-radius: 26px;
  background: center / cover no-repeat; filter: blur(26px) saturate(1.8); opacity: .85;
}
.cover {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 24px;
  background: rgba(255, 255, 255, .06);
}
.cover-wrap::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 24px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .04) 32%, transparent 50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cover-badge {
  position: absolute; z-index: 3; right: 10px; bottom: 10px; height: 26px; padding: 0 10px; border-radius: 999px;
  display: flex; align-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
  background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.cover-badge.left { right: auto; left: 10px; gap: 4px; }
.cover-badge svg { width: 13px; height: 13px; }
.track-meta { padding: 14px 6px 4px; }
.track-meta h2 {
  font-size: 19px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.track-meta .by { color: var(--text-2); margin-top: 4px; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.track-body { padding: 10px 2px 0; }
.label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 6px 6px 8px; }

/* Segmented control */
.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; border-radius: 22px;
  background: rgba(0, 0, 0, .16);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25), inset 0 0 0 1px var(--glass-edge);
}
html[data-theme="light"] .seg { background: rgba(255, 255, 255, .4); box-shadow: inset 0 1px 3px rgba(60, 40, 120, .12), inset 0 0 0 1px rgba(255, 255, 255, .8); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 18px; pointer-events: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(255, 255, 255, .1), 0 6px 16px -4px rgba(0, 0, 0, .4);
  transition: transform .55s var(--spring), width .3s var(--ease);
}
html[data-theme="light"] .seg-thumb { background: #fff; box-shadow: 0 4px 14px -4px rgba(60, 40, 120, .35); }
.seg-thumb.squish { animation: squish .45s var(--ease); }
@keyframes squish { 40% { scale: 1.08 .92; } }
.seg button {
  position: relative; z-index: 1; border: 0; background: none; padding: 9px 2px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text-2); transition: color .25s;
}
.seg button b { font-size: 15px; font-weight: 750; }
.seg button small { font-size: 11px; color: var(--text-3); }
.seg button.on { color: var(--text); }
.seg button .dot { position: absolute; top: 6px; right: 8px; color: var(--warn); }
.seg button .dot svg { width: 11px; height: 11px; }
.seg.compact button { padding: 8px 2px; font-size: 13px; font-weight: 650; }

.size-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 14px; color: var(--text-3); font-size: 13px; }
.size-hint svg { width: 14px; height: 14px; }
.size-hint.warn { color: var(--warn); }

/* Progress */
.progress { padding: 6px 4px 0; }
.progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.progress-top .st { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.progress-top .pct { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lbar {
  position: relative; height: 16px; border-radius: 999px; overflow: hidden;
  background: rgba(0, 0, 0, .2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--glass-edge);
}
html[data-theme="light"] .lbar { background: rgba(255, 255, 255, .5); }
.lbar .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, #ff4d7e, #c04df9, #6366f1, #c04df9, #ff4d7e); background-size: 300% 100%;
  animation: flow 3s linear infinite; transition: width .6s var(--ease);
  box-shadow: 0 0 18px rgba(192, 77, 249, .7), inset 0 -2px 4px rgba(0, 0, 0, .15);
}
.lbar .fill::after { content: ""; position: absolute; left: 6px; right: 6px; top: 2px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .45); }
.lbar.indeterminate .fill { width: 38% !important; animation: flow 3s linear infinite, indet 1.4s var(--ease) infinite; }
@keyframes flow { to { background-position: 300% 0; } }
@keyframes indet { from { left: -40%; } to { left: 100%; } }
.progress-sub { display: flex; justify-content: space-between; color: var(--text-3); font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; min-height: 18px; }
.pipeline { display: flex; margin-top: 18px; }
.pstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-3); position: relative; transition: color .3s; }
.pstep::before { content: ""; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: rgba(255, 255, 255, .1); }
.pstep:first-child::before { display: none; }
.pstep i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .16); transition: all .4s var(--spring); }
.pstep.on { color: var(--text-2); }
.pstep.on::before { background: linear-gradient(90deg, #c04df9, #ff4d7e); }
.pstep.on i { background: #ff4d7e; box-shadow: 0 0 0 3px rgba(255, 77, 126, .2), 0 0 12px #ff4d7e; }
.pstep.cur i { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 77, 126, 0), 0 0 18px #ff4d7e; transform: scale(1.15); } }

/* Result */
.result { text-align: center; padding: 10px 6px 2px; }
.result h3 { font-size: 20px; font-weight: 800; margin-top: 12px; letter-spacing: -.01em; }
.result p { color: var(--text-2); margin: 6px auto 18px; max-width: 320px; font-size: 14px; }
.result .btn-row + .btn-row { margin-top: 10px; }
.check-anim { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 211, 153, .14); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .35), 0 0 40px -6px rgba(52, 211, 153, .6); animation: pop .6s var(--spring) both; }
.check-anim svg { width: 38px; height: 38px; color: var(--ok); }
.check-anim path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s var(--ease) forwards; }
.check-anim.err { background: rgba(251, 113, 133, .14); box-shadow: inset 0 0 0 1px rgba(251, 113, 133, .35), 0 0 40px -6px rgba(251, 113, 133, .6); }
.check-anim.err svg { color: var(--err); }
.check-anim.warn { background: rgba(251, 191, 36, .14); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .35), 0 0 40px -6px rgba(251, 191, 36, .5); }
.check-anim.warn svg { color: var(--warn); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.quota { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; color: var(--text-3); font-size: 13px; }
.quota .mini { width: 70px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.quota .mini i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }

/* Skeleton */
.skel { position: relative; overflow: hidden; background: rgba(255, 255, 255, .07); border-radius: 12px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent); animation: skel 1.3s infinite; }
@keyframes skel { to { transform: translateX(100%); } }

/* ─────────── Lists ─────────── */

.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 22px; width: 100%;
  text-align: left; border: 0; transition: transform .35s var(--spring);
}
.row:active { transform: scale(.98); }
.row .thumb { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; flex: none; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.row .body { flex: 1; min-width: 0; }
.row .t { font-weight: 650; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .s { color: var(--text-3); font-size: 12.5px; margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row .end { flex: none; color: var(--text-3); display: grid; place-items: center; }
.row .end svg { width: 20px; height: 20px; }
.row .end.ok { color: var(--ok); } .row .end.err { color: var(--err); }
.ava {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; color: #fff; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.dot-sep::before { content: "·"; margin-right: 6px; }

.empty { text-align: center; padding: 48px 24px; }
.empty .art { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; color: var(--text-2); }
.empty .art svg { width: 38px; height: 38px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--text-3); margin: 6px auto 18px; max-width: 280px; font-size: 14px; }

/* ─────────── Tab bar ─────────── */

.tabbar {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--bottom) + 14px); transform: translateX(-50%);
  display: flex; padding: 6px; border-radius: 999px; gap: 2px;
  --blur: 20px;
}
.tabbar button {
  position: relative; z-index: 1; width: 86px; height: 56px; border: 0; background: none; border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 650; color: var(--text-2); transition: color .3s, transform .35s var(--spring);
}
.tabbar button svg { width: 23px; height: 23px; transition: transform .45s var(--spring); }
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { transform: translateY(-1px) scale(1.06); color: var(--accent); }
html[data-theme="light"] .tabbar button.on svg { color: #c026d3; }
.tabbar button:active { transform: scale(.92); }
.tab-lens {
  position: absolute; z-index: 0; top: 6px; left: 0; height: 56px; width: 86px; border-radius: 999px; pointer-events: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(255, 255, 255, .12), inset 0 0 12px rgba(255, 255, 255, .06), 0 4px 14px -2px rgba(0, 0, 0, .3);
  transition: transform .6s var(--spring);
}
html[data-theme="light"] .tab-lens { background: rgba(255, 255, 255, .85); box-shadow: 0 4px 14px -4px rgba(60, 40, 120, .3), inset 0 1px 0 #fff; }
.tab-lens.moving { animation: lensStretch .6s var(--ease); }
@keyframes lensStretch { 35% { scale: 1.18 .88; } }
.tab-badge { position: absolute; top: 7px; right: 22px; min-width: 8px; height: 8px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ─────────── Toasts ─────────── */

.toasts {
  position: fixed; z-index: 120; top: calc(var(--top) + 10px); left: 12px; right: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; width: 100%; max-width: 440px; display: flex; align-items: center; gap: 12px;
  padding: 11px 16px 11px 11px; border-radius: 24px; overflow: hidden; --blur: 28px;
  animation: toastIn .55s var(--spring) both;
}
.toast .ti { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.toast .ti svg { width: 19px; height: 19px; }
.toast .tx { flex: 1; min-width: 0; }
.toast .tx b { display: block; font-size: 14.5px; }
.toast .tx span { display: block; font-size: 13px; color: var(--text-2); }
.toast .tbar { position: absolute; left: 22px; right: 22px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--c); opacity: .55; transform-origin: left; animation: tshrink linear forwards; }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-30px) scale(.9); filter: blur(6px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-24px) scale(.94); filter: blur(4px); } }
@keyframes tshrink { to { transform: scaleX(0); } }

/* ─────────── Bottom sheet ─────────── */

.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .38); opacity: 0; transition: opacity .35s; }
html[data-theme="light"] .sheet-backdrop { background: rgba(30, 20, 60, .2); }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 91; left: 8px; right: 8px; bottom: calc(var(--bottom) + 8px); max-width: 560px; margin: 0 auto;
  max-height: calc(100vh - var(--top) - 40px); overflow-y: auto; border-radius: 34px; padding: 6px 18px 18px;
  background: var(--sheet-bg); --blur: 40px;
  transform: translateY(115%); transition: transform .55s var(--spring);
}
.sheet.open { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: .6; margin: 6px auto 14px; }
.sheet h3 { font-size: 19px; font-weight: 800; text-align: center; }
.sheet .sub { color: var(--text-3); text-align: center; font-size: 13.5px; margin-top: 4px; }
.sheet .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.sheet .actions .btn { width: 100%; height: 52px; }
.sheet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.sheet-head .thumb { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin-top: 16px; padding: 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.kv dt { color: var(--text-3); }
.kv dd { text-align: right; font-weight: 600; word-break: break-word; }

/* ─────────── Forms ─────────── */

.field {
  width: 100%; height: 48px; padding: 0 16px; border: 0; outline: 0; border-radius: 16px; font-size: 16px;
  background: var(--field-bg); box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 2px 6px rgba(0, 0, 0, .12);
  transition: box-shadow .25s;
}
.field::placeholder { color: var(--text-3); }
.field:focus { box-shadow: inset 0 0 0 1.5px rgba(192, 77, 249, .85), 0 0 0 4px rgba(192, 77, 249, .18); }
textarea.field { height: auto; min-height: 130px; padding: 14px 16px; resize: vertical; line-height: 1.45; }
.field-wrap { position: relative; }
.field-wrap svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.field-wrap .field { padding-left: 42px; }

.setting { display: flex; align-items: center; gap: 14px; padding: 13px 0; }
.setting + .setting { border-top: 1px solid rgba(255, 255, 255, .07); }
html[data-theme="light"] .setting + .setting { border-top-color: rgba(13, 11, 22, .07); }
.setting .info { flex: 1; min-width: 0; }
.setting .info b { display: block; font-size: 15px; font-weight: 650; }
.setting .info span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.setting.col { flex-direction: column; align-items: stretch; gap: 10px; }

.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; z-index: 2; cursor: pointer; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(120, 120, 140, .3); box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 2px 4px rgba(0, 0, 0, .2); transition: background .35s; }
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px;
  background: linear-gradient(180deg, #fff, #ececf3); box-shadow: 0 3px 8px rgba(0, 0, 0, .3), inset 0 -1px 0 rgba(0, 0, 0, .06);
  transition: transform .45s var(--spring), width .25s var(--ease);
}
.switch input:checked + i { background: var(--grad); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:active + i::after { width: 32px; }
.switch input:checked:active + i::after { transform: translateX(14px); }

.stepper { display: flex; align-items: center; gap: 4px; flex: none; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 1px var(--glass-edge); }
html[data-theme="light"] .stepper { background: rgba(255, 255, 255, .5); }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--glass-strong); display: grid; place-items: center; box-shadow: inset 0 1px 0 var(--glass-spec); transition: transform .3s var(--spring); }
.stepper button:active { transform: scale(.85); }
.stepper button svg { width: 15px; height: 15px; }
.stepper input { width: 46px; text-align: center; border: 0; outline: 0; background: none; font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ─────────── Admin ─────────── */

.subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: 0 -2px 14px; border-radius: 999px; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button {
  flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: none;
  display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--text-2);
  transition: all .35s var(--spring);
}
.subnav button svg { width: 16px; height: 16px; }
.subnav button.on { color: var(--text); background: linear-gradient(170deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 12px -4px rgba(0, 0, 0, .35); }
html[data-theme="light"] .subnav button.on { background: #fff; box-shadow: 0 4px 12px -4px rgba(60, 40, 120, .3); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 14px 16px; border-radius: 22px; }
.kpi .l { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi .l svg { width: 14px; height: 14px; }
.kpi .v { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.kpi .d.up { color: var(--ok); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--text); stroke-opacity: .08; }
.chart .axis text { fill: var(--text-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--chart); transition: opacity .2s; }
.chart.hovering .bar:not(.hl) { opacity: .45; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; padding: 7px 11px; border-radius: 13px; white-space: nowrap;
  font-size: 12.5px; transform: translate(-50%, calc(-100% - 10px)); transition: opacity .15s; --blur: 18px;
}
.chart-tip b { display: block; font-size: 15px; }
.chart-tip span { color: var(--text-3); }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 64px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; }
.hbar .track-h { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.hbar .track-h i { display: block; height: 100%; border-radius: 999px; background: var(--chart); }
.hbar .n { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

.sys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sys div { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.sys span { display: block; font-size: 11.5px; color: var(--text-3); }
.sys b { font-size: 14px; font-variant-numeric: tabular-nums; }

.tip-text { font-size: 12.5px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
.tip-text code { background: rgba(255, 255, 255, .08); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.preview-msg { padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: rgba(99, 102, 241, .16); box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .3); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.preview-msg a { color: var(--info); }

/* ─────────── Gate (вне Telegram / бан / техработы) ─────────── */

.gate { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.gate .card { max-width: 360px; padding: 30px 24px; }
.gate .art { width: 86px; height: 86px; border-radius: 30px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 16px 40px -10px rgba(192, 77, 249, .8); }
.gate .art svg { width: 40px; height: 40px; }
.gate h2 { font-size: 22px; font-weight: 800; }
.gate p { color: var(--text-2); margin-top: 8px; }

.loader-screen { min-height: 70vh; display: grid; place-items: center; }
.loader-orb { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); animation: orb 1.6s ease-in-out infinite; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 50px -6px rgba(192, 77, 249, .9); }
@keyframes orb { 50% { transform: scale(.8); filter: hue-rotate(40deg); } }

@media (max-width: 360px) {
  .hero h1 { font-size: 27px; }
  .tabbar button { width: 76px; }
  .steps-how { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
