:root {
  --bg: #06070f;
  --bg2: #0b0e1d;
  --card: rgba(255, 255, 255, .035);
  --card-hi: rgba(255, 255, 255, .06);
  --solid: #10132a;
  --stroke: rgba(255, 255, 255, .07);
  --stroke2: rgba(255, 255, 255, .13);
  --txt: #eef1ff;
  --sec: #8d95bb;
  --mute: #5a6290;
  --a1: #7c5cff;
  --a2: #22d3ee;
  --a3: #f472b6;
  --grad: linear-gradient(135deg, #7c5cff 0%, #4f8bff 50%, #22d3ee 100%);
  --grad-hot: linear-gradient(135deg, #f472b6 0%, #7c5cff 100%);
  --gold: #ffd25e;
  --silver: #cdd6ec;
  --bronze: #e8a06a;
  --ban: #ff4d6d;
  --warn: #ffb547;
  --mute-c: #a78bfa;
  --unmute: #34e5a5;
  --unban: #4d9fff;
  --review: #22d3ee;
  --up: #34e5a5;
  --down: #ff5c7a;
  --r: 22px;
  --r-sm: 14px;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --body: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body {
  color: var(--txt);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- фон ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 50% -10%, #121636 0%, var(--bg) 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.b1 { width: 360px; height: 360px; background: #5b3dff; top: -140px; left: -120px; animation: float1 18s ease-in-out infinite; }
.b2 { width: 300px; height: 300px; background: #0ea5c6; top: 120px; right: -160px; opacity: .35; animation: float2 22s ease-in-out infinite; }
.b3 { width: 280px; height: 280px; background: #c2338a; bottom: -160px; left: 20%; opacity: .25; animation: float1 26s ease-in-out infinite reverse; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(80% 50% at 50% 0%, #000 0%, transparent 100%); -webkit-mask-image: radial-gradient(80% 50% at 50% 0%, #000 0%, transparent 100%); }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.15); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,60px) scale(.9); } }

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 16px calc(110px + var(--safe-b)); }

/* ---------- верхняя панель ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 6px 2px 14px; }
.logo { width: 42px; height: 42px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; font-size: 21px; box-shadow: 0 8px 24px -6px rgba(124,92,255,.7), inset 0 1px 0 rgba(255,255,255,.35); flex: none; }
.logo svg { stroke: #fff; stroke-width: 2.4; }
.tb-title { flex: 1; min-width: 0; }
.tb-title b { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.tb-title span { display: block; font-size: 12.5px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-btn { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--card-hi); border: 1px solid var(--stroke2); font-size: 12.5px; font-weight: 700; color: var(--txt); transition: transform .15s; }
.mode-btn:active { transform: scale(.95); }
.mode-btn svg { font-size: 14px; color: var(--a2); }
.me-ava { width: 40px; height: 40px; border-radius: 50%; padding: 2px; background: var(--grad); flex: none; }
.me-ava > * { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--bg); }

/* ---------- нижняя навигация ---------- */
.tabbar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(calc(100% - 24px), 520px); display: flex; padding: 6px; gap: 4px; border-radius: 26px; background: rgba(16, 19, 40, .72); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid var(--stroke2); box-shadow: 0 20px 50px -12px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06); }
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 7px; border-radius: 20px; color: var(--mute); font-size: 11px; font-weight: 700; transition: color .25s; }
.tab svg { font-size: 21px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.tab.on { color: #fff; }
.tab.on svg { transform: translateY(-1px) scale(1.08); }
.tab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad); opacity: 0; transform: scale(.85); transition: opacity .25s, transform .3s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 8px 22px -6px rgba(124,92,255,.8); z-index: -1; }
.tab.on::before { opacity: 1; transform: scale(1); }

/* ---------- фильтры ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--stroke); }
.seg button { position: relative; z-index: 1; height: 36px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--sec); transition: color .25s; white-space: nowrap; }
.seg button.on { color: #fff; }
.seg .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 12px; background: var(--card-hi); border: 1px solid var(--stroke2); box-shadow: 0 6px 18px -8px rgba(124,92,255,.9), inset 0 0 0 1px rgba(124,92,255,.25); transition: transform .35s cubic-bezier(.3,1.25,.5,1), width .35s; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); font-size: 13px; font-weight: 600; color: var(--sec); white-space: nowrap; transition: all .2s; }
.chip.on { color: #fff; background: rgba(124,92,255,.18); border-color: rgba(124,92,255,.55); box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- карточки ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--r); padding: 18px; margin-bottom: 14px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: rise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.045), transparent 40%); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: rgba(124,92,255,.14); color: #b5a3ff; flex: none; }
.card-h h3 { flex: 1; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.card-h .aside { font-size: 12px; color: var(--sec); font-weight: 600; }
.card-h .link { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--a2); }
.section-t { display: flex; align-items: center; gap: 10px; margin: 26px 4px 12px; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.section-t::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--stroke2), transparent); }
.section-t .badge { font-family: var(--body); }

/* ---------- hero ---------- */
.hero { padding: 22px 20px 0; background: radial-gradient(120% 120% at 0% 0%, rgba(124,92,255,.28) 0%, transparent 55%), radial-gradient(100% 100% at 100% 0%, rgba(34,211,238,.18) 0%, transparent 55%), rgba(255,255,255,.035); border: 0; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: conic-gradient(from var(--ang, 0deg), rgba(124,92,255,.9), rgba(34,211,238,.6), rgba(244,114,182,.5), rgba(124,92,255,.9)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 8s linear infinite; z-index: -1; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --ang: 360deg; } }
.hero-lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--sec); font-size: 13px; font-weight: 600; }
.hero-num { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1.05; letter-spacing: -.03em; margin: 8px 0 6px; background: linear-gradient(180deg, #fff 30%, #b9b0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--sec); font-size: 12.5px; font-weight: 600; }
.hero-sub b { color: var(--txt); }
.hero-chart { margin: 6px -20px -6px; height: 96px; }

.delta { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.delta.up { color: var(--up); background: rgba(52,229,165,.12); }
.delta.down { color: var(--down); background: rgba(255,92,122,.12); }
.delta.flat { color: var(--sec); background: var(--card-hi); }
.delta svg { font-size: 13px; stroke-width: 3; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { position: relative; padding: 14px 12px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke); overflow: hidden; animation: rise .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
.kpi::before { content: ""; position: absolute; width: 90px; height: 90px; right: -40px; top: -40px; border-radius: 50%; background: var(--c); opacity: .16; filter: blur(18px); }
.kpi .k-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); margin-bottom: 10px; }
.kpi .k-v { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.1; }
.kpi .k-l { font-size: 12px; color: var(--sec); font-weight: 600; margin-top: 2px; }
.kpi .k-d { margin-top: 6px; font-size: 11px; font-weight: 800; }
.kpi .k-d.up { color: var(--up); } .kpi .k-d.down { color: var(--down); } .kpi .k-d.flat { color: var(--mute); }

/* ---------- легенда графиков ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lg { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); font-size: 12px; font-weight: 700; color: var(--txt); transition: opacity .2s; }
.lg i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.lg.off { opacity: .35; }
.chart { min-height: 220px; margin: 0 -8px; }
.apexcharts-tooltip.apexcharts-theme-dark { background: rgba(16,19,40,.92) !important; border: 1px solid var(--stroke2) !important; backdrop-filter: blur(12px); border-radius: 12px !important; box-shadow: 0 12px 30px rgba(0,0,0,.5) !important; }
.apexcharts-tooltip-title { background: transparent !important; border-bottom: 1px solid var(--stroke) !important; font-weight: 700 !important; }
.apexcharts-xaxistooltip { display: none !important; }

/* ---------- донат ---------- */
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.donut-box { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.donut { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.donut-track { fill: none; stroke: rgba(255,255,255,.05); stroke-width: 14; }
.donut-seg { fill: none; stroke-width: 14; transition: stroke-dasharray 1.1s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 4px rgba(0,0,0,.4)); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.1; }
.donut-center span { font-size: 11px; color: var(--sec); font-weight: 600; }
.dl { display: flex; flex-direction: column; gap: 9px; }
.dl-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.dl-row i { width: 10px; height: 10px; border-radius: 4px; background: var(--c); }
.dl-row b { font-variant-numeric: tabular-nums; }
.dl-row small { color: var(--sec); font-weight: 600; margin-left: 4px; }

/* ---------- лидеры ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding-top: 10px; }
.pd { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; cursor: pointer; }
.pd .crown { color: var(--gold); font-size: 22px; filter: drop-shadow(0 0 8px rgba(255,210,94,.8)); margin-bottom: 2px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.pd .ring { position: relative; border-radius: 50%; padding: 3px; background: var(--rc); box-shadow: 0 0 26px -2px var(--rg); }
.pd .ring .ava { border: 3px solid var(--bg2); }
.pd .rk { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 11px; font-weight: 800; color: #1a1300; background: var(--rc); border: 2px solid var(--bg2); }
.pd .nm { margin-top: 12px; font-size: 13px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd .vl { font-family: var(--display); font-size: 16px; font-weight: 700; margin-top: 2px; }
.pd .vl small { font-family: var(--body); font-size: 11px; color: var(--sec); font-weight: 600; }
.pd .ped { width: 100%; margin-top: 10px; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--rcs) 35%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--rcs) 40%, transparent); border-bottom: 0; display: grid; place-items: start center; padding-top: 8px; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--rcs); transform-origin: bottom; animation: grow .8s cubic-bezier(.2,1.2,.4,1) both; animation-delay: var(--d, 0s); }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.pd.p1 { --rc: linear-gradient(135deg, #fff1b8, #ffd25e 40%, #f59e0b); --rg: rgba(255,210,94,.75); --rcs: var(--gold); }
.pd.p2 { --rc: linear-gradient(135deg, #ffffff, #cdd6ec 50%, #8e9bb8); --rg: rgba(205,214,236,.45); --rcs: var(--silver); }
.pd.p3 { --rc: linear-gradient(135deg, #ffd7b5, #e8a06a 50%, #b4652e); --rg: rgba(232,160,106,.5); --rcs: var(--bronze); }
.pd.p1 .ped { height: 88px; } .pd.p2 .ped { height: 64px; } .pd.p3 .ped { height: 48px; }
.pd.empty { opacity: .35; }

.lb { display: flex; flex-direction: column; gap: 2px; }
.lb-row { display: grid; grid-template-columns: 26px 42px 1fr auto; gap: 10px; align-items: center; padding: 10px 6px; border-radius: 16px; cursor: pointer; transition: background .2s; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms + 120ms); }
.lb-row:active { background: var(--card-hi); }
.lb-row .n { font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--mute); text-align: center; }
.lb-row .who { min-width: 0; }
.lb-row .who b { display: block; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .who small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--sec); font-weight: 600; }
.lb-row .tot { text-align: right; }
.lb-row .tot b { display: block; font-family: var(--display); font-size: 16px; font-weight: 700; }
.lb-row .tot small { font-size: 11px; font-weight: 800; }
.stack { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.05); margin-top: 6px; }
.stack i { height: 100%; background: var(--c); transform-origin: left; animation: barIn .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: .2s; }
@keyframes barIn { from { transform: scaleX(0); } }
.rc { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 800; }
.rc.up { color: var(--up); } .rc.down { color: var(--down); } .rc.flat { color: var(--mute); }

/* ---------- аватарки ---------- */
.ava { position: relative; width: var(--s, 40px); height: var(--s, 40px); border-radius: 50%; display: grid; place-items: center; background: var(--g); background-size: cover; background-position: center; font-family: var(--display); font-weight: 700; font-size: calc(var(--s, 40px) * .36); color: rgba(255,255,255,.95); flex: none; overflow: hidden; text-transform: uppercase; }
.ava.has-img span { opacity: 0; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadeIn .4s; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- тепловая карта ---------- */
.heat { display: grid; grid-template-columns: 22px repeat(24, minmax(0, 1fr)); gap: 2px; }
.heat .hl { font-size: 10px; color: var(--mute); font-weight: 700; display: flex; align-items: center; }
.heat .hx { overflow: visible; white-space: nowrap; font-size: 9px; color: var(--mute); font-weight: 700; text-align: center; padding-top: 4px; }
.heat .c { aspect-ratio: 1; min-width: 0; border-radius: 3px; background: rgba(255,255,255,.04); position: relative; animation: pop .5s cubic-bezier(.2,1.3,.4,1) both; }
.heat .c[style*="--v"] { background: color-mix(in srgb, #7c5cff calc(var(--v) * 100%), rgba(255,255,255,.04)); }
.heat .c.hot { background: color-mix(in srgb, #22d3ee calc((var(--v) - .55) * 220%), #7c5cff); box-shadow: 0 0 10px rgba(34,211,238,calc(var(--v) * .6)); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.heat-scale { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--sec); font-weight: 600; }
.heat-scale i { width: 70px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.06), #7c5cff, #22d3ee); }

/* ---------- полосы ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row .bl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.bar-row .bl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bl b { font-variant-numeric: tabular-nums; flex: none; }
.bar-row .bl small { color: var(--sec); font-weight: 600; margin-left: 6px; }
.track { height: 10px; border-radius: 99px; background: rgba(255,255,255,.05); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--grad)); box-shadow: 0 0 14px -2px var(--sh, rgba(124,92,255,.7)); transform-origin: left; animation: barIn 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }

/* ---------- экосистема ---------- */
.eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mini { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke); animation: rise .5s both; animation-delay: calc(var(--i, 0) * 50ms); position: relative; overflow: hidden; }
.mini .m-l { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sec); font-weight: 700; }
.mini .m-l svg { color: var(--c, var(--a2)); font-size: 14px; }
.mini .m-v { font-family: var(--display); font-size: 24px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.mini .m-s { font-size: 11.5px; color: var(--sec); font-weight: 600; margin-top: 2px; }
.gauge-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; }
.gauge-box { height: 150px; margin: -10px -10px -20px; }
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--stroke); font-size: 13px; font-weight: 600; color: var(--sec); }
.kv b { color: var(--txt); font-family: var(--display); font-size: 15px; font-weight: 700; }

.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--stroke); }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .grow b { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .grow small { display: block; font-size: 12px; color: var(--sec); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .num { font-family: var(--display); font-weight: 700; font-size: 15px; }
.li .pos { width: 22px; font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--mute); text-align: center; }

/* ---------- профиль ---------- */
.p-hero { text-align: center; padding: 26px 18px 20px; }
.p-hero .backdrop { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) saturate(1.4); opacity: .35; z-index: -1; transform: scale(1.2); }
.p-ring { position: relative; width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; padding: 4px; background: conic-gradient(from var(--ang), #7c5cff, #22d3ee, #f472b6, #7c5cff); animation: spin 6s linear infinite; box-shadow: 0 0 40px -6px rgba(124,92,255,.8); }
.p-ring .ava { border: 4px solid var(--bg2); }
.p-rank { position: absolute; bottom: -4px; right: -4px; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; background: var(--rc, var(--grad)); color: #120d00; font-family: var(--display); font-size: 12px; font-weight: 800; border: 3px solid var(--bg2); }
.p-name { font-family: var(--display); font-size: 22px; font-weight: 700; margin-top: 14px; letter-spacing: -.02em; word-break: break-all; }
.p-id { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--sec); font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--card-hi); }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.p-chip { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(34,211,238,.1); color: #7fe7f7; border: 1px solid rgba(34,211,238,.25); }
.p-rankline { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.35); font-size: 13px; font-weight: 700; }
.p-rankline b { font-family: var(--display); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.trio .mini { text-align: center; }
.trio .m-v { font-size: 26px; }
.ach { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
.ach::-webkit-scrollbar { display: none; }
.badge-c { flex: none; width: 128px; padding: 14px; border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); animation: rise .5s both; animation-delay: calc(var(--i, 0) * 60ms + 100ms); }
.badge-c .e { font-size: 24px; line-height: 1; filter: drop-shadow(0 0 10px var(--c)); }
.badge-c b { display: block; font-family: var(--display); font-size: 20px; font-weight: 700; margin-top: 10px; }
.badge-c span { display: block; font-size: 11.5px; color: var(--sec); font-weight: 700; margin-top: 2px; }
.ttable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ttable th { font-size: 11px; color: var(--mute); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; text-align: right; padding: 0 4px 8px; }
.ttable th:first-child { text-align: left; }
.ttable td { padding: 9px 4px; border-top: 1px solid var(--stroke); text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ttable td:first-child { text-align: left; display: flex; align-items: center; gap: 8px; color: var(--sec); }
.ttable td:first-child i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.ttable tr.tot td { color: var(--txt); font-family: var(--display); font-size: 14px; }
.clock { display: grid; place-items: center; }
.clock svg { width: 100%; max-width: 280px; overflow: visible; }

/* ---------- репорты ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.rep { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--stroke); animation: rise .45s both; animation-delay: calc(var(--i, 0) * 30ms); }
.rep-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.rep-top .arrow { color: var(--down); font-size: 14px; }
.rep-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--sec); font-weight: 600; }
.rep-meta .sp { flex: 1; }
.rep-meta a, .rep-meta button { display: inline-flex; align-items: center; gap: 4px; color: var(--a2); font-weight: 800; text-decoration: none; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; background: var(--card-hi); font-size: 11px; font-weight: 700; color: var(--sec); }

/* ---------- переключатели и формы ---------- */
.sw-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--stroke); cursor: pointer; }
.sw-row:last-child { border-bottom: 0; }
.sw-row .grow { flex: 1; min-width: 0; }
.sw-row .grow b { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-row .grow small { font-size: 12px; color: var(--sec); font-weight: 600; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.1); transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.switch.on { background: var(--grad); box-shadow: 0 0 16px -2px rgba(124,92,255,.8); }
.switch.on::after { transform: translateX(20px); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 15px; font-size: 14.5px; font-weight: 800; background: var(--card-hi); border: 1px solid var(--stroke2); transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 26px -8px rgba(124,92,255,.9), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.danger { color: var(--down); background: rgba(255,92,122,.1); border-color: rgba(255,92,122,.3); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { font-size: 18px; }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; background: var(--card-hi); border: 1px solid var(--stroke); flex: none; transition: transform .15s; }
.icon-btn:active { transform: scale(.9); }
.icon-btn.danger { color: var(--down); background: rgba(255,92,122,.08); border-color: rgba(255,92,122,.22); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 800; color: var(--sec); text-transform: uppercase; letter-spacing: .05em; }
.input { height: 48px; padding: 0 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke2); outline: none; font-size: 15px; font-weight: 600; transition: border-color .2s, box-shadow .2s; width: 100%; }
.input:focus { border-color: rgba(124,92,255,.7); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d95bb' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
select.input option { background: var(--solid); }

/* ---------- шторка ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: none; }
.sheet-wrap.open { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(3,4,10,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; padding: 10px 18px calc(20px + var(--safe-b)); border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #161a36, #0d1024); border: 1px solid var(--stroke2); border-bottom: 0; animation: sheetUp .4s cubic-bezier(.2,1,.3,1); max-height: 88vh; overflow-y: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--stroke2); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--display); font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.sheet p.hint { font-size: 13px; color: var(--sec); margin-bottom: 16px; }
@keyframes sheetUp { from { transform: translateY(100%); } }

/* ---------- тост ---------- */
.toast { position: fixed; z-index: 60; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -150%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: rgba(22,26,54,.95); border: 1px solid var(--stroke2); backdrop-filter: blur(14px); font-size: 14px; font-weight: 700; box-shadow: 0 16px 40px rgba(0,0,0,.5); transition: transform .4s cubic-bezier(.2,1.2,.3,1); display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translate(-50%, 0); }
.toast.ok svg { color: var(--up); } .toast.err svg { color: var(--down); }

/* ---------- состояния ---------- */
.sk { border-radius: var(--r); margin-bottom: 14px; background: linear-gradient(100deg, rgba(255,255,255,.03) 30%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.03) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--stroke); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.empty { text-align: center; padding: 26px 12px; color: var(--sec); font-size: 13.5px; font-weight: 600; }
.empty .e { font-size: 38px; margin-bottom: 10px; filter: grayscale(.2); }
.fatal { text-align: center; padding: 80px 24px; }
.fatal .e { font-size: 56px; margin-bottom: 16px; }
.fatal h2 { font-family: var(--display); font-size: 20px; margin-bottom: 8px; }
.fatal p { color: var(--sec); font-size: 14px; }
.muted { color: var(--sec); }
.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mono { font-variant-numeric: tabular-nums; }
.lock { color: var(--mute); font-size: 15px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(52,229,165,.6); animation: pulse 2s infinite; display: inline-block; margin-right: 4px; vertical-align: 1px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,229,165,0); } 100% { box-shadow: 0 0 0 0 rgba(52,229,165,0); } }
.view-enter { animation: viewIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateX(16px); } }

@media (max-width: 370px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hero-num { font-size: 44px; }
  .donut-wrap { grid-template-columns: 1fr; }
  .gauge-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
