/* QUSHKA — тот же язык, что у MeVal: сланцевый фон, красный, «бумажный» белый, Oswald / Onest / JetBrains Mono.
   Срезанный угол — только у залитых красных кнопок; у блоков и карточек углов не срезаем. */
:root {
  color-scheme: dark;
  --bg: #0F1923;
  --bg-deep: #0A121A;
  --panel: #15222D;
  --panel-2: #1B2B38;
  --raised: #223545;
  --line: rgba(236, 232, 225, .08);
  --line-2: rgba(236, 232, 225, .16);
  --paper: #ECE8E1;
  --muted: #8B97A2;
  --faint: #5A6873;
  --red: #FF4655;
  --red-hi: #FF5A68;
  --red-deep: #BD3944;
  --red-wash: rgba(255, 70, 85, .12);
  --teal: #3CE6C5;
  --teal-wash: rgba(60, 230, 197, .12);
  --gold: #FFCE5C;
  --gold-wash: rgba(255, 206, 92, .12);
  /* серии графиков (проверены валидатором на тёмном фоне): длинные — красный, шортсы — синий */
  --long: #FF4655;
  --short: #3399D6;
  --median: #8B97A2;
  --display: "Oswald", "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  --body: "Onest", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --cut: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --top: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--paper); font: 400 14px/1.45 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; }
h1, h2, h3 { margin: 0; }
[hidden], .hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(236, 232, 225, .12); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(236, 232, 225, .22); }

.ico { width: 16px; height: 16px; flex: none; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.err { color: var(--red); min-height: 18px; font-size: 13px; }
.up { color: var(--teal); }

/* ---------- кнопки: одна высота, Oswald капсом ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  font: 500 13px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: rgba(236, 232, 225, .06); box-shadow: inset 0 0 0 1px rgba(236, 232, 225, .3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn .ico { width: 16px; height: 16px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-primary {
  background: var(--red); color: #fff; box-shadow: none; padding: 0 22px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.btn-primary:hover { background: var(--red-hi); box-shadow: none; }
.btn-primary:disabled { background: var(--raised); color: var(--faint); }
.btn-teal { color: var(--teal); box-shadow: inset 0 0 0 1px rgba(60, 230, 197, .45); }
.btn-teal:hover { background: var(--teal-wash); box-shadow: inset 0 0 0 1px var(--teal); }
.btn-gold { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 206, 92, .45); }
.btn-gold:hover { background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-wash); box-shadow: inset 0 0 0 1px var(--red); }
.btn.done { color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--muted); flex: none; transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--paper); background: rgba(236, 232, 225, .06); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ico { width: 16px; height: 16px; }
.icon-btn.done { color: var(--teal); }
.icon-btn.danger:hover { color: var(--red); background: var(--red-wash); }
.link-btn { font-size: 13px; color: var(--muted); text-decoration: underline; text-decoration-color: rgba(236, 232, 225, .25); text-underline-offset: 3px; }
.link-btn:hover { color: var(--paper); }

/* ---------- поля ---------- */
.field { display: grid; gap: 6px; }
.field > span { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
input[type=text], input:not([type]), input[type=password], textarea {
  width: 100%; height: 38px; padding: 0 12px; background: var(--bg-deep); border: 0; box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--paper); transition: box-shadow .15s;
}
textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--red); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: stretch; gap: 0;
  background: rgba(10, 18, 26, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 22px 0 20px; }
.brand img { width: 22px; height: 22px; }
.brand b { font: 700 19px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.tabs { display: flex; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px;
  font: 500 13px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  transition: color .15s, background .15s;
}
.tabs a .ico { width: 16px; height: 16px; }
.tabs a:hover { color: var(--paper); background: rgba(236, 232, 225, .04); }
.tabs a.on { color: var(--paper); }
.tabs a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--red); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 14px; padding: 0 12px 0 0; }
.pc { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.pc i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pc.on { color: var(--paper); }
.pc.on i { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(60, 230, 197, 0); } }
.who { font-size: 13px; color: var(--muted); }

