/* CamTrends — ночная аналитика для стримеров.
   Тёмная тема по умолчанию, один тёплый акцент (коралл → янтарь), Unbounded для цифр и заголовков, Manrope для текста. */

:root {
  --bg: #0c0b0f;
  --bg-glow: rgba(255, 93, 115, .10);
  --bg-glow-2: rgba(255, 170, 90, .06);
  --surface: #15131a;
  --surface-2: #1d1a24;
  --surface-3: #26222f;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f5f1ec;
  --text-2: #c2bac6;
  --muted: #8a8292;
  --accent: #ff5d73;
  --accent-2: #ffa95c;
  --accent-soft: rgba(255, 93, 115, .14);
  --grad: linear-gradient(120deg, #ff5d73 0%, #ff7f66 45%, #ffb35c 100%);
  --good: #3fd99a;
  --good-soft: rgba(63, 217, 154, .13);
  --warn: #ffc65c;
  --warn-soft: rgba(255, 198, 92, .14);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .13);
  --info: #9aa6ff;
  --info-soft: rgba(154, 166, 255, .13);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -24px rgba(0, 0, 0, .7);
  --radius: 18px;
  --radius-sm: 12px;
  --side: 248px;
  --display: "Unbounded", "SF Pro Display", -apple-system, sans-serif;
  --body: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f2ee;
  --bg-glow: rgba(255, 93, 115, .10);
  --bg-glow-2: rgba(255, 170, 90, .10);
  --surface: #ffffff;
  --surface-2: #f7f3f0;
  --surface-3: #efe9e4;
  --line: rgba(30, 20, 30, .08);
  --line-2: rgba(30, 20, 30, .14);
  --text: #1b1720;
  --text-2: #4b4352;
  --muted: #8a8190;
  --accent: #e8435c;
  --accent-soft: rgba(232, 67, 92, .10);
  --good: #12a46b;
  --good-soft: rgba(18, 164, 107, .10);
  --warn: #c98800;
  --warn-soft: rgba(201, 136, 0, .11);
  --bad: #d64545;
  --bad-soft: rgba(214, 69, 69, .10);
  --info: #5a67d8;
  --info-soft: rgba(90, 103, 216, .10);
  --shadow: 0 1px 2px rgba(30, 20, 30, .04), 0 16px 40px -28px rgba(30, 20, 30, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 15px/1.5 var(--body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* мягкое свечение и зерно — чтобы фон не был плоским */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -10%, var(--bg-glow), transparent 60%),
    radial-gradient(700px 480px at 100% 0%, var(--bg-glow-2), transparent 55%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .035;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: inherit; color: inherit; }
/* размер иконок по умолчанию; :where не перебивает более точные правила */
:where(svg) { width: 17px; height: 17px; flex-shrink: 0; vertical-align: -3px; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
::selection { background: var(--accent-soft); }
.num, .kpi .value, .big-num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- каркас ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 48px 16px 18px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 24px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 18px -6px var(--accent); }
.brand-mark svg { width: 18px; height: 18px; color: #fff; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.brand-name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text-2);
  font-weight: 600; font-size: 14px; text-align: left; transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav-item.on svg { color: var(--accent); opacity: 1; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 18px 12px 6px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.data-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 12.5px; color: var(--text-2); }
.data-card .row1 { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.data-card .sub { margin-top: 3px; color: var(--muted); }
.data-card button { margin-top: 8px; color: var(--accent); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.data-card button svg { width: 14px; height: 14px; }
.theme-switch { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.theme-switch button { flex: 1; padding: 6px 0; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.theme-switch button.on { background: var(--surface-3); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); flex-shrink: 0; }
.dot.busy { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.1s infinite; }
.dot.live { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.main { min-width: 0; padding: 0 40px 80px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 24px; padding: 34px 40px 18px; margin: 0 -40px 24px; align-items: center;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.page-title { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -.03em; margin: 0; line-height: 1.15; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 620px; }
.topbar > div:first-child { flex: 1 1 320px; min-width: 0; }
.context { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.select-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; height: 38px; color: var(--muted); }
.select-pill svg { width: 15px; height: 15px; }
.select-pill select { background: transparent; border: 0; color: var(--text); font-size: 13px; font-weight: 600; outline: none; cursor: pointer; max-width: 170px; }

.page { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-title { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.section-note { color: var(--muted); font-size: 13px; }

/* ---------- карточки и сетки ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.split > .stack { display: grid; gap: 14px; }
.full { grid-column: 1 / -1; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); min-width: 0; position: relative;
}
.card.flat { box-shadow: none; }
.card.accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background:
  linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 60%); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; min-height: 26px; }
.card-head > :last-child:not(.card-title) { flex-shrink: 0; }
.card-title { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 16px; }
.card-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin: -6px 0 16px; }
.card-note svg { width: 15px; height: 15px; color: var(--info); margin-top: 1px; }
.stagger > * { animation: rise .4s ease both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; } .stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(n+6) { animation-delay: .2s; }

/* KPI-плитки */
.kpi { display: flex; flex-direction: column; gap: 8px; min-height: 136px; }
.kpi .label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; gap: 7px; }
/* подпись в одну строку — плитки в ряду одинаковой высоты */
.kpi .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kpi .label svg { width: 15px; height: 15px; color: var(--accent); }
.kpi .value { font-size: 30px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value.none { color: var(--muted); opacity: .6; }
.kpi .value small { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi .meta { color: var(--text-2); font-size: 13px; margin-top: auto; line-height: 1.45; }
.kpi .meta .btn { margin-top: 2px; }
.kpi .cta { margin-top: auto; }

/* пилюли-статусы */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.neutral { background: var(--surface-3); color: var(--text-2); }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.up { color: var(--good); } .down { color: var(--bad); }

/* подсказка «?» */
.tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--muted); font: 700 10.5px/1 var(--body); cursor: help; flex-shrink: 0; }
.tip:hover { color: var(--text); border-color: var(--muted); }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 280px; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 9px 11px; font: 500 12.5px/1.45 var(--body); text-align: left; white-space: normal;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 30; }
.tip:hover::after { opacity: 1; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; background: var(--grad); color: #fff; box-shadow: 0 8px 22px -10px var(--accent); transition: transform .1s, filter .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn svg { width: 16px; height: 16px; }
.btn.secondary { background: var(--surface-3); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.link { color: var(--accent); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* списки и строки */
.rows > .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rows > .row:last-child { border-bottom: 0; }
.row .k { color: var(--text-2); }
.row .v { text-align: right; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 18px 0 8px; }
.label:first-child { margin-top: 0; }

/* советы */
.advice { display: grid; gap: 10px; }
.tipcard { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tipcard .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tipcard .ic svg { width: 18px; height: 18px; }
.tipcard .area { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tipcard .text { margin-top: 2px; color: var(--text); }

/* теги */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.chip small { color: var(--muted); font-weight: 600; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.good small { color: inherit; opacity: .7; }
.chip.bad { background: transparent; color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.chip.copy { cursor: copy; }
.chip.copy:hover { filter: brightness(1.15); }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--line-2); color: var(--text); }

/* графики */
.bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; align-items: end; height: 140px; }
.bars .b { border-radius: 6px 6px 3px 3px; background: var(--surface-3); min-height: 4px; position: relative; transition: background .15s; }
.bars .b:hover { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); }
.bars .b.best { background: var(--grad); box-shadow: 0 0 20px -6px var(--accent); }
.bars .b.none { height: 100%; background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
/* график по часам с подписями */
.hchart { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; height: 190px; align-items: end; }
.hchart .hc { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; text-align: center; min-width: 0; }
.hchart .val { font-size: 10px; font-weight: 700; color: var(--muted); align-self: end; white-space: nowrap; overflow: visible; }
.hchart .val.pos { color: var(--good); }
.hchart .bw { display: flex; align-items: flex-end; height: 100%; }
.hchart .b { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--surface-3); min-height: 3px; }
.hchart .b.up { background: color-mix(in srgb, var(--good) 55%, var(--surface-3)); }
.hchart .b.best { background: var(--grad); box-shadow: 0 0 18px -6px var(--accent); }
.hchart .b.worst { background: var(--surface-3); opacity: .55; }
.hchart .b.none { height: 100%; background: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 6px); opacity: .6; }
.hchart .hx { font-size: 10.5px; color: var(--muted); align-self: start; padding-top: 4px; font-variant-numeric: tabular-nums; }
.hchart .ref { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); opacity: .55; pointer-events: none; }
.hchart .ref span { position: absolute; right: 0; top: -16px; font-size: 10px; color: var(--muted); background: var(--surface); padding: 0 4px; }
.hchart.strip24 { height: 210px; }
.hchart.strip24 .hc { grid-template-rows: 18px 1fr 18px 22px; }
.hchart .rv { font-size: 12px; font-weight: 800; color: var(--text-2); align-self: center; }
.axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; margin-top: 8px; font-size: 10.5px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.axis.sub span { font-weight: 700; color: var(--text-2); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.meter { margin-bottom: 14px; }
.meter-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; gap: 10px; }
.meter-head b { font-family: var(--display); font-weight: 600; font-size: 13px; }
.track { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-bottom: 4px; }
.track i { display: block; height: 100%; border-radius: inherit; }
.track .t { background: var(--grad); } .track .a { background: var(--muted); opacity: .45; }

.heat { display: grid; grid-template-columns: 28px repeat(24, 1fr); gap: 3px; align-items: center; }
.heat i { height: 22px; border-radius: 4px; background: var(--surface-3); font: 700 9px/22px var(--body); font-style: normal; text-align: center; color: var(--text-2); overflow: hidden; }
.heat i.hot { color: #fff; }
.heat i.nc { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 5px); }
.heat .hl { font-size: 11px; color: var(--muted); font-weight: 600; }
.heat .hx { font-size: 10px; color: var(--muted); text-align: center; }

/* стат-плитки внутри карточки */
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.mini { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.mini .v { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.mini .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* модели */
.mlist { display: grid; }
.mrow { display: grid; grid-template-columns: 30px 42px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .rank { font-family: var(--display); font-size: 13px; color: var(--muted); text-align: center; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 15px; color: #fff; text-transform: uppercase; position: relative; flex-shrink: 0; }
.avatar .live { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.mname { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.mname .nm { font-weight: 700; font-size: 15px; color: var(--text); text-align: left; overflow: hidden; text-overflow: ellipsis; }
.mname .nm:hover { color: var(--accent); }
.mname .ext { color: var(--muted); display: inline-flex; }
.mname .ext svg { width: 14px; height: 14px; }
.mname .ext:hover { color: var(--accent); }
.mmeta { grid-column: 3 / -1; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.mgoal { color: var(--text); }
.mgoal::before { content: "🎯 "; }
.mstats { text-align: right; white-space: nowrap; }
.mstats .num { font-size: 17px; font-weight: 600; }
.mstats .s { font-size: 12px; color: var(--muted); }
.taglets { display: flex; flex-wrap: wrap; gap: 4px; }
.taglets span { font-size: 12px; padding: 2px 8px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.taglets span.hl { background: var(--good-soft); color: var(--good); border-color: transparent; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; }
.growth { color: var(--good); font-weight: 700; }

/* сравнение «ты против неё» */
.vs-table { display: grid; grid-template-columns: 1.15fr 1fr 1fr; font-size: 14px; }
.vs-table > div { padding: 11px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.vs-table .h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.vs-table .k { color: var(--text-2); }
.vs-table .win { color: var(--good); font-weight: 700; }
.vs-table .win::before { content: "▲ "; font-size: 10px; }
.vs-table.cmp { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); font-size: 13.5px; }
.vs-table.cmp > div { padding: 12px 12px; }
.vs-table.cmp > div:nth-child(3n+2) { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.vs-table.cmp .h { font-size: 12px; }
.vs-table.cmp3 { grid-template-columns: 150px repeat(3, minmax(0, 1fr)); font-size: 13.5px; }
.vs-table.cmp3 > div { padding: 12px 12px; }
.vs-table.cmp3 > .me { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.vs-table .mhead { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.vs-table .mhead .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.vs-table .mhead .nm { font: 700 14px var(--body); color: var(--text); }
.vs-table .mhead .nm:hover { color: var(--accent); }
.vs-table.cmp4 { font-size: 13px; grid-template-columns: 140px repeat(var(--n, 4), minmax(130px, 1fr)); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vs-table.cmp4 > div { padding: 11px 10px; }
.vs-table.cmp4 > .me { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.vs-table.cmp4 .mhead .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; }
.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.pick .muted { width: 84px; }
.plus-list { display: grid; gap: 8px; }
.plus { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.plus .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.plus .ic.her { background: var(--accent-soft); color: var(--accent); }
.plus .ic.me { background: var(--good-soft); color: var(--good); }

/* чек-лист проверки комнаты */
.check { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: start; }
.check:last-child { border-bottom: 0; }
.check .ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.ic.add { background: var(--accent-soft); color: var(--accent); }
.ic.change { background: var(--warn-soft); color: var(--warn); }
.ic.ok { background: var(--good-soft); color: var(--good); }
.ic.info { background: var(--surface-3); color: var(--muted); font-style: italic; }
.check .t { font-weight: 700; }
.check .d { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }

.score { display: flex; align-items: center; gap: 22px; }
.ring { width: 108px; height: 108px; flex-shrink: 0; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 26px; font-weight: 600; }

/* формы */
.form { display: grid; gap: 16px; }
.field { display: block; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.field > :is(input, select, textarea, .inline) { margin-top: 7px; display: block; }
.field > .inline { display: flex; }
.field .hint { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.input, .field input, .field select, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
  color: var(--text); font-size: 14px; font-weight: 500; outline: none; transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.fieldset + .fieldset { padding-top: 18px; border-top: 1px solid var(--line); }
.fieldset-title { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--text); margin: 0; display: flex; gap: 10px; align-items: center; }
.fieldset-title .n { width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline .input { flex: 1; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); position: relative; cursor: pointer; transition: .2s; flex-shrink: 0; border: 1px solid var(--line-2); }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: .2s; }
.toggle input:checked { background: var(--accent); border-color: transparent; }
.toggle input:checked::after { left: 18px; background: #fff; }

pre.out { white-space: pre-wrap; font: 500 14px/1.6 var(--body); background: var(--surface-2); border: 1px solid var(--line); padding: 14px 16px; border-radius: 12px; margin: 12px 0 0; }
.example { font-size: 13px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; margin-bottom: 6px; overflow-wrap: anywhere; color: var(--text-2); }

/* стримы */
.session { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface); margin-bottom: 12px; }
.session.live { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.session-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.session-head b { font-size: 15px; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.metrics > div { background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.metrics .v { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.metrics .l { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.earn { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.earn .input { width: 120px; padding: 7px 10px; }
.ww { display: grid; grid-template-columns: 1.2fr 1fr 1fr 80px; font-size: 13.5px; }
.ww > div { padding: 11px 8px; border-bottom: 1px solid var(--line); }
.ww .h { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.profile-strip { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-strip .avatar { width: 56px; height: 56px; border-radius: 17px; font-size: 20px; }
.profile-strip h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; letter-spacing: -.02em; }

/* переключатель своих ников по площадкам */
.acc-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.acc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; border-radius: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.acc:hover { border-color: var(--line-2); }
.acc.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.acc-pf { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.acc-nick { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.acc:not(.on) .acc-nick { color: var(--text-2); }

/* полоса 24 часов */
.strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; }
.strip .col { display: grid; gap: 6px; text-align: center; }
.strip .barbox { height: 130px; display: flex; align-items: flex-end; }
.strip .b { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--surface-3); min-height: 4px; }
.strip .b.best { background: var(--grad); box-shadow: 0 0 20px -6px var(--accent); }
.strip .b.none { height: 100%; background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
.strip .hx { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip .rv { font-size: 11px; font-weight: 800; color: var(--text-2); }

/* регионы */
.region { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.region:last-child { border-bottom: 0; }
.region .nm { font-weight: 700; }
.region .s { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

/* пустые состояния и загрузка */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 14px; color: var(--accent); }
.empty .ic svg { width: 24px; height: 24px; }
.empty h3 { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.empty p { margin: 0 auto 16px; max-width: 420px; font-size: 14px; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.notice svg { width: 16px; height: 16px; color: var(--info); flex-shrink: 0; margin-top: 2px; }

/* панель профиля */
.drawer-back { position: fixed; inset: 0; z-index: 60; background: rgba(5, 4, 8, .55); backdrop-filter: blur(4px); display: flex; justify-content: flex-end; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(780px, 100%); height: 100%; overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line-2); padding: 28px 28px 70px; position: relative; animation: slide .25s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer .close { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.drawer .close:hover { color: var(--text); }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 10px); background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; transition: .2s; pointer-events: none; z-index: 80; box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* мобильная версия: меню уходит вниз */
.bottom-nav { display: none; }
@media (max-width: 1150px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2.checks { grid-template-columns: 1fr; }   /* советы в две узкие колонки читаются плохо */
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 0 16px 100px; }
  .topbar { padding: 18px 16px 16px; margin: 0 -16px 16px; position: static; }
  .page-title { font-size: 22px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  /* плитки с цифрами — по две в ряд, чтобы не растягивать экран */
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 0; padding: 14px; }
  .kpi .label { font-size: 10.5px; }
  .kpi .value { font-size: 22px; }
  .kpi .meta { font-size: 12px; }
  .profile-strip > div:nth-child(2) { flex: 1 1 calc(100% - 72px) !important; }
  .span2 { grid-column: auto; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .cols2, .cols3 { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 42px minmax(0, 1fr); }
  .mrow .rank { display: none; }
  .mrow .mstats { grid-column: 2; text-align: left; }
  .mmeta { grid-column: 1 / -1; }
  .axis span:nth-child(odd), .strip .hx:nth-child(odd) { visibility: hidden; }
  /* почасовой график: на телефоне 24 подписи не влезают — показываем «сейчас» и каждый третий час
     (первый столбик .hc идёт вторым ребёнком после .ref, поэтому держим 3n+2) */
  .hchart .hc:not(:nth-child(3n+2)) .hx,
  .hchart .hc:not(:nth-child(3n+2)) .val,
  .hchart .hc:not(:nth-child(3n+2)) .rv { visibility: hidden; }
  .vs-table, .ww { font-size: 12.5px; }
  .vs-table.cmp { grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1fr); }
  .vs-table.cmp3 { grid-template-columns: 70px repeat(3, minmax(0, 1fr)); font-size: 11.5px; }
  /* на телефоне таблица листается вбок, подписи строк остаются на месте */
  .vs-table.cmp4 { grid-template-columns: 96px repeat(var(--n, 4), 158px); font-size: 12px; width: max-content; }
  .vs-table.cmp4 > .k { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .table-scroll { margin: 0 -4px; padding: 0 4px; }
  .vs-table.cmp3 > div { padding: 8px 5px; }
  .vs-table .mhead .avatar { display: none; }
  .vs-table.cmp > div { padding: 9px 6px; }
  .hchart .val { font-size: 8px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav button { display: grid; justify-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .bottom-nav button svg { width: 20px; height: 20px; }
  .bottom-nav button.on { color: var(--accent); }
  .tipcard { grid-template-columns: 32px 1fr; }
  .tipcard .pill { grid-column: 2; justify-self: start; }
  .check { grid-template-columns: 28px 1fr; }
  .check .pill { grid-column: 2; justify-self: start; }
}

/* «Ты и топ-модели»: обновить список и убрать модель */
.top-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.top-tools .muted { max-width: 560px; line-height: 1.45; }
.top-tools .btn[disabled] { opacity: .5; cursor: default; }
.vs-table .hide-model { display: block; margin: 0 0 8px auto; height: 24px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 11.5px var(--body); cursor: pointer; }
.vs-table .hide-model:hover { color: var(--bad, #ff6b6b); border-color: currentColor; }

/* ---------- режим Telegram Mini App (класс html.tg задаёт telegram.js) ---------- */
/* безопасные отступы: под шапку Telegram сверху, под «домашнюю» полоску снизу */
html.tg .topbar { padding-top: calc(var(--tg-safe-top, 0px) + 12px); }
html.tg .bottom-nav { padding-bottom: calc(6px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px))); }
html.tg .main { padding-bottom: calc(76px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px))); }

/* ---------- экран оплаты (подписка) ---------- */
.paywall { max-width: 460px; margin: 24px auto; }
.paywall .price { font: 800 40px/1 var(--display); text-align: center; margin: 6px 0 20px; }
.paywall .price span { font: 600 15px var(--body); color: var(--muted); margin-left: 4px; }
.paywall .btn.big { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.paywall .pay-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.paywall .pay-or::before, .paywall .pay-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.paywall .usdt { text-align: center; }
.paywall .usdt .label { font-size: 14px; margin-bottom: 14px; }
.paywall .qr { display: inline-block; padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
.paywall .qr img, .paywall .qr canvas { display: block; }
.paywall .addr { display: block; width: 100%; margin: 12px 0 0; padding: 10px; border: 1px dashed var(--line-2);
  border-radius: 10px; background: var(--surface-2); color: var(--text); font: 600 12px/1.4 ui-monospace, monospace;
  word-break: break-all; cursor: pointer; }
.paywall .addr:hover { border-color: var(--accent); }
.paywall .usdt .btn.secondary { width: 100%; justify-content: center; margin-top: 14px; }

/* ---------- админка ---------- */
.arow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.arow .btns { flex-shrink: 0; }

/* сумма к оплате USDT — крупно */
.paywall .usdt-amount { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
.paywall .usdt-amount b { color: var(--text); font-size: 19px; font-family: var(--display); }
