/* junkhub — один стиль на всё приложение: белый фон, пастельные карточки в цвете канала, чёрная главная кнопка. */
:root {
  --bg: #FFFFFF;
  --ink: #16161A;
  --muted: #6E6E78;
  --faint: #9A9AA3;
  --line: #EEEEF1;
  --chip: #F1F1F4;
  --field: #F4F4F6;
  --pink: #FF4D8D;
  --ok: #1E9E5A;
  --warn: #B26A00;
  --no: #D93A3A;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --tab-h: 64px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.4 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }

/* ---------- shell ---------- */
.app { min-height: 100dvh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
.view { max-width: 1180px; margin: 0 auto; padding: 18px 16px 32px; }
.head { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; min-height: 40px; }
.head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; }
.head .sp { flex: 1; }
.back { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--chip); font-size: 20px; flex: none; }
.gear { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--chip); font-size: 18px; flex: none; }

.topnav { display: none; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--faint); font-weight: 600; }
.tabbar a .ic { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .6; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] .ic { filter: none; opacity: 1; }

@media (min-width: 820px) {
  .app { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); padding: 12px max(16px, calc((100vw - 1180px) / 2 + 16px)); }
  .topnav .logo { font-weight: 800; font-size: 19px; letter-spacing: -.03em; margin-right: 16px; }
  .topnav a.p { padding: 8px 16px; border-radius: 99px; font-weight: 650; color: var(--muted); }
  .topnav a.p[aria-current="page"] { background: var(--ink); color: #fff; }
  .topnav .sp { flex: 1; }
  .head .gear { display: none; }
  .view { padding-top: 24px; }
}
.logo b { color: var(--pink); font-weight: 800; }
.today { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; background: #FFF1D6; color: #8A5A00; font-weight: 650; font-size: 13px; white-space: nowrap; }

/* ---------- buttons, chips, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--chip); font-weight: 650; white-space: nowrap; }
.btn.pri { background: var(--ink); color: #fff; }
.btn.big { height: 50px; border-radius: 14px; font-size: 15px; width: 100%; }
.btn.small { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.round { border-radius: 99px; }
.btn.danger { color: var(--no); background: #FDECEC; }
.link { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--no); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 11px; border-radius: 99px; background: var(--chip); font-weight: 650; font-size: 12px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.on { background: var(--ink); color: #fff; }
.chip.ch { color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.field { display: block; width: 100%; height: 46px; border: 0; border-radius: 12px; background: var(--field); color: var(--ink); padding: 0 14px; outline: none; }
textarea.field { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.field:focus { box-shadow: 0 0 0 2px var(--ink) inset; }
.lbl { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.seg { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; margin-bottom: 16px; max-width: 460px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg i { font-style: normal; color: var(--faint); font-weight: 500; margin-left: 4px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.err { color: var(--no); }
.okay { color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

/* ---------- list rows (films, clips, channels) ---------- */
.list { display: grid; gap: 10px; }
.list.queue { max-width: 760px; }
@media (min-width: 820px) { .list.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: var(--tint, #F6F6F8); min-width: 0; text-align: left; width: 100%; }
.row .tile { width: 46px; height: 70px; border-radius: 11px; flex: none; background: linear-gradient(160deg, var(--tile-a, #D8D8DE), var(--tile-b, #8E8E98)); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.95); font-size: 15px; position: relative; overflow: hidden; }
.row .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.row .tile img.on { opacity: 1; }
.row .tile .play { position: relative; font-size: 13px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
@media (min-width: 820px) { .row .tile { width: 56px; height: 100px; border-radius: 12px; } }
.row .body { flex: 1; min-width: 0; }
.row .t { font-weight: 750; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .s { color: var(--muted); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.row .grip { width: 22px; align-self: stretch; display: flex; align-items: center; justify-content: center; color: #B9B9C2; cursor: grab; touch-action: none; flex: none; font-size: 14px; letter-spacing: -2px; }
.row.dragging { box-shadow: 0 12px 30px rgba(0,0,0,.18); position: relative; z-index: 5; opacity: .96; }
.bar { height: 5px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--ink)); transition: width .4s; }
.bar.busy i { width: 35% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.hot { background: var(--pink); color: #fff; }
.title-edit { font: inherit; font-weight: 750; font-size: 15px; width: 100%; border: 0; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; background: #fff; outline: 2px solid var(--ink); }

/* ---------- films: categories, a section per channel, cards with a real still ---------- */
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 20px; padding: 2px 16px; }
.cats::-webkit-scrollbar { display: none; }
.cat { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--chip); font-weight: 650; font-size: 14px; white-space: nowrap; flex: none; }
.cat b, .fsec h2 b { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--faint)); flex: none; }
.cat i, .fsec h2 i { font-style: normal; color: var(--faint); font-weight: 600; }
.cat.on { background: var(--ink); color: #fff; }
.cat.on i { color: rgba(255,255,255,.55); }
.fsec + .fsec { margin-top: 28px; }
.fsec h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.fgrid { display: grid; gap: 14px; }
.fcard { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: start; align-content: start; min-width: 0; }
.fc-cover { position: relative; display: block; border-radius: 12px; overflow: hidden; }
.cover { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: inherit; overflow: hidden; background: linear-gradient(150deg, var(--tile-a, #D8D8DE), var(--tile-b, #8E8E98)); }
.cover .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.92); font-weight: 850; font-size: 30px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.cover img.on { opacity: 1; }
.fc-cover .badge { position: absolute; left: 6px; top: 6px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 750; display: inline-flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.fc-cover .line { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.35); overflow: hidden; }
.fc-cover .line i { display: block; height: 100%; background: var(--c); transition: width .4s; }
.fc-cover .line.busy i { width: 35% !important; animation: slide 1.4s ease-in-out infinite; }
.fc-body { min-width: 0; padding-top: 1px; }
.fc-body .t { font-weight: 750; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fc-body .s { color: var(--muted); font-size: 13px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-body .acts { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.fhero { display: grid; gap: 14px; max-width: 640px; }
.fhero .cover { border-radius: 18px; }
.fhero .cover .ph { font-size: 64px; }
.fh-body .s { color: var(--muted); font-size: 14px; margin-top: 8px; }
@media (min-width: 820px) {
  .cats { flex-wrap: wrap; overflow: visible; margin: -4px 0 24px; padding: 0; }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 18px; }
  .fcard { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fc-cover { border-radius: 14px; transition: transform .2s, box-shadow .2s; }
  .fc-cover:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.16); }
  .cover .ph { font-size: 46px; }
  .fc-cover .badge { left: 8px; top: 8px; height: 24px; font-size: 12px; }
  .fhero { grid-template-columns: 380px minmax(0, 1fr); max-width: 900px; align-items: center; gap: 22px; }
}

/* ---------- sheet: from the bottom on a phone, a panel on the right on a computer ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10,10,14,.38); opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: #fff;
  border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .25s ease; box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #DCDCE0; margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sheet .x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--chip); font-size: 16px; }
.sheet.full { top: 0; max-height: none; border-radius: 0; padding-top: calc(12px + env(safe-area-inset-top)); }
@media (min-width: 820px) {
  .sheet { left: auto; top: 0; width: 460px; max-height: none; height: 100dvh; border-radius: 0; transform: translateX(100%); padding: 22px 26px 26px; box-shadow: -10px 0 40px rgba(0,0,0,.14); }
  .sheet.wide { width: min(980px, 100vw); }
  .sheet .grab { display: none; }
}

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff;
  border-radius: 14px; padding: 12px 16px; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-weight: 550; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: #FFD24D; font-weight: 750; white-space: nowrap; }
@media (min-width: 820px) { .toast { bottom: 24px; } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(360px, 100%); display: grid; gap: 10px; }
.login h1 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 14px; }

/* ---------- moment stack ---------- */
/* the card, the buttons and the counter fit between the header and the tab bar */
.stack { position: relative; height: clamp(340px, calc(100dvh - 290px), 680px); max-width: 430px; margin: 0 auto; }
@media (min-width: 820px) { .stack { height: clamp(380px, calc(100dvh - 300px), 700px); } }
.mcard { position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: #111; color: #fff; touch-action: pan-y; user-select: none; box-shadow: 0 14px 40px rgba(0,0,0,.18); will-change: transform; }
.mcard.next { transform: scale(.95) translateY(14px); filter: brightness(.9); }
.mcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111; }
.mcard .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 52%, rgba(0,0,0,.78) 100%); pointer-events: none; }
.mcard .top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; align-items: flex-start; }
.mcard .pop { background: rgba(255,255,255,.2); backdrop-filter: blur(8px); color: #fff; height: 28px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; font-weight: 700; font-size: 12.5px; max-width: calc(100% - 50px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .sound { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 16px; }
.mcard .info { position: absolute; left: 16px; right: 16px; bottom: 16px; }
.mcard .hook { font-weight: 850; font-size: 21px; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mcard .meta { opacity: .85; margin-top: 6px; font-size: 13px; }
.mcard .whybox { margin-top: 6px; cursor: pointer; }
.mcard .why { opacity: .85; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard .more { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 750; opacity: .9; }
.mcard .src { display: none; }
.mcard.reading .shade { background: rgba(0,0,0,.72); }
.mcard.reading .why { -webkit-line-clamp: unset; display: block; max-height: 42vh; overflow-y: auto; font-size: 14px; opacity: 1; }
.mcard.reading .src { display: inline-flex; align-items: center; margin-top: 10px; height: 30px; padding: 0 12px; border-radius: 99px; background: rgba(255,255,255,.22); backdrop-filter: blur(8px); color: #fff; font-weight: 700; font-size: 12.5px; }
.mcard .stamp { position: absolute; top: 70px; padding: 6px 14px; border: 3px solid; border-radius: 12px; font-weight: 900; font-size: 22px; letter-spacing: .04em; opacity: 0; transform: rotate(-12deg); }
.mcard .stamp.yes { left: 18px; color: #3DDC84; border-color: #3DDC84; }
.mcard .stamp.no { right: 18px; color: #FF5A5A; border-color: #FF5A5A; transform: rotate(12deg); }
.mcard .loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; opacity: .7; }
.decide { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 18px 0 6px; }
.decide .r { width: 64px; height: 64px; border-radius: 50%; font-size: 26px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.decide .r.no { background: var(--chip); color: var(--muted); }
.decide .r.yes { background: var(--ink); color: #fff; }
.decide .edit { height: 44px; padding: 0 16px; border-radius: 99px; background: var(--chip); font-weight: 650; font-size: 14px; }
.progress-line { text-align: center; color: var(--faint); font-size: 12.5px; }

/* ---------- cut editor ---------- */
.cut video { width: 100%; max-height: 42dvh; border-radius: 16px; background: #111; display: block; object-fit: contain; cursor: pointer; }
.piece { border-radius: 16px; background: #F6F6F8; padding: 12px; margin-top: 10px; }
.piece.sel { background: #F0EDFF; box-shadow: 0 0 0 2px #7A5CFF inset; }
.piece .ph { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.piece .ph .sp { flex: 1; }
.track { position: relative; height: 44px; margin: 26px 14px 2px; touch-action: none; cursor: pointer; }
.track .rail { position: absolute; left: 0; right: 0; top: 19px; height: 6px; border-radius: 3px; background: #DCDCE3; }
.track .orig { position: absolute; top: 15px; height: 14px; border-radius: 4px; background: rgba(122,92,255,.18); }
.track .sel { position: absolute; top: 17px; height: 10px; border-radius: 5px; background: #7A5CFF; }
.track .h { position: absolute; z-index: 3; top: 4px; width: 28px; height: 36px; margin-left: -14px; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); cursor: ew-resize; }
.track .head { position: absolute; z-index: 2; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.track .head span { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scale { display: flex; justify-content: space-between; margin: 0 14px 8px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.here { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.here button { height: 32px; padding: 0 12px; border-radius: 10px; background: #fff; font-weight: 650; font-size: 13px; }
.cut .vbox { position: relative; }
.cut .wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; pointer-events: none; }
.transport { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.transport .tp { height: 36px; min-width: 36px; padding: 0 10px; border-radius: 10px; background: var(--chip); font-weight: 700; font-size: 13px; }
.transport .tp.play { background: var(--ink); color: #fff; min-width: 46px; font-size: 14px; }
.transport .now { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.transport .where { color: var(--muted); font-size: 13px; }
.transport .where.in { color: #7A5CFF; font-weight: 650; }
.transport .sp { flex: 1; }
.times { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.times .nudge { display: inline-flex; gap: 4px; align-items: center; }
.times .nudge button { width: 30px; height: 28px; border-radius: 8px; background: #fff; font-weight: 700; color: var(--ink); }

/* ---------- publish sheet ---------- */
.pub-top { display: flex; gap: 14px; margin: 4px 0 14px; }
.pub-top video { width: 120px; aspect-ratio: 9 / 16; border-radius: 14px; background: #111; object-fit: cover; flex: none; }
.pub-top .pinfo { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: 64px minmax(0, 1fr); row-gap: 8px; column-gap: 8px; align-items: center; font-size: 13.5px; margin-top: 10px; }
.kv .k { color: var(--muted); }
.acts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 12px; }
.acts3 > * { height: 60px; border-radius: 14px; background: var(--chip); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 650; font-size: 12.5px; white-space: nowrap; }
.acts3 > * b { font-size: 18px; font-weight: 600; }
.acts3 > [aria-disabled="true"] { opacity: .4; pointer-events: none; }
.foot-links { display: flex; justify-content: center; gap: 22px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- channel cards and page ---------- */
.ch-card { border-radius: 20px; padding: 14px; background: var(--tint); display: block; width: 100%; text-align: left; }
.ch-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-ava { width: 38px; height: 38px; border-radius: 50%; flex: none; background: var(--c); object-fit: cover; }
.ch-head .name { min-width: 0; flex: 1; }
.ch-head .name b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-head .name span { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nums { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.nums div b { display: block; font-size: 19px; font-weight: 800; }
.nums div span { color: var(--muted); font-size: 12px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 30px; flex: none; }
.spark i { width: 4px; border-radius: 2px 2px 0 0; background: var(--c); min-height: 2px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
@media (min-width: 820px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { border-radius: 16px; background: #F6F6F8; padding: 12px 14px; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; }
.kpi .n { font-size: 12px; color: var(--muted); }
.box { border-radius: 18px; background: #F6F6F8; padding: 14px; margin-bottom: 14px; }
.box h3 { margin: 0 0 4px; font-size: 16px; font-weight: 750; }
.chart { position: relative; margin-top: 8px; }
.chart svg { display: block; }
.chart .grid { stroke: #E2E2E8; }
.chart .tick { fill: var(--faint); font-size: 11px; }
.chart .lbl { fill: var(--ink); font-size: 12px; font-weight: 700; }
.chart .col path { fill: var(--c); }
.chart .col .hit { fill: transparent; }
.chart .col.hover path { opacity: .7; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
.vid { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.vid img, .vid .ph { width: 84px; height: 48px; border-radius: 8px; object-fit: cover; background: #DDD; flex: none; }
.vid .vlink { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; }
.vid .vdel { width: 34px; height: 34px; border-radius: 10px; flex: none; font-size: 15px; filter: grayscale(1); opacity: .55; }
.vid .vdel:hover, .vid .vdel:focus-visible { background: #FDECEC; filter: none; opacity: 1; }
.vid .b { flex: 1; min-width: 0; }
.vid .b .t { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vid .b .s { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid .n { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vid .n b { display: block; color: var(--ink); font-size: 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }

/* ---------- settings and the RuTracker blocks inside them ---------- */
.set h3 { font-size: 17px; margin: 26px 0 4px; }
.set .grid, .rt-settings .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.set .grid label, .rt-settings .grid label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 12px; }
.set .grid input, .set .grid select, .rt-settings input, .rt-settings select { display: block; width: 100%; height: 44px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--field); padding: 0 12px; font-size: 14px; color: var(--ink); }
.rt-settings h3 { font-size: 17px; margin: 26px 0 4px; }
.rt-settings button, .rt-box button:not(.btn) { height: 38px; padding: 0 14px; border-radius: 10px; background: var(--chip); font-weight: 650; margin: 10px 8px 0 0; }
.rt-settings button.pri { background: var(--ink); color: #fff; }
.rt-settings details, .rt-box details { margin-top: 12px; }
.rt-settings summary, .rt-box summary { cursor: pointer; font-weight: 650; color: var(--muted); }
.meta { color: var(--muted); font-size: 13px; }
.rt-install { padding-left: 20px; color: var(--muted); font-size: 13px; }
.rt-install li { margin: 6px 0; }
.rt-install a { text-decoration: underline; color: var(--ink); }
.rt-error { color: var(--no); font-size: 13px; margin-top: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl td, .tbl th { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
code { font-size: 12.5px; background: var(--chip); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; user-select: all; }