main { max-width: 1560px; margin: 0 auto; padding: 22px 24px 64px; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { font: 600 30px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.page-h .sub { color: var(--muted); font-size: 13px; padding-bottom: 3px; }
.kicker { font: 600 11px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- панели ---------- */
.panel { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px; display: grid; gap: 12px; align-content: start; }
.panel-h { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.panel-h h2 { font: 600 14px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.panel-h .meta { color: var(--muted); font-size: 12px; }
.stack { display: grid; gap: 14px; align-content: start; }
.empty { color: var(--muted); padding: 48px 0; text-align: center; }

/* ---------- сегменты (фильтры) ---------- */
.seg { display: inline-flex; box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button {
  height: 32px; padding: 0 14px; font: 500 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  transition: color .15s, background .15s;
}
.seg button:hover { color: var(--paper); }
.seg button.on { background: var(--red); color: #fff; }

/* ---------- метки ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; font: 600 11px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.tag .ico { width: 13px; height: 13px; }
.tag.ok { color: var(--teal); background: var(--teal-wash); }
.tag.redo { color: var(--gold); background: var(--gold-wash); }
.tag.red { color: #fff; background: var(--red); }
.tag.dark { color: var(--paper); background: rgba(10, 18, 26, .85); }
.tag.line { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.c-long { background: var(--long); fill: var(--long); stroke: var(--long); }
.c-short { background: var(--short); fill: var(--short); stroke: var(--short); }
.c-median { background: var(--median); }

/* ---------- всплывашка ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--raised); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-size: 13px; transition: transform .25s var(--ease), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { color: var(--teal); }
.toast.bad .ico { color: var(--red); }

/* ---------- вход, приглашение, настройка ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(255, 70, 85, .12), transparent 60%), var(--bg); }
.gate-box { width: min(440px, 100%); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); padding: 30px; display: grid; gap: 18px; }
.gate-box.wide { width: min(560px, 100%); }
.gate-brand { display: flex; align-items: center; gap: 12px; }
.gate-brand img { width: 30px; height: 30px; }
.gate-brand b { font: 700 26px/1 var(--display); letter-spacing: .1em; }
.gate-box h2 { font: 600 16px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.gate-box .lead { color: var(--muted); font-size: 13px; }
.gate-box .btn-primary { height: 44px; font-size: 15px; justify-self: start; }
.qr { width: 216px; height: 216px; background: #fff; padding: 6px; }
.secret { font: 600 15px/1.4 var(--mono); letter-spacing: .06em; word-break: break-all; color: var(--paper); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font: 600 15px/1.3 var(--mono); padding: 14px; background: var(--bg-deep); }

/* ---------- лента роликов ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px 16px; }
.card { display: grid; gap: 10px; align-content: start; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.card:hover .thumb img { transform: scale(1.035); }
.card:hover .thumb { box-shadow: 0 0 0 2px var(--red); }
.thumb .tl, .thumb .tr, .thumb .br { position: absolute; }
.thumb .tl { left: 8px; top: 8px; }
.thumb .tr { right: 8px; top: 8px; }
.thumb .br { right: 8px; bottom: 8px; }
.thumb .none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb .none .ico { width: 34px; height: 34px; }
.card .t { font-weight: 600; font-size: 15px; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .t { color: #fff; }
.card .m { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; }
.card .m span { display: inline-flex; align-items: center; gap: 5px; }
.card .m .ico { width: 14px; height: 14px; }
.card .m .warn { color: var(--gold); }

/* ---------- страница ролика ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 500 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.back:hover { color: var(--paper); }
.vhead { display: grid; gap: 10px; margin-bottom: 18px; }
.vhead h1 { font: 600 28px/1.15 var(--display); letter-spacing: .01em; }
.vmeta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; }
.vmeta span { display: inline-flex; align-items: center; gap: 6px; }
.vmeta .ico { width: 14px; height: 14px; }
.vcols { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.vside { position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
@media (max-width: 1180px) { .vcols { grid-template-columns: 1fr; } .vside { position: static; max-height: none; } }

.files { display: flex; gap: 6px; flex-wrap: wrap; }
.files button { height: 30px; padding: 0 12px; font-size: 12.5px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.files button:hover { color: var(--paper); }
.files button.on { color: #fff; box-shadow: inset 0 0 0 1px var(--red); background: var(--red-wash); }
.review { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review .src { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

/* превью как в ленте YouTube */
.yt { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px 14px; }
.yt-tile { display: grid; gap: 9px; align-content: start; }
.yt-tile .thumb { border-radius: 12px; }
.yt-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.yt-ava { width: 36px; height: 36px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font: 700 15px/1 var(--display); color: #fff; }
.yt-ttl { font: 500 15px/1.35 Roboto, "Segoe UI", Arial, sans-serif; color: #f1f1f1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-ch { color: #aaa; font: 400 13px/1.5 Roboto, "Segoe UI", Arial, sans-serif; }
.yt-lbl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }

/* названия, тексты, таймкоды */
.titles { display: grid; gap: 2px; }
.trow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 62px 30px; gap: 10px; align-items: center; min-height: 40px; padding: 4px 6px 4px 10px;
  cursor: pointer; transition: background .12s, box-shadow .12s; }
.trow:hover { background: var(--panel-2); }
.trow.on { background: var(--red-wash); box-shadow: inset 2px 0 0 var(--red); }
.trow .n { font: 600 12px var(--mono); color: var(--faint); text-align: right; }
.len { font: 500 11.5px var(--mono); color: var(--faint); text-align: right; }
.len.over { color: var(--red); font-weight: 700; }
.block { display: grid; gap: 8px; }
.block-h { display: flex; align-items: center; gap: 10px; }
.block-h h3 { font: 600 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.textbox { background: var(--bg-deep); padding: 12px 14px; max-height: 360px; overflow: auto; font-size: 13.5px; line-height: 1.55; }
.tcs { display: grid; gap: 1px; }
.tc { display: grid; grid-template-columns: 70px minmax(0, 1fr) 30px; gap: 10px; align-items: center; min-height: 34px; padding: 0 4px; }
.tc:hover { background: var(--panel-2); }
.tbtn { justify-self: start; height: 26px; padding: 0 8px; font: 600 12.5px var(--mono); color: var(--red); transition: background .12s, color .12s; }
.tbtn:hover { background: var(--red-wash); color: #fff; }
.item + .item { border-top: 1px solid var(--line); padding-top: 16px; }
.item { display: grid; gap: 14px; }
.item > h3 { font: 600 17px/1.2 var(--display); letter-spacing: .02em; }
.note-txt { color: var(--muted); font-size: 13px; }
details.raw summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.raw summary::-webkit-details-marker { display: none; }
details.raw summary .ico { transition: transform .2s var(--ease); }
details.raw[open] summary .ico { transform: rotate(180deg); }

/* замечания */
.notes { overflow: auto; display: grid; gap: 8px; align-content: start; padding-right: 2px; }
.note { background: var(--panel-2); padding: 10px 12px; display: grid; gap: 6px; }
.note.ok { box-shadow: inset 3px 0 0 var(--teal); }
.note.redo { box-shadow: inset 3px 0 0 var(--gold); }
.note-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ava { width: 22px; height: 22px; display: grid; place-items: center; font: 700 11px/1 var(--display); color: #fff; background: var(--raised); flex: none; }
.ava.owner { background: var(--red-deep); }
.note-ref { color: var(--gold); font-size: 12.5px; }
.compose { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.compose .at { display: flex; align-items: center; gap: 8px; }

/* ---------- плеер (как в MeVal): панель поверх картинки при наведении, на паузе — всегда ---------- */
.vp { position: relative; background: #000; outline: 0; min-width: 0; overflow: hidden; }
.vp-screen { position: relative; background: #000; cursor: pointer; display: grid; aspect-ratio: 16 / 9; max-height: 74vh; }
.vp.vertical .vp-screen { aspect-ratio: auto; height: 74vh; }
.vp-screen video, .vp-screen .vp-frame { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vp-screen .vp-frame { position: relative; z-index: 1; }
.vp-empty { grid-area: 1 / 1; display: grid; place-items: center; gap: 10px; align-content: center; color: var(--muted); background: var(--panel-2); z-index: 2; text-align: center; padding: 20px; }
.vp-empty .ico { width: 34px; height: 34px; margin: 0 auto; color: var(--faint); }
.vp-big { position: absolute; z-index: 2; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; display: grid; place-items: center;
  background: rgba(10, 18, 26, .72); color: #fff; pointer-events: none; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .25s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); }
.vp-big .ico { width: 30px; height: 30px; margin-left: 4px; }
.vp.paused.ready .vp-big { opacity: 1; transform: scale(1); }
.vp-ctrl { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 12px; opacity: 0; transition: opacity .2s; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.vp-ctrl::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: calc(100% + 64px); pointer-events: none;
  background: linear-gradient(rgba(5, 9, 13, 0), rgba(5, 9, 13, .6) 42%, rgba(5, 9, 13, .9) 75%, rgba(5, 9, 13, .96)); }
.vp:hover .vp-ctrl, .vp.paused .vp-ctrl, .vp.drag .vp-ctrl, .vp.vol-hold .vp-ctrl, .vp:focus-within .vp-ctrl { opacity: 1; }
.vp-line { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(236, 232, 225, .12); pointer-events: none; transition: opacity .2s; }
.vp-line > i { display: block; height: 100%; width: 0; background: var(--red); }
.vp:hover .vp-line, .vp.paused .vp-line, .vp.drag .vp-line { opacity: 0; }
.vp-scrub { position: relative; height: 18px; margin: 0 2px; cursor: pointer; touch-action: none; outline: 0; }
.vp-track { position: absolute; left: 0; right: 0; top: 7px; height: 4px; background: rgba(236, 232, 225, .22); transition: top .2s var(--ease), height .2s var(--ease); }
.vp-scrub:hover .vp-track, .vp.drag .vp-track { top: 6px; height: 6px; }
.vp-buf, .vp-hover, .vp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.vp-buf { background: rgba(236, 232, 225, .2); transition: width .3s; }
.vp-hover { background: rgba(236, 232, 225, .28); opacity: 0; transition: opacity .15s; }
.vp-scrub:hover .vp-hover { opacity: 1; }
.vp.drag .vp-hover { opacity: 0; }
.vp-fill { background: var(--red); box-shadow: 0 0 10px rgba(255, 70, 85, .45); }
.vp-knob { position: absolute; top: 3px; left: 0; width: 12px; height: 12px; margin-left: -6px; background: #fff; pointer-events: none;
  transform: rotate(45deg) scale(0); transition: transform .2s var(--ease); box-shadow: 0 0 0 3px rgba(255, 70, 85, .35); }
.vp-scrub:hover .vp-knob, .vp-scrub:focus-visible .vp-knob, .vp.paused .vp-knob { transform: rotate(45deg) scale(1); }
.vp.drag .vp-knob { transform: rotate(45deg) scale(1.25); }
.vp-tip { position: absolute; bottom: 20px; left: 0; padding: 3px 6px; font: 600 11px var(--mono); color: var(--paper); background: rgba(10, 18, 26, .92);
  transform: translateX(-50%); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; }
.vp-scrub:hover .vp-tip { opacity: 1; }
/* замечания на шкале — золотые ромбы над полосой */
.vp-marks { position: absolute; left: 0; right: 0; top: -2px; height: 0; }
.vp-marks i { position: absolute; top: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--gold); transform: rotate(45deg); cursor: pointer;
  box-shadow: 0 0 0 2px rgba(10, 18, 26, .8); transition: transform .15s var(--ease); }
.vp-marks i:hover { transform: rotate(45deg) scale(1.35); }
.vp-marks i.redo { background: var(--gold); }
.vp-row { display: flex; align-items: center; gap: 4px; height: 46px; }
.vp-row > * { flex-shrink: 0; }
.vp-btn { width: 38px; height: 38px; display: grid; place-items: center; color: rgba(236, 232, 225, .85); transition: color .12s, background .12s; }
.vp-btn:hover { color: #fff; background: rgba(236, 232, 225, .08); }
.vp-btn .ico { width: 20px; height: 20px; }
.vp-time { margin-left: 8px; font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.vp-time b { color: var(--paper); font-weight: 600; }
.vp-src { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: rgba(236, 232, 225, .7); padding: 4px 7px; box-shadow: inset 0 0 0 1px rgba(236, 232, 225, .25); margin-right: 6px; }
.vp-src.full { color: var(--teal); box-shadow: inset 0 0 0 1px rgba(60, 230, 197, .5); }
.vp:fullscreen { width: 100vw; height: 100vh; }
.vp:fullscreen .vp-screen { height: 100%; max-height: none; aspect-ratio: auto; }
.vp:fullscreen .vp-ctrl { padding: 0 22px 8px; }
/* громкость и скорость: ползунок раскрывается на месте при наведении на кнопку, ничего не перекрывая */
.vp-volgrp { display: flex; align-items: center; }
.vp-vol { position: relative; flex: none; width: 0; height: 30px; margin: 0; opacity: 0; cursor: pointer; touch-action: none;
  transition: width .34s var(--ease), margin .34s var(--ease), opacity .22s; }
.vp-volgrp:hover .vp-vol, .vp-vol:focus-visible, .vp-vol.hold { width: 120px; margin: 0 10px 0 6px; opacity: 1; }
.vp-vol::before, .vp-vol-fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; transition: height .2s, margin .2s, background .2s; }
.vp-vol::before { content: ""; right: 0; background: rgba(236, 232, 225, .3); }
.vp-vol-fill { width: var(--v, 0%); background: var(--paper); transition: width .14s ease-out, height .2s, margin .2s, background .2s; }
.vp-volgrp:hover .vp-vol::before, .vp-volgrp:hover .vp-vol-fill, .vp-vol.hold::before, .vp-vol.hold .vp-vol-fill { height: 6px; margin-top: -3px; }
.vp-volgrp:hover .vp-vol-fill, .vp-vol.hold .vp-vol-fill, .vp-vol:focus-visible .vp-vol-fill { background: var(--red); }
.vp-vol-knob { position: absolute; top: 50%; left: var(--v, 0%); width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #fff; transform: rotate(45deg) scale(.6);
  transition: left .14s ease-out, transform .22s var(--ease); }
.vp-volgrp:hover .vp-vol-knob, .vp-vol:focus-visible .vp-vol-knob { transform: rotate(45deg) scale(1); }
.vp-vol.hold .vp-vol-knob { transform: rotate(45deg) scale(1.3); }
.vp-vol.hold .vp-vol-fill, .vp-vol.hold .vp-vol-knob { transition-duration: 0s, .2s, .2s, .2s; }
.vp-volp { flex: none; width: 0; overflow: hidden; font: 500 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--paper); opacity: 0;
  transition: width .34s var(--ease), opacity .22s; }
.vp-volgrp:hover .vp-volp, .vol-hold .vp-volp { width: 40px; opacity: 1; }
.vp-spdb { min-width: 46px; height: 38px; padding: 0 8px; font: 600 12.5px var(--mono); color: rgba(236, 232, 225, .85); }
.vp-spdb:hover { color: #fff; background: rgba(236, 232, 225, .08); }
.vp-spdb.on { color: var(--gold); }

/* ---------- дашборд канала ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1400px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { position: relative; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px 14px; display: grid; gap: 8px; align-content: start; min-height: 128px; overflow: hidden; }
.kpi.hero { background: linear-gradient(135deg, rgba(255, 70, 85, .16), rgba(255, 70, 85, 0) 60%), var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 70, 85, .35); }
.kpi .kl { display: flex; align-items: center; gap: 7px; font: 600 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi .kl .ico { width: 14px; height: 14px; }
.kpi .kv { font: 600 40px/1 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.kpi .ks { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.kpi .ks span { display: inline-flex; align-items: center; gap: 6px; }
.chg { display: inline-flex; align-items: center; gap: 4px; font: 600 12.5px/1 var(--body); }
.chg.up { color: var(--teal); }
.chg.down { color: var(--gold); }
.kpi.best { grid-template-rows: auto 1fr; }
.best-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; }
.best-row img { width: 104px; aspect-ratio: 16 / 9; object-fit: cover; }
.best-row .kv { font-size: 30px; color: var(--teal); }
.best-row .bt { font-size: 12.5px; line-height: 1.3; color: var(--paper); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 14px; margin-bottom: 14px; }
.dgrid > .panel { display: flex; flex-direction: column; }
.dgrid > .panel > .chart { flex: 1 1 auto; }
@media (max-width: 1180px) { .dgrid { grid-template-columns: 1fr; } }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart { position: relative; width: 100%; min-height: 260px; }
.chart svg { position: absolute; inset: 0; display: block; overflow: visible; }
.chart .gap { fill: url(#hatch); }
.chart .hatch { stroke: rgba(236, 232, 225, .09); stroke-width: 3; }
.chart g.est rect.c-long, .chart g.est rect.c-short { opacity: .45; }
.sw-gap { display: inline-block; width: 12px; height: 12px; background: repeating-linear-gradient(45deg, rgba(236, 232, 225, .28) 0 2px, transparent 2px 5px); }
.est-note { font-size: 12px; color: var(--gold); white-space: normal; max-width: 260px; }
.chart .grid { stroke: rgba(236, 232, 225, .07); stroke-width: 1; }
.chart .base { stroke: rgba(236, 232, 225, .22); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 500 11px var(--mono); }
.chart .val { fill: var(--paper); font: 600 12px var(--mono); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart g.partial rect { opacity: .5; }
.chart g.on rect { filter: brightness(1.2); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .12; stroke: none; }
.chart .median { fill: none; stroke: var(--median); stroke-width: 2; stroke-dasharray: 5 5; }
.chart .cross { stroke: rgba(236, 232, 225, .3); stroke-width: 1; }
.chart .pt { stroke: var(--panel); stroke-width: 2.5; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--bg-deep); box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2);
  padding: 9px 11px; font-size: 12.5px; display: grid; gap: 4px; white-space: nowrap; }
.tip b { font: 600 12px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.tip div { display: flex; align-items: center; gap: 8px; }
.tip .v { margin-left: auto; padding-left: 14px; font: 600 12.5px var(--mono); }
.growing { display: grid; gap: 4px; }
.gl { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; background: var(--panel-2); cursor: pointer; transition: background .12s; }
.gl:hover { background: var(--raised); }
.gl .rank { font: 600 16px/1 var(--display); color: var(--faint); text-align: center; }
.gl img, .gl .noimg { width: 92px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-deep); }
.gl .t2 { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl .sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.gl .gv { text-align: right; display: grid; gap: 4px; justify-items: end; }
.gl .gv b { font: 600 20px/1 var(--display); color: var(--teal); font-variant-numeric: tabular-nums; }
.pace { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; font: 600 11.5px/1 var(--mono); white-space: nowrap; }
.pace.hot { color: var(--bg); background: var(--teal); }
.pace.good { color: var(--teal); background: var(--teal-wash); }
.pace.mid { color: var(--paper); background: rgba(236, 232, 225, .08); }
.pace.low { color: var(--gold); background: var(--gold-wash); }
.pace.none { color: var(--faint); }
.vtable { width: 100%; border-collapse: collapse; }
.vtable th { position: sticky; top: var(--top); z-index: 2; background: var(--panel); font: 600 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
.vtable th.tl { text-align: left; }
.sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; height: 22px; }
.sort .ico { width: 12px; height: 12px; opacity: 0; transition: transform .2s var(--ease), opacity .15s; }
th.on .sort { color: var(--paper); }
th.on .sort .ico { opacity: 1; }
th.on.asc .sort .ico { transform: rotate(180deg); }
.vtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; vertical-align: middle; }
.vtable td.tl { text-align: left; }
.vtable td.v { font: 600 20px/1 var(--display); letter-spacing: .01em; }
.vtable td.plus { font: 600 14px/1 var(--mono); color: var(--teal); }
.vtable td.mono { font: 500 13px var(--mono); color: var(--muted); }
.vr { cursor: pointer; transition: background .12s; }
.vr:hover, .vr.open { background: var(--panel-2); }
.vr.open td { border-bottom-color: transparent; }
.vt { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; align-items: center; }
.vt .thumbw { position: relative; }
.vt img, .vt .noimg { width: 128px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-deep); }
.vt .dur { position: absolute; right: 4px; bottom: 4px; padding: 1px 4px; font: 600 11px var(--mono); background: rgba(0, 0, 0, .8); }
.vt .t2 { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vt .sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 5px; }
.drow > td { background: var(--panel-2); padding: 0 12px 16px; text-align: left; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; padding-top: 6px; }
@media (max-width: 1000px) { .detail { grid-template-columns: 1fr; } }
.marks { display: grid; gap: 8px; align-content: start; }
.mark { background: var(--panel); padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.mark .kl { font: 600 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mark .mv { font: 600 24px/1 var(--display); grid-row: span 2; text-align: right; }
.mark .bench { font-size: 12px; color: var(--muted); }
.foot { margin-top: 10px; font-size: 12px; color: var(--faint); }
.an { margin-bottom: 14px; display: grid; gap: 10px; }
.an-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; }
.an-kpis { margin-bottom: 0; }
.an-kpis .kpi { min-height: 108px; }
.an-kpis .kv { font-size: 32px; }
.callout { margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(255, 206, 92, .3); }
.callout .panel-h .ico { color: var(--gold); }
.src-note { font-size: 11.5px; color: var(--faint); }
.vtable td.pct { font: 600 14px/1 var(--mono); color: var(--paper); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.status.bad { color: var(--gold); }

/* ---------- настройки ---------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; align-items: start; }
.list { display: grid; gap: 2px; }
.li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; background: var(--panel-2); min-height: 48px; }
.li .grow small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.li > .ico { color: var(--muted); }
.log { display: grid; grid-template-columns: 92px 110px minmax(0, 1fr) 120px; gap: 6px 12px; font-size: 13px; }
.log .h { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.log .bad { color: var(--gold); }
.invite-url { font: 13px var(--mono); word-break: break-all; background: var(--bg-deep); padding: 10px 12px; }

/* ---------- публичные страницы (о сервисе, политика) ---------- */
.doc { max-width: 820px; padding: 40px 24px 80px; line-height: 1.65; font-size: 15px; }
.doc .gate-brand { margin-bottom: 28px; }
.doc h1 { font: 600 34px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; margin-bottom: 14px; }
.doc h2 { font: 600 16px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; margin: 30px 0 10px; color: var(--paper); }
.doc .lead { font-size: 16px; color: var(--paper); }
.doc p, .doc li { color: #cfd5da; }
.doc a { color: var(--red-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 90, 104, .4); }
.doc code { font: 13px var(--mono); background: var(--panel-2); padding: 1px 6px; }
.doc ul { padding-left: 20px; }
.doc-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.doc-foot a { color: var(--muted); }
