/* Пульт «Искры» на телефоне. Пользуются в том числе старшие: крупный текст, большие кнопки, понятные подписи.
   Плавность: двигаются только transform и opacity, тяжёлое размытие — лишь на узких панелях. */
:root {
  --bg: #f4f4f4;
  --bg-elev: #ffffff;
  --bg-elev-2: #ebebeb;
  --fg: #111111;
  --fg-2: #505050;
  --fg-3: #878787;
  --line: rgba(0, 0, 0, .09);
  --chip: rgba(0, 0, 0, .06);
  --chip-on-bg: #111111;
  --chip-on-fg: #ffffff;
  --accent: #111111;
  --accent-fg: #ffffff;
  --link: #007aff;
  --ok: #1a8f4c;
  --warn: #b25e00;
  --warn-bg: #fff3e0;
  --danger: #d0281c;
  /* шапка и вкладки — цвета фона (30.10: «у шапки другой цвет, чем у фона и у панели»): полупрозрачная — тот же цвет */
  --bar: rgba(244, 244, 244, .92);
  --bar-solid: #f4f4f4;
  --scrim: rgba(0, 0, 0, .38);
  --shadow: 0 10px 30px rgba(0, 0, 0, .14);
  --sk: rgba(0, 0, 0, .07);
  --img-bg: #dddddd;
  --pad-press: #d9d9d9;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
/* Telegram во весь экран, без рамок (телефон): сверху вырез экрана и плавающие кнопки Telegram «Закрыть» и «⋯» — отступ
   под ними; его переменные (--tg-…) ставит его скрипт, env() внутри Telegram бывает нулевым */
html.tg {
  --safe-t: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-b: max(env(safe-area-inset-bottom, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
  --safe-l: max(env(safe-area-inset-left, 0px), calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px)));
  --safe-r: max(env(safe-area-inset-right, 0px), calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px)));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-elev: #171717;
    --bg-elev-2: #232323;
    --fg: #f5f5f5;
    --fg-2: #b8b8b8;
    --fg-3: #8a8a8a;
    --line: rgba(255, 255, 255, .09);
    --chip: rgba(255, 255, 255, .09);
    --chip-on-bg: #f5f5f5;
    --chip-on-fg: #111111;
    --accent: #f5f5f5;
    --accent-fg: #0a0a0a;
    --link: #0a84ff;
    --ok: #30d158;
    --warn: #ffb340;
    --warn-bg: rgba(255, 179, 64, .12);
    --danger: #ff5a4f;
    --bar: rgba(10, 10, 10, .9);
    --bar-solid: #0a0a0a;
    --scrim: rgba(0, 0, 0, .55);
    --shadow: 0 10px 30px rgba(0, 0, 0, .55);
    --sk: rgba(255, 255, 255, .07);
    --img-bg: #1d1d1d;
    --pad-press: #303030;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
/* страница не увеличивается ни щипком, ни двойным касанием — только листается (Safari на iPhone не слушает
   user-scalable=no в meta viewport) */
html { touch-action: pan-x pan-y; }
body {
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; overflow: hidden;
  /* долгое касание картинки или ссылки на iPhone — не системное «Сохранить / Открыть», а своё меню (longPress) */
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  touch-action: manipulation; -webkit-touch-callout: none; }
input { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* палец — не мышь: на телефоне и планшете текст не выделяется нигде, кроме полей (подробности и чат в плеере на
   компьютере выделяются мышью) — иначе удержание пальца на них выделяло слово и показывало лупу iPhone */
@media (hover: none) {
  :not(input, textarea) { -webkit-user-select: none !important; user-select: none !important; }
}
/* название на «Подробнее» (и оригинальное под ним) выделяется и копируется везде, и пальцем тоже (27.11: «название в
   любой тайтле/манге где угодно на такой странице можно было выделить и скопировать») */
.tp-title, .tp-alt, .t-head h2, .t-head .alt { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
@media (hover: none) {
  .tp-title, .tp-alt, .t-head h2, .t-head .alt { -webkit-user-select: text !important; user-select: text !important; }
}
/* картинку не «взять» и не унести (dragstart тоже гасится) */
img { display: block; -webkit-user-drag: none; }
svg { display: block; }
/* значки в кнопках не ловят нажатия — щелчок всегда у самой кнопки, даже если значок в этот момент заменили */
button svg { pointer-events: none; }
[hidden] { display: none !important; }
/* синих рамок фокуса браузера нет ни у чего (01.11, «убрать все синие выделения кнопок браузерные»): выбранное и наведённое
   у нас показывается своим видом */
:focus, :focus-visible { outline: none; }

/* --- раскладка: вкладки, у каждой стопка страниц */
#app { position: fixed; inset: 0; overflow: hidden; }
/* обрезают, но не прокручиваются (clip): въезжающая сбоку страница не делает документ шире экрана — иначе Safari, прокручивая
   к сезону или серии, сдвигал вбок весь раздел (30.10: «при открытии „Декстера“ страница перелетает влево») */
#views { position: absolute; inset: 0; overflow: hidden; overflow: clip; }
.view { position: absolute; inset: 0; display: none; overflow: hidden; overflow: clip; }
.view.on { display: block; }
/* isolation — страница сама по себе слоем: слои внутри (надписи «Продолжить», «Назад») не вылезают поверх страницы,
   открытой над ней */
.page {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: var(--bg); isolation: isolate;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 24px);
  transition: transform .36s var(--ease);
}
.view.has-mini .page { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 96px); }
.page.enter { transform: translate3d(100%, 0, 0); }
.page.under { transform: translate3d(-22%, 0, 0); pointer-events: none; }
.page.under::after { content: ''; position: fixed; inset: 0; background: var(--scrim); opacity: var(--under-dim, .5); }
/* долгое касание (меню): чуть вжимается, пока держат палец. У карточки — картинка, а не сама карточка (ниже) */
.lp-hold:not(.card) { transform: scale(.96); transition: transform .45s var(--ease); }
.view.fade { animation: fade .18s ease; }
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }

/* --- шапка страницы */
.hdr {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  min-height: calc(56px + var(--safe-t)); padding: var(--safe-t) 12px 0 16px;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
}
/* липкая полоса корня вкладки: капсулы разделов, поле поиска, кнопки; правый край капсул гаснет — видно, что листается */
/* фон сплошной: край капсул гаснет накладкой цвета полосы, а сквозь полупрозрачную полосу просвечивали карточки —
   накладка выглядела светлой «тенью» справа (особенно в светлой теме) */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 2px;
  padding: calc(var(--safe-t) + 14px) 8px 10px 0;
  background: var(--bar-solid);
}
.topbar.bare { padding: var(--safe-t) 0 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar.col { flex-direction: column; align-items: stretch; gap: 0; padding-right: 0; }
.topbar .chips-wrap { position: relative; flex: 1; min-width: 0; }
/* в столбик (поиск) — без растяжения: flex 1 в столбце даёт полосе нулевую высоту в Safari — капсулы пропадали */
.topbar.col .chips-wrap { flex: none; }
.topbar .chips { padding: 2px 40px 2px 16px; scroll-padding: 0 16px; }
.topbar .chips-wrap::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 44px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bar-solid)); }
/* лента в строке с кнопками (Главная) — накладка на 1 px за край: в Telegram на iPhone ширина ленты дробная, лента и
   накладка округлялись по-разному, и между ними светилась щель в 1 px; за краем — зазор до кнопки цвета полосы */
.topbar:not(.col) .chips-wrap::after { right: -1px; width: 45px; }
.topbar .search-box { margin: 0 16px 10px; }
/* ---------- Главная на телефоне (home.js): «Главная» и где смотреть, разделы иконками по три в ряд, как приложения на
   iPhone (цветной скруглённый квадрат, подпись под ним), «Продолжить», герой, ряды. Долгое нажатие — правка: дрожат,
   «−» скрыть, скрытые бледные с «+», «Готово» справа. На широком иконок нет — разделы в боковой панели */
/* строка — как кнопки справа (36): «Готово» вместо «где смотреть» шапку не меняет, иконки не съезжают */
.hub-title { flex: 1; min-width: 0; margin: 0 0 0 16px; font-size: 28px; line-height: 36px; font-weight: 800; letter-spacing: -.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* вид разделов (в правке): три маленьких знака в капсуле, выбранный — на светлой подложке, как переключатель iOS */
.hub-look { display: flex; gap: 2px; height: 32px; padding: 2px; margin-right: 8px; border-radius: 16px; background: var(--chip); flex: none; }
.hub-look button { width: 34px; height: 28px; border-radius: 14px; display: grid; place-items: center; transition: background .15s ease, box-shadow .15s ease; }
.hub-look button.on { background: var(--bg-elev); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.hub-look i { display: block; width: 14px; height: 14px; }
.hub-look .lk-tiles { border-radius: 4px; background: #8e8e93; }
.hub-look .lk-mono { border-radius: 50%; background: #8e8e93; }
.hub-look .lk-color { border-radius: 50%; background: conic-gradient(#ff3b30, #ff9500, #ffcc00, #34c759, #00c7be, #0a84ff, #ff2d55, #ff3b30); }
.hub-done { height: 36px; padding: 0 16px; margin-right: 8px; border-radius: 18px; background: var(--link); color: #fff; font-size: 15px; font-weight: 650; }
/* поля — без перехода: перетекание (home.js glide) считает места по новым полям сразу, плавные поля сдвигали всё ещё раз
   и в конце был рывок */
.hub { padding: 12px 0 22px; }
/* по правилам рабочего стола iPhone: иконки одного размера, промежутки между ними и до краёв — одинаковые (space-evenly),
   шаг по строкам — тот же, что по ширине (72 + 6 + 15 + 22 ≈ 72 + ¼ остатка); подпись под иконкой — на 6, шире
   иконки, если нужно (не обрезается о соседнюю клетку) */
.hub-grid { display: grid; grid-template-columns: repeat(3, 72px); justify-content: space-evenly; row-gap: 22px; }
.hub-app { position: relative; display: block; width: 72px; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; }
/* иконка: подложка .hub-bg (в иконках — квадрат 72 со скруглением iPhone по центру сверху, в плитках — вся карточка),
   поверх — слой цвета (::before, проявляется у цветных), знак, подпись; «−» / «+» — в углу подложки. Один набор
   элементов на все три вида: размеры подложки, знака и подписи перетекают (home.js glide), цвета — переходами */
.hub-j { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hub-bg { position: absolute; z-index: 0; left: calc(50% - 36px); top: 0; width: 72px; height: 72px; border-radius: 16px; background: var(--bg-elev);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 0 0 .5px var(--line); transition: background-color .38s ease, box-shadow .38s ease, opacity .25s ease; }
.hub-bg::before { content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .38s ease; }
.hub.look-color .hub-bg::before { opacity: 1; }
.hub-ic { position: relative; z-index: 1; width: 72px; height: 72px; display: grid; place-items: center; color: var(--fg); transition: color .38s ease; }
.hub-ic > svg { width: 40px; height: 40px; }
.hub-ic > svg path[stroke] { stroke-width: 1.8; }
.hub-l { position: relative; z-index: 1; width: 104px; margin: 0 -16px; font-size: 12.5px; font-weight: 500; line-height: 15px; text-align: center; color: var(--fg); }
.hub-lt { display: inline-block; max-width: 100%; vertical-align: top; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-app:active .hub-j { transform: scale(.95); }
/* у каждого раздела свой цвет — сверху чуть светлее, как у иконок iPhone; знак — белый (у манги чёрный, у YouTube —
   красный на белом); YouTube и VK — их настоящие знаки */
.hub-app[data-id="movies"] .hub-bg::before { background: linear-gradient(180deg, #4b4b50, #1c1c1f); }
.hub-app[data-id="series"] .hub-bg::before { background: linear-gradient(180deg, #4aa1ff, #0a68f5); }
.hub-app[data-id="anime"] .hub-bg::before { background: linear-gradient(180deg, #ff7b55, #ee3a16); }
.hub-app[data-id="manga"] .hub-bg::before { background: linear-gradient(180deg, #ffffff, #e6e6eb); }
.hub-app[data-id="ranobe"] .hub-bg::before { background: linear-gradient(180deg, #5cdc78, #1ea64b); }
.hub-app[data-id="audiobook"] .hub-bg::before { background: linear-gradient(180deg, #ffb64a, #ff8000); }
.hub-app[data-id="youtube"] .hub-bg::before { background: #fff; }
.hub-app[data-id="vk"] .hub-bg::before { background: linear-gradient(180deg, #2a8bff, #0066ee); }
.hub-app[data-id="music"] .hub-bg::before { background: linear-gradient(180deg, #ff5f8f, #e7175a); }
.hub.look-color .hub-ic { color: #fff; }
.hub.look-color .hub-app[data-id="manga"] .hub-ic { color: #1c1c1e; }
.hub.look-color .hub-app[data-id="youtube"] .hub-ic { color: #f00; }
.hub-app[data-id="youtube"] .hub-ic > svg, .hub-app[data-id="vk"] .hub-ic > svg { transition: width .38s ease, height .38s ease; }
.hub.look-color .hub-app[data-id="youtube"] .hub-ic > svg { width: 46px; height: 46px; }
.hub.look-color .hub-app[data-id="vk"] .hub-ic > svg { width: 44px; height: 44px; }
/* серые плитки (первый вид, 28.11 — понравился Дане): карточка 92 высотой, знак слева вверху, подпись слева внизу; сетка из
   шести долей — плитка на две, растянутая на три (home.js stretch), одна — во всю ширину. Сверху 12: «−» верхних плиток
   не уходит под шапку */
.hub.look-tiles { padding: 12px 16px 18px; }
.hub.look-tiles .hub-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); justify-content: stretch; gap: 10px; }
.hub.look-tiles .hub-app { grid-column: span 2; width: auto; }
.hub.look-tiles .hub-app.wide { grid-column: span 3; }
.hub.look-tiles .hub-app.full { grid-column: 1 / -1; }
.hub.look-tiles .hub-j { height: 92px; padding: 14px 8px 12px 12px; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hub.look-tiles .hub-bg { left: 0; top: 0; width: 100%; height: 100%; border-radius: 18px; box-shadow: none; }
.hub.look-tiles .hub-ic { width: 28px; height: 28px; }
.hub.look-tiles .hub-ic > svg { width: 28px; height: 28px; }
.hub.look-tiles .hub-l { width: auto; max-width: 100%; margin: 0; font-size: 15px; font-weight: 650; line-height: 1.2; text-align: left; }
/* «−» и «+» — в углу подложки: у иконок — квадрата (по центру сверху), у плиток — карточки; переезжает вместе с ней */
.hub-x { position: absolute; z-index: 2; top: -8px; left: calc(50% - 44px); width: 24px; height: 24px; border-radius: 12px; background: rgba(110, 110, 118, .92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3); opacity: 0; transform: scale(.4); pointer-events: none;
  transition: left .38s cubic-bezier(.2, .8, .2, 1), background-color .2s ease, opacity .2s ease, transform .25s cubic-bezier(.3, .7, .4, 1.4); }
.hub.look-tiles .hub-x { left: -8px; }
.hub-x::before, .hub-x::after { content: ''; position: absolute; left: 6px; right: 6px; top: 11px; height: 2px; border-radius: 1px; background: #fff; }
.hub-x::after { transform: rotate(90deg) scaleX(0); transition: transform .2s ease; }
/* в правке «−» появляются — проявляются и вырастают из точки */
.hub.edit .hub-x { opacity: 1; transform: none; pointer-events: auto; }
.hub.edit .hub-app.keep .hub-x { display: none; }
.hub-app.off .hub-x { background: var(--link); }
.hub-app.off .hub-x::after { transform: rotate(90deg); }
/* скрытый — бледный (сам «+» — нет), бледнеет и ярчает плавно */
.hub-ic, .hub-l { transition: color .38s ease, opacity .25s ease; }
.hub-app.off .hub-bg, .hub-app.off .hub-ic, .hub-app.off .hub-l { opacity: .38; }
@keyframes hub-jiggle { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
.hub.edit .hub-app { touch-action: none; }
.hub.edit .hub-j { animation: hub-jiggle .3s ease-in-out infinite; }
.hub.edit .hub-app:nth-child(2n) .hub-j { animation-duration: .27s; animation-delay: -.12s; }
.hub.edit .hub-app:nth-child(3n) .hub-j { animation-duration: .33s; animation-delay: -.2s; }
/* тянут: поднятая — над всеми, крупнее и без дрожи, едет за пальцем (transform — без перехода); соседи переезжают на
   новые места плавно; бросили — доезжает до своего; на месте порядок меняется без движения (still) */
.hub-app.lift { z-index: 3; }
.hub-app.lift .hub-j { animation: none; transform: scale(1.12); transition: transform .15s ease; }
.hub-app.lift .hub-bg { box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.hub-grid.dragging .hub-app:not(.lift) { transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.hub-app.settle { transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.hub-grid.still .hub-app { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .hub.edit .hub-j { animation: none; } }
body.wide .hub { display: none; }
.hdr h1 { flex: 1; margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr .small { font-size: 19px; font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; flex: none; color: var(--fg); }
/* где смотреть: капсула «Телевизор ⌄» / «iPhone ⌄» у «Главной» — видно, что тут выбирают устройство */
.host-btn { display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 9px 0 10px; margin-left: 6px; border-radius: 18px; flex: none;
  background: var(--chip); color: var(--fg); font-size: 14.5px; font-weight: 650; white-space: nowrap; }
.host-btn[hidden] { display: none; }
.host-btn svg { width: 18px; height: 18px; flex: none; }
.host-btn svg:last-child { width: 14px; height: 14px; opacity: .6; }
.host-btn:active { transform: scale(.96); }
.icon-btn:active { background: var(--chip); }
.icon-btn svg { width: 26px; height: 26px; }
.back { margin-left: -8px; }

/* --- нижние вкладки */
#tabs {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--bar); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--fg-3);
  font-size: 12.5px; font-weight: 600; letter-spacing: .1px; }
.tab svg { width: 28px; height: 28px; }
.tab.on { color: var(--fg); }
.tab:active svg { transform: scale(.9); }
.tab svg { transition: transform .12s ease; }

/* --- мини-плеер над вкладками */
#mini {
  position: absolute; left: 10px; right: 10px; bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); z-index: 19;
  display: flex; align-items: center; gap: 12px; height: 68px; padding: 8px 8px 8px 8px; border-radius: 18px;
  background: var(--bg-elev); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden;
  transform: translate3d(0, 0, 0); transition: transform .3s var(--ease), opacity .2s;
}
#mini.hide { transform: translate3d(0, 130%, 0); opacity: 0; pointer-events: none; }
#mini .thumb { width: 84px; height: 50px; border-radius: 10px; object-fit: cover; background: var(--img-bg); flex: none; }
#mini .txt { flex: 1; min-width: 0; }
#mini .t { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mini .s { font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* шкала — по верхней кромке острова (углы срезает его скругление) */
#mini .bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--chip); }
#mini .bar i { display: block; height: 100%; width: 0; background: var(--link); border-radius: 0 2px 2px 0; }
.round-btn { width: 52px; height: 52px; border-radius: 26px; display: grid; place-items: center; flex: none;
  background: var(--chip); color: var(--fg); transition: transform .12s ease; }
.round-btn:active { transform: scale(.92); }
.round-btn svg { width: 26px; height: 26px; }
.round-btn.accent { background: var(--accent); color: var(--accent-fg); }

/* --- общие блоки */
.sec-title { margin: 22px 16px 10px; font-size: 21px; font-weight: 800; letter-spacing: -.2px; }
.muted { color: var(--fg-2); }
.small-text { font-size: 15px; color: var(--fg-3); }
.pad { padding: 0 16px; }
/* плашка с кнопками — скругления вложенные: радиус плашки = радиус кнопки + отступ (14 + 12 = 26); раньше было 16 и 16
   при отступе 16 — углы кнопок круглее углов плашки. Текст — с отступом 18, как у кнопок подпись */
.banner { margin: 12px 16px; padding: 12px; border-radius: 26px; background: var(--warn-bg); color: var(--fg); font-size: 16px; }
.banner b { display: block; margin: 4px 6px 4px; color: var(--warn); }
.banner > span { display: block; margin: 0 6px; }
.banner .btn { margin-top: 8px; min-height: 50px; border-radius: 14px; }
.banner > span + .btn { margin-top: 14px; }
.banner > span:last-child { margin-bottom: 6px; }
.empty { padding: 48px 28px; text-align: center; color: var(--fg-2); }
.empty .big { font-size: 22px; font-weight: 800; color: var(--fg); margin-bottom: 8px; }
.empty svg { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--fg-3); }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 20px;
  border-radius: 16px; background: var(--chip); color: var(--fg); font-size: 17px; font-weight: 700; transition: transform .12s ease, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.danger { color: var(--danger); }
.btn.busy { opacity: .6; pointer-events: none; }
.btn span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-row .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; font-size: 16px; }
.btn[disabled] { opacity: .45; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
/* кнопка-значок в ряду (поделиться): квадрат по высоте кнопки */
.btn-row .btn.ic { flex: 0 0 54px; padding: 0; }

/* капсулы: разделы, сезоны, площадки поиска */
/* scroll-padding — прилипание по краю отступа: без него первая капсула вставала вплотную к краю экрана (сезоны) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 18px; border-radius: 20px; background: var(--chip); font-size: 16px; font-weight: 600;
  white-space: nowrap; scroll-snap-align: start; transition: background .15s, color .15s, opacity .12s; }
/* без сжатия: сжатая капсула в ленте с прилипанием сдвигала прокрутку — лента дёргалась */
.chip:active { opacity: .7; }
.chip.on { background: var(--chip-on-bg); color: var(--chip-on-fg); }
/* «Изменить» в конце капсул разделов — порядок и показ: словом и системным синим, без подложки, как «Изменить» в iPhone */
.chip.chip-edit { padding: 0 10px; background: none; color: var(--link); }

/* ряды карточек: прокрутка вбок с прилипанием */
.row { margin-bottom: 6px; }
/* карточки — своей ширины, слева направо: без justify-content сетка растягивала столбцы, и 4 заготовки разъезжались
   на всю ширину ряда */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; gap: 12px; overflow-x: auto;
  padding: 2px 16px 8px; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding: 0 16px; overscroll-behavior-x: contain; }
.scroller::-webkit-scrollbar { display: none; }
/* ряд «по экрану»: видно 3 карточки и край следующей (кадры 16:9 — 2 и край; на широком экране — на одну больше) */
.scroller.fit { grid-auto-columns: calc((100% - 3 * 12px - 26px) / 3); }
.scroller.fit.two { grid-auto-columns: calc((100% - 2 * 12px - 26px) / 2); }
.scroller.fit .card { width: auto; }
@media (min-width: 700px) {
  .scroller.fit { grid-auto-columns: calc((100% - 4 * 12px - 26px) / 4); }
  .scroller.fit.two { grid-auto-columns: calc((100% - 3 * 12px - 26px) / 3); }
}
.sec-link { display: flex; align-items: center; gap: 2px; width: calc(100% - 32px); text-align: left; }
.sec-link svg { width: 22px; height: 22px; color: var(--fg-3); }
.sec-link:active { opacity: .6; }
/* карточка — кнопка: браузер центрирует её содержимое по высоте ряда, и с подписью в одну строку картинка
   съезжала на полстроки вниз — содержимое к верху */
.card { width: 132px; scroll-snap-align: start; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-start; }
/* нажатие и удержание — вжимается картинка, сама карточка не меняется: она точка прилипания ряда, и Safari, видя её
   уменьшенной, подтягивал ряд на пару точек (30.10: «при лонгтапе карточки смещается карусель») */
body:not(.wide) .card .pic { transition: transform .12s ease; }
body:not(.wide) .card:active .pic { transform: scale(.96); }
body:not(.wide) .card.lp-hold .pic { transform: scale(.95); transition: transform .45s var(--ease); }
.card .pic { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--img-bg); }
.card.wide { width: 248px; }
.card.wide .pic { aspect-ratio: 16 / 9; }
.card.avatar { width: 96px; text-align: center; }
.card.avatar .pic { aspect-ratio: 1; border-radius: 50%; }
.pic img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
/* картинка загрузилась — фона-заглушки под ней нет: Safari сглаживает скругление картинки и фона по отдельности, и
   светлая заглушка проступала тонкой дугой по углам (01.11, плитки серий в плеере) */
:is(.pic, .thumb):has(> img.ok) { background: none; }
.pic img.ok { opacity: 1; }
.pic .noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center;
  font-size: 13px; color: var(--fg-3); }
.card .t { margin-top: 7px; font-size: 15px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.card.novideo .pic img, .li.novideo .thumb img { opacity: .35; }
.card.leaving, .li.leaving { opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s; }
.card .s { margin-top: 2px; font-size: 13.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .35); }
.prog i { display: block; height: 100%; background: var(--link); }
/* скругление вложено в угол постера: 12 (постер) − 6 (отступ) = 6, как ScoreBadge мака */
.badge { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700;
  background: rgba(0, 0, 0, .7); color: #fff; }
.badge.score { color: #4cd964; }
.badge.score.mid { color: #e6e6e6; }
.badge.score.bad { color: #ff6b5e; }
.badge.score i { font-style: normal; font-weight: 600; color: rgba(255, 255, 255, .72); margin-right: 4px; }
/* левый верхний угол кадра серии: пометка («Сейчас», «скоро») и оценка рядом, а не друг на друге */
.tags { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.tags .badge { position: static; }
.li .thumb .tags { left: 4px; top: 4px; }
.li .thumb .badge { padding: 1px 6px; border-radius: 6px; font-size: 11px; }
.badge.dur { left: auto; right: 6px; top: auto; bottom: 6px; }
.badge.live { background: #ff3b30; }
/* действие на карточке («Перейти сюда» — своя комната с другого устройства) — системным синим, не красным «в эфире» */
.badge.go { background: #0a84ff; }
.check { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .65); color: #fff; }
.check svg { width: 15px; height: 15px; }
/* что поверх кадра — своим слоем. Картинка, пока проявляется (opacity), — отдельный слой, и Safari на iPhone, листая ряд,
   то выносил полоску и оценку над ней, то клал обратно в ряд и перерисовывал — они пропадали и возвращались («скачут»).
   Свой слой у них всегда: нарисованы один раз и едут вместе с рядом */
:is(.pic, .thumb) > :is(.prog, .badge, .tags, .check, .card-av, .n, .ep-ok, .bar) { transform: translateZ(0); }

/* заготовки, пока грузится */
.sk { background: var(--sk); border-radius: 12px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.sk-line { height: 14px; margin: 8px 0; }
.sk-text { display: inline-block; max-width: 100%; height: .78em; vertical-align: -.05em; border-radius: 6px; background: var(--sk);
  animation: pulse 1.4s ease-in-out infinite; }
.sec-title .sk-text { height: .7em; }

/* списки: история, результаты поиска, серии */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 76px; text-align: left; width: 100%; }
.li:active { background: var(--chip); }
.li .thumb { position: relative; width: 116px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--img-bg); flex: none; }
.li .thumb.poster { width: 60px; aspect-ratio: 2 / 3; }
.li .thumb img { width: 100%; height: 100%; object-fit: cover; }
.li .body { flex: 1; min-width: 0; }
.li .t { font-size: 17px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li .s { margin-top: 3px; font-size: 14.5px; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li .s i { font-style: normal; color: var(--fg-3); margin: 0 5px; }
.li .s .sc { font-weight: 700; }
.li .s .sc.good { color: var(--ok); }
.li .s .sc.mid { color: inherit; }
.li .s .sc.bad { color: var(--danger); }
.li .end { flex: none; color: var(--fg-3); }
.li .end svg { width: 22px; height: 22px; }
.li.current .t { color: var(--link); }
.li.watched .thumb img { opacity: .55; }
.ep-num { font-weight: 800; color: var(--fg-2); margin-right: 4px; }
.li .thumb .ep-bg { filter: brightness(.42) saturate(1.15); transform: scale(1.08); }
.ep-big { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 850;
  letter-spacing: -.5px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* поле поиска */
.search-box { position: relative; margin: 6px 16px 10px; }
.search-box input { width: 100%; height: 52px; padding: 0 48px 0 48px; border-radius: 16px; border: 0; outline: none;
  background: var(--chip); font-size: 18px; }
.search-box input::placeholder { color: var(--fg-3); }
.search-box .ico { position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; color: var(--fg-3); }
.search-box .clear { position: absolute; right: 6px; top: 4px; }

/* карточка тайтла */
.hero { position: relative; margin: 0 0 4px; aspect-ratio: 16 / 10; max-height: 52vh; width: 100%; overflow: hidden; background: var(--img-bg); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, var(--bg) 100%); }
.hero.poster img { object-position: center 20%; }
.page.title-page .hdr { position: absolute; left: 0; right: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
.page.title-page .hdr .icon-btn { color: #fff; background: rgba(0, 0, 0, .35); }
.t-head { padding: 0 16px; margin-top: -40px; position: relative; z-index: 1; }
.t-head h2 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 850; letter-spacing: -.4px; }
.t-head .alt { margin-top: 4px; font-size: 15px; color: var(--fg-3); }
.t-head .meta { margin-top: 8px; font-size: 15px; color: var(--fg-2); }
.t-head .meta .sc { font-weight: 800; color: var(--ok); }
.t-actions { padding: 16px 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.desc { position: relative; margin: 12px 16px 0; font-size: 16px; line-height: 1.5; color: var(--fg-2); white-space: pre-line;
  max-height: 6em; overflow: hidden; transition: max-height .55s var(--ease); }
.desc::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg)); transition: opacity .35s var(--ease); }
.desc.open::after, .desc.short::after { opacity: 0; }
.more-link { display: grid; margin: 4px 16px 0; color: var(--link); font-size: 16px; font-weight: 600; line-height: 1.5; text-align: left; }
.more-link span { grid-area: 1 / 1; transition: opacity .3s var(--ease); }
.more-link .b, .more-link.open .a { opacity: 0; }
.more-link.open .b { opacity: 1; }

/* пульт: всё на одном экране — блоки делят высоту поровну, крестовина подстраивается под высоту экрана */
.remote-page { display: flex; flex-direction: column; }
.remote-page > .body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.topbar.tools { padding-left: 16px; padding-right: 16px; }
.topbar .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 15px 0 12px; border-radius: 20px;
  background: var(--chip); font-size: 15px; font-weight: 650; transition: transform .12s ease; }
.pill svg { width: 20px; height: 20px; }
.pill.danger { color: var(--danger); }
.pill:active { transform: scale(.95); }
.remote { flex: 1; min-height: 0; padding: 6px 20px 8px; display: flex; flex-direction: column; align-items: center;
  justify-content: space-evenly; gap: 12px; }
/* крестовина: кольцо из 4 секторов по четверти, ОК в середине; нажатый сектор мягко светлеет, без «подсветки касания» */
.dpad { position: relative; flex: none; width: min(78vw, 300px, 36dvh); aspect-ratio: 1; }
/* крестовина по центру, у MacBook справа от неё — полоса прокрутки той же высоты */
.dpad-row { position: relative; width: 100%; display: flex; justify-content: center; }
.scroll-strip { position: absolute; right: -8px; top: 0; bottom: 0; width: 38px; border-radius: 19px; background: var(--bg-elev);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 0;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.scroll-strip[hidden] { display: none; }
.dpad-row.with-strip .dpad { width: min(66vw, 270px, 34dvh); }
.scroll-strip .ss-end { color: var(--fg-3, var(--fg-2)); opacity: .6; display: grid; place-items: center; }
.scroll-strip .ss-end svg { width: 18px; height: 18px; }
.scroll-strip .grip { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-radius: 12px; background: var(--chip);
  transition: transform .35s cubic-bezier(.3,1.25,.5,1), background .15s; }
.scroll-strip .grip i { display: block; width: 16px; height: 2px; border-radius: 1px; background: var(--fg-2); }
.scroll-strip.drag .grip { transition: none; background: var(--pad-press); }
.dpad svg { width: 100%; height: 100%; overflow: visible; }
.dpad .sec { fill: var(--bg-elev); stroke: var(--bg); stroke-width: 2.5; cursor: pointer; outline: none; transition: fill .18s ease; }
.dpad .sec.pressed { fill: var(--pad-press); transition-duration: .04s; }
.dpad .arr { fill: none; stroke: var(--fg-2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
  transition: stroke .18s ease; }
.dpad .sec.pressed + .arr { stroke: var(--fg); }
.dpad .hit { fill: #000; fill-opacity: 0; stroke: none; cursor: pointer; outline: none; }
.dpad .rim { fill: none; stroke: var(--line); stroke-width: 1; pointer-events: none; }
.dpad .ok { position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--bg-elev-2); color: var(--fg); font-size: 20px; font-weight: 800; transition: background .18s ease, transform .12s ease; }
.dpad .ok.pressed { background: var(--pad-press); transform: translate(-50%, -50%) scale(.96); transition-duration: .04s; }
.keys { width: 100%; max-width: 380px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 72px; border-radius: 18px;
  background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; color: var(--fg-2);
  transition: transform .1s, background .1s; }
.key svg { width: 28px; height: 28px; color: var(--fg); }
.keys.four { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.key[hidden], .dpad[hidden] { display: none; }
.key .num-ic { height: 28px; font-size: 19px; font-weight: 800; letter-spacing: -.5px; line-height: 28px; color: var(--fg); }
/* цифры каналов — на месте крестовины, того же размера: 3 × 4 круглые кнопки */
.numpad { flex: none; width: min(78vw, 300px, 36dvh); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr); gap: 8px; }
.numpad[hidden] { display: none; }
.dpad-row.with-strip .numpad { width: min(66vw, 270px, 34dvh); }
.numpad .nk { border-radius: 999px; background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg);
  font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; transition: transform .1s, background .1s; }
.numpad .nk.small { font-size: 13px; font-weight: 650; color: var(--fg-2); }
.numpad .nk:active, .numpad .nk.pressed { transform: scale(.94); background: var(--pad-press); }
.key:active, .key.pressed { transform: scale(.95); background: var(--chip); }
/* ползунок — один на громкость и яркость: значок или кнопка слева, полоса, число справа, подсказка над пальцем */
.slider-row { position: relative; width: 100%; max-width: 380px; display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 8px 16px 8px 8px; border-radius: 22px; background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line); }
.slider-row.wide { max-width: none; margin-top: 14px; }
/* строка настроек с ползунком (порог оценки), как в «Настройках» iPhone: подпись и значение серым сверху, под ними
   ползунок без своей рамки во всю ширину, пройденное — синим (--p ставит sliderRow) */
.opt-group > .opt.sr-row { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding: 4px 16px 10px; }
.opt.sr-row:active { background: none; }
/* верх — как обычная строка (подпись посередине своей высоты), ползунок — под ним; было: подпись у самого края группы */
.sr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.sr-top .sl-val { min-width: 0; font-size: 17px; font-weight: 400; color: var(--fg-3); }
.slider-row.flat { max-width: none; min-height: 0; padding: 0; gap: 0; border-radius: 0; background: none; box-shadow: none; }
.slider-row.flat .sl-tip { display: none; }
.slider-row.flat .sl-track input { height: 30px; cursor: pointer; }
.slider-row.flat .sl-track input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--link) calc(var(--p, 0) * 100%), var(--chip) 0); }
.slider-row.flat .sl-track input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--chip); }
.slider-row.flat .sl-track input::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--link); }
/* ручка — 22, не 28 (как у громкости): на тонкой полоске большая ручка — «огромный шар» */
.slider-row.flat .sl-track input::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; border-radius: 11px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .06); }
.slider-row.flat .sl-track input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 11px; }
.slider-row .lead { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; flex: none; color: var(--fg-2); }
.slider-row button.lead { background: var(--chip); color: var(--fg); transition: transform .12s ease, color .15s; }
.slider-row button.lead:active { transform: scale(.92); }
.slider-row button.lead.on { color: var(--danger); }
.slider-row .lead svg { width: 26px; height: 26px; }
.sl-track { position: relative; flex: 1; min-width: 0; }
.sl-track input { display: block; width: 100%; height: 40px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
.sl-track input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--chip); }
.sl-track input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--chip); }
.sl-track input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 14px;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.sl-track input::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.slider-row.muted .sl-track, .slider-row.unknown .sl-track { opacity: .45; }
.sl-val { min-width: 52px; text-align: right; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-tip { position: absolute; bottom: 36px; left: 0; padding: 4px 10px; border-radius: 9px; background: var(--fg); color: var(--bg);
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translate(-50%, 6px); transition: opacity .15s, transform .2s var(--ease); }
.slider-row.drag .sl-tip { opacity: 1; transform: translate(-50%, 0); }
@media (max-height: 720px) {
  .key { min-height: 60px; }
  .slider-row { min-height: 56px; padding-top: 4px; padding-bottom: 4px; }
}
.text-sheet { padding: 6px 16px 8px; }
.text-send { width: 100%; display: flex; gap: 10px; }
.text-send input { flex: 1; min-width: 0; height: 54px; padding: 0 16px; border-radius: 16px; border: 0; outline: none; background: var(--chip); font-size: 17px; }
.text-send .btn { width: auto; }
.hint { font-size: 14px; color: var(--fg-3); text-align: center; max-width: 360px; margin: 10px auto 0; }

/* «Сейчас играет» */
/* один экран без прокрутки: лист — столбик, кадр сверху сжимается первым, управление прижато книзу */
.sheet.np-sheet { display: flex; flex-direction: column; }
.np { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 20px calc(12px + var(--safe-b)); }
.np-head { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: auto; }
/* свободное место — поровну над кадром и под ним */
.np .art { position: relative; flex: 0 1 auto; width: 100%; height: calc((min(100vw, 680px) - 40px) * 9 / 16); min-height: 120px;
  border-radius: 18px; overflow: hidden; background: var(--img-bg); margin-top: 4px; }
.np .art.none { display: none; }
.np .art img { width: 100%; height: 100%; object-fit: cover; }
.np .art .state { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 700; }
.np-titles { flex: none; min-width: 0; }
.np h2 { margin: 16px 0 2px; font-size: 24px; line-height: 1.2; font-weight: 850;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np .sub { font-size: 16px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-ctrl { flex: none; margin-top: auto; padding-top: 8px; }
.seek { position: relative; margin: 10px 0 2px; height: 34px; touch-action: none; }
.seek .track { position: absolute; left: 0; right: 0; top: 14px; height: 6px; border-radius: 3px; background: var(--chip); }
.seek .fill { position: absolute; left: 0; top: 14px; height: 6px; border-radius: 3px; background: var(--fg); width: 0; }
.seek .thumb { position: absolute; top: 6px; width: 22px; height: 22px; margin-left: -11px; border-radius: 11px; background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.35); left: 11px; transition: transform .12s; }
.seek.drag .thumb { transform: scale(1.25); }
.seek .bubble { position: absolute; top: -26px; transform: translateX(-50%); padding: 3px 9px; border-radius: 8px; background: var(--fg);
  color: var(--bg); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .15s; }
.seek.drag .bubble { opacity: 1; }
.times { display: flex; justify-content: space-between; font-size: 14px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.transport { display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; align-items: center; justify-items: center; margin: 10px -8px 6px; }
.transport .round-btn { width: 56px; height: 56px; border-radius: 28px; background: transparent; }
.transport .round-btn:active { background: var(--chip); }
.transport .round-btn svg { width: 30px; height: 30px; }
.transport .play { width: 76px; height: 76px; border-radius: 38px; background: var(--fg); color: var(--bg); }
.transport .play:active { background: var(--fg); }
.transport .play svg { width: 36px; height: 36px; }
.transport .round-btn[disabled] { opacity: .28; }
.np .btn { margin-top: 10px; min-height: 50px; }
.np .btn-row:empty { display: none; }
/* громкость в листе — без своей подложки: строка как остальные */
.np .slider-row.wide { margin-top: 8px; min-height: 52px; padding: 0; background: none; box-shadow: none; }
/* низкий экран (iPhone SE, Safari с панелями): кадр — маленький, рядом с названием */
@media (max-height: 620px) {
  .np-head { flex-direction: row; align-items: center; gap: 14px; margin-top: 4px; }
  .np .art { flex: none; width: 112px; height: 63px; min-height: 0; border-radius: 12px; margin: 0; }
  .np .art .state { left: 4px; bottom: 4px; padding: 2px 6px; border-radius: 6px; font-size: 11px; }
  .np-titles { flex: 1; }
  .np h2 { margin: 0 0 2px; font-size: 20px; }
  .np .sub { font-size: 15px; }
  .transport .play { width: 68px; height: 68px; border-radius: 34px; }
  .np .btn { min-height: 46px; margin-top: 8px; }
}

/* листы снизу. Верх — не выше отступа сверху (--safe-t): в Telegram во весь экран там вырез и плавающие «Закрыть»/«Назад»
   и «⋯» (его safeAreaInset + contentSafeAreaInset, base.css) — высокий лист заезжал под них верхушкой (28.11) */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity .3s ease; }
.scrim.on { opacity: 1; }
/* --kb, --vvh, --vvt — клавиатура и видимая часть (sheets.js): лист над клавиатурой, не выше видимого */
.sheet { position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 41; max-height: min(92dvh, calc(var(--vvh, 100dvh) - var(--safe-t) - 10px)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 24px 24px 0 0; padding-bottom: calc(16px + var(--safe-b));
  transform: translate3d(0, 100%, 0); transition: transform .38s var(--ease), opacity .3s ease;
  /* второй «хвост» того же цвета под листом: пружина при возврате чуть поднимает лист — снизу не видно щели */
  box-shadow: 0 -10px 40px rgba(0,0,0,.25), 0 80px 0 var(--bg); }
.sheet.on { transform: translate3d(0, 0, 0); }
.sheet.full { top: calc(var(--vvt, 0px) + var(--safe-t) + 10px); max-height: none; }
/* лист поверх листа: въезжает справа, нижний уходит влево и гаснет; «‹» — наоборот (как страницы в окне iPhone) */
.sheet.sub { transform: translate3d(100%, 0, 0); }
.sheet.sub.on { transform: translate3d(0, 0, 0); }
.sheet.under, .sheet.on.under, .sheet.sub.on.under { transform: translate3d(-30%, 0, 0); opacity: 0; pointer-events: none; }
/* ручка и заголовок с «‹» и ✕ — закреплены сверху, пока лист листают (цвета листа: содержимое уходит под них); уехало
   под них — тонкая черта, как у шапки листа iPhone. У «Сейчас играет» лист не листается, фон — в цвет обложки */
/* flow-root — отступ ручки внутри шапки, а не над ней (иначе над закреплённой шапкой — щель, в ней видно содержимое) */
.sheet-top { position: sticky; top: 0; z-index: 5; display: flow-root; background: inherit; transition: box-shadow .2s ease; }
.sheet.scrolled > .sheet-top { box-shadow: 0 1px 0 var(--line); }
.sheet:is(.np-sheet, .mn-sheet) > .sheet-top { position: static; background: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--fg-3); opacity: .5; margin: 8px auto 4px; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 20px; }
.sheet-head h3 { flex: 1; margin: 0; font-size: 20px; font-weight: 800; }
.sheet-head.has-back { padding-left: 6px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 0 20px; text-align: left; font-size: 17px; }
.opt:active { background: var(--chip); }
.opt svg { width: 24px; height: 24px; flex: none; color: var(--fg-2); }
.opt .on-mark { margin-left: auto; width: 24px; height: 24px; flex: none; display: grid; place-items: center; }
.opt .on-mark svg { color: var(--link); }
/* разделитель пунктов листа (как в меню) */
.opt-sep { height: 1px; margin: 6px 20px; background: var(--sep, rgba(127, 127, 127, .2)); }
/* подпись справа серым («выключен»), зелёным — «на связи» */
.opt .opt-sub { margin-left: auto; font-size: 15px; color: var(--fg-3); white-space: nowrap; }
.opt .opt-sub:empty { display: none; }
.opt .opt-sub:not(:empty) + .on-mark { margin-left: 12px; }
.opt-sub.on { color: #30d158; }
.opt.danger { color: var(--danger); }
.opt.danger svg { color: var(--danger); }
.opt.link, .opt.link svg { color: var(--link); }
/* «›» у строки, которая что-то открывает */
.opt > svg.go { width: 18px; height: 18px; margin-left: auto; color: var(--fg-3); }
.opt > .opt-val + svg.go { margin-left: -6px; }
/* настройки и их страницы — группы на подложке, как настройки iPhone: серый заголовок над группой, тонкие разделители
   (от текста, если у строк значки), пояснение под группой. Заголовок — заглавными и с отступом над ним, как у iPhone и
   Telegram: строчными того же размера и цвета он сливался с пояснением группы выше («подпись и заголовок одного стиля и
   сливаются»); тот же вид — у мака (OptHead) и iPhone (OptKit) */
.opt-head { padding: 28px 32px 7px; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-3); }
.sheet-top + .opt-head, .sheet-top + div > .opt-head:first-child { padding-top: 12px; }
.opt-note { padding: 7px 32px 0; font-size: 13.5px; line-height: 1.35; color: var(--fg-3); }
.opt-gap { height: 24px; }
/* пояснение ко всему листу — в самом низу, посередине (как подписи внизу настроек iPhone) */
.opt-foot { padding: 14px 32px 0; font-size: 13px; color: var(--fg-3); text-align: center; }
.opt-group { margin: 0 16px; border-radius: 14px; background: var(--bg-elev); overflow: hidden; }
.opt-group:empty { display: none; }
.sheet-top.titled + .opt-group, .sheet-top.titled + div > .opt-group:first-child { margin-top: 8px; }
.opt-group + .opt-group { margin-top: 24px; }
.opt-note + .opt-group { margin-top: 20px; }
.opt-group > .opt { position: relative; min-height: 52px; padding: 0 16px; }
.opt-group > .opt + .opt::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
/* лист «Разделы» (sec-order.js): кружок — показывать ли, ≡ — тянуть; поднятая строка — над соседями, с тенью, они
   уступают ей место */
.so-list { overflow: visible; }
.opt-group > .so-row { padding-right: 4px; touch-action: pan-y; transition: transform .25s var(--ease); }
.so-row:active { background: none; }
/* a row that also opens something (a username's page): lit when pressed, not while dragged */
.so-row.tap:active:not(.lift) { background: var(--chip); }
/* ›, then ≡ right after it (the ≡ box is 48 wide — its own padding is the gap) */
.so-row > svg.go + .so-grip { margin-left: -8px; }
.so-row.still { transition: none; }
.so-row.lift { z-index: 2; transition: none; background: var(--bg-elev); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.so-row.lift.settle { transition: transform .2s var(--ease); }
.so-row.lift::before, .so-row.lift + .so-row::before { opacity: 0; }
.so-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--fg-3); display: grid; place-items: center;
  transition: background .15s, border-color .15s; }
.opt .so-mark svg { width: 16px; height: 16px; color: #fff; opacity: 0; }
.so-mark.on { background: var(--link); border-color: var(--link); }
.opt .so-mark.on svg { opacity: 1; }
.so-mark:disabled { opacity: .4; }
.so-row.off .so-t, .opt.so-row.off > svg { color: var(--fg-3); }
.so-grip { margin-left: auto; width: 48px; height: 48px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.opt .so-grip svg { color: var(--fg-3); }
.so-row.lift .so-grip { cursor: grabbing; }
.opt-group > .opt + .opt:has(> svg:first-child, > .acc-pic:first-child)::before { left: 54px; }
/* имя и под ним подпись (на связи, с какого дня): подпись меняется — ничего не сдвигается */
.opt-two { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 8px 0; }
.opt-two > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-two small { margin-top: 1px; font-size: 14px; color: var(--fg-3); }
.opt-two small.on { color: var(--ok); }
.opt input[switch] { margin-left: auto; flex: none; transform: scale(1.15); accent-color: var(--ok); }
.toggle { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--chip); flex: none; margin-left: auto; transition: background .2s; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.toggle.on { background: var(--ok); }
.toggle.on::after { transform: translateX(20px); }

/* тосты — тёмное стекло, как надписи поверх видео в плеере (раньше белая плашка во всю яркость — «стрёмная»), в обеих темах */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 92px); z-index: 60; transform: translate3d(-50%, 20px, 0);
  max-width: calc(100vw - 40px); padding: 10px 18px; border-radius: 18px; background: rgba(28, 28, 30, .86); color: #fff; font-size: 15px;
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 28px rgba(0, 0, 0, .3);
  font-weight: 600; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
#toast.on { opacity: 1; transform: translate3d(-50%, 0, 0); }

/* экран подключения */
.gate { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 16px; padding: 32px; text-align: center; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
/* по середине, а не помещается — прокрутка с самого верха (justify-content: center срезал верх и низ без прокрутки) */
.gate::before, .gate::after { content: ''; flex: 1 0 0; }
.gate .logo { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); }
.gate h1 { margin: 6px 0 0; font-size: 26px; font-weight: 850; }
.gate p { margin: 0; font-size: 17px; color: var(--fg-2); max-width: 340px; }
.gate .btn { max-width: 320px; }
/* не на связи — кнопки других устройств (телевизор, MacBook) */
.gate-hosts { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; margin-top: 10px; }
.gate-hosts .btn { width: 100%; }
/* первый вход: «Есть «Искра» на другом устройстве?» — три крупных выбора с пояснением; шаги — с «Назад» */
.gate-picks { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; margin-top: 6px; }
.gate-pick { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px 14px 16px; border-radius: 18px; text-align: left;
  background: var(--bg-elev); box-shadow: 0 0 0 1px var(--line); transition: transform .12s ease, background .15s ease, opacity .15s ease; }
.gate-pick:active { transform: scale(.98); }
.gate-pick .gi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--chip); color: var(--fg); }
.gate-pick .gi svg { width: 24px; height: 24px; }
.gate-pick .gt { flex: 1; min-width: 0; }
.gate-pick b { display: block; font-size: 17px; font-weight: 700; color: var(--fg); }
.gate-pick .s { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--fg-3); }
.gate-pick > svg { width: 18px; height: 18px; flex: none; color: var(--fg-3); }
.gate-pick.new .gi { background: var(--accent); color: var(--accent-fg); }
.gate-pick.busy { opacity: .6; pointer-events: none; }
@media (hover: hover) { .gate-pick:hover { background: var(--bg-elev-2); } }
.gate-back { position: absolute; top: calc(var(--safe-t) + 12px); left: 12px; display: flex; align-items: center; gap: 2px; height: 40px;
  padding: 0 16px 0 8px; border-radius: 20px; font-size: 16px; font-weight: 600; color: var(--fg); background: var(--chip); }
.gate-back svg { width: 20px; height: 20px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid var(--chip); border-top-color: var(--fg); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .spinner { width: 22px; height: 22px; border-width: 3px; border-color: rgba(128,128,128,.35); border-top-color: currentColor; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (min-width: 700px) {
  .page > *, .np { max-width: 680px; margin-left: auto; margin-right: auto; }
  .page > .hdr { max-width: none; }
}

/* «На экран „Домой“»: шаги и картинка-подсказка (нижняя панель Safari, нужная кнопка подсвечена) */
.home-hint { padding: 0 20px 8px; font-size: 17px; line-height: 1.4; }
.home-hint p { margin: 4px 0 14px; color: var(--fg-2); }
.hint-step { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; }
.hint-n { width: 28px; height: 28px; border-radius: 14px; background: var(--chip); display: grid; place-items: center; flex: none;
  font-size: 15px; font-weight: 800; }
.hint-key { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 9px; background: var(--chip);
  font-weight: 700; vertical-align: middle; white-space: nowrap; }
.hint-key svg { width: 19px; height: 19px; }
.hint-pic { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 12px; margin: 6px 0 18px; border-radius: 22px;
  background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line); }
.hp-addr { flex: 1; height: 42px; border-radius: 21px; background: var(--chip); display: grid; place-items: center; font-size: 15px; color: var(--fg-2); }
.hp-btn { position: relative; width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center; color: var(--fg-2); flex: none; }
.hp-btn svg { width: 24px; height: 24px; }
.hp-btn.on { color: var(--link); background: var(--chip); }
.hp-btn.on::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--link); animation: hpPulse 1.6s ease-in-out infinite; }
@keyframes hpPulse { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .3; transform: scale(1.12); } }

/* аккаунты в настройках и лист входа */
.opt-val { margin-left: auto; min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 16px; }
.opt-val + svg { width: 18px; height: 18px; margin-left: -6px; color: var(--fg-3); }
.opt-val.sk-val { animation: pulse 1.4s ease-in-out infinite; }
.opt .acc-pic { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.opt .acc-name { display: flex; flex-direction: column; min-width: 0; padding: 8px 0; }
.opt .acc-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .acc-name small { color: var(--fg-3); font-size: 14px; }
.login { padding: 0 20px 16px; font-size: 17px; line-height: 1.4; }
.login p { margin: 4px 0 14px; color: var(--fg-2); }
.login .hint-step { margin: 12px 0; }
.login-code { display: block; width: 100%; margin: 4px 0 6px; padding: 14px 12px 10px; border-radius: 16px; background: var(--chip); text-align: center; }
.login-code[hidden] { display: none; }
.login-code span { display: block; font: 700 34px/1.15 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; }
.login-code small { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--fg-3); }
.login-code small svg { width: 15px; height: 15px; }
.login .btn.primary { margin-top: 18px; }
.login-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; min-height: 24px; font-size: 15px; color: var(--fg-2); }
.login-status .spinner { width: 18px; height: 18px; border-width: 2.5px; flex: none; }
.login-status span { flex: 1; min-width: 0; }
.login-status.err { color: var(--danger); }
.login-status .btn { margin-top: 4px; }
.login-code small.cap { display: block; margin: 0 0 4px; font-size: 13px; }
.login .btn.primary[hidden] { display: none; }
.login-enter { margin-top: 18px; }
.login-enter[hidden] { display: none; }
.login-enter-cap { margin-bottom: 10px; }
.login-enter input { font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; }
.login-enter input::placeholder { font: 400 17px/1 -apple-system, system-ui, sans-serif; letter-spacing: 0; }
.login .login-enter .btn.primary { margin-top: 0; }
.login-enter-err { margin-top: 8px; font-size: 15px; color: var(--danger); }
.login-enter-err:empty { display: none; }
/* вход в MangaLib: поля группой, как в «Настройках» iPhone */
.opt.ml-field { cursor: text; }
.ml-field input { flex: 1; min-width: 0; height: 52px; padding: 0; border: 0; outline: none; background: none; color: inherit; font: inherit; font-size: 17px; }
.ml-field input::placeholder { color: var(--fg-3); }
.login.ml-go { padding-bottom: 4px; }
.login.ml-go .btn.primary { margin-top: 16px; }
.login .btn.primary + .login-code { margin-top: 14px; }
.login-code span { font-size: 26px; }

/* убранное из ряда или списка тает на своём месте (morph в cards.js): не мешает нажатиям и прилипанию прокрутки */
.ghost { pointer-events: none; scroll-snap-align: none !important; z-index: 0; }
/* ---------- «Искра» здесь: плеер в странице. Во весь экран — чёрный фон, видео целиком, управление поверх;
   свёрнутый — окно в углу над вкладками. Кнопки белые на затемнении — и в светлой, и в тёмной теме */
#tabs.three { grid-template-columns: repeat(3, 1fr); }
#player { position: fixed; z-index: 35; background: #000; color: #fff; overflow: hidden; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#player.full { inset: 0; }
/* .p-miniprobe — невидимая заготовка с теми же правилами: по ней жест вниз знает, куда лететь видео (app.js) */
#player.mini, .p-miniprobe { left: auto; top: auto; right: 10px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); width: min(340px, 58vw);
  aspect-ratio: 16 / 9; border-radius: 23px; }
#player.mini { box-shadow: 0 12px 34px rgba(0, 0, 0, .45); cursor: pointer; transform-origin: 0 0; }
.p-miniprobe { position: fixed; visibility: hidden; pointer-events: none; }
/* в кадре страницы ролика (широкий экран) — WatchStage мака: место и размер ставит страница (app.js, dockAt), скругление
   20 — как у кадра. Управление — то же, без «Свернуть», названия (оно под видео), серий и подробностей */
#player.dock { border-radius: 20px; transform-origin: 0 0; box-shadow: 0 10px 48px rgba(0, 0, 0, .45); }
#player.dock .p-screen { position: absolute; inset: 0; }
#player.dock.ui-on .p-ui { opacity: 1; pointer-events: auto; }
#player.dock:not(.ui-on) { cursor: none; }
#player.dock .p-below, #player.dock .p-list, #player.dock .p-top > .p-btn:first-child { display: none; }
#player.dock .p-titles { visibility: hidden; }
#player.dock { --pt: 12px; --pb: 12px; --pr: 12px; --pbx: 18px; }
#player.dock .p-top { padding: var(--pt) var(--pr) 0 12px; }
#player.dock .p-bot { padding: 0 var(--pbx) var(--pb) 18px; }
#player.dock .p-btn.big { width: 64px; height: 64px; border-radius: 32px; }
#player.dock .p-btn.big svg { width: 32px; height: 32px; }
/* пока ищется и грузится — только кружок (название и серия — сверху или под видео), кнопки посередине не лезут на него */
#player:has(.p-load:not([hidden])) .p-mid { visibility: hidden; }
/* подгружается на ходу — кружок на месте «Пауза», как в плеере Apple (раньше кружок просвечивал из-под кнопки) */
#player:has(.p-spin:not([hidden])) .p-mid .p-btn.big { visibility: hidden; }
/* полёт в угол и обратно: под плеером чёрная завеса гаснет, пока видео летит (стоит в странице перед плеером) */
.p-veil { position: fixed; inset: 0; z-index: 35; background: #000; opacity: 0; pointer-events: none; }
body.p-full { overflow: hidden; }
/* плеер во весь экран браузера (requestFullscreen; html.p-fs — player.js fsChange). В Telegram на iPhone WebKit рисует его
   со щелями: по краям (иногда только сверху) проступало, что под плеером (WebKit 264455) — теперь там чёрное: страница
   скрыта, фон чёрный. Плавающих «Закрыть» и «⋯» Telegram в это время нет (видео в своём окне поверх него) — отступы
   только под вырез и полоску «Домой», без запаса Telegram */
html.p-fs, html.p-fs body { background: #000; }
html.p-fs body > :not(#player) { visibility: hidden; }
html.tg.p-fs { --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px); }
/* видео — на весь кадр абсолютно и вписано целиком. Раньше оно стояло в сетке (grid, place-items: center): в узком окне
   Safari считал ширину колонки от высоты окна (528 × 16/9 ≈ 940 px) — картинка растягивалась, прижималась влево
   и обрезалась справа */
#player .p-stage { position: absolute; inset: 0; overflow: hidden; }
#player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; background: #000; }
/* последний кадр, пока поток той же серии ставится заново (player.js freeze) — ровно там же, где видео */
#player .p-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; pointer-events: none; }
#player .p-still[hidden] { display: none; }
#player .p-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  /* как в YouTube: пока видно управление, кадр притушен целиком (белые кнопки видны и на светлом кадре) */
  /* внизу под шкалой — гуще, но только у самого края, плавной кривой (как затемнение у Apple): с середины кадра
     тень выглядела задранной */
  background: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .35)), linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 74%,
    rgba(0, 0, 0, .12) 82%, rgba(0, 0, 0, .34) 90%, rgba(0, 0, 0, .58) 96%, rgba(0, 0, 0, .68));
  opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#player.full.ui-on .p-ui { opacity: 1; pointer-events: auto; }
#player.full:not(.ui-on) { cursor: none; }
/* перемотка клавишами или двойным касанием (seek-on, app.js showSeek) — сбоку кружок с двумя стрелками (.p-seekfx), внизу
   шкала со временем во всю ширину (кнопки у неё убраны совсем — раньше они были невидимы и шкала обрывалась), лёгкая
   тень только у края; нажать на неё нельзя — для этого обычное управление */
#player.seek-on:not(.ui-on):is(.full, .dock) .p-ui { opacity: 1; }
/* seek-out — пока гаснет: вид тот же, иначе на угасании проступало всё управление */
#player:is(.seek-on, .seek-out):not(.ui-on) .p-ui { background: linear-gradient(rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, .2) 90%, rgba(0, 0, 0, .5)); }
#player:is(.seek-on, .seek-out):not(.ui-on) :is(.p-top, .p-mid, .p-skip-row) { visibility: hidden; }
#player:is(.seek-on, .seek-out):not(.ui-on) .p-bar > :not(.p-time, .p-seek) { display: none; }
#player:is(.seek-on, .seek-out):not(.ui-on) .p-seek .knob { transform: scale(.8); }
/* отступы строк плеера — общие с боковыми панелями (колонка «Вместе», «Подробнее») и капсулой говорящего: их шапка — на одной
   линии с верхней строкой плеера, микрофон и поле — с нижней (верхняя — --th: название в две строки, нижняя — 46 px). --pt/--pb — сверху/снизу, --pr — справа сверху */
#player { --th: 52px; --pt: calc(var(--safe-t) + 8px); --pb: calc(var(--safe-b) + 12px); --pr: calc(var(--safe-r) + 10px); --pbx: calc(var(--safe-r) + 14px); }
/* в Telegram выключает видео его «Назад» вверху (telegram.js) — своего ✕ нет */
html.tg #player .p-x { display: none; }
#player .p-top { display: flex; align-items: center; gap: 6px; min-height: calc(var(--pt) + var(--th)); padding: var(--pt) var(--pr) 0 calc(var(--safe-l) + 10px); }
/* название — кнопка «Подробнее»: стрелка «›» сразу за текстом, при наведении — мягкая подложка; дальше пустое место
   (.p-gap) и кнопки справа */
#player .p-titles { flex: 0 1 auto; min-width: 0; padding: 4px 10px 5px; margin-left: -4px; border-radius: 12px; text-align: left;
  transition: background .15s ease; }
#player .p-titles:hover { background: rgba(255, 255, 255, .1); }
#player .p-titles:active { background: rgba(255, 255, 255, .16); }
#player .p-gap { flex: 1; }
#player .p-titles .t { display: flex; align-items: center; gap: 2px; font-size: 17px; font-weight: 700; }
#player .p-titles .t span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player .p-titles .t svg { width: 18px; height: 18px; margin-left: -3px; flex: none; opacity: .6; stroke-width: 2.6; transition: transform .2s ease, opacity .15s ease; }
#player .p-titles:hover .t svg { opacity: 1; transform: translateX(2px); }
/* подробности открыты — стрелка смотрит назад, к ним */
#player.info .p-titles .t svg, #player.info .p-titles:hover .t svg { opacity: 0; transform: none; }
#player .p-titles .s { font-size: 14px; color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player .p-btn { width: 46px; height: 46px; border-radius: 23px; display: grid; place-items: center; flex: none; color: #fff;
  background: transparent; transition: transform .12s ease, background .15s ease; }
#player .p-btn:hover { background: rgba(255, 255, 255, .12); }
#player .p-btn:active { transform: scale(.9); }
#player .p-btn svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
#player .p-btn.big { width: 76px; height: 76px; border-radius: 38px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#player .p-btn.big svg { width: 38px; height: 38px; }
#player .p-btn[hidden] { display: none; }
#player .p-pill { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 18px; flex: none; max-width: 34vw;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; font-weight: 600; }
#player .p-pill svg { width: 18px; height: 18px; flex: none; }
#player .p-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player .p-pill[hidden] { display: none; }
#player .p-mid { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 4vw, 34px); }
#player .p-bot { position: relative; padding: 0 var(--pbx) var(--pb) calc(var(--safe-l) + 14px); }
/* «Пропустить» — над шкалой поверх, а не строкой: строка росла, и «Пауза» посередине подпрыгивала на её полвысоты */
#player .p-skip-row { position: absolute; right: var(--pbx); bottom: 100%; display: flex; justify-content: flex-end; }
#player .p-skip { margin-bottom: 10px; height: 42px; padding: 0 18px; border-radius: 21px; background: #fff; color: #000; font-size: 15px; font-weight: 700; }
#player .p-skip[hidden] { display: none; }
/* высота — по кнопке «во весь экран» (46) и без кнопок: в перемотке (кнопки убраны) шкала стоит там же, где в управлении */
#player .p-bar { display: flex; align-items: center; gap: 12px; min-height: 46px; }
#player .p-time { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .85); min-width: 44px; text-align: center; }
#player .p-seek { position: relative; flex: 1; height: 34px; cursor: pointer; touch-action: none; }
#player .p-seek .track, #player .p-seek .buf, #player .p-seek .fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; }
#player .p-seek .track { right: 0; background: rgba(255, 255, 255, .25); }
#player .p-seek .buf { background: rgba(255, 255, 255, .35); }
/* опенинг и эндинг — оранжевым (как у мака, 80 %), вставки спонсоров — жёлтым; заливка просмотренного — поверх */
#player .p-seek .marks { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; overflow: hidden; pointer-events: none; }
#player .p-seek .mk { position: absolute; top: 0; bottom: 0; background: rgba(255, 159, 10, .85); }
#player .p-seek .mk.sp { background: rgba(255, 214, 10, .85); }
#player .p-seek .fill { background: #fff; }
#player .p-seek .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 7px; background: #fff;
  transition: transform .15s ease; }
#player .p-seek.drag .knob { transform: scale(1.4); }
#player .p-seek .bubble { position: absolute; bottom: 30px; transform: translateX(-50%); padding: 4px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, .75); font-size: 13px; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .15s ease; }
#player .p-seek.drag .bubble { opacity: 1; }
#player .p-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center; background: #000; pointer-events: none; }
#player .p-load[hidden], #player .p-spin[hidden], #player .p-tap[hidden] { display: none; }
#player .spinner { border-color: rgba(255, 255, 255, .2); border-top-color: #fff; }
#player .p-spin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none; }
#player .p-wait { max-width: 300px; padding: 0 16px; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, .75); text-align: center; }
#player .p-wait[hidden] { display: none; }
/* кружок — там же, где «Пауза»: посередине между строками управления (верхняя — --pt + --th, нижняя — шкала 46 и --pb),
   а не посередине экрана: боком на телефоне (и в Telegram — под его кнопками) строки разной высоты, и кружок стоял выше */
#player:is(.full, .dock):not(.below) :is(.p-spin, .p-load) { padding-top: calc(var(--pt) + var(--th)); padding-bottom: calc(var(--pb) + 46px); }
#player .p-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 28px; border-radius: 30px; background: #fff; color: #000; font-size: 19px; font-weight: 700; z-index: 2; }
#player .p-tap svg { width: 26px; height: 26px; }
#player .p-flash { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 22px;
  background: rgba(0, 0, 0, .6); font-size: 17px; font-weight: 700; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
#player .p-flash.on { opacity: 1; }
#player .p-flash.l { left: 22%; }
#player .p-flash.r { left: 78%; }
/* перемотка: кружок со стеклом сбоку (назад — слева, стрелки зеркально), под стрелками — сколько */
#player .p-seekfx { position: absolute; top: 50%; left: 22%; transform: translate(-50%, -50%); width: 92px; height: 92px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none;
  background: rgba(30, 30, 30, .42); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  color: #fff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s ease; }
#player .p-seekfx.r { left: 78%; }
#player .p-seekfx.on { opacity: 1; transition-duration: .08s; }
#player .p-seekfx svg { width: 30px; height: 30px; }
#player .p-seekfx.l svg { transform: scaleX(-1); }
@media (max-width: 719px) { #player .p-seekfx { width: 76px; height: 76px; } #player .p-seekfx svg { width: 26px; height: 26px; } }
/* свёрнутый плеер скруглён по правилу вложенных скруглений: радиус окна = радиус кнопки в углу (38 / 2 = 19) + отступ от
   края (4) = 23, угол окна и круг кнопки идут «параллельно» (с прежними 14 зазор в углу был неровным) */
#player .p-miniui { position: absolute; top: 4px; right: 4px; display: none; gap: 2px; }
#player.mini .p-miniui { display: flex; }
#player.mini .p-miniui .p-btn { width: 38px; height: 38px; background: rgba(0, 0, 0, .55); }
#player.mini .p-miniui .p-btn svg { width: 20px; height: 20px; }
/* Во весь экран плеер листается вниз — и встаёт только в двух положениях (прилипание): видео целиком или панель под
   ним (серии и сезоны; у фильма и ролика — описание и похожее). Экран с видео стоит на месте, панель наезжает снизу,
   видео над ней уменьшается целиком (applyScroll в app.js) и играет дальше */
#player { --pp: 16px; }
/* плеер всегда тёмный — и заглушки картинок под сериями тёмные, как в тёмной теме */
#player { --img-bg: #1d1d1d; }
body.wide #player { --pp: 40px; }
#player.full { overflow-x: hidden; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
#player.full::-webkit-scrollbar { display: none; }
#player .p-snap { position: absolute; left: 0; top: 0; width: 1px; height: 1px; scroll-snap-align: start; pointer-events: none; }
#player .p-screen { position: sticky; top: 0; height: 100%; overflow: hidden; transform-origin: 0 0; }
/* касания по видео — все свои (app.js): панель идёт за пальцем, видео — в угол. Браузер сам не листает: его прилипание
   на iPhone возвращало панель обратно. Чат, подробности и ряды прокручиваются сами — они свои прокручиваемые блоки */
#player.full .p-screen { touch-action: none; }
/* панель ведёт палец или своя анимация — без прилипания браузера (встаёт в два положения сама) */
#player.full.dragging { scroll-snap-type: none; }
#player.mini .p-screen { position: absolute; inset: 0; }
#player .p-frame { position: absolute; inset: 0; transform-origin: 50% 50%; }
#player.below .p-ui { opacity: 0 !important; pointer-events: none !important; }
#player.full.below { cursor: auto; }
#player.full.below .p-frame { cursor: pointer; }
#player.mini .p-below { display: none; }
#player .p-below { position: relative; z-index: 3; scroll-snap-align: end; padding: 20px 0 calc(var(--safe-b) + 26px); background: #0a0a0a;
  border-radius: 22px 22px 0 0; box-shadow: 0 -24px 60px rgba(0, 0, 0, .55); cursor: auto; -webkit-user-select: none; user-select: none; }
#player .p-below:empty { display: none; }
.pb-head { display: flex; align-items: center; gap: 14px; padding: 0 var(--pp) 14px; }
.pb-tt { flex: 1; min-width: 0; }
.pb-tt .t { font-size: 22px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-tt .s { margin-top: 2px; font-size: 14.5px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-up { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px 0 12px; border-radius: 19px; flex: none; font-size: 14px; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .12); transition: background .15s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.pb-up svg { width: 18px; height: 18px; }
.pb-up:hover { background: rgba(255, 255, 255, .2); transform: scale(1.03); }
.pb-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--pp) 6px; scrollbar-width: none; }
.pb-chips:empty { display: none; }
.pb-chips::-webkit-scrollbar { display: none; }
#player .p-below .scroller { gap: 16px; padding: 12px var(--pp) 10px; scroll-padding: 0 var(--pp); scroll-snap-type: none; }
#player .p-below .row-nav.l { left: 10px; }
.p-below .ep-tile { width: 264px; }
.p-below .ep-tile .pic { height: 149px; }
#player .p-below .row { margin: 0; }
#player .p-below .row > .sec-title { margin: 14px var(--pp) 0; }
.pb-desc { max-width: 920px; padding: 0 var(--pp); font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .75); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pb-desc .sk-text { display: block; margin: 6px 0; }
#player .p-list { margin: 0 2px; flex: none; }
#player .p-more { display: none; }
/* у серии с метками опенинга — «⋯» и на широком: в нём автопропуск */
#player .p-more.p-auto:not([hidden]) { display: grid; }
@media (max-width: 719px) {
  .p-below .ep-tile { width: 220px; }
  .p-below .ep-tile .pic { height: 124px; }
  #player .p-list span { display: none; }
  #player .p-list { padding: 0 10px; }
  /* телефон: сверху — свернуть, название, «Подробнее» и «Вместе» значками, «⋯» (озвучка, качество, картинка в картинке,
     AirPlay), закрыть; качество у шкалы не помещается — тоже в «⋯» */
  #player .p-opt { display: none; }
  #player .p-more:not([hidden]) { display: grid; }
  #player .p-together > span { display: none; }
  #player .p-together { padding: 0 10px; }
}
@media (min-width: 900px) {
  #player.mini, .p-miniprobe { bottom: 18px; right: 18px; width: 380px; }
  #player { --pt: 14px; --pb: 20px; --pr: 18px; --pbx: 24px; }
  #player .p-top { padding: var(--pt) var(--pr) 0 18px; }
  #player .p-bot { padding: 0 var(--pbx) var(--pb) 24px; }
}

/* вход «здесь»: код и QR */
.link-box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 420px; }
.link-box h2 { margin: 6px 0 0; font-size: 24px; font-weight: 850; }
.link-box p { margin: 0; font-size: 16px; color: var(--fg-2); }
.link-box .small, .gate .small { font-size: 14px; color: var(--fg-3); max-width: 360px; }
.link-code { font-size: 44px; font-weight: 850; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.link-box .qr { width: 200px; height: 200px; border-radius: 16px; background: #fff; }
.link-send { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.link-send p { margin: 0; font-size: 17px; color: var(--fg-2); }
.code-input { width: 100%; height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-elev-2); color: var(--fg);
  font-size: 32px; font-weight: 800; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; outline: none; }
.code-input:focus { border-color: var(--link); }

/* «Добавить устройство»: QR-код и код с отсчётом (полоска тает, последние 30 с — оранжевым), как войти с телефона и
   компьютера, телевизор — отдельно; «Готово» — кто вошёл */
.add-dev { display: flex; flex-direction: column; gap: 16px; padding: 6px 20px 8px; }
.add-card { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 20px; background: var(--bg-elev);
  box-shadow: 0 0 0 1px var(--line); transition: opacity .2s ease; }
.add-qr { flex: none; width: 148px; height: 148px; padding: 6px; border-radius: 14px; background: #fff; }
.add-qr .qr { display: block; width: 100%; height: 100%; }
.add-code { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.add-cap { font-size: 14px; color: var(--fg-3); }
.add-code { container-type: inline-size; }
.add-code .link-code { font-size: min(38px, 21cqi); line-height: 1.05; white-space: nowrap; letter-spacing: .03em; }
.add-bar { height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.add-bar i { display: block; height: 100%; border-radius: 2px; background: var(--link); transform-origin: left center; transition: transform .25s linear, background .3s ease; }
.add-left { font-size: 14px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.add-left.soon { color: var(--warn); }
.add-card:has(.add-left.soon) .add-bar i { background: var(--warn); }
.add-card.wait .add-qr, .add-card.wait .link-code { opacity: .18; animation: pulse 1.4s ease-in-out infinite; }
.add-card.off .add-qr, .add-card.off .link-code, .add-card.off .add-bar { opacity: .25; }
.add-msg { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--fg-2); }
.add-msg:empty { display: none; }
.add-msg .btn { min-height: 46px; }
.add-step, .add-tv { display: flex; gap: 14px; align-items: flex-start; }
.add-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--chip); color: var(--fg-2); }
.add-ic svg { width: 21px; height: 21px; }
.add-step > div > b, .add-tv > div > b { display: block; font-size: 16px; font-weight: 700; }
.add-step > div > span, .add-tv > div > span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--fg-3); }
.add-step em { font-style: normal; font-weight: 650; color: var(--fg); }
.add-tv { padding-top: 16px; border-top: 1px solid var(--line); }
.add-tv .add-scan { margin-top: 12px; min-height: 46px; }
.add-lead { margin: 0; font-size: 16px; line-height: 1.4; color: var(--fg-2); }
.add-done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px 0 4px; text-align: center; }
.add-ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.add-ok svg { width: 34px; height: 34px; }
.add-done h2 { margin: 2px 0 0; font-size: 24px; font-weight: 850; }
.add-done p { margin: 0 0 6px; max-width: 360px; font-size: 16px; line-height: 1.4; color: var(--fg-2); }
@media (max-width: 374px) { .add-card { flex-direction: column; align-items: stretch; } .add-qr { align-self: center; } }
body.wide .add-card { background: rgba(255, 255, 255, .04); }

/* вход кодом: шесть клеток (по три), под ними — одно поле; шестая цифра — проверка; не подошёл — клетки вздрагивают */
.cc-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 380px; }
.cc { position: relative; display: block; cursor: text; transition: opacity .15s ease; }
.cc-cells { display: flex; align-items: center; gap: 8px; }
.cc-cell { width: min(48px, calc((100vw - 64px - 56px) / 6)); height: 60px; border-radius: 13px; display: grid; place-items: center;
  font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--fg); background: var(--bg-elev);
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s ease; }
.cc-cell.cur { box-shadow: 0 0 0 2px var(--link); }
.cc-cell.cur:empty::after { content: ''; width: 2px; height: 28px; border-radius: 1px; background: var(--link); animation: ccBlink 1s steps(1) infinite; }
.cc-gap { width: 8px; height: 2px; border-radius: 1px; background: var(--fg-3); opacity: .5; }
.cc-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: none; background: transparent;
  font-size: 16px; color: transparent; -webkit-text-fill-color: transparent; caret-color: transparent; }
.cc-input::selection { background: transparent; }
.cc.busy { opacity: .55; pointer-events: none; }
.cc.bad .cc-cells { animation: ccShake .42s ease; }
.cc.bad .cc-cell { box-shadow: 0 0 0 1.5px var(--danger); }
.cc-msg { min-height: 20px; max-width: 340px; font-size: 15px; line-height: 1.35; color: var(--fg-3); }
.cc.bad + .cc-msg { color: var(--danger); }
@keyframes ccBlink { 50% { opacity: 0; } }
@keyframes ccShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.gate .join-h { margin-top: 30px; }
.gate .join-tv { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- широкий экран (body.wide — от 720 px и не телефон боком) — как «Искра» на маке (ContentView, CinemaUI):
   плашка разделов слева — стеклянная, с отступом 8 и скруглением 20; раздел — на всё окно: герой и уехавшие вбок
   карточки рядов уходят под плашку и видны сквозь неё размыто. Цвета — всегда тёмные, как кинотеатр мака */
#side { display: none; }
.wide-title { display: none; }
body.wide {
  --side-w: 232px; --side-gap: 0px; --pad: 40px;
  /* --inset — край плашки с зазором (до него раздел под плашкой), --l — левый край содержимого (Cinema.side от плашки);
     у блоков страницы свои поля 16 — поле самой страницы на 16 меньше */
  --inset: calc(var(--side-w) + var(--side-gap)); --l: calc(var(--inset) + var(--pad));
  --bp: calc(var(--l) - 16px); --rp: calc(var(--pad) - 16px);
  --bg: #0a0a0a; --bg-elev: #171717; --bg-elev-2: #232323; --fg: #f5f5f5; --fg-2: #b8b8b8; --fg-3: #8a8a8a;
  --line: rgba(255, 255, 255, .09); --chip: rgba(255, 255, 255, .09); --chip-on-bg: #f5f5f5; --chip-on-fg: #111111;
  --accent: #f5f5f5; --accent-fg: #0a0a0a; --link: #0a84ff; --ok: #30d158; --warn: #ffb340; --warn-bg: rgba(255, 179, 64, .12);
  --danger: #ff5a4f; --bar: rgba(10, 10, 10, .9); --bar-solid: #0a0a0a; --scrim: rgba(0, 0, 0, .55); --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  --sk: rgba(255, 255, 255, .07); --img-bg: #1d1d1d; --pad-press: #303030;
  color-scheme: dark;
}
@media (max-width: 999px) { body.wide { --side-w: 208px; --pad: 28px; } }

/* панель разделов — вплотную к краю окна на всю высоту (не плашкой-островом, как на маке): полупрозрачная, с
   размытием — уехавшие под неё карточки и герой видны размыто; от раздела её отделяет тонкая линия */
body.wide #side { display: flex; flex-direction: column; gap: 3px; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--side-w); z-index: 21; padding: 16px 12px 12px; overflow-y: auto; scrollbar-width: none;
  background: rgba(10, 10, 10, .78); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .07); }
body.wide #side::-webkit-scrollbar { display: none; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 12px; font-size: 16px; font-weight: 750; letter-spacing: -.2px; }
.side-brand img { width: 26px; height: 26px; border-radius: 7px; }
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border-radius: 9px; flex: none;
  background: rgba(255, 255, 255, .05); color: var(--fg-2); font-size: 14px; text-align: left; transition: background .12s ease; }
.side-search svg { width: 17px; height: 17px; flex: none; }
.side-search span { flex: 1; }
.side-search kbd { font: 500 12px/1 inherit; color: var(--fg-3); }
.side-search:hover { background: rgba(255, 255, 255, .08); }
.side-search.on { background: rgba(255, 255, 255, .12); color: var(--fg); }
.side-group { padding: 12px 10px 2px; font-size: 11.5px; font-weight: 600; color: var(--fg-3); }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; flex: none;
  font-size: 14.5px; font-weight: 500; color: var(--fg); text-align: left; transition: background .12s ease; }
.side-item svg { width: 19px; height: 19px; flex: none; color: var(--fg-2); }
.side-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item:hover { background: rgba(255, 255, 255, .05); }
/* «Изменить» у заголовка «Смотреть» — порядок и показ разделов; с мышью — проявляется, когда она над панелью */
.side-group:has(.side-edit) { display: flex; align-items: baseline; padding-right: 6px; }
.side-edit { margin-left: auto; padding: 2px 4px; font-size: 12px; font-weight: 600; color: var(--link); transition: opacity .15s ease; }
.side-edit:hover { text-decoration: underline; }
@media (hover: hover) { .side-edit { opacity: 0; } #side:hover .side-edit, .side-edit:focus-visible { opacity: 1; } }
/* выбранный — подложкой и ярким значком, шрифт тот же (жирный выбранный «прыгал» шириной и спорил с заголовками) */
.side-item.on { background: rgba(255, 255, 255, .1); }
.side-item.on svg { color: var(--fg); }
.side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 3px; }

/* раздел — на всё окно; содержимое страниц — от края плашки с полем 40 (Cinema.side) */
body.wide #tabs { display: none; }
body.wide #views { left: 0; }
body.wide .page, body.wide .view.has-mini .page { padding-bottom: 48px; }
body.wide .page > * { max-width: none; margin-left: 0; margin-right: 0; }
body.wide .page > .body { padding: 0 var(--rp) 0 var(--bp); }
body.wide .page > .hdr { padding-left: calc(var(--l) - 8px); padding-right: var(--pad); min-height: 72px;
  background: rgba(10, 10, 10, .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.wide .page > .topbar { padding-left: var(--bp); padding-right: var(--rp); }
body.wide .home-page > .topbar { display: none; }
body.wide .wide-title { display: block; margin: 26px 16px 4px; font-size: 32px; font-weight: 850; letter-spacing: -.5px; }
/* листов снизу на широком экране нет: выбор из вариантов — меню у кнопки (popMenu), остальное (настройки, вход,
   устройства) — окно посреди окна браузера (не раздела: правее панели оно выглядело сдвинутым), как окна мака: проявляется с лёгким приближением, Esc и щелчок мимо — закрыть */
body.wide .sheet { left: 50%; right: auto; top: 50%; bottom: auto;
  width: min(520px, calc(100% - 48px)); max-height: min(760px, calc(100dvh - 48px - 2 * var(--safe-t))); padding-bottom: 14px;
  border-radius: 18px; background: #171717; opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.95);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1), opacity .2s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 90px rgba(0, 0, 0, .6); }
body.wide .sheet.on { opacity: 1; transform: translate3d(-50%, -50%, 0); }
/* окно посередине — с отступом сверху (Telegram во весь экран на iPad: его кнопки) и столько же снизу */
body.wide .sheet.full { top: 50%; height: min(760px, calc(100dvh - 48px - 2 * var(--safe-t))); }
body.wide .grabber { display: none; }
body.wide .sheet-head { padding: 14px 10px 6px 22px; }
body.wide .sheet .opt { min-height: 48px; font-size: 16px; border-radius: 10px; margin: 0 8px; width: calc(100% - 16px); padding: 0 14px; }
body.wide .sheet .opt:hover { background: rgba(255, 255, 255, .06); }
body.wide .sheet.sub { transform: translate3d(calc(-50% + 48px), -50%, 0); }
body.wide .sheet.sub.on { transform: translate3d(-50%, -50%, 0); }
body.wide .sheet.under, body.wide .sheet.on.under, body.wide .sheet.sub.on.under { opacity: 0; transform: translate3d(calc(-50% - 48px), -50%, 0); pointer-events: none; }
body.wide .opt-head { padding: 22px 28px 6px; font-size: 12px; }
body.wide .opt-note { padding: 6px 28px 0; font-size: 12.5px; }
body.wide .opt-group { margin-left: 14px; margin-right: 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
body.wide .sheet .opt-group > .opt { margin: 0; width: 100%; border-radius: 0; padding: 0 14px; min-height: 46px; }
body.wide .opt-group > .opt + .opt::before { left: 14px; }
body.wide .opt-group > .opt + .opt:has(> svg:first-child, > .acc-pic:first-child)::before { left: 52px; }
body.wide .opt-two small { font-size: 13px; }
body.wide .scrim { background: rgba(0, 0, 0, .5); }
body.wide #mini { left: calc(var(--inset) + 16px); right: auto; width: min(560px, 100% - var(--inset) - 32px); bottom: 16px; }
body.wide #toast { left: 50%; bottom: 40px; }
body.wide .hero { max-height: 62vh; aspect-ratio: 21 / 9; }
/* «Назад» вложенных страниц — стеклянный круг, как GlassBackButton мака */
body.wide .hdr .back, .glass-back { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
body.wide .hdr .back { margin-left: 0; margin-right: 8px; }
body.wide .hdr .back svg, .glass-back svg { width: 19px; height: 19px; }
body.wide .hdr .back:hover, .glass-back:hover { transform: scale(1.06); background: rgba(0, 0, 0, .58); }
body.wide .hdr .back:active, .glass-back:active { transform: scale(.94); }

/* страницы поверх раздела — проявляются на месте с лёгким приближением (Cinema.pageTransition), без выезда сбоку */
body.wide .page { transition: transform .5s cubic-bezier(.2, .9, .3, 1.02), opacity .28s ease; }
body.wide .page.enter { transform: scale(.97); opacity: 0; }
body.wide .page.under { transform: none; }
body.wide .page.under::after { display: none; }

/* --- заготовки — как .skeleton() мака: плашки своего размера и бегущий блик (у всех в такт) */
body.wide .sk, body.wide .sk-text, body.wide .sk-btn { background-color: var(--sk);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .09), rgba(255, 255, 255, 0));
  background-repeat: no-repeat; background-size: min(320px, 90%) 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: -320px 0; } to { background-position: calc(100% + 320px) 0; } }

/* --- герой раздела — как HeroCarousel мака: высота 68 % окна (460…680), кадр во всю ширину (и под плашкой) */
.hero-box { display: none; }
body.wide .hero-box { display: block; margin: 0 calc(-1 * var(--rp)) 0 calc(-1 * var(--bp)); }
body.wide .hero-box:not(:empty) + .wide-title { display: none; }
.mhero { position: relative; height: clamp(460px, 68vh, 680px); overflow: hidden; background: var(--bg); color: #fff; }
/* the frame opens the card (hero.js) */
.mhero:not(.sk) { cursor: pointer; }
.mh-bg { position: absolute; inset: 0; }
.mh-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
/* затемнение — от края плашки, как у мака от края раздела; под плашкой — почти сплошное */
.mh-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0, rgba(10, 10, 10, .92) var(--inset), rgba(10, 10, 10, .85) calc(var(--inset) + (100% - var(--inset)) * .3),
      rgba(10, 10, 10, .25) calc(var(--inset) + (100% - var(--inset)) * .62), rgba(10, 10, 10, 0) calc(var(--inset) + (100% - var(--inset)) * .8)),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 10, 10, .6) 22%, rgba(10, 10, 10, 0) 50%),
    linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 50%); }
.mh-info { position: absolute; left: calc(var(--l) + 8px); bottom: 54px; width: min(780px, calc(100% - var(--l) - 8px - var(--bars-w, 352px) - var(--pad) - 32px)); }
.mh-in { display: flex; flex-direction: column; gap: 12px; }
.mh-in.out { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; }
.mh-label { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--link); }
.mh-title { font-size: 52px; line-height: 1.05; font-weight: 850; letter-spacing: -.8px; text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-title.long { font-size: 40px; }
.mh-meta, .tp-meta { font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-meta .sc, .tp-meta .sc { font-weight: 700; }
.sc.good { color: #4dd966; } .sc.mid { color: #d1d1d1; } .sc.bad { color: #ff6b5e; }
.mh-meta i, .tp-meta i { font-style: normal; color: rgba(255, 255, 255, .35); margin: 0 8px; }
.mh-desc { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .72); max-width: 580px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mhero.sk .mh-desc .sk-text { display: block; margin: 6px 0; }
.mh-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
/* капсулы и круги кинотеатра (CinemaButtonStyle, CinemaCircleStyle): главная — белая, остальные — полупрозрачные */
.mh-btn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 22px; border-radius: 21px; font-size: 15px; font-weight: 600; flex: none;
  color: #fff; background: rgba(255, 255, 255, .14); white-space: nowrap; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
.mh-btn svg { width: 18px; height: 18px; flex: none; }
.mh-btn:hover { background: rgba(255, 255, 255, .24); transform: scale(1.03); }
.mh-btn:active { transform: scale(.96); transition-duration: .1s; }
.mh-btn.primary { color: #000; background: rgba(255, 255, 255, .94); }
.mh-btn.primary:hover { background: #fff; }
.mh-btn[disabled] { opacity: .45; pointer-events: none; }
.mh-btn .spinner { width: 16px; height: 16px; border-width: 2.5px; border-color: rgba(0, 0, 0, .2); border-top-color: #000; }
.mh-circle { width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .16); flex: none;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
.mh-circle svg { width: 18px; height: 18px; }
.mh-circle:hover { background: rgba(255, 255, 255, .28); transform: scale(1.06); }
.mh-circle:active { transform: scale(.92); transition-duration: .1s; }
/* полоски слайдов со стрелками — внизу справа; узко — под сведениями слева (класс narrow ставит герой) */
.mh-nav { position: absolute; right: calc(var(--pad) + 8px); bottom: 52px; display: flex; align-items: center; gap: 6px; }
.mhero.one .mh-nav { display: none; }
.mhero.narrow .mh-info { width: calc(100% - var(--l) - 8px - var(--pad)); bottom: 88px; }
.mhero.narrow .mh-nav { left: calc(var(--l) + 8px); right: auto; bottom: 28px; }
.mh-arrow { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: #fff; margin: 0 8px; flex: none;
  background: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 16px rgba(0, 0, 0, .35);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
.mh-arrow svg { width: 16px; height: 16px; }
.mh-arrow:hover { background: rgba(255, 255, 255, .2); transform: scale(1.07); }
.mh-arrow:active { transform: scale(.94); transition-duration: .1s; }
.mh-bars { display: flex; gap: 6px; }
/* полоска — капсула 34×4; заполненность ставит герой каждый кадр. На паузе посреди текущей — ровный вырез и значок */
@property --cut { syntax: '<length>'; inherits: false; initial-value: 0px; }
.mh-bar { position: relative; width: 34px; height: 20px; flex: none; }
.mh-bar::before, .mh-bar i { content: ''; position: absolute; left: 0; top: 8px; height: 4px; border-radius: 2px; --cut: 0px; transition: --cut .2s ease-out;
  -webkit-mask: linear-gradient(90deg, #000 calc(17px - var(--cut) / 2), transparent 0, transparent calc(17px + var(--cut) / 2), #000 0) 0 0 / 34px 100% no-repeat;
  mask: linear-gradient(90deg, #000 calc(17px - var(--cut) / 2), transparent 0, transparent calc(17px + var(--cut) / 2), #000 0) 0 0 / 34px 100% no-repeat; }
.mh-bar::before { width: 34px; background: rgba(255, 255, 255, .28); }
.mh-bar i { width: 34px; background: rgba(255, 255, 255, .95); transform: scaleX(0); transform-origin: 0 50%; }
.mhero.paused .mh-bar.cur::before, .mhero.paused .mh-bar.cur i { --cut: 13px; }
.mh-bar b { position: absolute; left: 50%; top: 50%; width: 7px; height: 8px; border-left: 2.5px solid #fff; border-right: 2.5px solid #fff;
  opacity: 0; transform: translate(-50%, -50%) scale(.5); transition: opacity .2s ease-out, transform .2s ease-out; }
.mhero.paused .mh-bar.cur b { opacity: .95; transform: translate(-50%, -50%) scale(1); }
.mhero .sk-btn { background-color: var(--sk) !important; }


/* --- телефон: тот же герой карточкой (светлая тема — затемнение своё, не цвет страницы), листать — пальцем вбок (как
   карусель приложения на iPhone).
   Corners are concentric (Apple's rule: inner radius = outer radius − inset): the card 28, the buttons 14 at 14 from
   its edges — their curves run along the card's; the buttons are rounded rectangles as the phone's other buttons
   (.btn), not pills. The slide bars — at the top, as Stories (28.11: the pill, the circle and the bars right under them
   met at the bottom corners — «визуально ранит глаз… выглядит как ии-слоп»), and by the same rule: their round ends
   (1.5) at 28 − 1.5 from the edges — narrower and lower, concentric with the corners («Rвн = pad + Rнутр») */
body:not(.wide) .hero-box { display: block; margin: 4px 16px 6px; }
body:not(.wide) .mhero { --mr: 28px; --mi: 14px; height: clamp(380px, 58vh, 520px); border-radius: var(--mr); background: #141414; isolation: isolate; }
body:not(.wide) .mh-shade { background: linear-gradient(0deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .55) 34%, rgba(0, 0, 0, 0) 62%),
  linear-gradient(180deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 22%); }
body:not(.wide) .mh-info, body:not(.wide) .mhero.narrow .mh-info { left: var(--mi); right: var(--mi); width: auto; bottom: var(--mi); }
body:not(.wide) .mh-in > :not(.mh-actions) { padding: 0 2px; }
body:not(.wide) .mh-in { gap: 8px; }
body:not(.wide) .mh-label { font-size: 11px; }
body:not(.wide) .mh-title { font-size: 28px; letter-spacing: -.4px; }
body:not(.wide) .mh-title.long { font-size: 24px; }
body:not(.wide) .mh-meta { font-size: 13px; }
body:not(.wide) .mh-desc { display: none; }
body:not(.wide) .mh-actions { gap: 8px; margin-top: 6px; }
body:not(.wide) .mh-actions .mh-btn, body:not(.wide) .mh-actions .mh-circle { height: 46px; border-radius: calc(var(--mr) - var(--mi)); }
body:not(.wide) .mh-actions .mh-circle { width: 46px; }
body:not(.wide) .mh-actions .mh-btn.primary { flex: 1; justify-content: center; font-size: 16px; }
body:not(.wide) .mh-actions .mh-btn:not(.primary) { display: none; }
/* the bar's line is 3 high (radius 1.5) at 3 inside its 10-high touch box */
body:not(.wide) .mh-nav, body:not(.wide) .mhero.narrow .mh-nav { left: calc(var(--mr) - 1.5px); right: calc(var(--mr) - 1.5px); top: calc(var(--mr) - 1.5px - 3px); bottom: auto; }
body:not(.wide) .mh-arrow { display: none; }
body:not(.wide) .mh-bars { flex: 1; gap: 5px; }
/* полоски — на всю ширину поровну; вырез паузы (маска на 34px) телефону не нужен */
body:not(.wide) .mh-bar { flex: 1; width: auto; height: 10px; }
body:not(.wide) .mh-bar::before, body:not(.wide) .mh-bar i { width: 100%; top: 3px; height: 3px; border-radius: 1.5px; -webkit-mask: none; mask: none; }
body:not(.wide) .mh-bar b { display: none; }
/* --- карточки и ряды — как в кинотеатре мака (CinemaPosterCard 168×252, CinemaWideCard 300×169, CinemaShelf): ряд
   с шагом 18 и запасом сверху и снизу под подъём; ряд — во всю ширину окна, уехавшие влево карточки уходят под плашку;
   наведение — постер растёт от нижнего края на 4,5 % (широкая — на 3 %), белая рамка 3 и глубокая тень */
.pplay { display: none; }
.row-box { position: relative; }
.row-nav { display: none; }
body.wide .card { width: 168px; }
body.wide .card.wide { width: 300px; }
body.wide .card.avatar { width: 120px; }
body.wide .scroller { gap: 18px; padding: 16px var(--pad) 18px var(--l); scroll-padding: 0 var(--pad) 0 var(--l); scroll-snap-type: none; }
/* ряды поиска «по экрану» — на широком экране те же карточки, что везде (постер 168, кадр 300) */
body.wide .scroller.fit { grid-auto-columns: 168px; }
body.wide .scroller.fit.two { grid-auto-columns: 300px; }
body.wide .row { margin: 0 calc(-1 * var(--rp)) 0 calc(-1 * var(--bp)); }
body.wide .row > .sec-title { margin: 30px var(--pad) 0 var(--l); }
body.wide .sec-title { margin: 30px 16px 0; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
body.wide .sec-link { width: auto; }
body.wide .sec-title .sk-text { width: 220px !important; }
/* two lines like on the phone: long names were cut after a few words (28.11); still longer — the full one on hover (cards.js) */
body.wide .card .t { margin-top: 9px; font-size: 15.5px; }
body.wide .card .s { font-size: 12.5px; color: rgba(255, 255, 255, .5); }
body.wide .card .pic { box-shadow: 0 4px 16px rgba(0, 0, 0, .3); transform-origin: 50% 100%;
  transition: transform .32s cubic-bezier(.34, 1.36, .64, 1), box-shadow .3s ease; }
/* рамка наведения — над затемнением и подписями «Продолжить» (z 1–2): под ними низ рамки выходил грязно-серым */
body.wide .card .pic::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0); transition: box-shadow .2s ease; }
body.wide .card.wide .pplay { display: grid; place-items: center; position: absolute; left: 50%; top: 50%; width: 50px; height: 50px;
  margin: -25px 0 0 -25px; border-radius: 25px; background: rgba(0, 0, 0, .45); color: #fff; opacity: 0; transition: opacity .2s ease; }
body.wide .card.wide .pplay svg { width: 22px; height: 22px; }
body.wide .card.cont .pplay { background: rgba(255, 255, 255, .25); width: 48px; height: 48px; margin: -24px 0 0 -24px; }
@media (hover: hover) {
  body.wide .card:hover .pic { transform: scale(1.045); box-shadow: 0 10px 36px rgba(0, 0, 0, .6); }
  body.wide .card.wide:hover .pic { transform: scale(1.03); }
  body.wide .card:hover .pic::after { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9); }
  body.wide .card.wide:hover .pplay { opacity: 1; }
  body.wide .card.avatar:hover .pic { transform: scale(1.06); }
}
/* «Продолжить просмотр» — как CinemaWideCard: название, серия и полоска поверх кадра, растёт вся карточка. Одна на
   телефоне и на широком (01.11: на телефоне название было под кадром — «почему карточки иначе на моб выглядят») */
.card.cont { position: relative; }
body.wide .card.cont { transform-origin: 50% 100%; transition: transform .32s cubic-bezier(.34, 1.36, .64, 1); }
body.wide .card.cont .pic { transition: box-shadow .3s ease; }
.card.cont .pic::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .85)); }
.card.cont .t, .card.cont .s { position: absolute; left: 12px; right: 12px; z-index: 2; margin: 0; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.card.cont .t { bottom: 34px; font-size: 15.5px; font-weight: 700; }
.card.cont .s { bottom: 15px; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.card.cont .prog { left: 12px; right: 12px; bottom: 8px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); z-index: 2; }
.card.cont .prog i { background: #fff; border-radius: 2px; }
.card.cont .noimg { display: none; }
/* картинка, затемнение, название и серия — своими слоями с самого начала, как полоска (blocks.css, «что поверх кадра»):
   Safari на iPhone, листая ряд, на время проявления картинки въехавшей справа карточки выносил её в отдельный слой и
   перекладывал то, что над ней, — текст и полоска на миг пропадали (28.11). Слои постоянные — перекладывать нечего */
.card.cont .pic img, .card.cont .pic::before, .card.cont > :is(.t, .s) { transform: translateZ(0); }
@media (hover: hover) {
  body.wide .card.cont:hover { transform: scale(1.03); }
  body.wide .card.cont:hover .pic { transform: none; }
}
/* стрелки ряда — круги 44 у краёв видимой части (CinemaCircleStyle), при наведении на ряд и только туда, куда можно листнуть */
body.wide .row-nav { display: grid; place-items: center; position: absolute; top: calc(50% - 22px - 15px); width: 44px; height: 44px;
  border-radius: 22px; z-index: 3; color: #fff; background: rgba(48, 48, 48, .82);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .25s cubic-bezier(.34, 1.36, .64, 1), background .15s ease; }
body.wide .row-nav svg { width: 18px; height: 18px; }
body.wide .row-nav svg path { stroke-width: 2.6; }
body.wide .row-nav.l { left: calc(var(--inset) + 10px); }
body.wide .row-nav.r { right: 10px; }
body.wide .row-nav:hover { background: rgba(72, 72, 72, .9); transform: scale(1.06); }
body.wide .row-box.can-l:hover .row-nav.l, body.wide .row-box.can-r:hover .row-nav.r { opacity: 1; pointer-events: auto; }

/* --- карточка тайтла на широком экране — как FilmDetailView мака: кадр во всё окно, сведения внизу слева, кнопки;
   ниже — сезоны капсулами и серии кадрами, «В ролях», связанное. «Назад» — стеклянный круг в углу, не уезжает */
body.wide .page.tp > .hdr { display: none; }
body.wide .page.tp > .body { padding: 0; }
body.wide .page.tp .row { margin: 0; }
body.wide .page.tp .banner { margin: 16px var(--pad) 0 var(--l); }
.tp-backbar { position: sticky; top: 0; height: 0; z-index: 6; }
.tp-backbar .glass-back { position: absolute; left: calc(var(--l) - 8px); top: 24px; }
.tp-head { position: relative; height: clamp(520px, 80vh, 760px); overflow: hidden; background: var(--bg); }
.tp-bg { position: absolute; inset: 0; }
.tp-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.tp-bg img.ok { opacity: 1; }
.tp-bg.dim img.ok { opacity: .35; }
.tp-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0, rgba(10, 10, 10, .93) var(--inset), rgba(10, 10, 10, .88) calc(var(--inset) + (100% - var(--inset)) * .3),
      rgba(10, 10, 10, .2) calc(var(--inset) + (100% - var(--inset)) * .66), rgba(10, 10, 10, 0) calc(var(--inset) + (100% - var(--inset)) * .85)),
    linear-gradient(0deg, var(--bg) 0, rgba(10, 10, 10, .55) 25%, rgba(10, 10, 10, 0) 55%); }
.tp-poster { position: absolute; right: calc(var(--pad) + 30px); top: 50%; width: 250px; height: 375px; margin-top: -187px; border-radius: 16px;
  overflow: hidden; background: var(--img-bg); box-shadow: 0 16px 60px rgba(0, 0, 0, .6); }
.tp-poster img { width: 100%; height: 100%; object-fit: cover; }
.tp-info { position: absolute; left: calc(var(--l) + 8px); bottom: 36px; width: min(760px, calc(100% - var(--l) - 8px - var(--pad)));
  display: flex; flex-direction: column; gap: 12px; color: #fff; }
.tp-info.has-poster { width: min(760px, calc(100% - var(--l) - 8px - var(--pad) - 320px)); }
.tp-title { margin: 0; font-size: 56px; line-height: 1.05; font-weight: 850; letter-spacing: -.8px; text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-title.long { font-size: 42px; }
.tp-alt { font-size: 16px; color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-meta { color: rgba(255, 255, 255, .82); }
.tp-tag { font-size: 15px; font-style: italic; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-desc { max-width: 640px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .78);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tp-desc .sk-text { display: block; margin: 5px 0; }
.tp-btns { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.tp-status { display: flex; align-items: center; gap: 14px; font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .55); }
.tp-status span { display: inline-flex; align-items: center; gap: 5px; }
.tp-status svg { width: 15px; height: 15px; }
.tp-status .warn { color: #ff9f0a; }
.tp-seasons { padding-top: 8px; }
.tp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--pad) 0 var(--l); scrollbar-width: none; }
.tp-chips::-webkit-scrollbar { display: none; }
.tp-chip { flex: none; height: 36px; padding: 0 18px; border-radius: 18px; font-size: 14px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .12); transition: background .15s ease, color .15s ease; }
.tp-chip:hover { background: rgba(255, 255, 255, .2); }
.tp-chip.on { background: #fff; color: #000; }
.tp-stitle { margin: 14px var(--pad) 0 var(--l); font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.tp-stitle + .row-box .scroller { padding-top: 12px; }
.tp-err { margin: 10px var(--pad) 0 var(--l); color: rgba(255, 255, 255, .5); }
/* серия — EpisodeTile мака: кадр 300×169 с номером, отметкой и полоской, название, подпись */
.ep-tile { display: flex; flex-direction: column; width: 300px; text-align: left; }
.ep-tile .pic { position: relative; width: 100%; height: 169px; border-radius: 12px; overflow: hidden; background: var(--img-bg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.34, 1.36, .64, 1), box-shadow .3s ease; }
.ep-tile .pic::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .7)); }
.ep-tile .pic::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0); transition: box-shadow .2s ease; }
.ep-tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.ep-tile .pic .ep-bg { filter: brightness(.42) saturate(1.15); transform: scale(1.08); }
.ep-tile .n { position: absolute; left: 10px; bottom: 10px; z-index: 2; font-size: 12.5px; font-weight: 700; color: #fff; }
/* «просмотрена» — не .ok: так помечается загрузившаяся картинка (img()), и правило уводило её влево-вверх на 10×9 */
.ep-tile .ep-ok { position: absolute; right: 7px; bottom: 7px; z-index: 2; width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center;
  background: #fff; color: #000; }
.ep-tile .ep-ok svg { width: 12px; height: 12px; }
.ep-tile .ep-ok svg path { stroke-width: 3; }
.ep-tile .bar { position: absolute; left: 10px; right: 10px; bottom: 4px; z-index: 2; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.ep-tile .bar i { display: block; height: 100%; background: #fff; }
/* пометки — капсулы одной высоты: «Сейчас» («скоро», «нет видео») слева вверху, оценка с сайтом — справа вверху.
   Скругления вложены, как у Apple: радиус кадра (16) = радиус капсулы (10) + её отступ от края (6) — угол капсулы идёт
   параллельно углу кадра (с прежними 12 и 8 капсула в углу стояла криво) */
.ep-tile .pic { border-radius: 16px; }
.ep-tile .tags { left: 6px; top: 6px; }
.ep-tile .tags.r { left: auto; right: 6px; }
.ep-tile .bdg, .ep-tile .tags .badge { height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; line-height: 20px; font-weight: 700;
  background: rgba(0, 0, 0, .75); white-space: nowrap; }
.ep-tile .bdg { color: #fff; }
.ep-tile .bdg.now { background: #fff; color: #000; }
.ep-tile .pplay { display: grid; place-items: center; position: absolute; left: 50%; top: 50%; z-index: 2; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 22px; background: rgba(255, 255, 255, .25); color: #fff; opacity: 0; transition: opacity .2s ease; }
.ep-tile .pplay svg { width: 20px; height: 20px; }
.ep-tile .t { margin-top: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-tile .s { margin-top: 1px; font-size: 12.5px; color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-tile.done .pic img:not(.ep-bg) { opacity: .55; }
/* ещё не вышла — кадр притушен, подпись «выйдет …» читается как обычно */
.ep-tile.soon .pic { opacity: .55; }
.ep-tile.cur .pic::after { box-shadow: inset 0 0 0 3px #fff; }
@media (hover: hover) {
  .ep-tile:hover .pic { transform: scale(1.03); box-shadow: 0 8px 32px rgba(0, 0, 0, .55); }
  .ep-tile:hover .pic::after { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9); }
  .ep-tile:not(.cur):hover .pplay { opacity: 1; }
}


/* «Другие форматы» (formats.js) — то же произведение в других разделах: плитка — значок раздела в скруглённом квадрате,
   что это и подпись; ряд вбок. Пришли после страницы — проявляются, что ниже съезжает (morph) */
.fm.fm-in > * { animation: fm-in .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fm-in { from { opacity: 0; transform: translateY(8px); } }
.fm-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px; scroll-padding: 0 16px; scrollbar-width: none; }
.fm-row::-webkit-scrollbar { display: none; }
.fm-tile { flex: none; display: flex; align-items: center; gap: 12px; min-width: 172px; max-width: 300px; padding: 10px 18px 10px 10px;
  border-radius: 16px; background: var(--bg-elev); text-align: left; transition: background .15s ease, transform .2s ease; }
.fm-tile:active { transform: scale(.97); transition-duration: .1s; }
.fm-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--chip); }
.fm-ic svg { width: 22px; height: 22px; }
.fm-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-t { font-size: 15px; font-weight: 650; }
.fm-s { font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page.tp .fm-row { padding: 12px var(--pad) 0 var(--l); scroll-padding: 0 var(--pad) 0 var(--l); gap: 12px; }
.page.tp .fm-tile { min-width: 200px; padding: 12px 20px 12px 12px; }
@media (hover: hover) {
  .fm-tile:hover { background: var(--bg-elev-2); }
}
/* --- ролик на широком экране — VideoDetailView и WatchLayout мака: поле 20 со всех сторон, кадр сверху не уезжает,
   под ним своей прокруткой сведения, справа своей прокруткой «Смотрите также». Ширину кадра (--vw), колонки (--sw)
   и столбцов сетки (--n) считает страница */
body.wide .view .page.vp, body.wide .view.has-mini .page.vp { overflow: hidden; padding-bottom: 0; }
body.wide .page.vp > .hdr { display: none; }
body.wide .page.vp > .body { height: 100%; padding: 0; }
.vp-layout { display: flex; justify-content: center; gap: 20px; height: 100%; padding: 20px 20px 0 calc(var(--inset) + 20px); }
.vp-main { display: flex; flex-direction: column; gap: 16px; width: var(--vw, 100%); flex: none; min-height: 0; }
.vp-side { width: var(--sw, 0); flex: none; overflow-y: auto; scrollbar-width: none; padding-bottom: 30px; }
.vp-layout.one .vp-side { display: none; }
.vp-info { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: 30px; display: flex; flex-direction: column; gap: 14px; }
.vp-info::-webkit-scrollbar, .vp-side::-webkit-scrollbar { display: none; }
/* свёрнутый плеер — в углу внизу: сведения и колонка прокручиваются выше него */
body.wide .view.has-mini .vp-info, body.wide .view.has-mini .vp-side { padding-bottom: 250px; }
.vp-info > .banner { margin: 0; }
/* кадр — WatchStage мака, пока видео не идёт: картинка, затемнение книзу, белый круг ▶ 78 и подпись под ним */
.vp-stage { position: relative; flex: none; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000;
  box-shadow: 0 10px 48px rgba(0, 0, 0, .45); }
.vp-stage::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.vp-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.vp-bg img.ok { opacity: 1; }
.vp-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .6)); }
.vp-cover { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.vp-circle { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 39px; color: #000; background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 32px rgba(0, 0, 0, .4); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
.vp-circle svg { width: 32px; height: 32px; }
.vp-circle .spinner { width: 32px; height: 32px; border-width: 3px; border-color: rgba(0, 0, 0, .18); border-top-color: #000; }
.vp-cover:hover .vp-circle { transform: scale(1.08); background: #fff; }
.vp-cover:active .vp-circle { transform: scale(.96); transition-duration: .1s; }
/* фокус с клавиатуры — белая рамка по кадру, как наведение у карточек (не синяя рамка браузера) */
.vp-cover:focus-visible { outline: none; }
.vp-stage:has(.vp-cover:focus-visible)::after { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9); }
.vp-label { position: absolute; left: 50%; top: calc(50% + 39px + 14px); transform: translateX(-50%); padding: 6px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 16px; font-weight: 600; white-space: nowrap; }
.vp-stage .glass-back { position: absolute; left: 20px; top: 20px; z-index: 2; }
.vp-where { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 13px; font-weight: 600; color: #fff; pointer-events: none; }
.vp-where svg { width: 15px; height: 15px; }
/* под кадром: название 22, канал, описание */
.vp-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.2px; flex: none; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vp-title .sk-text { width: 70%; }
.vp-chan { display: flex; align-items: center; gap: 14px; min-height: 44px; flex: none; }
.vp-ch { display: flex; align-items: center; gap: 12px; min-width: 0; margin: -4px 0 -4px -4px; padding: 4px 14px 4px 4px; border-radius: 26px;
  text-align: left; color: #fff; transition: background .15s ease; }
button.vp-ch:hover { background: rgba(255, 255, 255, .07); }
.vp-ava { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 22px; overflow: hidden; flex: none;
  background: var(--img-bg); font-size: 18px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.vp-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.vp-ava img.ok { opacity: 1; }
.vp-ch-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vp-ch-t b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-ch-t small { font-size: 12.5px; color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-desc { flex: none; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); display: flex; flex-direction: column; gap: 6px; }
.vp-desc.can:not(.open) { cursor: pointer; }
.vp-desc.can:not(.open):hover { background: rgba(255, 255, 255, .08); }
.vp-meta { font-size: 14px; font-weight: 600; }
.vp-meta i { font-style: normal; color: rgba(255, 255, 255, .35); margin: 0 7px; }
.vp-text { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .8); white-space: pre-line; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vp-desc.open .vp-text { display: block; -webkit-line-clamp: unset; }
.vp-text .sk-text { display: block; margin: 5px 0; }
.vp-more { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--link); }
.vp-more .sk-text { width: 40px !important; }
/* без колонки — «Смотрите также» сеткой под описанием, карточки рядов */
.vp-below:empty { display: none; }
.vp-gtitle { margin: 10px 0 14px; font-size: 19px; font-weight: 700; }
.vp-grid { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 22px 16px; }
body.wide .vp-grid .card.wide, body.wide .ch-grid .card.wide { width: 100%; }
/* колонка справа — строки VideoRow мака: кадр 168, название в 2 строки, канал, просмотры; наведение — плашкой */
.vp-stitle { margin: 0 0 8px 5px; font-size: 17px; font-weight: 700; }
.vp-list { display: flex; flex-direction: column; gap: 2px; }
.vrow { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 5px; border-radius: 12px; text-align: left; color: #fff;
  transition: background .12s ease; }
button.vrow:hover { background: rgba(255, 255, 255, .07); }
.vrow .pic { position: relative; width: 168px; aspect-ratio: 16 / 9; flex: none; border-radius: 9px; overflow: hidden; background: var(--img-bg); }
.vrow .pic img { width: 100%; height: 100%; object-fit: cover; }
.vrow .dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .78);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vrow .dur.live { background: #ff3b30; font-size: 9.5px; font-weight: 800; }
.vrow .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 1px; }
.vrow .t { font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vrow .t .sk-text { display: block; margin: 3px 0; }
.vrow .c, .vrow .m { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vrow .c { color: rgba(255, 255, 255, .6); }
.vrow .m { color: rgba(255, 255, 255, .45); }

/* --- поиск на широком экране — SearchScreen мака: пустое поле — подсказка или недавние запросы капсулами; одна
   площадка — сеткой карточек (постеры от 168, кадры от 300), каналы — рядом сверху; в «Всё» у заголовка — «Все 20 ›» */
.srch-hint { margin: 30px 16px 0; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.srch-hint p { margin: 0 0 8px; }
.srch-rhead { display: flex; align-items: center; justify-content: space-between; margin: 30px 16px 12px; }
.srch-rhead h2 { margin: 0; font-size: 19px; font-weight: 700; }
.srch-clear { font-size: 15px; font-weight: 500; color: var(--fg-3); padding: 6px 0 6px 12px; }
.srch-clear:hover { color: var(--fg); }
.srch-recent { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
/* капсула недавнего запроса: сам запрос и крестик справа (как у мака) */
.srch-q { display: inline-flex; align-items: center; height: 36px; border-radius: 18px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .08); transition: background .15s ease; }
.srch-q:hover { background: rgba(255, 255, 255, .14); }
.srch-qgo { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 6px 0 14px; color: inherit; }
.srch-qgo svg { width: 16px; height: 16px; color: rgba(255, 255, 255, .55); }
.srch-qx { width: 22px; height: 22px; margin-right: 7px; border-radius: 11px; display: grid; place-items: center; color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .1); transition: background .15s ease, color .15s ease; }
.srch-qx:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.srch-qx svg { width: 11px; height: 11px; }
.srch-qx svg path { stroke-width: 3; }
/* телефон: «Вы искали» строками — запрос и крестик справа; «Очистить» у заголовка */
.srch-phead { display: flex; align-items: baseline; justify-content: space-between; padding-right: 16px; }
.srch-li { min-height: 56px; padding: 0 4px 0 16px; gap: 4px; }
.srch-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 56px; text-align: left; color: inherit; }
.srch-go .t { font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srch-ic { flex: none; color: var(--fg-3); display: grid; }
.srch-ic svg { width: 22px; height: 22px; }
.srch-x { flex: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: var(--fg-3); }
.srch-x:active { background: var(--chip); }
.srch-x svg { width: 18px; height: 18px; }
.srch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; padding: 24px 16px 0; }
.srch-grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px 20px; }
body.wide .srch-grid .card, body.wide .srch-grid .card.wide { width: 100%; }
body.wide .srch-chans .scroller { padding-top: 22px; padding-bottom: 0; }
.sec-link .cnt { display: none; }
body.wide .sec-link { gap: 10px; }
body.wide .sec-link .cnt:not(:empty) { display: inline; font-size: 14px; font-weight: 600; color: var(--link); }
body.wide .sec-link .cnt:not(:empty) + svg { width: 15px; height: 15px; margin-left: -8px; color: var(--link); }
body.wide .sec-link .cnt:not(:empty) + svg path { stroke-width: 2.6; }

/* --- история на широком экране — HistoryScreen мака: «История» 40, капсулы и «Очистить» одной строкой; по дням — сетка
   кадров (как «Продолжить просмотр»), под кадром время и площадка; «⋯» на кадре при наведении */
.hist-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin: 34px 16px 4px; }
.hist-title { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 850; letter-spacing: -.6px; }
.hist-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hist-head .grow { flex: 1; }
.hist-day { margin: 30px 16px 0; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.hist-day .sk-text { width: 120px; }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px 20px; padding: 14px 16px 0; }
body.wide .hist-grid .card.wide { width: 100%; }
.hcard { position: relative; min-width: 0; }
.hc-cap { margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-more { position: absolute; right: 10px; top: 10px; z-index: 3; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0;
  transition: opacity .15s ease, background .15s ease; }
.hc-more svg { width: 18px; height: 18px; }
.hc-more:hover { background: rgba(0, 0, 0, .72); }
.hcard:hover .hc-more, .hc-more:focus-visible { opacity: 1; }
@media (hover: none) { .hc-more { opacity: 1; } }
/* та же история на телефоне: капсулы строкой под шапкой (прокручиваются), кадры во всю ширину одной колонкой */
.hist-head-ph { margin-top: 2px; }
body:not(.wide) .hist-day { margin: 22px 16px 0; font-size: 20px; font-weight: 800; }
body:not(.wide) .hist-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px 14px; padding-top: 12px; }
body:not(.wide) .hist-grid .card.wide { width: 100%; }
body:not(.wide) .hc-cap { margin-top: 6px; font-size: 13px; color: var(--fg-3); }

/* --- канал на широком экране — VideoChannelView мака: шапка 380 с обложкой (нет — размытый аватар), аватар 124, имя 40,
   сведения, описание; ниже все ролики сеткой от 300 */
body.wide .page.chp > .hdr { display: none; }
body.wide .page.chp > .body { padding: 0; }
.ch-head { position: relative; height: 380px; overflow: hidden; background: var(--bg); }
.ch-bg { position: absolute; inset: 0; }
.ch-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.ch-bg img.ok { opacity: .75; }
.ch-bg.blur img { filter: blur(60px) saturate(1.3); transform: scale(1.4); }
.ch-bg.blur img.ok { opacity: .45; }
.ch-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, var(--bg) 0, rgba(10, 10, 10, .5) 45%, rgba(10, 10, 10, 0) 90%); }
.ch-in { position: absolute; left: calc(var(--l) + 8px); right: var(--pad); bottom: 28px; display: flex; align-items: center; gap: 22px; color: #fff; }
.ch-ava { position: relative; display: grid; place-items: center; width: 124px; height: 124px; border-radius: 62px; overflow: hidden; flex: none;
  background: var(--img-bg); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); font-size: 48px; font-weight: 800; color: rgba(255, 255, 255, .5); }
.ch-ava::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.ch-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.ch-ava img.ok { opacity: 1; }
.ch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ch-name { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 850; letter-spacing: -.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.ch-meta { font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-meta i { font-style: normal; color: rgba(255, 255, 255, .35); margin: 0 8px; }
.ch-desc { max-width: 640px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .6); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-desc .sk-text { display: block; margin: 4px 0; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px 20px; padding: 26px var(--pad) 0 var(--l); }
.ch-err { grid-column: 1 / -1; color: rgba(255, 255, 255, .5); }

/* --- меню у кнопки (вместо листа снизу) — как меню мака: тёмное стекло, отметка слева, наведённое — системным синим */
.menu { position: fixed; z-index: 70; min-width: 220px; max-width: min(360px, calc(100vw - 24px)); max-height: min(440px, calc(100vh - 24px)); overflow-y: auto;
  padding: 5px; border-radius: 12px; background: rgba(32, 32, 32, .9); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 50px rgba(0, 0, 0, .5); color: #f5f5f5; transform-origin: var(--mo, 50% 0); }
.menu-h { padding: 6px 10px 4px 30px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-i { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 5px 12px 5px 8px; border-radius: 7px; text-align: left;
  font-size: 14px; line-height: 1.25; color: inherit; }
.menu-i .ck { width: 14px; height: 14px; flex: none; }
.menu.nock .menu-i { padding-left: 10px; }
.menu-i .opt-sub { margin-left: auto; padding-left: 18px; font-size: 12.5px; color: rgba(255, 255, 255, .45); white-space: nowrap; }
.menu-i .opt-sub:empty { display: none; }
.menu-i .opt-sub.on { color: #30d158; }
.menu-i:hover .opt-sub { color: rgba(255, 255, 255, .8); }
.menu-i .ck svg { width: 14px; height: 14px; }
.menu-i .ck:not(.pic) svg path { stroke-width: 2.6; }
/* галочки и значки в одной колонке (меню островка): шире, галочка — посередине, значок — как у пунктов без галочек */
.menu.lead .menu-i .ck { width: 17px; height: 17px; display: grid; place-items: center; }
.menu-i .ck.pic svg { width: 17px; height: 17px; opacity: .85; }
.menu.lead .menu-h { padding-left: 33px; }
/* пункт с подменю: «›» у края; подменю открыто — пункт подсвечен */
.menu-chev { margin-left: auto; padding-left: 14px; display: grid; place-items: center; opacity: .55; }
.menu-chev svg { width: 13px; height: 13px; }
.menu-i:hover .menu-chev { opacity: 1; }
.menu-i.open { background: rgba(255, 255, 255, .12); }
.opt-chev { margin-left: auto; display: grid; place-items: center; color: var(--fg-3); }
.opt-chev svg { width: 16px; height: 16px; }
.menu-i > svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.menu-i:hover, .menu-i:focus-visible { background: #0a84ff; color: #fff; outline: none; }
.menu-i.danger { color: #ff6b5e; }
.menu-i.danger:hover { color: #fff; background: #ff453a; }
.menu-sep { height: 1px; margin: 5px 8px; background: rgba(255, 255, 255, .1); }
/* с хвостиком (showPop): окошко вырезано по контуру с хвостиком, кромка — картинкой фона тем же контуром; тень — своим
   слоем под ним (.menu-shadow: тень рисуется только снаружи прямоугольника — под стекло не попадает) */
.menu.tailed { box-shadow: none; background-repeat: no-repeat; background-size: 100% 100%; }
.menu-shadow { position: fixed; z-index: 70; border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); pointer-events: none; }
/* телефон: меню кнопки в листе (optionSheet — выбор из открытого листа) — как меню кнопок iPhone: строки крупные, во
   всю ширину, с чертами между ними, цвета темы; значок — справа, галочка — слева */
body:not(.wide) .menu { min-width: 250px; max-width: min(320px, calc(100vw - 32px)); padding: 0; border-radius: 14px; color: var(--fg);
  background: var(--bg-elev); background: color-mix(in srgb, var(--bg-elev) 84%, transparent);
  box-shadow: 0 0 0 .5px var(--line), 0 14px 44px rgba(0, 0, 0, .3); }
body:not(.wide) .menu-h { padding: 12px 16px 9px; font-size: 13px; color: var(--fg-3); white-space: normal; text-align: center; }
body:not(.wide) .menu-i { min-height: 48px; gap: 12px; padding: 11px 16px 11px 14px; border-radius: 0; font-size: 17px; }
body:not(.wide) .menu.nock .menu-i { padding-left: 16px; }
body:not(.wide) :is(.menu-h, .menu-i) + .menu-i { box-shadow: inset 0 .5px 0 var(--line); }
body:not(.wide) .menu-i .ck, body:not(.wide) .menu-i .ck svg { width: 18px; height: 18px; }
body:not(.wide) .menu-i > svg { order: 2; margin-left: auto; width: 22px; height: 22px; color: var(--fg-2); opacity: 1; }
body:not(.wide) .menu-i .opt-sub { padding-left: 12px; font-size: 15px; color: var(--fg-3); }
body:not(.wide) .menu-i:hover, body:not(.wide) .menu-i:focus-visible { background: none; color: inherit; }
body:not(.wide) .menu-i:active { background: var(--chip); }
body:not(.wide) .menu-i.danger, body:not(.wide) .menu-i.danger > svg { color: var(--danger); }
body:not(.wide) .menu-sep { height: 8px; margin: 0; background: var(--line); }

/* a question in the middle of the screen (sheets.js askAlert) — Iskra's own window, not a copy of the iPhone alert
   (29.11: «тупо копию айфоновской»): the title and the line under it on the left, our buttons at the bottom side by
   side — «Отмена» grey, the action filled (dangerous — red). Corners concentric as the device window: 32 = the button's
   16 + 16 from the edges */
.alert-scrim { position: fixed; inset: 0; z-index: 72; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s ease; }
.alert-scrim.on { opacity: 1; }
.alert { position: fixed; left: 50%; top: 50%; z-index: 73; width: min(360px, calc(100vw - 32px)); padding: 22px 16px 16px; border-radius: 32px;
  background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line), 0 24px 70px rgba(0, 0, 0, .5);
  opacity: 0; transform: translate(-50%, -50%) scale(.96); transition: transform .24s cubic-bezier(.2, .9, .3, 1), opacity .18s ease; }
.alert.on { opacity: 1; transform: translate(-50%, -50%); }
.alert-t { padding: 0 6px; font-size: 20px; font-weight: 800; line-height: 1.25; letter-spacing: -.2px; }
.alert-m { padding: 8px 6px 0; font-size: 15px; line-height: 1.4; color: var(--fg-2); }
.alert-b { display: flex; gap: 10px; margin-top: 22px; }
.alert-b .btn { flex: 1 1 0; min-width: 0; min-height: 50px; padding: 0 12px; font-size: 16px; }
.alert-b .btn.go { background: var(--accent); color: var(--accent-fg); }
.alert-b .btn.go.danger { background: var(--danger); color: #fff; }
/* ---------- смотреть вместе: колонка «Вместе» выезжает справа — зеркально подробностям слева (на телефоне тоже): видео
   уменьшается и сдвигается влево (applyScroll), управление — над видео. Ширина — --pr-w, открытая — --room-w */
.p-room { display: none; }
#player.full .p-room { display: flex; flex-direction: column; position: absolute; top: 0; right: 0; bottom: 0; width: var(--pr-w, 340px); z-index: 4;
  background: #111; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .08); color: #f5f5f5; cursor: auto; -webkit-user-select: text; user-select: text;
  transform: translate3d(100%, 0, 0); visibility: hidden; transition: transform .42s cubic-bezier(.2, .9, .3, 1), visibility 0s .42s; }
#player.full.room .p-room { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.2, .9, .3, 1), visibility 0s; }
#player.room .p-ui { right: var(--room-w, 0px); }
.p-room [hidden] { display: none !important; }
.pr-head { flex: none; display: flex; align-items: center; gap: 2px; min-height: calc(var(--pt) + var(--th) + 8px); padding: var(--pt) var(--pr) 8px 18px; }
.pr-head .pr-icon:first-child { margin-left: -10px; }
.pr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pr-t b { font-size: 17px; font-weight: 750; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-t span { font-size: 13px; color: rgba(255, 255, 255, .5); }
.pr-t span.warn { color: #ffb340; }
.pr-icon { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; color: rgba(255, 255, 255, .85); flex: none; transition: background .15s ease, color .15s ease; }
.pr-icon:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pr-icon svg { width: 21px; height: 21px; }
.pr-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* кружок участника: первая буква на его цвете; говорит — зелёное кольцо */
.av { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff;
  font-size: 15px; font-weight: 750; box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); transition: box-shadow .15s ease; }
.av.talk { box-shadow: 0 0 0 2.5px #111, 0 0 0 5px #30d158; }
/* полоса людей над чатом: кружок и имя; грузится — оранжевое кольцо крутится; микрофон — зелёный значок; последним — «Позвать» */
.pr-strip { flex: none; display: flex; gap: 4px; padding: 2px 10px 12px; overflow-x: auto; scrollbar-width: none; box-shadow: 0 1px 0 rgba(255, 255, 255, .07); }
.pr-strip::-webkit-scrollbar { display: none; }
/* ширина — по имени (58–86): «Сергей» целиком, а не «Серге…» — многоточие заняло бы столько же места, сколько «й» */
.pr-pp { flex: none; min-width: 58px; max-width: 86px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 3px 2px; border-radius: 12px; color: #fff; transition: background .15s ease; }
.pr-pp:hover { background: rgba(255, 255, 255, .06); }
.pr-pp .n { max-width: 82px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-avw { position: relative; display: block; }
.pr-pp.load .pr-avw::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255, 179, 64, .25); border-top-color: #ffb340; animation: spin 1s linear infinite; }
.pr-badge { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: #30d158; color: #000; box-shadow: 0 0 0 2.5px #111; }
.pr-badge svg { width: 12px; height: 12px; }
.pr-badge svg path { stroke-width: 2.6; }
.pr-pp.add .av { width: 40px; height: 40px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14); }
.pr-pp.add .av svg { width: 20px; height: 20px; }
.pr-pp.add.hot .av { background: #0a84ff; color: #fff; box-shadow: none; }
.pr-pp.add.hot .n { color: #fff; }
/* переписка: подряд от одного — одной группой, имя над первым; свои — справа синие; события — серой строкой посередине */
.pr-chat { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.pr-empty { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 16px; text-align: center; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .45); }
.pr-empty b { font-size: 15.5px; font-weight: 650; color: rgba(255, 255, 255, .85); }
.pr-empty-go { display: flex; align-items: center; gap: 7px; height: 38px; margin-top: 10px; padding: 0 16px 0 13px; border-radius: 19px; background: #0a84ff; color: #fff;
  font-size: 14.5px; font-weight: 650; }
.pr-empty-go svg { width: 18px; height: 18px; }
.pr-sys { align-self: center; max-width: 100%; padding: 0 8px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .42); text-align: center; }
.pr-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 86%; }
.pr-msg.cont { margin-top: -7px; }
.pr-msg .who { padding-left: 12px; font-size: 12.5px; font-weight: 700; }
.pr-msg .txt { padding: 7px 12px; border-radius: 18px; font-size: 15px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(255, 255, 255, .1); }
.pr-msg:not(.me) .txt { border-bottom-left-radius: 6px; }
.pr-msg:not(.me).cont .txt { border-top-left-radius: 6px; }
.pr-msg.me { align-self: flex-end; align-items: flex-end; }
.pr-msg.me .txt { background: #0a84ff; color: #fff; border-bottom-right-radius: 6px; }
.pr-msg.me.cont .txt { border-top-right-radius: 6px; }
/* низ: реакции в ряд, микрофон и поле с кнопкой «отправить» внутри */
.pr-bottom { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 12px var(--pb); }
.pr-reacts { display: flex; justify-content: space-between; padding: 0 2px; }
.pr-react { width: 40px; height: 36px; border-radius: 10px; font-size: 21px; line-height: 1; display: grid; place-items: center;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
.pr-react:hover { background: rgba(255, 255, 255, .08); transform: scale(1.12); }
.pr-react:active { transform: scale(.9); }
.pr-compose { display: flex; gap: 8px; align-items: center; min-height: 46px; }
.pr-mic { width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85);
  transition: background .15s ease, box-shadow .15s ease; }
.pr-mic svg { width: 20px; height: 20px; }
.pr-mic:hover { background: rgba(255, 255, 255, .16); }
.pr-mic.on { background: #30d158; color: #000; }
.pr-field { flex: 1; min-width: 0; display: flex; align-items: center; height: 42px; padding: 0 4px 0 15px; border-radius: 21px; background: rgba(255, 255, 255, .1); transition: box-shadow .15s ease; }
.pr-field:focus-within { box-shadow: inset 0 0 0 1.5px rgba(10, 132, 255, .9); }
/* 16 px — меньше iPhone при касании увеличивает страницу, и вёрстка разъезжается */
.pr-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; color: #fff; font-size: 16px; }
.pr-input::placeholder { color: rgba(255, 255, 255, .42); }
.pr-send { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .45);
  transition: background .15s ease, color .15s ease, transform .15s ease; }
.pr-field.has .pr-send { background: #0a84ff; color: #fff; }
.pr-send:active { transform: scale(.9); }
.pr-send svg { width: 19px; height: 19px; }
.pr-send svg path { stroke-width: 2.5; }
/* до комнаты и «Комната» — листаются целиком */
.pr-start, .pr-roompane { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(var(--safe-b) + 18px); gap: 8px; }
.pr-cap { display: block; margin: 12px 2px 2px; font-size: 12.5px; font-weight: 650; letter-spacing: .3px; color: rgba(255, 255, 255, .5); }
.pr-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.pr-pts { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.pr-pt { display: flex; align-items: center; gap: 12px; }
.pr-pt .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(10, 132, 255, .16); color: #4ea2ff; }
.pr-pt .ic svg { width: 18px; height: 18px; }
.pr-pt b { display: block; font-size: 15px; font-weight: 650; }
.pr-pt span { display: block; margin-top: 1px; font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .5); }
.pr-namebox { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 9px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.pr-namebox:focus-within { box-shadow: inset 0 0 0 2px #0a84ff; }
.pr-namebox .av { width: 34px; height: 34px; background: #0a84ff; transition: background .2s ease; }
.pr-namebox .av.none { background: rgba(255, 255, 255, .12); }
.pr-name { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: #fff; font-size: 17px; font-weight: 600; }
.pr-name::placeholder { color: rgba(255, 255, 255, .4); font-weight: 400; }
.pr-name.bad { animation: shake .4s ease; }
/* кто я в колонке — та же карточка (meCard), что у гостя, на тёмном стекле, вровень с полем */
.pr-who { display: contents; }
.p-room .me-card { margin-top: 10px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.p-room .me-n b { color: #fff; }
.p-room .me-n span { color: rgba(255, 255, 255, .5); }
.p-room .me-edit { color: #0a84ff; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pr-go { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; margin-top: 6px; border-radius: 14px; flex: none;
  font-size: 16px; font-weight: 700; background: #fff; color: #000; transition: transform .12s ease, opacity .2s; }
.pr-go:active { transform: scale(.98); }
.pr-go.busy { opacity: .7; pointer-events: none; }
#player .pr-go .spinner { width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(0, 0, 0, .2); border-top-color: #000; }
.pr-foot { margin-top: 2px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .45); }
.pr-inv { display: flex; gap: 14px; align-items: center; }
.pr-qr { width: 96px; height: 96px; border-radius: 10px; background: #fff; flex: none; }
.pr-invr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pr-invr b { font-size: 15px; font-weight: 650; line-height: 1.3; }
.pr-invr span { font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .5); }
/* ссылка — полем во всю ширину, под ней «Скопировать ссылку» */
.pr-link { display: flex; flex-direction: column; gap: 8px; }
.pr-url { height: 40px; padding: 0 12px; border-radius: 11px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  font-size: 14px; font-weight: 550; line-height: 40px; color: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-user-select: all; user-select: all; cursor: text; }
.pr-copy { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 12px; font-size: 15px; font-weight: 650; white-space: nowrap;
  background: #0a84ff; color: #fff; transition: background .2s ease, transform .12s ease; }
.pr-copy:active { transform: scale(.98); }
.pr-copy svg { width: 18px; height: 18px; flex: none; }
.pr-copy.done { background: #30d158; color: #000; }
.pr-shares { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.pr-sh { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 9px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .06); transition: background .15s ease; }
.pr-sh:hover { background: rgba(255, 255, 255, .11); color: #fff; }
.pr-sh .ic { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: #48484a; }
.pr-sh .ic svg { width: 18px; height: 18px; }
/* Telegram и WhatsApp — их логотипы целиком, без своего кружка */
.pr-sh.tg .ic, .pr-sh.wa .ic { background: none; }
.pr-sh.tg .ic svg, .pr-sh.wa .ic svg { width: 36px; height: 36px; }
.pr-list { display: flex; flex-direction: column; gap: 4px; }
.pr-p { display: flex; align-items: center; gap: 11px; min-height: 44px; }
.pr-pn { flex: 1; min-width: 0; }
.pr-pn .n { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-pn .s { display: flex; align-items: center; gap: 5px; margin-top: 1px; font-size: 12.5px; color: rgba(255, 255, 255, .5); }
.pr-pn .s svg { width: 14px; height: 14px; flex: none; }
.pr-pn .s.warn { color: #ffb340; }
.pr-mi { color: rgba(255, 255, 255, .3); }
.pr-mi.on { color: #30d158; }
.pr-mi svg { width: 19px; height: 19px; }
.pr-wait { display: flex; align-items: center; gap: 11px; min-height: 36px; font-size: 13.5px; color: rgba(255, 255, 255, .5); }
.pr-wait .dot { width: 10px; height: 10px; margin: 0 13px; border-radius: 5px; background: #0a84ff; animation: pulse 1.4s ease-in-out infinite; }
.pr-leave { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; margin-top: 14px; border-radius: 14px; flex: none;
  font-size: 15px; font-weight: 600; color: #ff6b5e; background: rgba(255, 255, 255, .05); transition: background .15s ease; }
.pr-leave:hover { background: rgba(255, 69, 58, .12); }
.pr-leave svg { width: 19px; height: 19px; }
/* кнопка «Вместе» в верхней строке плеера: в комнате — светлая, с числом людей или непрочитанных */
#player .p-together { position: relative; }
#player .p-together.on { background: rgba(255, 255, 255, .9); color: #000; }
#player .p-together .cnt { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11.5px; font-weight: 800; line-height: 18px; text-align: center;
  background: rgba(0, 0, 0, .75); color: #fff; }
#player .p-together .cnt.unread { background: #ff3b30; }
#player .p-together .cnt[hidden] { display: none; }
/* заметки сверху посередине видео: «Пауза · Мама» */
.p-notes { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 76px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 3; }
.p-note { padding: 8px 16px; border-radius: 18px; background: rgba(20, 20, 20, .82); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35); animation: note-in .3s cubic-bezier(.2, .9, .3, 1.2); transition: opacity .35s ease, transform .35s ease; }
.p-note.out { opacity: 0; transform: translateY(-6px); }
@keyframes note-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
/* сообщения поверх видео, когда колонки не видно — слева внизу, над шкалой */
.p-bubbles { position: absolute; left: 16px; bottom: 110px; width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  pointer-events: none; z-index: 3; }
.p-bubble { max-width: 100%; padding: 7px 12px; border-radius: 14px; background: rgba(20, 20, 20, .82); color: #fff; font-size: 15px; line-height: 1.35;
  animation: note-in .3s ease; transition: opacity .5s ease; overflow-wrap: anywhere; }
.p-bubble b { margin-right: 6px; font-weight: 750; }
.p-bubble.out { opacity: 0; }
/* реакции летят снизу вверх у левого края */
.p-fly { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
/* подъём (одной кривой) и прозрачность — у внешнего, качание — у внутреннего, появление пружинкой — у самой реакции */
.p-react { position: absolute; bottom: 90px; will-change: transform, opacity;
  animation: react-rise 4s cubic-bezier(.33, .15, .35, 1) forwards, react-fade 4s linear forwards; }
.p-react-sw { display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: react-sway var(--sway-t, 1.7s) ease-in-out calc(var(--sway-t, 1.7s) * -.5) infinite alternate; }
.p-react.ccw .p-react-sw { animation-direction: alternate-reverse; }
.p-react .e { font-size: 44px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); animation: react-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.p-react .w { padding: 1px 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 650; white-space: nowrap; }
@keyframes react-rise { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, var(--rise, -380px), 0); } }
@keyframes react-fade { 0% { opacity: 0; } 7% { opacity: 1; } 68% { opacity: 1; } 100% { opacity: 0; } }
@keyframes react-sway {
  from { transform: translate3d(calc(var(--sway, 18px) * -1), 0, 0) rotate(-7deg); }
  to { transform: translate3d(var(--sway, 18px), 0, 0) rotate(7deg); }
}
@keyframes react-pop { from { transform: scale(.3); } to { transform: scale(1); } }
/* кто говорит — капсулой как кнопки плеера (36 px, тёмное стекло — видна и без затемнения управления): справа, по
   центру верхней строки (её верх +8, высота 46); с управлением — под ней, по тому же краю; колонка открыта и мини — нет */
.p-talkers { position: absolute; top: calc(var(--pt) + var(--th) / 2 - 18px); right: var(--pr); z-index: 3; pointer-events: none;
  display: flex; align-items: center; gap: 8px; height: 36px; max-width: min(340px, 60%); padding: 0 14px 0 5px; border-radius: 18px;
  background: rgba(20, 20, 20, .72); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3); color: #fff; font-size: 14px; font-weight: 600;
  opacity: 0; transform: scale(.9); transform-origin: 100% 50%; translate: 0 0;
  transition: opacity .3s ease, transform .4s cubic-bezier(.2, .9, .3, 1.15), translate .3s var(--ease); }
.p-talkers.on { opacity: 1; transform: none; }
#player.ui-on .p-talkers { translate: 0 calc(var(--th) / 2 + 26px); }
#player.room .p-talkers, #player.mini .p-talkers { display: none; }
.p-talk-avs { display: flex; flex: none; }
.p-talk-avs .av + .av { margin-left: -6px; }
.p-talk-avs .av, .p-talk-avs .av.talk { box-shadow: 0 0 0 2px rgba(20, 20, 20, .9), 0 0 0 calc(2px + var(--lv, .5) * 2px) #30d158; transition: box-shadow .12s linear; }
.p-talk-n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «Звук» — как модуль «Звук» в Пункте управления мака: стекло, заголовок, ползунок-капсула с белой заливкой и значком
   внутри, «›» справа — внутрь (фильм, голоса, каждый). Ползунок — тот же sliderRow, что громкость ТВ на пульте, вид .cap */
.menu.snd-pop { width: 300px; padding: 12px 14px 14px; border-radius: 18px; background: rgba(38, 38, 40, .62);
  -webkit-backdrop-filter: blur(40px) saturate(1.8); backdrop-filter: blur(40px) saturate(1.8);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16), 0 20px 50px rgba(0, 0, 0, .45); }
.snd { --cap-fill: #fff; --cap-track: rgba(255, 255, 255, .16); --cap-ic: rgba(0, 0, 0, .55); --snd-2: rgba(255, 255, 255, .5); }
.sheet .snd { --cap-fill: var(--fg); --cap-track: var(--chip); --cap-ic: var(--bg); --snd-2: var(--fg-3); padding: 4px 16px 12px; }
.snd-t { display: flex; align-items: center; gap: 4px; min-height: 22px; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .92); }
.snd-back { width: 22px; height: 22px; margin-left: -3px; border-radius: 11px; display: grid; place-items: center; color: rgba(255, 255, 255, .8); }
.snd-back:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.snd-back svg { width: 15px; height: 15px; }
.snd-back svg path { stroke-width: 2.6; }
.snd-row { display: flex; align-items: center; gap: 8px; }
.snd-go { width: 26px; height: 26px; border-radius: 13px; flex: none; display: grid; place-items: center; background: var(--cap-track); color: inherit; opacity: .9; transition: background .15s, opacity .15s; }
.snd-go:hover { opacity: 1; background: rgba(255, 255, 255, .26); }
.snd-go svg { width: 14px; height: 14px; }
.snd-go svg path { stroke-width: 2.8; }
.snd-cap { margin: 14px 0 6px; font-size: 11.5px; font-weight: 600; color: var(--snd-2); }
.snd-t + .snd-cap { margin-top: 2px; }
.sheet .snd-cap:first-child { margin-top: 4px; }
.snd-who { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.snd-cap + .snd-who { margin-top: 2px; }
.snd-wc { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.snd-wn { font-size: 12.5px; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* iPhone и iPad: фильм — кнопками сбоку (страницам громкость не дают) */
.snd-note { margin-top: 16px; font-size: 12.5px; color: var(--snd-2); }
/* капсула: заливка — до середины ручки (--k — её размер), значок слева поверх белого */
.slider-row.cap { --k: 24px; flex: 1; min-width: 0; max-width: none; min-height: 0; padding: 0; gap: 0; border-radius: 0; background: none; box-shadow: none; }
.snd-who .slider-row.cap { --k: 18px; }
.slider-row.cap .sl-val, .slider-row.cap .sl-tip { display: none; }
.slider-row.cap .sl-track input { height: var(--k); cursor: pointer; }
.slider-row.cap .sl-track input::-webkit-slider-runnable-track { height: var(--k); border-radius: calc(var(--k) / 2);
  background: linear-gradient(to right, var(--cap-fill) calc(var(--k) / 2 + var(--p, 1) * (100% - var(--k))), var(--cap-track) 0); }
.slider-row.cap .sl-track input::-moz-range-track { height: var(--k); border-radius: calc(var(--k) / 2); background: var(--cap-track); }
.slider-row.cap .sl-track input::-moz-range-progress { height: var(--k); border-radius: calc(var(--k) / 2); background: var(--cap-fill); }
.slider-row.cap .sl-track input::-webkit-slider-thumb { width: var(--k); height: var(--k); margin-top: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 4px rgba(0, 0, 0, .3); }
.slider-row.cap .sl-track input::-moz-range-thumb { width: var(--k); height: var(--k); border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.cap-ic { position: absolute; left: calc(var(--k) / 2 - 7px); top: 50%; width: 14px; height: 14px; margin-top: -7px; display: grid; place-items: center; color: var(--cap-ic); pointer-events: none; }
.cap-ic svg { width: 14px; height: 14px; }
.cap-ic svg path { stroke-width: 2.4; }
.slider-row.cap.mid .sl-track::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%;
  background: var(--snd-2); pointer-events: none; }
/* поверх видео: отсчёт 3-2-1 и «ждём …» */
.p-over { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(0, 0, 0, .45); pointer-events: none; }
.p-over[hidden] { display: none; }
.p-over .num { font-size: 120px; font-weight: 850; line-height: 1; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, .5); animation: count-in .9s ease-out; }
.p-over .s { font-size: 17px; font-weight: 650; color: rgba(255, 255, 255, .8); }
.p-over .t { font-size: 19px; font-weight: 700; color: #fff; text-align: center; padding: 0 20px; }
.p-over-go { pointer-events: auto; height: 40px; padding: 0 18px; border-radius: 20px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 14.5px; font-weight: 600; }
.p-over-go:hover { background: rgba(255, 255, 255, .24); }
@keyframes count-in { from { opacity: 0; transform: scale(1.5); } 30% { opacity: 1; transform: scale(1); } to { opacity: 1; transform: scale(1); } }
/* копирование старым способом (copyText) — поле вне экрана; 16 px — чтобы iPhone не увеличивал страницу */
.copy-buf { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
/* вход гостя */
.inv-label { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 650; letter-spacing: .3px; color: var(--fg-3); }
.gate.join { z-index: 45; gap: 14px; }
/* приглашение: кадр того, что идёт, с кружком позвавшего; кто уже в комнате; вы — фото и имя */
.inv-hero { display: grid; place-items: center; margin-bottom: 4px; }
.inv-frame { position: relative; width: min(340px, 84vw); aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--img-bg); box-shadow: var(--shadow); }
.inv-frame > img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.inv-frame > img.ok { opacity: 1; }
.inv-frame > .av { position: absolute; left: 12px; bottom: 12px; box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); }
.inv-gone { width: 88px; height: 88px; border-radius: 22px; display: grid; place-items: center; background: var(--chip); color: var(--fg-3); }
.inv-gone svg { width: 44px; height: 44px; }
.gate .inv-people { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg-2); }
.inv-people[hidden] { display: none; }
.inv-stack { display: flex; }
.inv-stack .av { box-shadow: 0 0 0 2px var(--bg); }
.inv-stack .av + .av { margin-left: -8px; }
.inv-me { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 320px; margin-top: 6px; }
/* кто я (meCard) — общая карточка: здесь и в колонке «Вместе» перед «Создать приглашение» */
.me-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px 10px 10px; border-radius: 18px; background: var(--bg-elev-2); text-align: left; }
.me-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.me-n b { font-size: 17px; font-weight: 700; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-n span { font-size: 13px; color: var(--fg-3); }
.me-edit { flex: none; padding: 8px 10px; border-radius: 10px; color: var(--link); font-size: 15px; font-weight: 600; }
.me-edit:active { opacity: .6; }
.gate .name-input { max-width: 320px; letter-spacing: 0; font-size: 24px; font-weight: 700; }
.gate .inv-label { color: var(--fg-3); }
/* гость: своей «Искры» нет — без панели разделов и вкладок */
body.guest #side, body.guest #tabs { display: none !important; }
body.guest.wide { --side-w: 0px; }
/* вкладок у гостя нет — свёрнутый плеер у самого низа; страница оставляет под ним место */
body.guest { --tabs-h: 0px; }
body.guest .page { padding-bottom: 24px; }
body.guest .view.has-mini .page { padding-bottom: calc(var(--safe-b) + 150px); }
body.guest.wide .view.has-mini .page { padding-bottom: 250px; }

/* «Вы в гостях»: сверху — кто мы, кадр того, что смотрим (как герой кинотеатра: кадр, затемнение, белые надписи и
   капсулы), под ним — кто в комнате. На широком — колонкой посередине */
.gp { display: flex; flex-direction: column; gap: 14px; padding: 6px 16px 8px; }
body.wide .gp { width: min(1040px, 100%); margin: 0 auto; padding: 32px 0 8px; gap: 18px; }
.gp-top { display: flex; align-items: center; gap: 12px; padding: 4px 2px 2px; }
.gp-logo { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.gp-tt { min-width: 0; }
.gp-tt b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.2px; color: var(--fg); }
.gp-tt span { display: block; font-size: 14px; color: var(--fg-3); }
.gp-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 340px; border-radius: 20px; background: #161616; color: #fff; }
body.wide .gp-hero { min-height: clamp(380px, 52vh, 520px); border-radius: 24px; }
.gp-bg { position: absolute; inset: 0; z-index: -2; }
.gp-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.gp-bg img.ok { opacity: 1; }
.gp-bg.dim img { filter: blur(30px) saturate(1.2); transform: scale(1.2); }
.gp-bg.dim img.ok { opacity: .55; }
.gp-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0, rgba(0, 0, 0, .3) 22%, rgba(0, 0, 0, .7) 50%, rgba(0, 0, 0, .9) 100%); }
body.wide .gp-hero::before { background: linear-gradient(90deg, rgba(0, 0, 0, .82) 0, rgba(0, 0, 0, .5) 42%, rgba(0, 0, 0, 0) 78%),
  linear-gradient(0deg, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 45%); }
.gp-hero.empty::before { background: radial-gradient(120% 90% at 0 100%, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 60%); }
.gp-in { display: flex; flex-direction: column; gap: 6px; padding: 20px 18px 18px; }
body.wide .gp-in { max-width: 620px; gap: 8px; padding: 40px 44px; }
.gp-kick { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }
.gp-dot { width: 8px; height: 8px; border-radius: 4px; flex: none; background: #30d158; box-shadow: 0 0 0 3px rgba(48, 209, 88, .25); }
.gp-dot.pause { background: #ffb340; box-shadow: 0 0 0 3px rgba(255, 179, 64, .25); }
.gp-dot.off { background: rgba(255, 255, 255, .45); box-shadow: none; }
.gp-title { margin: 2px 0 0; font-size: 26px; line-height: 1.12; font-weight: 800; letter-spacing: -.4px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.wide .gp-title { font-size: 44px; letter-spacing: -.9px; }
body.wide .gp-title.long { font-size: 34px; }
.gp-sub { font-size: 15px; color: rgba(255, 255, 255, .78); }
body.wide .gp-sub { font-size: 17px; }
.gp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
/* телефон: кнопки крупно, каждая на всю ширину */
body:not(.wide) .gp-actions .mh-btn { flex: 1 1 100%; justify-content: center; height: 48px; border-radius: 24px; font-size: 16px; }
.gp-h { margin: 12px 2px 0; font-size: 21px; font-weight: 800; letter-spacing: -.3px; color: var(--fg); }
.gp-people { display: grid; grid-template-columns: 1fr; gap: 8px; }
body.wide .gp-people { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gp-p { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--bg-elev); }
body.wide .gp-p { background: rgba(255, 255, 255, .06); }
.gp-p .av.talk { box-shadow: 0 0 0 2.5px var(--bg-elev), 0 0 0 5px #30d158; }
.gp-pn { flex: 1; min-width: 0; }
.gp-pn .n { font-size: 16px; font-weight: 650; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-pn .s { display: flex; align-items: center; gap: 5px; margin-top: 1px; font-size: 13.5px; color: var(--fg-3); }
.gp-pn .s svg { width: 15px; height: 15px; flex: none; }
.gp-pn .s.warn { color: #ff9f0a; }
.gp-mic { flex: none; color: var(--fg-3); opacity: .7; }
.gp-mic.on { color: #30d158; opacity: 1; }
.gp-mic svg { width: 20px; height: 20px; }
.gp-note { margin: 6px 2px 0; max-width: 620px; font-size: 14px; line-height: 1.5; color: var(--fg-3); }
@media (max-width: 719px) {
  .p-bubbles { bottom: 90px; }
  /* на телефоне боковая панель — почти во всю ширину: рядом остаётся полоска с видео, без кнопок (не влезают);
     касание по ней панель убирает */
  #player.full.info .p-ui, #player.full.room .p-ui { opacity: 0; pointer-events: none; }
}
/* свёрнутый плеер: поверх маленького видео — только отсчёт, без заметок, сообщений и реакций */
#player.mini .p-notes, #player.mini .p-bubbles, #player.mini .p-fly, #player.mini .p-over.wait { display: none; }
#player.mini .p-over .num { font-size: 56px; }
#player.mini .p-over .s { display: none; }

/* подробности слева в плеере: видео сдвигается вправо и уменьшается (applyScroll), управление — над видео */
.p-info { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pi-w, 400px); z-index: 4; display: flex; flex-direction: column;
  background: #111; box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08); color: #f5f5f5; cursor: auto; -webkit-user-select: text; user-select: text;
  transform: translate3d(-100%, 0, 0); visibility: hidden; transition: transform .42s cubic-bezier(.2, .9, .3, 1), visibility 0s .42s; }
#player.full.info .p-info { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.2, .9, .3, 1), visibility 0s; }
#player.mini .p-info { display: none; }
#player .p-frame.glide { transition: transform .42s cubic-bezier(.2, .9, .3, 1); }
#player.info .p-ui { left: var(--info-w); }
#player .p-ui { transition: opacity .25s ease, left .42s cubic-bezier(.2, .9, .3, 1), right .42s cubic-bezier(.2, .9, .3, 1); }
.pi-head { display: flex; align-items: center; gap: 8px; min-height: calc(var(--pt) + var(--th) + 6px); padding: var(--pt) 10px 6px 20px; }
.pi-head b { flex: 1; font-size: 13px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.pi-close { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; color: #fff; }
.pi-close:hover { background: rgba(255, 255, 255, .1); }
.pi-close svg { width: 21px; height: 21px; }
.pi-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 28px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.pi-title { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 850; letter-spacing: -.4px; }
.pi-alt { font-size: 15px; color: rgba(255, 255, 255, .55); }
.pi-meta { font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, .78); line-height: 1.5; }
.pi-meta .sc { font-weight: 700; }
.pi-meta i { font-style: normal; color: rgba(255, 255, 255, .35); margin: 0 7px; }
.pi-tag { font-size: 14.5px; font-style: italic; color: rgba(255, 255, 255, .65); }
.pi-desc { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .82); white-space: pre-line; }
.pi-desc .sk-text { display: block; margin: 6px 0; }
.pi-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pi-btns .mh-btn { height: 38px; padding: 0 16px; font-size: 14px; }
.pi-h { margin: 14px 0 2px; font-size: 17px; font-weight: 750; }
.pi-list { display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; }
.pi-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; text-align: left; color: inherit; }
.pi-item:hover { background: rgba(255, 255, 255, .07); }
.pi-th { width: 104px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #222; flex: none; }
.pi-th.poster { width: 52px; aspect-ratio: 2 / 3; }
.pi-th img { width: 100%; height: 100%; object-fit: cover; }
.pi-it { min-width: 0; }
.pi-it .t { font-size: 14.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pi-it .s { font-size: 12.5px; color: rgba(255, 255, 255, .5); margin-top: 2px; }
.pi-cast { display: flex; flex-direction: column; gap: 8px; }
.pi-person { display: flex; align-items: center; gap: 12px; }
.pi-person .ph { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #222; flex: none; display: grid; place-items: center; color: rgba(255, 255, 255, .3); }
.pi-person .ph img { width: 100%; height: 100%; object-fit: cover; }
.pi-person .ph svg { width: 22px; height: 22px; }
.pi-person .t { font-size: 14.5px; font-weight: 600; }
.pi-person .s { font-size: 12.5px; color: rgba(255, 255, 255, .5); }
#player .p-list[hidden] { display: none; }

/* --- «Смотреть на телевизоре»: видео идёт на ТВ, здесь — кадр с подписью и пульт; микрофон — «нажми и говори» */
#player.cast .p-stage video { visibility: hidden; }
#player .p-cast { position: absolute; inset: 0; overflow: hidden; background: #000; }
#player .p-cast[hidden] { display: none; }
#player .p-cast .pc-bg { position: absolute; inset: -20px; background: center / cover no-repeat; filter: blur(14px) brightness(.42); transform: scale(1.04); }
#player .p-cast .pc-in { position: absolute; left: 0; right: 0; top: 0; height: 50%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 6px; padding: 16px 16px 58px; box-sizing: border-box; text-align: center; }
#player .p-cast .pc-ic { width: 64px; height: 64px; border-radius: 32px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); margin-bottom: 4px; }
#player .p-cast .pc-ic svg { width: 32px; height: 32px; }
#player .p-cast b { font-size: 20px; font-weight: 700; }
#player .p-cast .pc-s { font-size: 14px; color: rgba(255, 255, 255, .72); max-width: 360px; }
#player.mini .p-cast .pc-in > :not(.pc-ic), #player.dock .p-cast .pc-s { display: none; }
#player.mini .p-cast .pc-in { height: 100%; justify-content: center; padding: 0; }
#player .p-castback[hidden] { display: none; }
#player.mini .p-cast .pc-ic { width: 36px; height: 36px; }
#player.mini .p-cast .pc-ic svg { width: 20px; height: 20px; }
.pr-tv.on { color: #30d158; }
.pr-tvcard { gap: 10px; }
.pr-tvt { font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .72); }
.pr-tvgo { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 12px; font-size: 15px; font-weight: 650;
  background: #f5f5f5; color: #0a0a0a; }
.pr-tvgo.on { background: rgba(255, 255, 255, .12); color: #fff; }
.pr-tvgo svg { width: 18px; height: 18px; flex: none; }
.pr-tvgo:active { transform: scale(.98); }
.pr-mic.ptt { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pr-mic.ptt.on { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(48, 209, 88, .25); }
.av.tv svg { width: 55%; height: 55%; }


/* сообщения как в Telegram: ответ цитатой, «изменено», реакции под пузырём, меню с реакциями, строка ответа/правки над полем */
.pr-msg .txt { -webkit-touch-callout: none; }
.pr-quote { display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin: 1px 0 5px; padding: 3px 8px 4px 9px; border-radius: 8px;
  border-left: 3px solid currentColor; background: rgba(255, 255, 255, .08); text-align: left; font-size: 13px; line-height: 1.3; color: inherit;
  transition: opacity .12s; }
.pr-quote:active { opacity: .6; }
.pr-msg.me .pr-quote { background: rgba(255, 255, 255, .16); border-left-color: rgba(255, 255, 255, .85); }
.pr-quote b { font-weight: 700; }
.pr-msg.me .pr-quote b { color: #fff !important; }
.pr-quote span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.pr-msg .ed { font-size: 11.5px; opacity: .6; white-space: nowrap; }
.pr-mr { display: flex; flex-wrap: wrap; gap: 4px; }
.pr-mrc { display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 13px; background: rgba(255, 255, 255, .1); font-size: 14px; color: #fff; }
.pr-mrc b { font-size: 12.5px; font-weight: 700; }
.pr-mrc.on { background: #0a84ff; }
.pr-mrc:active { transform: scale(.92); }
.pr-msg.flash .txt { animation: prFlash 1.2s ease; }
@keyframes prFlash { 0%, 40% { box-shadow: 0 0 0 3px rgba(10, 132, 255, .7); } 100% { box-shadow: 0 0 0 3px rgba(10, 132, 255, 0); } }
.mm-reacts { display: flex; gap: 2px; padding: 4px 6px 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.mm-r { width: 38px; height: 38px; border-radius: 19px; font-size: 22px; line-height: 1; display: grid; place-items: center;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .15s ease; }
.mm-r:hover { transform: scale(1.18); }
.mm-r.on { background: rgba(10, 132, 255, .35); }
.pr-ctx { display: flex; align-items: center; gap: 10px; padding: 2px 2px 2px 8px; color: #0a84ff; }
.pr-ctx[hidden] { display: none; }
.pr-ctx > svg { width: 20px; height: 20px; flex: none; }
.pr-ctx-t { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 2px solid #0a84ff; padding-left: 8px; font-size: 13px; line-height: 1.3; }
.pr-ctx-t b { font-weight: 700; }
.pr-ctx-t span { color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-ctx-x { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; flex: none; color: rgba(255, 255, 255, .6); }
.pr-ctx-x svg { width: 18px; height: 18px; }
/* ---------- Телефон боком (низкий и широкий экран, без панели компьютера): высоты мало, ширины много. Вкладки —
   колонкой слева (навигационная колонка, как в Android; заодно на месте выреза iPhone), шапки ниже, вся ширина под
   ряды, пульт и «Сейчас на телевизоре» — в две колонки, листы — колонкой посередине, вход — рядом, а не столбиком.
   Плеер и так во весь экран. Вырез iPhone боком — с обеих сторон (safe-area слева и справа) */
@media (orientation: landscape) and (max-height: 479px) {
  :root { --tabs-h: 0px; --rail: calc(80px + var(--safe-l)); }
  #tabs { top: 0; right: auto; bottom: 0; width: var(--rail); height: auto; display: flex; flex-direction: column; justify-content: center;
    gap: 6px; padding: var(--safe-t) 0 var(--safe-b) var(--safe-l); border-top: 0; border-right: 1px solid var(--line); }
  .tab { flex: none; height: 62px; font-size: 11.5px; }
  .tab svg { width: 26px; height: 26px; }
  #views { left: var(--rail); }
  .page { padding-right: var(--safe-r); padding-bottom: calc(var(--safe-b) + 20px); }
  .view.has-mini .page { padding-bottom: calc(var(--safe-b) + 88px); }
  .page > *, .np { max-width: none; margin-left: 0; margin-right: 0; }
  .topbar { padding-top: calc(var(--safe-t) + 8px); padding-bottom: 6px; }
  .topbar .search-box { margin-bottom: 6px; }
  .chip { height: 36px; }
  .hdr { min-height: calc(48px + var(--safe-t)); }
  .hero { max-height: 46vh; }
  .t-actions { max-width: 520px; }
  #mini { left: calc(var(--rail) + 10px); right: auto; width: min(480px, calc(100% - var(--rail) - var(--safe-r) - 20px)); }
  #player.mini { right: calc(var(--safe-r) + 10px); width: min(300px, 40vw); }

  /* пульт: крестовина слева во всю высоту, кнопки, громкость и яркость — справа */
  .remote { display: grid; grid-template-columns: auto minmax(0, 360px); grid-auto-rows: auto; align-content: center; justify-content: center;
    column-gap: clamp(24px, 6vw, 56px); row-gap: 10px; padding: 4px 16px calc(var(--safe-b) + 8px); }
  .remote > .dpad-row { grid-column: 1; grid-row: 1 / span 4; width: auto; align-self: center; }
  .remote > :not(.dpad-row) { grid-column: 2; }
  .dpad, .dpad-row.with-strip .dpad { width: min(290px, calc(100dvh - var(--safe-b) - 96px)); }
  .dpad-row.with-strip { padding-right: 44px; }
  .key { min-height: 64px; }
  .slider-row { min-height: 54px; }

  /* листы — колонкой посередине, почти во всю высоту */
  .sheet { left: max(var(--safe-l), calc(50% - 310px)); right: max(var(--safe-r), calc(50% - 310px)); max-height: calc(var(--vvh, 100dvh) - var(--safe-t) - 10px); }
  .sheet.full { top: calc(var(--vvt, 0px) + var(--safe-t) + 10px); }
  .sheet .grabber { margin-top: 6px; }

  /* «Сейчас на телевизоре»: кадр и название слева, управление справа */
  .sheet.np-sheet { left: max(var(--safe-l), 12px); right: max(var(--safe-r), 12px); }
  .np { flex-direction: row; align-items: center; gap: 28px; padding: 0 20px calc(8px + var(--safe-b)); min-height: 0; }
  .np-head { flex: 1 1 0; min-width: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
  .np .art { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 50dvh; min-height: 0; border-radius: 14px; margin: 0; }
  .np h2 { margin: 12px 0 2px; font-size: 20px; }
  .np-ctrl { flex: 1.2 1 0; min-width: 0; max-height: 100%; overflow-y: auto; margin: 0; padding-top: 0; }
  .transport { margin: 4px -8px 2px; }
  .transport .play { width: 64px; height: 64px; border-radius: 32px; }

  /* вход: логотип меньше, два выбора рядом */
  .gate { padding: 16px calc(24px + var(--safe-r)) calc(16px + var(--safe-b)) calc(24px + var(--safe-l)); gap: 12px; }
  .gate .logo { width: 56px; height: 56px; border-radius: 14px; }
  .gate h1 { margin: 0; font-size: 22px; }
  .gate p { font-size: 16px; max-width: 560px; }
  .gate-picks { flex-direction: row; max-width: 760px; }
  .gate-pick { flex: 1 1 0; min-width: 0; }
  .gate-back { left: calc(var(--safe-l) + 12px); }
}

/* ---------- Друзья (Telegram): кружок с фото, комната друга на «Главной», «Позвать друзей» в комнате, вход через Telegram */
.av { overflow: hidden; }
.av .av-pic { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0; transition: opacity .2s ease; }
.av .av-pic.ok { opacity: 1; }
.card-av { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; }
.card-av .av { font-size: 14px; box-shadow: 0 0 0 2.5px rgba(0, 0, 0, .55); }
/* смотрят несколько друзей — кружки внахлёст, первый (хозяин) сверху */
.card-av .av + .av { margin-left: -9px; }
.card-av .av:nth-child(1) { z-index: 3; }
.card-av .av:nth-child(2) { z-index: 2; }
.opt-group > .opt + .opt:has(> .av:first-child)::before { left: 62px; }
.opt > .av { margin-right: 0; }
/* «Позвать друзей» в «Комнате»: справа кнопка; позвали — серым «Позвали», в комнате — зелёным «Здесь» */
.pr-pn .s.on { color: #30d158; }
.pr-call { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; background: #0a84ff; color: #fff; font-size: 14px; font-weight: 650;
  transition: background .15s ease, transform .12s ease; }
.pr-call:active { transform: scale(.95); }
.pr-call.done { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); }
.pr-call.busy { opacity: .6; }
.pr-here { flex: none; display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 650; color: #30d158; }
.pr-here svg { width: 16px; height: 16px; }
.pr-addfr { display: flex; align-items: center; gap: 11px; min-height: 48px; width: 100%; text-align: left; color: #fff; }
.pr-addfr .av { background: rgba(10, 132, 255, .18); color: #4ea2ff; }
.pr-addfr .av svg { width: 19px; height: 19px; }
.pr-addfr .n { color: #4ea2ff; }
.pr-addfr .pr-pn .s { white-space: normal; line-height: 1.35; }
.pr-vis { display: flex; align-items: center; gap: 12px; width: 100%; padding-top: 12px; text-align: left; color: #fff; border-top: 1px solid rgba(255, 255, 255, .08); }
.pr-vis .pr-pn .s { white-space: normal; }
.pr-vis .toggle { background: rgba(255, 255, 255, .16); }
.pr-vis .toggle.on { background: #30d158; }
/* та же карточка «Позвать по ссылке» в листе («Добавить друга») — в цветах листа. Not inside the room's column:
   «Сейчас играет» is a sheet too, and the column there got the sheet's margins and colours (28.11) */
.sheet .pr-card:not(.p-room *) { margin: 0 16px; background: var(--bg-elev); color: var(--fg); }
.sheet .pr-invr span:not(.p-room *) { color: var(--fg-3); }
.sheet .pr-qr:not(.p-room *) { box-shadow: inset 0 0 0 1px var(--line); }
.sheet .pr-url:not(.p-room *) { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg-2); }
.sheet .pr-sh:not(.p-room *) { background: var(--chip); color: var(--fg-2); }
.sheet .pr-sh:not(.p-room *):hover { background: var(--bg-elev-2); color: var(--fg); }
.sheet .pr-sh.more:not(.p-room *) .ic { background: var(--fg-3); }
.af-lead { margin: 4px 32px 14px; font-size: 15.5px; line-height: 1.4; color: var(--fg-2); }
.af-scan { width: calc(100% - 32px); margin: 12px 16px 0; min-height: 50px; background: var(--bg-elev); }
.af-new { display: block; margin: 14px auto 0; padding: 8px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--link); }
.af-new:active { background: var(--chip); }
.add-friend { padding-bottom: calc(var(--safe-b) + 18px); }
/* без Telegram — как подключить */
.soc-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 28px calc(var(--safe-b) + 20px); text-align: center; }
.soc-logo svg { width: 64px; height: 64px; display: block; }
.soc-empty b { font-size: 21px; font-weight: 800; }
.soc-empty p { margin: 0; max-width: 380px; font-size: 15.5px; line-height: 1.4; color: var(--fg-2); }
.soc-empty p.small { font-size: 13.5px; color: var(--fg-3); }
.soc-empty .btn { max-width: 340px; margin-top: 6px; }
a.btn { text-decoration: none; }
.btn.tg-btn svg, .gate a.btn svg { width: 26px; height: 26px; }
/* «В друзья»: кто зовёт — крупно, «Добавить в друзья» */
.fr-inv { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 24px calc(var(--safe-b) + 18px); text-align: center; }
.fr-inv .av { font-size: 34px; margin-bottom: 4px; }
.fr-inv h2 { margin: 0; font-size: 24px; font-weight: 850; }
.fr-who { margin-top: -6px; font-size: 16px; color: var(--fg-2); }
.fr-inv p { margin: 4px 0 8px; max-width: 380px; font-size: 15px; line-height: 1.4; color: var(--fg-3); }
.fr-inv .btn { max-width: 360px; }
/* «Войти на «Mac · Chrome»?» в Telegram */
.tgl { padding: 6px 24px calc(var(--safe-b) + 18px); }
.tgl .btn { max-width: 360px; }
.tgl-ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--chip); color: var(--fg); }
.tgl-ic svg { width: 34px; height: 34px; }
.tgl p.tgl-warn { font-size: 14px; color: var(--warn); }
/* экран входа: «Войти через Telegram» — его знак целиком; ожидание подтверждения */
.gate-pick.tg { text-decoration: none; color: inherit; }
.gate-pick.tg .gi { background: none; }
.gate-pick.tg .gi svg { width: 44px; height: 44px; }
.gate-tg svg { display: block; width: 76px; height: 76px; }
.gate .gate-qr { width: 180px; height: 180px; border-radius: 16px; background: #fff; }
.gate a.btn { max-width: 320px; }
/* «Друзья» — как контакты Telegram: сейчас смотрят — карточками, ниже список карточкой: «Добавить друга» первой строкой
   (синим), друзья — кружок 44, имя, что смотрит или @имя (нет — имя посередине по высоте), «Войти», «⋯» */
.fp { padding-bottom: 24px; }
.fp-head { display: flex; align-items: center; gap: 12px; margin: 6px 16px 6px; }
.fp-title { flex: 1; margin: 0; font-size: 32px; line-height: 1.1; font-weight: 850; letter-spacing: -.4px; }
.friends-page.sub .fp > .row:first-child { margin-top: 4px; }
.fp-list { display: flex; flex-direction: column; margin: 8px 16px 0; border-radius: 16px; background: var(--bg-elev); overflow: hidden; }
.fp-li { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 9px 6px 9px 14px; text-align: left; color: var(--fg); }
button.fp-li:active, .fp-li.tap:active { background: var(--chip); }
.fp-li.tap { cursor: pointer; }
.fp-li + .fp-li::before { content: ''; position: absolute; top: 0; left: 72px; right: 0; height: 1px; background: var(--line); }
.fp-li .av { font-size: 18px; }
.fp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-body .t { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-body .s { margin-top: 2px; font-size: 14.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-body .s.on { color: var(--ok); }
.fp-new { color: var(--link); }
.fp-new .t { font-weight: 600; }
.fp-new-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--chip); }
.fp-new-ic svg { width: 22px; height: 22px; }
.fp-join { flex: none; height: 32px; padding: 0 16px; border-radius: 16px; display: flex; align-items: center; background: var(--link); color: #fff; font-size: 15px; font-weight: 650; }
.fp-join:active { opacity: .8; }
.fp-more { flex: none; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: var(--fg-3); }
.fp-more svg { width: 22px; height: 22px; }
.fp-more:active { background: var(--chip); }
.fp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 40px auto 0; padding: 0 28px; max-width: 420px; text-align: center; }
.fp-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--fg-2); }
.fp-ic svg { width: 36px; height: 36px; }
.fp-empty b { font-size: 21px; font-weight: 800; }
.fp-empty p { margin: 0 0 8px; font-size: 15.5px; line-height: 1.4; color: var(--fg-2); }
.fp-note { margin: 10px 32px 0; font-size: 13.5px; line-height: 1.4; color: var(--fg-3); }
.friends-page .soc-empty { margin-top: 30px; }
.tab { position: relative; }
.tab.live::after { content: ''; position: absolute; top: 9px; left: calc(50% + 9px); width: 9px; height: 9px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 2px var(--bar-solid); }
body.wide .fp-head { margin: 34px 16px 10px; }
body.wide .fp-title { font-size: 40px; letter-spacing: -.6px; }
body.wide .fp-list { max-width: 760px; background: rgba(255, 255, 255, .05); }
body.wide .fp-li:hover { background: rgba(255, 255, 255, .05); }
body.wide .fp-note { max-width: 720px; }
body.wide .fp-more:hover { background: rgba(255, 255, 255, .08); color: var(--fg); }

/* account (account.js): the sign-in flow on the first screen and in sheets, the card in «Настройки», «Аккаунт» */
.btn.link { min-height: 44px; background: none; color: var(--link); font-weight: 600; font-size: 16px; }
.btn.link svg { width: 20px; height: 20px; }
.gate .gate-other { width: auto; margin-top: 4px; }
.acct-in { width: 100%; max-width: 320px; height: 54px; padding: 0 16px; border-radius: 16px; background: var(--bg-elev); color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; text-align: left; }
.acct-in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--link); }
.acct-in.wide { max-width: none; }
.acct-st { min-height: 20px; font-size: 14.5px; line-height: 1.35; color: var(--fg-3); max-width: 340px; }
.acct-st.ok { color: var(--ok); }
.acct-st.bad { color: var(--danger); }
.gate .acct-again { margin-top: 6px; }
.btn.link[disabled] { color: var(--fg-3); opacity: 1; }

/* the same flow in a sheet: centred column like the first screen, no own «Назад» */
.acct-flow.in-sheet { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 24px calc(var(--safe-b) + 20px); text-align: center; }
.acct-flow.in-sheet h1 { margin: 4px 0 0; font-size: 24px; font-weight: 850; }
.acct-flow.in-sheet p { margin: 0; max-width: 360px; font-size: 16px; line-height: 1.4; color: var(--fg-2); }
.acct-flow.in-sheet .btn { max-width: 320px; }
.acct-flow.in-sheet .gate-tg svg { display: block; width: 64px; height: 64px; }
.acct-flow.in-sheet .gate-qr { width: 170px; height: 170px; border-radius: 16px; background: #fff; }
.acct-flow.in-sheet .small { font-size: 14px; color: var(--fg-3); }

/* the card on top of «Настройки» */
.opt-group > .opt.acct-card { min-height: 84px; gap: 14px; }
.acct-card .av { flex: none; }
.acct-av0 { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--chip); color: var(--fg-2); }
.acct-av0 svg { width: 30px; height: 30px; }
.acct-av0.sk { animation: pulse 1.4s ease-in-out infinite; }
.acct-cn { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.acct-cn b { font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-cn small { font-size: 14.5px; line-height: 1.3; color: var(--fg-3); }
.opt-group > .opt + .opt:has(> .acct-li:first-child)::before { left: 58px; }
.opt svg.acct-li, .opt .acct-li { width: 28px; height: 28px; }

/* «Аккаунт»: the photo with a camera badge, the name and @username under it */
.acct-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 16px 22px; text-align: center; }
.acct-head b { margin-top: 8px; font-size: 22px; font-weight: 800; }
.acct-head > span { font-size: 15px; color: var(--fg-3); }
.acct-photo { position: relative; border-radius: 50%; }
.acct-photo:active { transform: scale(.97); }
.acct-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); box-shadow: 0 0 0 3px var(--bg); }
.acct-cam svg { width: 18px; height: 18px; }
body.wide .sheet .acct-cam { box-shadow: 0 0 0 3px var(--bg-sheet, var(--bg)); }

/* a device in a sheet (devices.js devSheet), as a session in Telegram's «Устройства»: ✕ in the corner, the icon on a
   coloured tile (TV — graphite, computer — blue, phone — green), the name and its state, the action as a big capsule */
/* Corners are concentric, as everywhere («Rвн = pad + Rнутр»): the window 32 = ✕ (44 / 2 = 22) + 10 from the edges =
   the button (.btn, 16 — a rounded rectangle as the other buttons, not a pill) + 16 from the edges. On a phone — the
   top corners (the bottom ones are the screen's) */
.dev-sheet { border-radius: 32px 32px 0 0; padding-bottom: calc(16px + var(--safe-b)); }
body.wide .sheet.dev-sheet { border-radius: 32px; padding-bottom: 16px; }
.dev-x { position: absolute; z-index: 6; top: 10px; left: 10px; background: var(--chip); }
.dev-head { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 22px 16px 24px; text-align: center; }
.dev-ic { width: 84px; height: 84px; margin-bottom: 12px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #4aa3ff, #1677f2); }
.dev-ic.t-tv { background: linear-gradient(180deg, #6b6b70, #3a3a3e); }
.dev-ic.t-phone { background: linear-gradient(180deg, #4cd964, #25a943); }
.dev-ic svg { width: 46px; height: 46px; }
.dev-ic svg path { stroke-width: 1.7; }
.dev-head b { font-size: 24px; font-weight: 800; line-height: 1.2; }
.dev-head > span:not(.dev-ic) { font-size: 16px; color: var(--fg-3); }
.dev-head > span.on { color: var(--ok); }
.dev-acts { display: flex; flex-direction: column; gap: 10px; padding: 28px 16px 0; }
.dev-acts .btn { color: #fff; }
.dev-acts .btn.dev-go { background: var(--link); }
.dev-acts .btn.dev-off { background: var(--danger); }

/* a line edited in its own sheet (name, @username) */
.acct-edit { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 0; }
.acct-edit .btn { margin-top: 4px; }
.acct-edit .acct-st { max-width: none; padding: 0 4px; }
.acct-pre { position: relative; display: block; }
.acct-pre > span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 17px; color: var(--fg-3); pointer-events: none; }
.acct-pre .acct-in { padding-left: 34px; }

/* «Настройки» and their pages — pages, not sheets (settings.js, sidebar.js setPage): rows in a column of a readable
   width; on a wide screen the column stands in the middle of the section, like the Mac's settings */
.set-page .set-col { padding: 4px 0 calc(var(--safe-b) + 40px); }
body.wide .set-page .set-col { max-width: 660px; margin: 0 auto; }
body.wide .set-page .set-col > .hist-head { padding-left: 16px; margin-bottom: 22px; }

/* the link as in Telegram's profile: «ссылка», the address, «а также @…, @…», QR on the right */
.acct-link { margin-bottom: 24px; }
.acct-link-in { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }
.acct-link-t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.acct-link-t small { font-size: 14px; color: var(--fg-3); }
.acct-link-u { font-size: 17px; color: var(--link); text-align: left; overflow-wrap: anywhere; }
.acct-link-more { font-size: 15px; line-height: 1.35; color: var(--fg-2); text-align: left; }
.acct-link-more button { color: var(--link); }
.acct-qr { flex: none; color: var(--link); }
.acct-qr svg { color: var(--link); }
.acct-qr-page { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 12px 24px 0; text-align: center; }
.acct-qr-page canvas { width: 240px; height: 240px; padding: 14px; border-radius: 24px; background: #fff; }
.acct-qr-page b { font-size: 20px; font-weight: 800; }
.acct-qr-page p { margin: 0; max-width: 320px; font-size: 15px; color: var(--fg-2); }
.acct-qr-page .btn { max-width: 320px; }
/* the card sits in its own box on the first page of «Настройки» (built once) — the gap a group gets after a group */
.acct-card-box:not(:empty) { margin-bottom: 24px; }
/* --- фильтры поиска (AnimeFilterBar мака): ряд под площадками — капсулы меньше капсул площадок, что выбрано — на
   капсуле; выбранный фильтр — системным синим (ChipBackground мака), «Сбросить» — тихой ссылкой в конце ряда */
.topbar .srch-fwrap .chips { padding-top: 6px; padding-bottom: 2px; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px 0 14px; border-radius: 17px;
  background: var(--chip); color: var(--fg); font-size: 14.5px; font-weight: 600; white-space: nowrap; scroll-snap-align: start;
  transition: background .15s, box-shadow .15s, transform .12s; }
.fchip svg { width: 13px; height: 13px; flex: none; opacity: .6; }
.fchip svg path { stroke-width: 2.6; }
.fchip svg:first-child:not(:last-child) { width: 15px; height: 15px; opacity: .75; }
.fchip svg:first-child:not(:last-child) path { stroke-width: 2; }
.fchip.on { background: rgba(10, 132, 255, .2); box-shadow: inset 0 0 0 1px rgba(10, 132, 255, .6); }
.fchip:active { transform: scale(.95); }
.srch-freset { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 8px; color: var(--fg-3);
  font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.srch-freset svg { width: 13px; height: 13px; }
.srch-freset svg path { stroke-width: 2.6; }
body.wide .fchip:hover { background: rgba(255, 255, 255, .14); }
body.wide .fchip.on:hover { background: rgba(10, 132, 255, .3); }
body.wide .srch-freset:hover { color: var(--fg); }
.srch-note { margin: 16px 16px 0; font-size: 14px; line-height: 1.4; color: var(--fg-3); }
.empty .srch-fclear { max-width: 260px; margin: 18px auto 0; }
/* подбор по фильтрам на телефоне — сеткой постеров, три в ряд */
body:not(.wide) .srch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; padding: 14px 16px 0; }
body:not(.wide) .srch-grid .card { width: 100%; }
body:not(.wide) .srch-grid .card .t { font-size: 14px; }

/* окошко выбора капсулами (жанры, годы, тип): у кнопки — тёмное стекло меню; щелчок включает, окно не закрывается */
.menu.cpanel { width: min(470px, calc(100vw - 24px)); max-width: none; max-height: min(560px, calc(100vh - 24px)); padding: 14px 14px 12px;
  display: flex; flex-direction: column; overflow: hidden; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 12px; font-size: 15px; }
.cp-reset { font-size: 13.5px; font-weight: 500; color: #0a84ff; }
.cp-reset:hover { color: #409cff; }
.cp-scroll { overflow-y: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.cp-find { display: block; width: 100%; height: 34px; margin-bottom: 12px; padding: 0 12px; border: 0; border-radius: 9px; outline: none;
  background: rgba(255, 255, 255, .08); color: inherit; font: inherit; font-size: 14px; }
.cp-find::placeholder { color: rgba(255, 255, 255, .4); }
.cp-caps { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-caps + .cp-caps { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.tcap { height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(255, 255, 255, .08); color: inherit; font-size: 14px; font-weight: 500;
  transition: background .12s ease, transform .12s ease; }
.tcap:hover { background: rgba(255, 255, 255, .15); }
.tcap:active { transform: scale(.95); }
.tcap.on, .tcap.on:hover { background: #0a84ff; color: #fff; }
.cp-note { margin-top: 12px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .45); }
/* телефон: то же листом снизу, капсулы крупнее, внизу «Готово» */
.cp-sheet { padding: 0 16px calc(var(--safe-b) + 14px); }
.cp-top { display: flex; justify-content: flex-end; min-height: 4px; }
.cp-sheet .cp-reset { padding: 0 2px 10px; font-size: 16px; color: var(--link); }
.cp-sheet .cp-find { height: 44px; border-radius: 12px; background: var(--chip); color: var(--fg); font-size: 16px; }
.cp-sheet .cp-find::placeholder { color: var(--fg-3); }
.cp-sheet .cp-caps { gap: 8px; }
.cp-sheet .cp-caps + .cp-caps { border-top-color: var(--line); }
.cp-sheet .tcap { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--chip); color: var(--fg); font-size: 16px; font-weight: 600; }
.cp-sheet .tcap.on { background: #0a84ff; color: #fff; }
.cp-sheet .cp-note { color: var(--fg-3); font-size: 14px; }
.cp-done { margin-top: 18px; }

/* --- «В избранное» (favBtn): обе подписи в одной ячейке — ширина по большей, при смене текста кнопка не дёргается;
   сердечко — контур и заливка друг на друге: заливка (системный красный) проявляется пружинкой, кольцо расходится */
.fav-btn .fav-tx { display: inline-grid; overflow: visible; }
.fav-btn .fav-tx > span { grid-area: 1 / 1; transition: opacity .2s ease; }
.fav-btn .fav-tx > span:last-child, .fav-btn.on .fav-tx > span:first-child { opacity: 0; }
.fav-btn.on .fav-tx > span:last-child { opacity: 1; }
.fav-btn .fav-heart { position: relative; display: inline-grid; place-items: center; flex: none; overflow: visible; }
.fav-btn .fav-heart > svg { grid-area: 1 / 1; transition: opacity .15s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.fav-btn .fav-heart > svg:last-child { color: #ff453a; opacity: 0; transform: scale(.4); }
.fav-btn.on .fav-heart > svg:last-child { opacity: 1; transform: none; }
.fav-btn.on .fav-heart > svg:first-child { opacity: 0; transform: scale(.6); }
.fav-btn .fav-heart::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 2px #ff453a; opacity: 0; pointer-events: none; }
.fav-btn .fav-heart.ring::after { animation: favring .55s ease-out; }
@keyframes favring { from { opacity: .75; transform: scale(.4); } to { opacity: 0; transform: scale(1.7); } }
.fav-btn[disabled] { opacity: .45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fav-btn .fav-heart.ring::after { animation: none; } }

/* --- «Моё» на телефоне (как «Вы» YouTube): крупный заголовок, друзья строкой кружков, избранное рядом, история */
/* шапка «Моё» одной строкой: кто вы, под именем «N устройств ›», справа шестерёнка (на телефоне настройки только здесь) */
.my-head { padding: 8px 8px 10px 16px; }
.my-who { display: flex; align-items: center; gap: 14px; }
.my-who .av { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; }
.my-logo { width: 60px; height: 60px; }
.my-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.my-name b { font-size: 24px; line-height: 1.15; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-sub { display: flex; align-items: center; min-width: 0; margin-top: 2px; font-size: 15px; color: var(--fg-3); white-space: nowrap; }
.my-devs { display: inline-flex; align-items: center; gap: 1px; flex: none; color: var(--fg-3); font-size: 15px; }
.my-devs svg { width: 14px; height: 14px; }
.my-devs:active { opacity: .6; }
.my-set { flex: none; }
.my-empty { padding-top: 36px; }
.my-friends:empty { display: none; }
.my-friends .sec-link .cnt { display: inline; margin-left: 7px; font-weight: 600; color: var(--fg-3); }
.my-fr-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; scroll-padding: 0 16px; }
.my-fr-row::-webkit-scrollbar { display: none; }
.my-fr { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; color: var(--fg); }
.my-fr .av { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; transition: transform .12s ease; }
button.my-fr:active .av { transform: scale(.94); }
/* смотрит вместе — зелёное кольцо, как «в сети» у мессенджеров */
.my-fr.live .av { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px #30d158; }
.my-fr.add .av { background: var(--chip); color: var(--fg-2); }
.my-fr.add .av svg { width: 24px; height: 24px; }
.my-fr .t { max-width: 100%; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-fr .s { margin-top: -3px; font-size: 11.5px; line-height: 1.2; color: #30d158; }
.my-fr-cta { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 2px 16px 8px; padding: 12px 12px 12px 14px;
  border-radius: 14px; background: var(--chip); color: var(--fg); font-size: 15px; line-height: 1.3; text-align: left; }
.my-fr-cta .gi { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.my-fr-cta .gi svg { width: 30px; height: 30px; }
.my-fr-cta .tx { flex: 1; min-width: 0; }
.my-fr-cta > svg { width: 18px; height: 18px; flex: none; color: var(--fg-3); }
.my-fr-cta:active { opacity: .7; }
/* «Избранное» сеткой; пустое — посередине строки сетки */
.fav-grid .empty { grid-column: 1 / -1; }
.fav-empty svg { color: #ff453a; }

/* оценка от немногих (меньше тысячи голосов) — сколько их, серым рядом с цифрой */
.votes { margin-left: 6px; font-size: .85em; font-weight: 500; color: var(--fg-3); }
.t-head .meta .votes { margin-left: 0; }
/* телефон: под «Видео пока нет» — почему */
.novideo-note { margin: -4px 4px 0; font-size: 14px; line-height: 1.35; color: var(--warn); text-align: center; }
/* кнопки в шапках боковых панелей — того же размера, что кнопки плеера: крестик колонки и подробностей — вровень с его крестиком */
.pr-head .pr-icon, .pi-close { width: 46px; height: 46px; border-radius: 23px; }
.pr-head .pr-icon svg, .pi-close svg { width: 24px; height: 24px; }

/* --- подборки (lists.js): строками в «Моё» (телефон) и на странице «Подборки» (широкий) — как «Плейлисты» в Медиатеке
   iPhone; поле названия новой подборки; капсулы вида в подборке */
.my-lists { margin: 8px 0 24px; }
.lists-wrap { max-width: 720px; padding-top: 14px; }
body.wide .lists-wrap { margin: 0 var(--pad) 0 var(--l); padding-top: 18px; }
body.wide .lists-wrap .opt-group { margin: 0; }
.list-chips { padding-top: 10px; padding-bottom: 2px; }
.list-chips[hidden] { display: none; }
.opt.an-row { padding: 0 16px; }
.an-input { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: none; color: var(--fg); font: inherit; font-size: 17px; }
.an-input::placeholder { color: var(--fg-3); }
.an-btns { padding: 16px 16px 4px; }
/* ---------- Музыка (music.js): строки треков, полки, исполнитель, альбом и плейлист, плашка внизу, «Сейчас играет».
   Карточки альбомов и плейлистов — общие карточки (cards.js) квадратом, исполнители — кругом (avatar).
   Цвет — из обложки (--tint, у Яндекса готовый): шапка страницы и «Сейчас играет» окрашены им */
/* цвет — свойством с типом: тогда браузер ведёт его плавно (градиенты сами не переходят), и фон «Сейчас играет» и
   страниц перетекает в цвет нового трека, а не перескакивает («транзишн для фона») */
@property --tint { syntax: '<color>'; inherits: true; initial-value: #1c1c1e; }
.card.square .pic { aspect-ratio: 1; border-radius: 10px; }
body.wide .card.square { width: 184px; }

/* страница в цвет обложки: сверху цвет, к низу шапки уходит в фон раздела (прокручивается вместе со страницей) */
.mus-page.tinted { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 55%, var(--bg)) 0,
  color-mix(in srgb, var(--tint) 18%, var(--bg)) 300px, var(--bg) 560px) var(--bg); background-attachment: local; transition: --tint .6s ease; }
.mus-page.tinted > .hdr { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background-color .2s ease; }
/* прокрутили — шапка плотная, как у всех страниц (ряды под ней не просвечивают) */
.mus-page.scrolled > .hdr { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }
.mus-page > .hdr .mus-like.on { color: #ff375f; }
.mus-page > .hdr .mus-like[disabled] { opacity: .3; }

/* строка трека */
.trk-list { display: flex; flex-direction: column; padding: 2px 0 6px; }
/* подсветка (наведение, нажатие) — плашкой с отступом 6 вокруг обложки со всех сторон: плашка — на 10 внутрь от краёв,
   обложка и надписи — там же, где у остального раздела (16 от края); скругление — 8 обложки + 6 */
.trk { position: relative; display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); min-height: 60px; margin: 0 10px;
  padding: 6px 10px 6px 6px; text-align: left; border-radius: 14px; color: var(--fg); }
.trk.numd { min-height: 54px; }
.trk:active { background: var(--chip); }
@media (hover: hover) { .trk:hover { background: var(--chip); } }
.trk.off { opacity: .4; }
.trk-c { position: relative; width: 48px; height: 48px; flex: none; border-radius: 8px; overflow: hidden; background: var(--img-bg); display: grid; place-items: center; }
.trk-c img { width: 100%; height: 100%; object-fit: cover; }
.trk-c.sk { background: var(--chip); }
.trk-noc { display: grid; place-items: center; color: var(--fg-3); }
.trk-noc svg { width: 22px; height: 22px; }
.trk-n { position: relative; width: 24px; flex: none; text-align: center; font-size: 16px; font-weight: 600; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.trk-n + .trk-c { margin-left: -2px; }
.trk-tx { flex: 1; min-width: 0; }
.trk-tx .t { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; line-height: 1.25; }
.trk-tx .t span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-tx .s { margin-top: 2px; font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-e { flex: none; font-style: normal; font-size: 10px; font-weight: 800; line-height: 15px; padding: 0 4px; border-radius: 4px; background: var(--fg-3); color: var(--bg); }
.trk-best { flex: none; font-style: normal; font-size: 12px; color: var(--fg-3); }
.trk-d { flex: none; font-size: 14px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
/* что играет — название системным синим; на обложке (или вместо номера) — полоски */
.trk { --bars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='8' width='3' height='10' rx='1.5'/%3E%3Crect x='10.5' y='5' width='3' height='13' rx='1.5'/%3E%3Crect x='17' y='10' width='3' height='8' rx='1.5'/%3E%3C/svg%3E"); }
.trk.on .trk-tx .t { color: var(--link); }
.trk.on .trk-c::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.trk.on .trk-c::before { content: ''; position: absolute; inset: 0; z-index: 1; background: #fff; -webkit-mask: var(--bars) center / 24px no-repeat; mask: var(--bars) center / 24px no-repeat; }
.trk.on.numd .trk-n { color: transparent; align-self: stretch; }
.trk.on.numd .trk-n::after { content: ''; position: absolute; inset: 0; background: var(--link); -webkit-mask: var(--bars) center / 20px no-repeat; mask: var(--bars) center / 20px no-repeat; }
.trk.on.paused .trk-c::before, .trk.on.paused.numd .trk-n::after { opacity: .5; }

/* полка треков: колонки по четыре строки вбок */
.scroller.trk-shelf { grid-auto-flow: column; grid-template-rows: repeat(4, auto); grid-auto-columns: min(calc(100% - 44px), 380px); gap: 0 8px; padding-left: 0; }
.trk-shelf .trk { scroll-snap-align: start; }
body.wide .scroller.trk-shelf { grid-auto-columns: 360px; gap: 0 12px; padding-left: calc(var(--l) - 16px); scroll-padding-left: calc(var(--l) - 16px); }
body.wide .trk-list { max-width: 860px; }

/* лучшее совпадение в поиске */
.mus-best { display: flex; align-items: center; gap: 14px; width: calc(100% - 32px); margin: 8px 16px 4px; padding: 12px; border-radius: 16px;
  background: var(--bg-elev); text-align: left; }
.mus-best > svg { width: 22px; height: 22px; color: var(--fg-3); }
.mus-best-c { width: 72px; height: 72px; flex: none; border-radius: 10px; overflow: hidden; background: var(--img-bg); }
.mus-best-c.round { border-radius: 50%; }
.mus-best-c img { width: 100%; height: 100%; object-fit: cover; }
.mus-best-tx { flex: 1; min-width: 0; }
.mus-best-tx .t { font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mus-best-tx .s { font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.wide .mus-best { max-width: 560px; }
/* «Всё» на широком: ряд площадки — во всё окно (уехавшие карточки уходят под панель), карточки возвращает в поле
   страницы отступ ряда (.scroller — padding var(--l)); у музыки ряда-прокрутки нет — возвращаем блок целиком, иначе
   лучшее совпадение и треки — под панелью. Сверху — 16 под заголовком, как у карточек */
body.wide .row > .mus-found { margin: 0 var(--rp) 0 var(--bp); padding-top: 8px; }

/* ---------- исполнитель: фото во всю ширину под прозрачной шапкой, имя и слушатели поверх, ▶ — у края фото */
.ar-page > .body { margin-top: calc(-56px - var(--safe-t)); }
.ar-page > .hdr h1 { transition: opacity .2s ease; }
.ar-page:not(.scrolled) > .hdr h1 { opacity: 0; }
.ar-page:not(.scrolled) > .hdr .icon-btn { color: #fff; background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ar-hero { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 74vh; overflow: hidden; background: var(--tint, var(--img-bg)); }
.ar-photo { position: absolute; inset: 0; overflow: hidden; }
/* фото у Яндекса бывают с бракованным краем (у КИНО нижний ряд точек — белый мусор): картинка чуть выше рамки, низ — за обрезом */
.ar-photo img { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 8px); object-fit: cover; object-position: 50% 22%; }
.ar-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .62) 100%); }
.ar-hero-in { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 12px; padding: 0 16px 18px; color: #fff; }
.ar-tx { flex: 1; min-width: 0; }
.ar-name { margin: 0; font-size: 40px; line-height: 1.02; font-weight: 850; letter-spacing: -1px; text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ar-stat { margin-top: 6px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .82); }
.ar-acts { display: flex; align-items: center; gap: 12px; flex: none; }
.ar-play, .ar-shuf { display: grid; place-items: center; border-radius: 50%; transition: transform .12s ease; }
.ar-play { width: 60px; height: 60px; background: #fff; color: #000; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.ar-play svg { width: 28px; height: 28px; margin-left: 3px; }
.ar-shuf { width: 44px; height: 44px; background: rgba(255, 255, 255, .2); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ar-shuf svg { width: 22px; height: 22px; }
.ar-play:active, .ar-shuf:active { transform: scale(.92); }
.ar-play[disabled], .ar-shuf[disabled] { opacity: .4; }
.ar-body { padding-top: 4px; }
/* последний релиз — одной крупной строкой */
.ar-last { display: flex; align-items: center; gap: 14px; width: calc(100% - 32px); margin: 10px 16px 4px; text-align: left; }
.ar-last > svg { width: 22px; height: 22px; color: var(--fg-3); flex: none; }
.ar-last-c { width: 96px; height: 96px; flex: none; border-radius: 10px; overflow: hidden; background: var(--img-bg); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.ar-last-c img { width: 100%; height: 100%; object-fit: cover; }
.ar-last-tx { flex: 1; min-width: 0; }
.ar-last-tx .k { font-size: 13px; font-weight: 700; color: var(--fg-3); text-transform: uppercase; letter-spacing: .3px; }
.ar-last-tx .t { margin-top: 2px; font-size: 19px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-last-tx .s { margin-top: 2px; font-size: 14px; color: var(--fg-2); }
/* «Об исполнителе»: фото, начало биографии (касание — целиком), сведения */
.ab-card { display: block; width: calc(100% - 32px); margin: 12px 16px 8px; border-radius: 18px; overflow: hidden; text-align: left;
  background: color-mix(in srgb, var(--tint, var(--chip)) 22%, var(--bg-elev)); }
.ab-photo { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--img-bg); }
.ab-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.ab-in { padding: 14px 16px 16px; }
.ab-text { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--fg); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.ab-card.open .ab-text { -webkit-line-clamp: unset; display: block; }
.ab-facts { margin-top: 10px; font-size: 14px; color: var(--fg-2); }
body.wide .ar-page > .body { margin-top: -72px; }
body.wide .ar-hero { aspect-ratio: auto; height: clamp(380px, 56vh, 560px); max-height: none; margin: 0 calc(-1 * var(--rp)) 0 calc(-1 * var(--bp)); width: auto; }
body.wide .ar-photo img { object-position: 50% 24%; }
body.wide .ar-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .7) 100%); }
body.wide .ar-hero-in { left: var(--l); right: var(--pad); padding: 0 0 34px; gap: 24px; }
body.wide .ar-name { font-size: 72px; letter-spacing: -2px; -webkit-line-clamp: 1; }
body.wide .ar-stat { font-size: 17px; }
body.wide .ar-play { width: 64px; height: 64px; }
body.wide .ar-last, body.wide .ab-card { max-width: 640px; }
body.wide .ab-card { display: grid; grid-template-columns: 280px 1fr; max-width: 980px; }
body.wide .ab-photo { aspect-ratio: auto; height: 100%; min-height: 200px; }
@media (hover: hover) { body.wide .ar-play:hover { transform: scale(1.06); } }

/* ---------- альбом и плейлист: телефон — обложка по центру, широкий — обложка слева, сведения справа */
.mus-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 16px 8px; }
.mus-art { width: min(64vw, 280px); aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--img-bg); box-shadow: 0 14px 44px rgba(0, 0, 0, .32);
  display: grid; place-items: center; }
.mus-art img { width: 100%; height: 100%; object-fit: cover; }
.mus-art .trk-noc svg { width: 64px; height: 64px; }
.mus-info { min-width: 0; width: 100%; }
.mus-title { margin: 16px 0 2px; font-size: 24px; line-height: 1.2; font-weight: 850; letter-spacing: -.3px; }
.mus-sub { display: inline-block; font-size: 18px; color: var(--fg-2); }
.mus-sub.link { color: var(--link); font-weight: 600; }
.mus-desc { display: -webkit-box; width: 100%; margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--fg-2); text-align: inherit;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.mus-desc.open { -webkit-line-clamp: unset; display: block; }
.mus-meta { margin-top: 6px; font-size: 13.5px; color: var(--fg-3); }
.mus-btns { display: flex; gap: 10px; margin-top: 16px; }
.mus-btns .btn { flex: 1; min-height: 48px; border-radius: 14px; }
.mus-btns.pad { padding: 8px 16px 6px; }
.mus-foot { padding: 14px 16px 6px; font-size: 13.5px; line-height: 1.6; color: var(--fg-3); }
body.wide .mus-head { flex-direction: row; align-items: flex-end; text-align: left; gap: 28px; padding: 18px 16px 18px; }
body.wide .mus-art { width: 232px; flex: none; }
body.wide .mus-title { font-size: 40px; margin-top: 0; }
body.wide .mus-btns { max-width: 400px; }
body.wide .mus-btns.pad { padding: 18px 16px 8px; }
body.wide .mus-desc { max-width: 720px; }

/* ---------- островок «что играет» внизу — как мини-плеер видео (#mini): над вкладками, на широком — внизу раздела.
   Островков три (прошлый, этот, следующий) — #mbar только место, островки ставит лента (music.js Carousel).
   От краёв 18 = 2 × 9 (отступ обложки от края островка): соседи выглядывают на 9 через просвет 9 (music.js ISL_GAP) */
#mbar {
  position: absolute; left: 18px; right: 18px; bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); z-index: 19; height: 64px; cursor: pointer;
  transform: translate3d(0, 0, 0); transition: transform .3s var(--ease), opacity .2s;
}
#mbar.hide { transform: translate3d(0, 130%, 0); opacity: 0; pointer-events: none; }
.mb-isl { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 18px;
  background: var(--bg-elev); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; will-change: transform; }
.mb-isl .thumb { width: 48px; height: 48px; flex: none; border-radius: 9px; overflow: hidden; background: var(--img-bg); display: grid; place-items: center; color: var(--fg-3); }
.mb-isl .thumb img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.mb-isl .thumb svg { width: 22px; height: 22px; }
.mb-isl .txt { flex: 1; min-width: 0; margin-left: 4px; }
.mb-isl .t { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-isl .s { font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ▶ и ⏭ — вплотную: между значками 16 (кнопки по 40 без промежутка). Гаснут за пальцем: --d — доля шага до середины
   (music.js Carousel) — уходящий гасит их на первых ~50 px, приезжающий проявляет на последних */
.mb-isl .round-btn { width: 40px; height: 44px; background: transparent; opacity: clamp(0, calc(1 - var(--d, 0) * 7), 1); }
.mb-isl .nb { margin-left: -8px; }
.mb-isl .round-btn svg { width: 24px; height: 24px; }
.mb-isl .bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--chip); }
.mb-isl .bar i { display: block; height: 100%; width: 0; background: var(--link); border-radius: 0 2px 2px 0; }
.view.has-mbar .page { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 92px); }
body.wide .view.has-mbar .page { padding-bottom: 108px; }
/* части, что есть только у среднего островка и полосы на широком экране (ниже) */
.mb-isl .mb-mid, .mb-isl .mb-ctl { display: contents; }
.mb-isl .pv, .mb-isl .mb-seek, .mb-isl .mb-right, .mb-edge { display: none; }

/* ---------- островок на широком экране (island.js): ширину и место ставит он сам (style), размер — data-sz: c —
   обложка, название, ▶; m — ещё ⏮ ⏭ и шкала; b — полоса во всю ширину: посередине кнопки над шкалой, справа громкость
   и очередь. По бокам — ручки размера, спрятанный — язычок с обложкой у нижнего края (#mtab) */
body.wide #mbar { left: calc(var(--inset) + 16px); right: auto; width: 360px; bottom: 16px; touch-action: none; transition: opacity .2s; }
body.wide #mbar[data-sz="b"] { height: 76px; }
body.wide #mbar.moving { cursor: grabbing; }
body.wide #mbar.sizing { cursor: ew-resize; }
body.wide .mb-edge { display: block; position: absolute; top: 0; bottom: 0; width: 14px; z-index: 5; cursor: ew-resize; }
.mb-edge.l { left: -7px; }
.mb-edge.r { right: -7px; }
.mb-edge::after { content: ''; position: absolute; top: 50%; left: 5px; width: 4px; height: 26px; margin-top: -13px; border-radius: 2px;
  background: var(--fg-3); opacity: 0; transition: opacity .15s ease; }
body.wide #mbar:hover .mb-edge::after { opacity: .3; }
body.wide #mbar .mb-edge:hover::after, body.wide #mbar.sizing .mb-edge::after { opacity: .85; }
body.wide #mbar[data-sz="c"] .nb { display: none; }
body.wide #mbar:not([data-sz="c"]) .bar { display: none; }
body.wide #mbar:not([data-sz="c"]) .mb-ctl { display: flex; align-items: center; justify-content: center; gap: 2px; flex: none; }
body.wide #mbar:not([data-sz="c"]) .pv { display: grid; }
body.wide #mbar:not([data-sz="c"]) .nb { margin-left: 0; }
/* ▶ — залитым кругом, как у плееров на компьютере */
body.wide #mbar:not([data-sz="c"]) .pb { width: 38px; height: 38px; margin: 0 4px; border-radius: 19px; background: var(--fg); color: var(--bg); }
body.wide #mbar:not([data-sz="c"]) .pb svg { width: 20px; height: 20px; }
body.wide #mbar:not([data-sz="c"]) .mb-seek { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
/* средний — как мини-плеер Apple Music: сверху «название · исполнитель», под ним шкала во всю ширину текста, кнопки справа */
body.wide #mbar[data-sz="m"] .mb-isl { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-rows: 1fr 1fr; column-gap: 12px; align-items: center; }
body.wide #mbar[data-sz="m"] .thumb { grid-area: 1 / 1 / 3 / 2; }
body.wide #mbar[data-sz="m"] .txt { grid-area: 1 / 2; align-self: end; display: flex; align-items: baseline; gap: 4px; margin-left: 0; }
body.wide #mbar[data-sz="m"] .txt .t { flex: 0 1 auto; min-width: 0; font-size: 15px; }
body.wide #mbar[data-sz="m"] .txt .s { flex: 1 1 0; min-width: 48px; }
body.wide #mbar[data-sz="m"] .txt .s:not(:empty)::before { content: '· '; }
body.wide #mbar[data-sz="m"] .mb-seek { grid-area: 2 / 2; align-self: start; gap: 8px; }
body.wide #mbar[data-sz="m"] .mb-seek .tm { min-width: 30px; }
body.wide #mbar[data-sz="m"] .mb-ctl { grid-area: 1 / 3 / 3 / 4; margin-right: 2px; }
body.wide #mbar[data-sz="b"] .mb-isl { padding: 8px 14px 8px 10px; }
body.wide #mbar[data-sz="b"] .txt { flex: 1 1 0; }
body.wide #mbar[data-sz="b"] .mb-mid { display: flex; flex-direction: column; align-items: stretch; flex: 0 1 600px; min-width: 300px; }
body.wide #mbar[data-sz="b"] .mb-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 1 0; min-width: 0; }
.mb-seek .tm { min-width: 38px; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.mb-seek .tm:last-child { text-align: right; }
/* полосы шкалы и громкости: тонкие, при наведении — толще, синие и с бегунком */
.mb-seek .mb-trk, .mb-vol .mb-trk { position: relative; flex: 1; height: 18px; cursor: pointer; touch-action: none; }
.mb-vol .mb-trk { flex: 0 0 96px; }
.mb-seek .mb-trk::before, .mb-vol .mb-trk::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--chip); }
.mb-seek .fill, .mb-vol .fill { position: absolute; left: 0; top: 7px; height: 4px; width: 0; border-radius: 2px; background: var(--fg-2); }
.mb-seek .fill::after, .mb-vol .fill::after { content: ''; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 6px;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); opacity: 0; transition: opacity .12s ease; }
.mb-seek:hover .fill, .mb-seek.drag .fill, .mb-vol:hover .fill, .mb-vol.drag .fill { background: var(--link); }
.mb-seek:hover .fill::after, .mb-seek.drag .fill::after, .mb-vol:hover .fill::after, .mb-vol.drag .fill::after { opacity: 1; }
.mb-vol { display: flex; align-items: center; gap: 2px; }
.mb-right .icon-btn { width: 38px; height: 38px; color: var(--fg-2); }
.mb-right .icon-btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .mb-right .icon-btn:hover { color: var(--fg); background: var(--chip); } }
#mtab { position: absolute; bottom: 0; z-index: 19; width: 72px; height: 30px; padding: 5px 5px 0; overflow: hidden;
  border-radius: 14px 14px 0 0; background: var(--bg-elev); border: 1px solid var(--line); border-bottom: 0; box-shadow: var(--shadow);
  display: grid; place-items: start center; color: var(--fg-3); transition: transform .3s var(--ease); }
#mtab img { width: 100%; height: 44px; object-fit: cover; border-radius: 9px 9px 0 0; }
#mtab svg { width: 20px; height: 20px; margin-top: 2px; }
#mtab:hover { transform: translateY(-4px); }
#mtab.gone { transform: translateY(110%); pointer-events: none; }
body:not(.wide) #mtab { display: none; }
/* отзывчивость (28.11, «наведение на плей… чуть увеличить, а при нажатии уменьшить… база»): у кнопок островка и «Сейчас
   играет» наведение — чуть крупнее, нажатие — мельче, с лёгкой пружиной; прозрачность не плавная — её ведёт лента */
.mb-isl .round-btn, .mb-right .icon-btn, .mn .transport .round-btn { transition: transform .2s cubic-bezier(.3, .7, .4, 1.5), background-color .15s ease, color .15s ease; }
@media (hover: hover) {
  #mbar .mb-isl .round-btn:hover, #mbar .mb-right .icon-btn:hover { transform: scale(1.12); }
  .mn-ov button:hover { transform: scale(1.06); }
}
#mbar .mb-isl .round-btn:active, #mbar .mb-right .icon-btn:active, .mn .transport .round-btn:active, .mn-ov button:active { transform: scale(.86); transition-duration: .08s; }
@media (orientation: landscape) and (max-height: 479px) {
  #mbar { left: calc(var(--rail) + 10px); right: auto; width: min(480px, calc(100% - var(--rail) - var(--safe-r) - 20px)); }
  .view.has-mbar .page { padding-bottom: calc(var(--safe-b) + 88px); }
}

/* ---------- «Сейчас играет»: весь лист в цвет обложки (тёмным тоном — белые буквы читаются на любом цвете), обложка
   сверху (сжимается на низком экране), управление прижато книзу */
.sheet.mn-sheet { display: flex; flex-direction: column; transition: transform .38s var(--ease), opacity .3s ease, --tint .8s ease; }
.sheet.mn-sheet.tinted { --mn-fg: #fff; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 62%, #000) 0, color-mix(in srgb, var(--tint) 30%, #000) 100%);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25), 0 80px 0 color-mix(in srgb, var(--tint) 30%, #000); }
.sheet.mn-sheet.tinted .grabber { background: #fff; }
.mn { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 20px calc(12px + var(--safe-b)); overflow: hidden;
  container-type: size; }
.mn-top { display: flex; align-items: center; gap: 8px; margin: 0 -12px 4px; }
.mn-top .icon-btn, .mn-top-gap { width: 44px; flex: none; }
.mn-sheet.tinted .icon-btn { color: #fff; }
.mn-from { flex: 1; min-width: 0; text-align: center; font-size: 14px; font-weight: 650; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* обложка крупно, как в Яндекс Музыке: почти во всю ширину; лента из трёх (прошлая, эта, следующая) — сдвиг и масштаб
   ставит лента (music.js Carousel) */
/* рамка обложки — квадрат, мерка от высоты листа (cqh; 312 — шапка и управление под ней): на невысоком экране
   (Telegram) обложка меньше, но не сплющивается и не выталкивает кнопки. Текст песни — в той же рамке, поверх */
.mn-artbox { position: relative; flex: none; width: min(100%, 540px, 52vh); width: min(100%, 540px, calc(100cqh - 312px)); aspect-ratio: 1;
  margin: auto auto 0; }
.mn-art { position: absolute; inset: 0; transition: transform .45s var(--ease); cursor: grab; }
.mn-art.paused { transform: scale(.88); }
.mn-slide { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; background: var(--img-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); display: grid; place-items: center; will-change: transform; }
.mn-slide:empty { visibility: hidden; }
.mn-slide img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.mn-slide .trk-noc svg { width: 72px; height: 72px; }
.mn-ctrl { flex: none; margin-top: auto; padding-top: 18px; width: 100%; max-width: 560px; align-self: center; }
.mn-head { display: flex; align-items: center; gap: 8px; }
.mn-titles { flex: 1; min-width: 0; }
.mn-t { font-size: 22px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-a { display: block; max-width: 100%; padding: 0; font-size: 18px; color: inherit; opacity: .72; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* имена исполнителей — каждое своей ссылкой («VILLIAN, madk1d») */
/* место нажатия — на 8 выше и ниже букв (у строчного поле по вертикали строку не раздвигает) */
.mn-an, .mus-an { display: inline; padding: 8px 0; font: inherit; color: inherit; letter-spacing: inherit; transition: opacity .12s; }
.mn-an:active, .mus-an:active { opacity: .5; }
.mn-like { margin-right: -10px; }
.mn-like.on { color: #ff375f !important; }
.mn-sheet.tinted .seek .track { background: rgba(255, 255, 255, .25); }
.mn-sheet.tinted .seek .fill { background: #fff; }
.mn-sheet.tinted .times { color: rgba(255, 255, 255, .6); }
.mn .transport .round-btn { color: inherit; }
.mn .transport .round-btn.flat svg { width: 24px; height: 24px; }
.mn .transport .round-btn.flat.big svg { width: 36px; height: 36px; }
.mn .transport .round-btn.flat:not(.on) { opacity: .7; }
.mn .transport .round-btn.flat.big { opacity: 1; }
.mn .transport .round-btn.flat.on { color: var(--link); opacity: 1; }
.mn-sheet.tinted .transport .round-btn.flat.on { color: #fff; background: rgba(255, 255, 255, .18); }
.mn-sheet.tinted .transport .play { background: #fff; color: #000; }
.mn-bottom { display: flex; align-items: center; justify-content: space-between; margin: 6px -10px 0; }
.mn-where { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; border-radius: 22px; font-size: 15px; font-weight: 650; color: inherit; opacity: .8; }
.mn-where svg { width: 20px; height: 20px; }
.mn-where:active { opacity: .5; }
.mn-bottom .icon-btn { color: inherit; opacity: .8; }
/* широкий экран: «Сейчас играет» — во всё окно, как у Яндекс Музыки на компьютере (окном 520×760 посреди было тесно:
   обложка во всю ширину окна, а по высоте не влезали кнопки — она сжималась только по высоте и плющилась). Обложка —
   посреди экрана, квадрат одной меркой (--art); кнопки — на ней при наведении (на паузе — видны всегда); под ней —
   название и исполнитель, тонкая шкала по ширине обложки без цифр (время — по бокам шкалы при наведении). Текст песни
   и очередь выезжают из-под обложки вправо, обложка — влево: расходятся в стороны поровну (пользователь 04.11) */
body.wide .sheet.full.mn-sheet { left: 0; top: 0; width: 100%; height: 100dvh; max-height: none; padding-bottom: 0; border-radius: 0;
  transform: translate3d(0, 24px, 0); box-shadow: none; transition: transform .38s var(--ease), opacity .25s ease, --tint .8s ease; }
body.wide .sheet.full.mn-sheet.on { transform: none; }
body.wide .mn { --art: min(600px, calc(100dvh - 340px), calc((100vw - 200px) / 2)); --top: max(70px, calc((100dvh - var(--art) - 110px) / 2));
  --dx: 0px; position: relative; display: block; height: 100%; padding: 0; }
body.wide .mn-sheet.lyr-on .mn, body.wide .mn-sheet.q-on .mn { --dx: calc(var(--art) / -2 - 40px); }
body.wide .mn-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; margin: 0; padding: 14px 36px 0; }
body.wide .mn-artbox { display: contents; }
body.wide .mn-art, body.wide .mn-ctrl { position: absolute; right: auto; bottom: auto; left: calc(50% - var(--art) / 2); width: var(--art); margin: 0; z-index: 2;
  translate: var(--dx) 0; transition: translate .55s var(--ease), transform .45s var(--ease); }
body.wide .mn-art { top: var(--top); height: var(--art); }
body.wide .mn-sheet.lyr-on .mn-art { visibility: visible; }
/* колонка — по ширине обложки: без minmax(0, …) длинное название растягивало её (а с ней и шкалу) вправо за обложку */
body.wide .mn-ctrl { top: calc(var(--top) + var(--art)); max-width: none; padding-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "seek"; }
body.wide .mn-head { grid-area: head; justify-content: center; }
body.wide .mn-titles { flex: none; max-width: 100%; text-align: center; }
body.wide .mn-a { text-align: center; }
body.wide .mn .transport, body.wide .mn-bottom { display: none; }
/* шкала — тонкая, кружок — при наведении; время — по бокам шкалы, за её краями */
body.wide .mn .seek { grid-area: seek; margin: 8px 0 0; }
body.wide .mn .seek .track, body.wide .mn .seek .fill { top: 15px; height: 4px; border-radius: 2px; }
body.wide .mn .seek .thumb { opacity: 0; transition: opacity .15s ease, transform .15s ease; }
body.wide .mn .seek:hover .thumb, body.wide .mn .seek.drag .thumb { opacity: 1; }
body.wide .mn .times { grid-area: seek; align-self: end; display: flex; align-items: center; justify-content: space-between; height: 34px;
  margin: 0 -68px; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
body.wide .mn .times span { width: 52px; }
body.wide .mn .times span:first-child { text-align: right; }
body.wide .mn .seek:hover + .times, body.wide .mn .seek.drag + .times { opacity: 1; }
/* кнопки на обложке. Затемнение (.mn-scrim) и кнопки — порознь: листают — затемнение едет с обложкой (сдвиг и
   прозрачность ставит лента, music.js moved), кнопки — на месте. Мерки кнопок — в --u: 1px от обложки 385 и шире,
   на меньшей — меньше вместе с ней (ряд ⤮ ⏮ ⏯ ⏭ ↻ — 364, на обложке 222 вылезал за края) */
.mn-ov { display: none; }
body.wide .mn-ov { position: absolute; inset: 0; z-index: 3; display: block; container-type: inline-size; --u: min(1px, .26cqw);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; }
body.wide .mn-art:hover .mn-ov, body.wide .mn-art.paused .mn-ov { opacity: 1; pointer-events: auto; }
.mn-scrim { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 12px; background: rgba(0, 0, 0, .42); will-change: transform; }
.mn-ov-btns { position: absolute; inset: 0; }
.mn-ov-mid { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  gap: calc(10 * var(--u)); }
.mn-ov-bot { position: absolute; left: calc(16 * var(--u)); right: calc(16 * var(--u)); bottom: calc(16 * var(--u)); display: flex; align-items: center;
  justify-content: space-between; }
.mn-ov-top { position: absolute; top: calc(16 * var(--u)); right: calc(16 * var(--u)); }
.mn-ov .round-btn, .mn-ov .icon-btn, .mn-ov .mn-where { width: calc(48 * var(--u)); height: calc(48 * var(--u)); padding: 0; margin: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: transparent; opacity: 1; transition: background-color .15s ease, transform .15s ease; }
.mn-ov .mn-where span, .mn-ov [hidden] { display: none; }
.mn-ov .round-btn svg, .mn-ov .icon-btn svg, .mn-ov .mn-where svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.mn-ov .round-btn.big { width: calc(64 * var(--u)); height: calc(64 * var(--u)); }
.mn-ov .round-btn.big svg { width: calc(36 * var(--u)); height: calc(36 * var(--u)); }
.mn-ov .round-btn.play { width: calc(88 * var(--u)); height: calc(88 * var(--u)); margin: 0 calc(6 * var(--u)); background: #fff; color: #000; }
.mn-ov .round-btn.play svg { width: calc(38 * var(--u)); height: calc(38 * var(--u)); }
.mn-ov .round-btn.flat:not(.on) { opacity: .8; }
.mn-ov button:hover { background-color: rgba(255, 255, 255, .14); }
.mn-ov .round-btn.play:hover { background-color: #fff; transform: scale(1.06); }
.mn-ov .round-btn.flat.on, .mn-ov .mn-lyrb.on, .mn-ov .mn-qb.on { background-color: rgba(255, 255, 255, .24); }
.mn-ov .mn-like.on { color: #ff375f !important; }
/* текст песни и очередь — справа; спрятаны под обложкой (левым краем — у её левого края, прозрачные) */
body.wide .mn-lyr, body.wide .mn-q { position: absolute; left: calc(50% + 40px); top: 0; bottom: 0; width: min(640px, calc(50% - 88px)); min-height: 0;
  margin: 0; z-index: 1; display: block; opacity: 0; visibility: hidden; pointer-events: none; translate: calc(var(--art) / -2 - 40px) 0;
  transition: translate .55s var(--ease), opacity .35s ease, visibility 0s linear .55s; }
body.wide .mn-lyr { padding: 0; }
body.wide .mn-lyr::before { height: 30vh; }
body.wide .mn-q { display: flex; flex-direction: column; padding: 86px 0 28px; }
body.wide .mn-sheet.lyr-on .mn-lyr, body.wide .mn-sheet.q-on .mn-q { opacity: 1; visibility: visible; pointer-events: auto; translate: 0 0;
  transition: translate .55s var(--ease), opacity .45s ease .05s, visibility 0s; }
body.wide .mn-line { font-size: 30px; }
body.wide .mn-line.gap { font-size: 24px; }
.mn-q { display: none; }
.mn-q-head { flex: none; padding: 0 16px 10px; font-size: 20px; font-weight: 800; }
/* a book's chapters in the player (music.js showChapters): on the phone in the cover's frame like the lyrics, on the
   wide screen on the right like the queue; rows white on the player's color */
.mn-chl { display: none; padding: 0 16px; }
.mn-sheet.ch-on .mn-artbox .mn-chl { display: block; position: absolute; inset: 0; z-index: 1; padding: 0; }
.mn-sheet.ch-on .mn-art { visibility: hidden; }
body.wide .mn-chl { display: block; }
body.wide .mn-sheet.ch-on .mn-art { visibility: visible; }
body.wide .mn-sheet.ch-on .mn { --dx: calc(var(--art) / -2 - 40px); }
body.wide .mn-sheet.ch-on .mn-chp { opacity: 1; visibility: visible; pointer-events: auto; translate: 0 0;
  transition: translate .55s var(--ease), opacity .45s ease .05s, visibility 0s; }
.mn-chl .mg-head { margin: 0 0 6px; }
.mn-chl .mg-title { font-size: 20px; }
.mn-chl .mg-title span, .mn-chl .mg-s, .mn-chl .mg-note { color: rgba(255, 255, 255, .6); }
.mn-chl .mg-tool, .mn-chl .mg-find { background: rgba(255, 255, 255, .14); color: #fff; }
.mn-chl .mg-row { margin: 0; color: inherit; }
.mn-chl .mg-row:hover { background: rgba(255, 255, 255, .1); }
.mn-chl .mg-row.cur { background: rgba(255, 255, 255, .16); }
.mn-chl .mg-at { color: #fff; }
.mn-qlist { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-mask: linear-gradient(180deg, #000 0, #000 92%, transparent 100%); mask: linear-gradient(180deg, #000 0, #000 92%, transparent 100%); }
.mn-sheet.tinted .mn-q .trk .s, .mn-sheet.tinted .mn-q .trk-d { color: rgba(255, 255, 255, .6); }
.mn-sheet.tinted .mn-q .trk.on .trk-tx .t { color: #fff; }
.mn-sheet.tinted .mn-q .trk:hover { background: rgba(255, 255, 255, .1); }

/* широкий экран: у страниц шапка всегда плотная (wide.css) — у музыки над цветом и фото она прозрачная, пока не прокрутили */
body.wide .mus-page.tinted:not(.scrolled) > .hdr, body.wide .ar-page:not(.scrolled) > .hdr { background: transparent; }
body.wide .mus-page.scrolled > .hdr { background: rgba(10, 10, 10, .94); }

/* текст песни вместо обложки: строки крупно, звучащая — белая, прошедшие и будущие — тусклее; касание строки — к ней */
/* сверху — место до трети высоты: первая строка (и точки вступления) стоит там же, где звучащая потом, а не прижата к
   краю под растворением */
/* место сверху и снизу — пустыми блоками внутри прокрутки, не полями: поля (54 % высоты экрана) flex не ужимает, и в
   невысоком окне (Telegram на iPhone) кнопки уходили за низ листа (04.11) */
.mn-lyr { display: none; position: absolute; inset: 0; z-index: 1; padding: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 7%, #000 85%, transparent 100%); mask: linear-gradient(180deg, transparent 0, #000 7%, #000 85%, transparent 100%); }
.mn-lyr::before, .mn-lyr::after { content: ''; display: block; height: 22%; }
.mn-lyr::after { height: 60%; }
.mn-sheet.lyr-on .mn-lyr { display: block; }
.mn-sheet.lyr-on .mn-art { visibility: hidden; }
.mn-line { display: block; width: 100%; padding: 6px 0; text-align: left; font-size: 27px; line-height: 1.22; font-weight: 800; letter-spacing: -.3px;
  color: inherit; opacity: .5; transition: opacity .3s ease, transform .3s ease; transform-origin: 0 50%; }
/* спетые — бледнее будущих: взгляд идёт вниз, к тому, что сейчас начнётся */
.mn-line.past { opacity: .25; }
.mn-line.cur { opacity: 1; }
.mn-line.gap { font-size: 22px; }
/* вступление без слов: три точки загораются по очереди (доля до первой строки) и чуть «дышат»; пошли слова — уходят */
.mn-dots { display: flex; gap: 9px; max-height: 41px; padding: 14px 0; overflow: hidden; transform-origin: 0 50%;
  animation: mn-breathe 1.6s ease-in-out infinite; transition: max-height .35s ease, padding .35s ease, opacity .25s ease; }
.mn-dots i { flex: none; width: 13px; height: 13px; border-radius: 50%; background: currentColor; opacity: .38; transition: opacity .25s linear; }
.mn-dots.gone { max-height: 0; padding: 0; opacity: 0; }
@keyframes mn-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.mn-lyr-text { font-size: 19px; line-height: 1.5; font-weight: 650; white-space: pre-line; }
.mn-lyr-note { padding: 40px 0; font-size: 17px; opacity: .7; text-align: center; }
.mn-lyr-by { margin-top: 24px; font-size: 13px; opacity: .55; }
.mn-bottom-r { display: flex; align-items: center; gap: 4px; }
.mn-lyrb.on, .mn-qb.on { opacity: 1 !important; background: rgba(255, 255, 255, .18); }
.mn-sheet:not(.tinted) .mn-lyrb.on, .mn-sheet:not(.tinted) .mn-qb.on { background: var(--chip); }

/* audiobooks (28.11) in the same player: a cover is portrait (400×570 at «Книга в ухе») — the slide is too, in the middle of
   the square frame (no neighbours to swipe: every chapter has the same cover); its name opens its page; under the scale — how
   much of the book is left; below — the speed («1,25×») and the sleep timer (its minutes next to the moon) */
.mn-art.book .mn-slide, .mn-art.book .mn-scrim { left: 14.9%; width: 70.2%; }
.mn-art.book .mn-ov-bot { left: calc(14.9% + 12 * var(--u)); right: calc(14.9% + 12 * var(--u)); }
.mn-art.book .mn-ov-top { right: calc(14.9% + 12 * var(--u)); }
.mn-sheet.book .mn-t { cursor: pointer; }
.mn .times .mn-left { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
body.wide .mn-ctrl { grid-template-areas: "head" "seek" "left"; }
body.wide .mn-ctrl > .mn-left { grid-area: left; margin-top: 2px; padding: 0; font-size: 13px; color: var(--fg-3); }
body.wide .mn-sheet.tinted .mn-ctrl > .mn-left { color: rgba(255, 255, 255, .6); }
.mn-ctrl > .mn-left:empty { display: none; }
.mn-rate, .mn-sleep { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px;
  font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; color: inherit; opacity: .8; transition: opacity .12s, background-color .15s; }
.mn-sleep svg { width: 22px; height: 22px; }
.mn-sleep span:empty { display: none; }
.mn-sleep span { font-size: 14px; font-weight: 700; }
.mn-rate.on, .mn-sleep.on { opacity: 1; background: rgba(255, 255, 255, .18); }
.mn-sheet:not(.tinted) .mn-rate.on, .mn-sheet:not(.tinted) .mn-sleep.on { background: var(--chip); }
.mn-rate:active, .mn-sleep:active { opacity: .5; }
.mn-ov .mn-rate, .mn-ov .mn-sleep { height: calc(48 * var(--u)); min-width: calc(48 * var(--u)); padding: 0 calc(10 * var(--u)); color: #fff; opacity: 1;
  font-size: calc(16 * var(--u)); border-radius: calc(24 * var(--u)); }
.mn-ov .mn-sleep svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.mn-ov .mn-rate.on, .mn-ov .mn-sleep.on { background-color: rgba(255, 255, 255, .24); }

/* ---------- «Вместе» in «Сейчас играет» (listen-room.js): the room's column on the right, as in the reader (the shared
   rules — manga.css); wide — the player moves into the space left of it, phone — the column over it, a tap on the
   strip left of it hides it. The button — at the top's right, in a room — light with the number of people */
/* the column's paddings come from these (together.css): without --pb the whole padding of its bottom row was dropped —
   the mic stuck to the column's edge (28.11) */
.mn-sheet { --pt: 12px; --pr: 10px; --pb: calc(var(--safe-b) + 10px); }
body.wide .mn-sheet { --pt: calc(var(--safe-t) + 14px); }
.mn-sheet .p-room { z-index: 7; border-radius: inherit; }
body.wide .mn { transition: margin-right .42s cubic-bezier(.2, .9, .3, 1); }
body.wide .mn-sheet.room .mn { margin-right: 340px; }
@media (max-width: 719px) {
  .mn-sheet .p-room { width: 88%; border-radius: 0 24px 0 0; }
  .mn-sheet.room .r-shade { display: block; position: absolute; inset: 0; z-index: 6; background: rgba(0, 0, 0, .35); border-radius: inherit; }
}
.mn-together { position: relative; width: 44px; flex: none; }
.mn-together.on { background: rgba(255, 255, 255, .9); color: #000 !important; }
.mn-together .cnt { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11.5px; font-weight: 800;
  line-height: 18px; text-align: center; background: #0a84ff; color: #fff; }
.mn-together .cnt.unread { background: #ff3b30; }
.mn-together .cnt[hidden] { display: none; }
/* a guest out of a room can't call anyone — the place stays, «Сейчас играет»'s title keeps the middle */
.mn-together[hidden] { display: block; visibility: hidden; }
/* ---------- Люди (people.js). Карточка человека — PersonCard мака: фото 3:4, имя и роль по две строки; одна везде
   («В ролях», «Персонажи», «Озвучивают», «Роли»), на телефоне поменьше. Наведение на широком — как у карточек: фото
   растёт от нижнего края, белая рамка 3 и тень */
.person { display: flex; flex-direction: column; width: 104px; text-align: left; color: var(--fg); scroll-snap-align: start; }
.person .pic { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--img-bg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .25); transition: transform .12s ease; }
.person .pic.sk { box-shadow: none; }
button.person:active .pic { transform: scale(.96); }
.person .pic img { width: 100%; height: 100%; object-fit: cover; }
.person .pic > svg { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; color: var(--fg-3); opacity: .5; }
.person .t { margin-top: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .s { margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--fg-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.wide .person { width: 130px; }
body.wide .person .s { color: rgba(255, 255, 255, .5); }
body.wide .person .pic > svg { width: 42px; height: 42px; margin: -21px 0 0 -21px; color: rgba(255, 255, 255, .25); opacity: 1; }
body.wide .person .pic { transform-origin: 50% 100%; transition: transform .32s cubic-bezier(.34, 1.36, .64, 1), box-shadow .3s ease; }
body.wide .person .pic::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0); transition: box-shadow .2s ease; }
@media (hover: hover) {
  body.wide button.person:hover .pic { transform: scale(1.03); box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
  body.wide button.person:hover .pic::after { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9); }
}

/* страница человека — PersonPage мака: слева фото, справа имя, второе имя, сведения, описание; ниже ряды. Телефон —
   как в приложении для iPhone: фото 120×170, описание под ним во всю ширину */
.pp-head { display: flex; align-items: flex-start; gap: 16px; padding: 12px 16px 0; }
.pp-photo { position: relative; flex: none; width: 120px; height: 170px; border-radius: 14px; overflow: hidden; background: var(--img-bg); }
.pp-photo img { width: 100%; height: 100%; object-fit: cover; }
.pp-photo > svg { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; color: var(--fg-3); opacity: .5; }
.pp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.pp-name { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 850; letter-spacing: -.4px; overflow-wrap: anywhere; }
.pp-alt { font-size: 15px; color: var(--fg-2); }
.pp-facts { font-size: 14px; line-height: 1.4; color: var(--fg-3); }
.pp-retry { margin-top: 8px; }
.pp-bio .desc { margin-top: 14px; }
/* аниме у Shikimori — только номер MAL: пока ищется тайтл каталога — кольцо поверх постера */
.pp-ring { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
.pp-ring .spinner { border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }

/* фильмография — строками: год, тайтл и роль, фильм или сериал (CreditRow мака) */
.pp-credits .sec-title .cnt { margin-left: 8px; font-size: .8em; font-weight: 600; color: var(--fg-3); }
.pp-clist { display: flex; flex-direction: column; padding-bottom: 8px; }
.pp-credit { display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 9px 16px; text-align: left; color: var(--fg); }
.pp-credit:active { background: var(--chip); }
.pp-credit .y { flex: none; width: 44px; font-size: 15px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.pp-credit .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-credit .t { font-size: 16px; font-weight: 600; }
.pp-credit .s { font-size: 14px; color: var(--fg-3); }
.pp-credit .k { flex: none; font-size: 13px; color: var(--fg-3); }

body.wide .page.pp > .hdr { display: none; }
body.wide .pp-head { gap: 28px; padding: 104px 16px 0; }
body.wide .pp-photo { width: 200px; height: 280px; border-radius: 16px; box-shadow: 0 12px 48px rgba(0, 0, 0, .45); }
body.wide .pp-photo > svg { width: 70px; height: 70px; margin: -35px 0 0 -35px; color: rgba(255, 255, 255, .2); opacity: 1; }
body.wide .pp-txt { gap: 10px; padding-top: 8px; }
body.wide .pp-name { font-size: 40px; line-height: 1.08; letter-spacing: -.6px; }
body.wide .pp-name.long { font-size: 32px; }
body.wide .pp-alt { font-size: 16px; color: rgba(255, 255, 255, .55); }
body.wide .pp-facts { font-weight: 500; color: rgba(255, 255, 255, .75); }
body.wide .pp-bio { max-width: 720px; }
body.wide .pp-bio .desc { margin: 4px 0 0; font-size: 14.5px; max-height: 9em; color: rgba(255, 255, 255, .78); }
body.wide .pp-bio .more-link { margin: 2px 0 0; font-size: 14.5px; }
body.wide .pp-btns { display: flex; gap: 12px; margin-top: 6px; }
body.wide .pp-retry { align-self: flex-start; }
body.wide .pp-clist { max-width: 900px; margin: 10px 16px 0; padding-bottom: 0; gap: 2px; }
body.wide .pp-credit { gap: 16px; padding: 8px 12px; border-radius: 10px; }
@media (hover: hover) { body.wide .pp-credit:hover { background: rgba(255, 255, 255, .07); } }
body.wide .pp-credit .y { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .45); }
body.wide .pp-credit .t { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.wide .pp-credit .s { font-size: 13px; color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.wide .pp-credit .k { color: rgba(255, 255, 255, .4); }
body.wide .pp-credits .sec-title .cnt { font-size: 17px; color: rgba(255, 255, 255, .4); }
/* ---------- Манга: главы (страница «Подробнее», лист в читалке) и читалка (reader.js, chapters.js) */
.mg-sec { padding: 4px 16px 8px; }
.mg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.mg-title { font-size: 22px; font-weight: 800; margin: 0; flex: 1 1 auto; }
.mg-title span { color: var(--fg-3); font-weight: 600; margin-left: 4px; }
.mg-tools { display: flex; align-items: center; gap: 8px; flex: none; max-width: 100%; }
.mg-tool { height: 36px; min-width: 36px; padding: 0 10px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--chip); color: var(--fg); font-size: 14px; font-weight: 600; }
.mg-tool svg { width: 18px; height: 18px; flex: none; }
.mg-tool.wide { max-width: 52vw; }
.mg-tool span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-tool:active { transform: scale(.96); }
.mg-find { width: 64px; height: 36px; border-radius: 18px; border: 0; padding: 0 12px; background: var(--chip); color: var(--fg); font: inherit; font-size: 15px; text-align: center; }
.mg-list { display: flex; flex-direction: column; }
/* строка: подсветка — внутри с полем, как у строки трека (скругление, отклик нажатия) */
.mg-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px; margin: 0 -12px; border-radius: 14px; text-align: left; color: var(--fg);
  transition: background .15s ease, opacity .2s ease; }
.mg-row:hover { background: var(--chip); }
.mg-row:active { background: var(--pad-press); }
.mg-row.read { opacity: .48; }
.mg-row.cur { background: color-mix(in srgb, var(--link) 12%, transparent); opacity: 1; }
.mg-row.flash { animation: mgFlash 1.2s ease; }
@keyframes mgFlash { 0%, 40% { background: color-mix(in srgb, var(--link) 22%, transparent); } }
.mg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mg-t { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-s { font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-ok { color: var(--ok); flex: none; display: grid; }
.mg-ok svg { width: 20px; height: 20px; }
.mg-at { flex: none; font-size: 13px; color: var(--link); font-weight: 600; }
.mg-more { height: 1px; }
.mg-note { margin: 10px 0; font-size: 13px; color: var(--fg-3); }
.mg-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 0; color: var(--fg-2); }
.mg-empty b { color: var(--fg); font-size: 17px; }
.mg-panel .mg-sheet { padding: 0 16px calc(var(--safe-b) + 16px); }
/* лист глав в читалке: число — в заголовке листа, перевод, порядок и № — строкой под ним, в закреплённой шапке */
.mg-panel .sheet-head .mg-n { margin-left: 8px; color: var(--fg-3); font-weight: 600; }
.mg-panel .sheet-top > .mg-head { margin: 0; padding: 6px 16px 10px; }
body.wide .mg-panel .sheet-top > .mg-head { padding: 4px 22px 10px; }
/* телефон, «Подробнее»: авторы и откуда главы — под описанием, тихо */
.mg-info { display: flex; flex-direction: column; gap: 6px; margin: 12px 16px 0; color: var(--fg-3); font-size: 14px; }
.mg-info span { display: flex; align-items: center; gap: 8px; }
.mg-info svg { width: 17px; height: 17px; flex: none; }
.mg-info .warn { color: var(--warn); }
/* на широком: главы — по левой линии страницы (--l: панель и поле, как у «Связанного» и сезонов), колонкой, не во всю
   ширину монитора; страница тёмная — подсветка строк светлая */
.page.tp .mg-sec { margin: 0 var(--pad) 0 var(--l); padding: 8px 0 0; max-width: 880px; color: #fff; }
.page.tp .mg-title span, .page.tp .mg-s { color: rgba(255, 255, 255, .55); }
.page.tp .mg-row { color: #fff; }
.page.tp .mg-row:hover { background: rgba(255, 255, 255, .08); }
.page.tp .mg-row:active { background: rgba(255, 255, 255, .14); }
.page.tp :is(.mg-tool, .mg-find) { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- читалка: поверх всего, как плеер во весь экран */
#reader { position: fixed; inset: 0; z-index: 40; color: #fff; background: #000; opacity: 0; transition: opacity .22s ease; user-select: none; -webkit-user-select: none;
  --pt: calc(var(--safe-t) + 8px); --pb: calc(var(--safe-b) + 10px); --pl: calc(var(--safe-l) + 10px); --pr: calc(var(--safe-r) + 10px); }
#reader.on { opacity: 1; }
#reader.bg-gray { background: #1c1c1e; }
#reader.bg-white { background: #fff; color: #111; }
#reader .r-stage { position: absolute; inset: 0; overflow: hidden; }
#reader .r-stage.scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
#reader .r-stage.pages { touch-action: none; }
/* лента: во всю ширину телефона; на широком — по выбору (во всю высоту страницы, средняя, во всю ширину) */
/* начало ленты — под вырезом экрана (Dynamic Island, кнопки Telegram) и шапкой читалки, конец — над полосой «домой» */
#reader .r-strip { display: flex; flex-direction: column; align-items: center; min-height: 100%;
  padding: calc(var(--safe-t) + 56px) 0 var(--safe-b); box-sizing: border-box; }
#reader .r-chap { width: 100%; display: flex; flex-direction: column; align-items: center; }
#reader .r-im { display: block; width: 100%; height: auto; aspect-ratio: 7 / 10; background: rgba(127, 127, 127, .08); color: transparent; }
/* ещё грузится — мерцает, а не пустое место */
#reader .r-im:not(.ok):not(.bad) { background: linear-gradient(100deg, rgba(127, 127, 127, .07) 30%, rgba(127, 127, 127, .17) 50%, rgba(127, 127, 127, .07) 70%) 0 0 / 300% 100%;
  animation: rWait 1.4s linear infinite; }
@keyframes rWait { from { background-position: 100% 0; } to { background-position: 0 0; } }
#reader .r-im.ok { background: none; }
/* did not load: the page's own size if known (nothing jumps when it loads), a retry arrow — tap, it loads again */
#reader .r-im.bad, #reader .r-pg.bad { background: rgba(127, 127, 127, .14) center / 34px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.34-5.66'/%3E%3Cpath d='M20 4v4.5h-4.5'/%3E%3C/svg%3E"); }
#reader .r-im.bad { aspect-ratio: 7 / 3; }
#reader .r-pg.bad { width: min(100%, 70vh); aspect-ratio: 7 / 10; }
/* ширина ленты (--rw — по выбору: во всю высоту страницы, средняя, во всю ширину) и приближение (--rz, reader.js
   stripZoom): колонка шире в --rz раз, полотно — не шире колонки (пустых полей по бокам не прокрутить) */
#reader .r-stage.scroll { --rw: 100vw; }
#reader .r-stage.scroll.w-fit { --rw: min(100vw, 100vh * .72); }
#reader .r-stage.scroll.w-mid { --rw: min(100vw, 900px); }
@media (max-width: 719px) { #reader .r-stage.scroll.w-fit, #reader .r-stage.scroll.w-mid { --rw: 100vw; } }
/* ширина — от самой ленты, а не окна: колонка «Вместе» справа сужает ленту, и «во всю ширину» вылезало бы за край */
@supports (width: 1cqw) {
  #reader .r-stage.scroll { container-type: inline-size; --rw: 100cqw; }
  #reader .r-stage.scroll.w-fit { --rw: min(100cqw, 100vh * .72); }
  #reader .r-stage.scroll.w-mid { --rw: min(100cqw, 900px); }
  @media (max-width: 719px) { #reader .r-stage.scroll.w-fit, #reader .r-stage.scroll.w-mid { --rw: 100cqw; } }
}
#reader .r-stage.scroll .r-strip { width: max(100%, calc(var(--rw) * var(--rz, 1))); }
#reader .r-stage.scroll .r-chap { max-width: calc(var(--rw) * var(--rz, 1)); }
#reader .r-stage.scroll.zoomed { overflow-x: auto; touch-action: pan-x pan-y; }
#reader .r-div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 56px 16px; width: 100%; text-align: center; }
#reader .r-div small, #reader .r-end small { font-size: 13px; opacity: .6; text-transform: uppercase; letter-spacing: .06em; }
#reader .r-div b { font-size: 20px; }
#reader .r-tail { width: 100%; min-height: 40vh; display: flex; align-items: center; justify-content: center; padding-bottom: var(--pb); }
#reader .r-end { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; max-width: 420px; }
#reader .r-end b { font-size: 21px; line-height: 1.25; }
#reader .r-end span { font-size: 15px; opacity: .7; }
#reader .r-act { margin-top: 6px; height: 46px; padding: 0 22px; border-radius: 23px; background: #fff; color: #000; font-size: 16px; font-weight: 700; }
#reader.bg-white .r-act { background: #111; color: #fff; }
#reader .r-prev { margin: 4px 0 24px; background: rgba(255, 255, 255, .14); color: inherit; }
#reader.bg-white .r-prev { background: rgba(0, 0, 0, .08); color: #111; }
#reader .r-err { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; font-size: 16px; }
/* страницы: три слайда в ряд (вертикально — в столбик), разворот — две страницы рядом */
#reader .r-track { position: absolute; inset: 0; display: flex; width: 300%; will-change: transform; }
#reader .r-stage.rtl .r-track { flex-direction: row-reverse; }
#reader .r-stage.ttb .r-track { flex-direction: column; width: 100%; height: 300%; }
#reader .r-slide { position: relative; flex: 0 0 33.3334%; display: flex; align-items: center; justify-content: center; overflow: hidden;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); box-sizing: border-box; }
#reader .r-zoom { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; transform-origin: 50% 50%; }
#reader .r-pg { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; pointer-events: none; }
#reader .r-zoom.two .r-pg { max-width: 50%; }
#reader .r-zoom.two .r-pg:first-child { object-position: right center; }
#reader .r-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#reader .r-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#reader .r-load[hidden] { display: none; }
#reader .spinner { border-color: rgba(127, 127, 127, .25); border-top-color: currentColor; }
/* управление: шапка и низ на затемнении, прячутся касанием середины (на компьютере — сами через 3 с) */
#reader .r-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
#reader.ui-on .r-ui { opacity: 1; }
#reader.ui-on .r-ui > * { pointer-events: auto; }
#reader .r-top { display: flex; align-items: center; gap: 4px; padding: var(--pt) var(--pr) 18px var(--pl); background: linear-gradient(rgba(0, 0, 0, .72), rgba(0, 0, 0, 0)); color: #fff; }
#reader .r-bot { padding: 22px calc(var(--pr) + 4px) var(--pb) calc(var(--pl) + 4px); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .72)); color: #fff; }
#reader .r-titles { min-width: 0; padding: 0 6px; }
/* в Telegram закрывает читалку его «Назад» вверху (telegram.js) — своей «‹» нет, название от края */
html.tg #reader .r-back { display: none; }
html.tg #reader .r-titles { padding-left: 10px; }
#reader .r-titles .t { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#reader .r-titles .s { font-size: 14px; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#reader .r-gap { flex: 1; }
#reader .r-slot { display: contents; }
#reader .r-btn { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; flex: none; color: #fff; transition: transform .12s ease, background .15s ease, opacity .15s ease; }
#reader .r-btn:hover { background: rgba(255, 255, 255, .12); }
#reader .r-btn:active { transform: scale(.9); }
#reader .r-btn:disabled { opacity: .35; }
#reader .r-btn svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
#reader .r-bar { display: flex; align-items: center; gap: 8px; }
#reader .r-seek { position: relative; flex: 1; height: 34px; cursor: pointer; touch-action: none; }
/* секции — по одной на страницу: прочитанные и эта — белые, загруженные вперёд — светлее, остальные — тусклые */
#reader .r-seek .segs { position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; display: flex; gap: 3px; }
#reader .r-seek .segs.thin { gap: 2px; }
#reader .r-seek .segs.tight { gap: 1px; }
#reader .r-seek .segs i { flex: 1; min-width: 0; border-radius: 2px; background: rgba(255, 255, 255, .2); transition: background .2s ease; }
#reader .r-seek .segs i.got { background: rgba(255, 255, 255, .42); }
#reader .r-seek .segs i.on { background: #fff; }
#reader .r-seek .segs i.pick { background: var(--link); }
#reader .r-seek .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 7px; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5); transition: transform .15s ease; }
#reader .r-seek.drag .knob { transform: scale(1.4); }
#reader .r-seek .bubble { position: absolute; bottom: 30px; transform: translateX(-50%); padding: 4px 9px; border-radius: 8px; background: rgba(0, 0, 0, .78);
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .15s ease; }
#reader .r-seek.drag .bubble { opacity: 1; }
#reader .r-note { text-align: center; font-size: 13px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* страница из скольких — когда управление спрятано */
#reader .r-pill { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 6px); transform: translateX(-50%); padding: 3px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; transition: opacity .2s ease; }
#reader.ui-on .r-pill { opacity: 0; }
#reader:not(.ui-on) { cursor: none; }
#reader:not(.ui-on) .r-stage.scroll { cursor: auto; }
/* настройки чтения в листе */
.r-set .opt-group { margin-bottom: 4px; }

/* ---------- «Вместе» в читалке (read-room.js): та же колонка, что в плеере, выезжает справа; на широком страница
   сужается (лента и страницы — по оставшемуся месту), на телефоне колонка почти во всю ширину поверх, касание по
   оставшейся полоске её убирает */
/* the ranobe reader (#novel) has the same column, button, circles and «Следите за» — shared rules here, its own layout in novel.css */
#reader, #novel, .mn-sheet { --th: 44px; }
#reader .p-room, #novel .p-room, .mn-sheet .p-room { display: flex; flex-direction: column; position: absolute; top: 0; right: 0; bottom: 0; width: 340px; z-index: 6;
  background: #111; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .08); color: #f5f5f5; cursor: auto; -webkit-user-select: text; user-select: text;
  transform: translate3d(100%, 0, 0); visibility: hidden; transition: transform .42s cubic-bezier(.2, .9, .3, 1), visibility 0s .42s; }
#reader.room .p-room, #novel.room .p-room, .mn-sheet.room .p-room { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.2, .9, .3, 1), visibility 0s; }
#reader .r-shade, #novel .r-shade, .mn-sheet .r-shade { display: none; }
@media (min-width: 720px) {
  #reader.room .r-stage, #reader.room .r-ui, #reader.room .p-notes, #reader.room .p-fly { right: 340px; }
  #reader.room .r-pill, #reader.room .r-follow { left: calc(50% - 170px); }
}
@media (max-width: 719px) {
  #reader .p-room { width: 88%; }
  #reader.room .r-shade { display: block; position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .35); }
  #reader.room .r-ui { opacity: 0; pointer-events: none; }
}
/* кнопка «Вместе» в шапке: в комнате — светлая, с числом людей или непрочитанных */
#reader .r-together, #novel .r-together { position: relative; }
#reader .r-together[hidden], #novel .r-together[hidden] { display: none; }
#reader .r-together.on { background: rgba(255, 255, 255, .9); color: #000; }
#reader .r-together.on svg { filter: none; }
#reader .r-together .cnt, #novel .r-together .cnt { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11.5px; font-weight: 800;
  line-height: 18px; text-align: center; background: #0a84ff; color: #fff; }
#reader .r-together .cnt.unread, #novel .r-together .cnt.unread { background: #ff3b30; }
#reader .r-together .cnt[hidden], #novel .r-together .cnt[hidden] { display: none; }
/* кто где: кружки над шкалой страниц (в другой главе — у края, бледнее); нажал — следить, за кем следите — синий */
#reader .r-marks { position: absolute; left: 0; right: 0; bottom: 25px; height: 0; transition: opacity .15s ease; }
#reader .r-seek.drag .r-marks { opacity: 0; }
#reader .r-mark, #novel .r-mark { position: absolute; bottom: 0; width: 28px; height: 28px; padding: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  transform: translateX(calc(-50% + var(--k, 0) * 12px)); transition: left .35s cubic-bezier(.2, .9, .3, 1), opacity .2s ease; }
#reader .r-mark.on, #novel .r-mark.on { background: #0a84ff; }
#reader .r-mark.away, #novel .r-mark.away { opacity: .7; }
/* «Следите за: Мама ✕» — сверху посередине, видно и без управления */
#reader .r-follow, #novel .r-follow { position: absolute; left: 50%; top: calc(var(--safe-t) + 64px); z-index: 4; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 32px); height: 36px; padding: 0 4px 0 6px; border-radius: 18px; background: rgba(10, 132, 255, .94); color: #fff; font-size: 14px; font-weight: 600;
  white-space: nowrap; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
#reader .r-follow span, #novel .r-follow span { overflow: hidden; text-overflow: ellipsis; }
#reader .r-follow .av, #novel .r-follow .av { box-shadow: 0 0 0 1.5px #fff; }
#reader .r-fx, #novel .r-fx { flex: none; width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
#reader .r-fx:hover, #novel .r-fx:hover { background: rgba(255, 255, 255, .2); }
#reader .r-fx svg, #novel .r-fx svg { width: 16px; height: 16px; }

/* the hidden section (xsec.js): search, a gallery, the tag picker */
.x-page .search-box { margin-top: 10px; }
.x-page .srch-fwrap { padding-bottom: 2px; }
.x-note { padding: 6px 16px 0; color: var(--fg-3); font-size: 13px; }
.fchip.x-tag svg { width: 11px; height: 11px; }
.fchip.ex, .fchip.ex:hover { background: rgba(255, 69, 58, .18); box-shadow: inset 0 0 0 1px rgba(255, 69, 58, .55); }
.x-load { display: grid; place-items: center; padding: 80px 0; }
.x-head { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.x-cover { flex: none; width: 128px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--img-bg); }
body.wide .x-cover { width: 200px; }
.x-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.x-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.x-info h2 { margin: 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
body.wide .x-info h2 { font-size: 24px; }
.x-sub { color: var(--fg-2); font-size: 14px; overflow-wrap: anywhere; }
.x-meta { color: var(--fg-3); font-size: 13px; }
.x-info .btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 0 20px; }
.x-info .btn svg { width: 18px; height: 18px; }
.x-tags { padding: 0 16px; }
.x-tags .opt-head { padding-left: 0; }
.x-caps { display: flex; flex-wrap: wrap; gap: 6px; }
.x-caps .tcap { display: inline-flex; align-items: center; gap: 6px; }
.x-caps .tcap small { font-size: 12px; font-weight: 400; opacity: .55; }
.x-caps .tcap.ex, .x-caps .tcap.ex:hover { background: rgba(255, 69, 58, .85); color: #fff; }
.x-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 16px; }
body.wide .x-thumbs { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.x-thumbs button { position: relative; padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--img-bg); }
.x-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.x-thumbs span { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; }
.x-pick { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; }
.x-kinds { overflow-x: auto; scrollbar-width: none; gap: 6px; }
.x-kinds .chip { height: 34px; padding: 0 14px; font-size: 14px; }
.x-pick .cp-find { margin: 0; height: 40px; font-size: 16px; }
.x-sugg { display: flex; flex-direction: column; min-height: 120px; }
.x-row { display: flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--line); }
.x-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-pm { flex: none; width: 34px; height: 34px; border-radius: 17px; border: 0; background: var(--chip); color: inherit; font-size: 20px; line-height: 1;
  display: grid; place-items: center; }
.x-pm svg { width: 16px; height: 16px; }
.x-pm.on { background: #0a84ff; color: #fff; }
.x-pm.ex { background: #ff453a; color: #fff; }
/* the tag sheet on a phone — by the visible part alone (top and height of visualViewport), not by the keyboard's height:
   on an iPhone --kb came out larger than the keyboard, the sheet stood high above it squeezed, «Готово» on the field.
   «Готово» — always seen at its bottom (the list scrolls under it) */
body:not(.wide) .sheet.full.x-sheet { top: calc(var(--vvt, 0px) + var(--safe-t) + 10px); bottom: auto; height: calc(var(--vvh, 100dvh) - var(--safe-t) - 10px); }
.x-pick .cp-done { position: sticky; bottom: 8px; z-index: 1; box-shadow: 0 0 0 10px var(--bg); }
/* ---------- комментарии MangaLib (comments.js): лист, превью на странице тайтла, кнопка в конце главы */
.cm-tools { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; scrollbar-width: none; }
.cm-tools::-webkit-scrollbar { display: none; }
.cm-tools .chip { height: 34px; padding: 0 14px; font-size: 15px; }
.cm-tools-gap { flex: none; width: 1px; margin: 6px 2px; background: var(--line); }
.cm-panel .cm-list { padding: 4px 16px 0; }

.cm-thread { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cm-thread:last-child { border-bottom: 0; }
.cm { display: flex; gap: 10px; align-items: flex-start; }
.cm-av { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--chip);
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--fg-3); }
.cm-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cm-body { flex: 1; min-width: 0; }
.cm-pin { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 2px; }
.cm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; color: var(--fg-3); }
.cm-head b { font-size: 14px; font-weight: 700; color: var(--fg); overflow-wrap: anywhere; }
.cm-to { display: inline-flex; align-items: center; gap: 3px; }
.cm-to svg { width: 13px; height: 13px; }
.cm-pg { padding: 0 6px; border-radius: 6px; background: var(--chip); }
.cm-text { margin-top: 3px; font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; white-space: normal; }
.cm-text p { margin: 0 0 6px; }
.cm-text p:last-child { margin-bottom: 0; }
.cm-text blockquote { margin: 4px 0 6px; padding: 2px 0 2px 10px; border-left: 3px solid var(--line); color: var(--fg-2); }
.cm-text blockquote p { margin: 0; }
/* спойлер — размыт, как в Telegram; нажали — проступает */
.cm-sp { margin: 4px 0 6px; padding: 6px 10px; border-radius: 10px; background: var(--chip); cursor: pointer; }
.cm-sp-t { display: block; font-size: 12px; font-weight: 700; color: var(--fg-3); }
.cm-sp-body { filter: blur(6px); user-select: none; -webkit-user-select: none; pointer-events: none; transition: filter .25s ease; }
.cm-sp.open { cursor: auto; }
.cm-sp.open .cm-sp-body { filter: none; user-select: text; -webkit-user-select: text; pointer-events: auto; }
.cm-sticker { display: inline-block; width: 96px; height: 96px; object-fit: contain; vertical-align: middle; }
.cm-pic { display: block; width: min(240px, 100%); max-height: 320px; margin: 6px 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--chip); }
.cm-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cm-foot { display: flex; align-items: center; gap: 14px; margin-top: 4px; font-size: 13px; color: var(--fg-3); }
/* ▲ счёт ▼ — как у сайта; свой голос — цветом; кнопки крупнее значка (палец), строку не раздувают */
.cm-votes { display: inline-flex; align-items: center; gap: 0; margin-left: -8px; font-variant-numeric: tabular-nums; }
.cm-vote { width: 32px; height: 32px; margin: -4px 0; border-radius: 50%; display: grid; place-items: center; color: var(--fg-3); }
.cm-vote svg { width: 16px; height: 16px; }
.cm-vote.up.on { color: var(--ok); }
.cm-vote.dn.on { color: var(--danger); }
.cm-score { min-width: 14px; text-align: center; }
.cm-score.pos { color: var(--fg-2); font-weight: 600; }
.cm-act { padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--fg-3); }
.cm-act-more { width: 32px; height: 32px; margin: -4px 0 -4px auto; display: grid; place-items: center; padding: 0; }
.cm-act-more svg { width: 18px; height: 18px; }
@media (hover: hover) { .cm-vote:hover, .cm-act:hover { color: var(--fg); } }
/* свой новый — проступает на месте; удалённый — тает, соседи съезжают */
.cm-new { animation: cm-in .35s var(--ease); }
@keyframes cm-in { from { opacity: 0; transform: translateY(-6px); } }
.cm-gone { overflow: hidden; opacity: 0; padding-top: 0; padding-bottom: 0; transition: height .25s var(--ease), opacity .2s ease, padding .25s var(--ease); }

/* поле внизу листа (как в Telegram): прилипает к низу, на коротком листе — тоже внизу */
.cm-panel { display: flex; flex-direction: column; }
/* отступ под вырез — у самого поля (у листа снизу он висел бы щелью под полем) */
.cm-panel:has(> .cm-compose:not([hidden])) { padding-bottom: 0; }
.cm-compose { position: sticky; bottom: 0; z-index: 4; margin-top: auto; padding: 8px 12px calc(8px + var(--safe-b)); background: inherit; border-top: 1px solid var(--line); }
.cm-compose[hidden] { display: none; }
.cm-compose-row { display: flex; align-items: flex-end; gap: 8px; }
.cm-input { flex: 1; min-width: 0; height: 40px; max-height: 132px; padding: 9px 14px; border: 0; border-radius: 20px; outline: none; resize: none;
  background: var(--chip); color: inherit; font: inherit; font-size: 16px; line-height: 22px; }
.cm-input::placeholder { color: var(--fg-3); }
.cm-send { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--link); color: #fff; transition: background .15s, color .15s; }
.cm-send:disabled { background: var(--chip); color: var(--fg-3); }
.cm-send svg { width: 20px; height: 20px; }
.cm-replying { display: flex; align-items: center; gap: 6px; padding: 0 2px 8px 6px; font-size: 13px; color: var(--fg-3); }
.cm-replying[hidden] { display: none; }
.cm-replying > svg { width: 15px; height: 15px; flex: none; }
.cm-replying b { color: var(--fg); }
.cm-replying button { margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; }
.cm-replying button svg { width: 16px; height: 16px; }
.cm-login { display: block; width: 100%; height: 44px; border-radius: 14px; background: var(--chip); color: var(--link); font-size: 15px; font-weight: 600; }

/* ответы — одним уровнем под комментарием, аватар меньше */
.cm-replies { margin: 10px 0 0 46px; display: flex; flex-direction: column; gap: 12px; }
.cm-re .cm-av { width: 28px; height: 28px; font-size: 12px; }
.cm-more-re { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 0; font-size: 14px; font-weight: 600; color: var(--link); }
.cm-more-re svg { width: 15px; height: 15px; }

.cm-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 16px; text-align: center; color: var(--fg-3); }
.cm-sentinel { height: 1px; }
.cm-note { padding: 14px 16px 4px; font-size: 13px; color: var(--fg-3); text-align: center; }
.cm-note a { color: var(--link); }
.sk-cm .sk-line { height: 12px; margin: 6px 0; }
.sk-cm .cm-av.sk { border-radius: 50%; }

/* картинка целиком — поверх всего */
.cm-view { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: calc(var(--safe-t) + 12px) 12px calc(var(--safe-b) + 12px);
  background: rgba(0, 0, 0, .92); opacity: 0; transition: opacity .2s ease; }
.cm-view.on { opacity: 1; }
.cm-view img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-view-x { position: absolute; top: calc(var(--safe-t) + 10px); right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff; }
.cm-view-x svg { width: 20px; height: 20px; }

/* превью на странице тайтла: «Комментарии ›» и лучший из них */
.cm-box:empty { display: none; }
.cm-box { padding: 0 16px; margin: 14px 0 4px; }
.cm-teaser { display: block; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--bg-elev); text-align: left; color: inherit; }
.cm-teaser:active { background: var(--bg-elev-2); }
.cm-teaser-head { display: flex; align-items: center; gap: 8px; }
.cm-teaser-head b { font-size: 17px; font-weight: 800; }
.cm-teaser-src { font-size: 13px; color: var(--fg-3); }
.cm-teaser-head svg { margin-left: auto; width: 18px; height: 18px; color: var(--fg-3); }
.cm-teaser-c { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.cm-teaser-c .cm-av { width: 28px; height: 28px; font-size: 12px; }
.cm-teaser-c .sk-line { flex: 1; }
.cm-teaser-t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-teaser-t b { color: var(--fg); font-weight: 700; }
/* на широком: по левой линии страницы, как главы; страница тёмная */
.page.tp .cm-box { margin: 18px var(--pad) 0 var(--l); padding: 0; max-width: 880px; }
.page.tp .cm-teaser { background: rgba(255, 255, 255, .08); color: #fff; }
.page.tp .cm-teaser:hover { background: rgba(255, 255, 255, .12); }
.page.tp .cm-teaser-t { color: rgba(255, 255, 255, .7); }
.page.tp .cm-teaser-t b { color: #fff; }
.page.tp :is(.cm-teaser-src, .cm-teaser-head svg) { color: rgba(255, 255, 255, .55); }
.page.tp .cm-teaser .cm-av { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .6); }

/* читалка: «Комментарии к главе» — в конце главы и между главами в ленте */
#reader .r-cm { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; margin-bottom: 18px; border-radius: 20px;
  background: rgba(255, 255, 255, .12); color: inherit; font-size: 15px; font-weight: 600; }
#reader .r-end .r-cm { margin: 10px 0 0; }
#reader .r-cm svg { width: 18px; height: 18px; }
#reader.bg-white .r-cm { background: rgba(0, 0, 0, .07); }
/* ---------- Ranobe reader (novel.js): over everything, like the manga reader. Text in one column of a chosen width,
   size, typeface and spacing; four themes as Apple Books (light, sepia, dark, black) or as the system. The bars — the
   theme's own color with a blur, as in Books and Safari: scrolling down hides them, up shows them */
#novel { --n-bg: #fff; --n-fg: #1c1c1e; --n-fg2: #6e6e73; --n-bar: rgba(255, 255, 255, .86); --n-line: rgba(0, 0, 0, .1);
  --pt: calc(var(--safe-t) + 4px); --pb: calc(var(--safe-b) + 6px); --pl: calc(var(--safe-l) + 6px); --pr: calc(var(--safe-r) + 6px);
  position: fixed; inset: 0; z-index: 40; background: var(--n-bg); color: var(--n-fg); opacity: 0; transition: opacity .22s ease, background .25s ease, color .25s ease; }
#novel.on { opacity: 1; }
#novel.th-sepia { --n-bg: #f4ecd8; --n-fg: #3b2f1e; --n-fg2: #7c6a50; --n-bar: rgba(244, 236, 216, .88); --n-line: rgba(59, 47, 30, .14); }
#novel.th-dark { --n-bg: #1c1c1e; --n-fg: #e6e6e8; --n-fg2: #9a9aa0; --n-bar: rgba(28, 28, 30, .86); --n-line: rgba(255, 255, 255, .12); }
#novel.th-black { --n-bg: #000; --n-fg: #d4d4d8; --n-fg2: #8e8e93; --n-bar: rgba(0, 0, 0, .82); --n-line: rgba(255, 255, 255, .13); }
#novel .n-stage { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#novel .n-col { max-width: calc(var(--n-w) + 48px); margin: 0 auto; padding: calc(var(--safe-t) + 76px) max(22px, var(--safe-r) + 16px) calc(var(--safe-b) + 110px) max(22px, var(--safe-l) + 16px);
  font-size: var(--n-size); line-height: var(--n-lh); font-family: -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#novel.serif .n-col { font-family: ui-serif, 'New York', Georgia, 'PT Serif', 'Times New Roman', serif; }
#novel .n-text p { margin: 0 0 .85em; white-space: pre-line; overflow-wrap: break-word; }
#novel.indent .n-text p { margin: 0; text-indent: 1.6em; }
#novel.justify .n-text p { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
#novel .n-text p.q { padding-left: .9em; border-left: 3px solid var(--n-line); text-indent: 0; }
#novel.indent .n-text p.q { margin: .3em 0; }
#novel .n-text h3 { margin: 1.4em 0 .6em; font-size: 1.12em; line-height: 1.3; font-weight: 700; }
#novel .n-text b { font-weight: 700; }
#novel .n-hr { margin: 1.3em 0; text-align: center; color: var(--n-fg2); line-height: 1; }
#novel .n-fig { margin: 1.3em 0; text-align: center; cursor: zoom-in; }
#novel .n-fig img { display: block; max-width: 100%; height: auto; min-height: 60px; margin: 0 auto; border-radius: 8px; background: var(--n-line); opacity: .4; transition: opacity .3s ease; }
#novel .n-fig img.ok { opacity: 1; background: none; min-height: 0; }
#novel .n-text .n-cap { margin: -.4em 0 1.2em; font-size: .8em; line-height: 1.4; color: var(--n-fg2); text-align: center; text-indent: 0; }
/* chapters one after another: a line and the next one's heading */
#novel .n-sec + .n-sec { margin-top: 3.2em; padding-top: 2.6em; border-top: 1px solid var(--n-line); }
#novel .n-head { margin: 0 0 1.7em; text-align: center; }
#novel .n-head small { display: block; font: 600 12.5px/1.3 -apple-system, system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--n-fg2); }
#novel .n-head h1 { margin: .35em 0 0; font-size: 1.42em; line-height: 1.25; font-weight: 700; text-wrap: balance; }
#novel .n-by { margin-top: .6em; font: 13px/1.35 -apple-system, system-ui, sans-serif; color: var(--n-fg2); }
#novel .n-tail { min-height: 32vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 36px 8px;
  text-align: center; font: 15px/1.4 -apple-system, system-ui, sans-serif; color: var(--n-fg2); }
#novel .n-tail.end b { font-size: 20px; color: var(--n-fg); }
#novel .n-act { margin-top: 6px; height: 44px; padding: 0 22px; border-radius: 22px; background: var(--n-fg); color: var(--n-bg); font-size: 16px; font-weight: 700; }
#novel .n-err { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; font: 16px/1.4 -apple-system, system-ui, sans-serif; }
#novel .n-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#novel .n-load[hidden] { display: none; }
#novel .spinner { border-color: var(--n-line); border-top-color: currentColor; }
/* controls */
#novel .n-top, #novel .n-bot { position: absolute; left: 0; right: 0; z-index: 2; background: var(--n-bar); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px);
  font-family: -apple-system, system-ui, sans-serif; transition: transform .3s cubic-bezier(.2, .9, .3, 1), opacity .22s ease, background .25s ease; }
#novel .n-top { top: 0; display: flex; align-items: center; gap: 2px; padding: var(--pt) var(--pr) 4px var(--pl); box-shadow: 0 .5px 0 var(--n-line); }
#novel .n-bot { bottom: 0; padding: 4px calc(var(--pr) + 4px) var(--pb) calc(var(--pl) + 4px); box-shadow: 0 -.5px 0 var(--n-line); }
#novel:not(.ui-on) .n-top { transform: translate3d(0, -100%, 0); opacity: 0; pointer-events: none; }
#novel:not(.ui-on) .n-bot { transform: translate3d(0, 100%, 0); opacity: 0; pointer-events: none; }
#novel .n-titles { min-width: 0; padding: 0 4px; }
#novel .n-titles .t { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#novel .n-titles .s { font-size: 13px; color: var(--n-fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.tg #novel .n-back { display: none; }
html.tg #novel .n-titles { padding-left: 10px; }
#novel .n-gap { flex: 1; }
#novel .n-btn { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; flex: none; color: var(--n-fg); transition: transform .12s ease, background .15s ease, opacity .15s ease; }
#novel .n-btn:hover { background: var(--n-line); }
#novel .n-btn:active { transform: scale(.9); }
#novel .n-btn:disabled { opacity: .3; }
#novel .n-btn svg { width: 24px; height: 24px; }
#novel .n-row { display: flex; align-items: center; gap: 6px; }
#novel .n-barw { position: relative; flex: 1; height: 34px; display: flex; align-items: center; }
#novel .n-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--n-line); overflow: hidden; }
#novel .n-bar i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--link); transition: width .2s ease; }
#novel .n-note { padding: 0 0 2px; text-align: center; font-size: 12.5px; color: var(--n-fg2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «Вместе» (read-room.js; shared rules — manga.css): the column comes from the right; on a wide screen the text moves
   aside, on a phone the column lies over almost all of it */
#novel .n-slot { display: contents; }
#novel .r-together.on { background: var(--link); color: #fff; }
#novel .n-marks { position: absolute; left: 0; right: 0; bottom: 22px; height: 0; }
@media (min-width: 720px) {
  #novel.room .n-stage, #novel.room .n-top, #novel.room .n-bot, #novel.room .p-notes, #novel.room .p-fly { right: 340px; }
  #novel.room .n-pill, #novel.room .r-follow { left: calc(50% - 170px); }
}
@media (max-width: 719px) {
  #novel .p-room { width: 88%; }
  #novel.room .r-shade { display: block; position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .35); }
  #novel.room .n-top, #novel.room .n-bot { opacity: 0; pointer-events: none; }
}
/* how much is read — when the controls are away */
#novel .n-pill { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 4px); transform: translateX(-50%); font: 600 11.5px/1 -apple-system, system-ui, sans-serif;
  color: var(--n-fg2); font-variant-numeric: tabular-nums; pointer-events: none; transition: opacity .2s ease; }
#novel.ui-on .n-pill { opacity: 0; }
/* a picture whole, over the text */
#novel .n-lb { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: var(--pt) 8px var(--pb);
  background: rgba(0, 0, 0, .94); cursor: zoom-out; animation: n-in .2s ease; }
#novel .n-lb img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes n-in { from { opacity: 0; } }
/* «Aa» — size, themes, typeface, spacing */
.n-set .opt-group { margin-bottom: 4px; }
.n-size { display: flex; align-items: center; justify-content: space-between; margin: 0 16px; padding: 6px; border-radius: 14px; background: var(--bg-elev); }
.n-step { width: 72px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--fg); }
.n-step:active { background: var(--chip); }
.n-step:disabled { opacity: .3; }
.n-step .sm { font-size: 15px; font-weight: 600; }
.n-step .lg { font-size: 25px; font-weight: 600; }
.n-val { font-size: 15px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.n-themes { display: flex; gap: 14px; padding: 8px 18px 10px; overflow-x: auto; scrollbar-width: none; }
.n-themes::-webkit-scrollbar { display: none; }
.n-th { width: 54px; height: 54px; flex: none; border-radius: 27px; display: grid; place-items: center; font: 600 16px/1 ui-serif, Georgia, serif;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); transition: transform .12s ease; }
.n-th:active { transform: scale(.92); }
/* the chosen one — a ring around (the row scrolls sideways and would cut an outline: it has room in its padding) */
.n-th.on { outline: 2.5px solid var(--link); outline-offset: 3px; }
.n-th.th-light { background: #fff; color: #1c1c1e; }
.n-th.th-sepia { background: #f4ecd8; color: #3b2f1e; }
.n-th.th-dark { background: #1c1c1e; color: #e6e6e8; }
.n-th.th-black { background: #000; color: #d4d4d8; }
.n-th.th-auto { background: linear-gradient(135deg, #fff 50%, #1c1c1e 50%); color: #8e8e93; font: 600 12px/1 -apple-system, system-ui, sans-serif; }
/* «Чаты» (chats.js): the list, a chat, the cloud password. Iskra's look — neutral, the system blue for small things; my
   messages on the right, others' on the left; one sender in a row — one group with tighter corners between */
.cht-wrap { display: block; }
/* the head as other sections' (hist-head): on a phone — as the other tabs' titles (32, «Друзья», «Моё») */
body:not(.wide) .cht-head.hist-head { margin: 6px 12px 6px 16px; }
body:not(.wide) .cht-head .hist-title { font-size: 32px; letter-spacing: -.4px; }
.cht-new { color: var(--link); }
.cht-list { display: flex; flex-direction: column; }
.cht-list > .opt-note:first-child { padding-top: 10px; }

/* a row: photo, name and time, the last message and unread */
.cht-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 8px 16px; text-align: left; }
.cht-row:active, .cht-row.on { background: var(--chip); }
.cht-row .av { flex: none; }
.cht-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; padding-bottom: 2px; }
/* between rows — Telegram's (ChatListItem): a hairline at the row's very bottom, from the text's left edge (16 + the photo
   52 + 12) to 16 short of the right edge; none under the last one; a pressed row hides its own and the one above it
   (29.11: the line sat on the text's box, 8 above the row's edge — hugging the text above, far from the next row) */
.cht-row::after { content: ''; position: absolute; left: 80px; right: 16px; bottom: 0; height: 1px; box-shadow: inset 0 -.5px 0 var(--line); pointer-events: none; }
.cht-row:last-child::after, .cht-row:active::after, .cht-row:has(+ .cht-row:active)::after { opacity: 0; }
.cht-top, .cht-bot { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cht-top b { flex: 1; min-width: 0; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cht-top time { flex: none; font-size: 13px; color: var(--fg-3); }
.cht-prev { flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; color: var(--fg-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cht-prev.lock { font-style: italic; }
.cht-badge { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; align-self: center;
  background: var(--link); color: #fff; font-size: 13px; font-weight: 700; }
.cht-reqs .cht-req-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--chip); color: var(--fg-2); }
.cht-reqs .cht-req-ic svg { width: 26px; height: 26px; }
.cht-none { padding: 24px 16px; text-align: center; color: var(--fg-3); font-size: 15px; }
/* before the chats (no keys, the password) — in the look of «Настройки»: a grey head, rows with fields, a note, the button */
.cht-gate { padding: 4px 0 24px; }
.cht-gate > .spinner { margin: 48px auto; }
.cht-wait { animation: chtLate .2s ease .9s both; }
@keyframes chtLate { from { opacity: 0; } to { opacity: 1; } }
.cht-gate-go { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 0; }
.cht-gate-go + .opt-group { margin-top: 18px; }

/* ✎ and picking people */
.cht-people .opt-group { margin-top: 0; }
.cht-prow .av { flex: none; }
.cht-prow.wait .av { opacity: .55; }
.cht-call { margin-left: auto; flex: none; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--chip); color: var(--link); font-size: 15px; font-weight: 600; }
.cht-call:disabled { color: var(--fg-3); }
.cht-check { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1.5px var(--fg-3); color: #fff; }
.cht-check.on { background: var(--link); box-shadow: none; }
.cht-check svg { width: 16px; height: 16px; }
.cht-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 0; }
.cht-chips:empty { display: none; }
.cht-chip { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 4px; border-radius: 16px; background: var(--chip); font-size: 14.5px; }
.cht-chip svg { width: 14px; height: 14px; color: var(--fg-3); }
.cht-pick-go { position: sticky; bottom: 0; padding: 14px 16px calc(14px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }

/* --- the chat: the head, messages, the field. On a page (phone) the page doesn't scroll — the messages do; the tab bar
   hides (body.no-tabs) and the field sits above the keyboard */
body.no-tabs #tabs { transform: translate3d(0, 100%, 0); }
#tabs { transition: transform .3s var(--ease); }
/* with the keyboard open the page is exactly the visible part — its top and height (sheets.js: --vvt, --vvh), as the tag
   sheet (manga.css): by the keyboard's height (--kb) alone the field flew up under the head and the list showed through
   below (29.11, iPhone in Telegram) — there --kb comes out larger than the keyboard */
.page.chat-page { display: flex; flex-direction: column; overflow: visible; padding-bottom: 0; top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }
/* the field left: the page glides to full height with the keyboard instead of waiting for iOS to report it */
.page.chat-page.kb-down { top: 0; height: 100%; transition: transform .36s var(--ease), top .32s cubic-bezier(.25, .8, .25, 1), height .32s cubic-bezier(.25, .8, .25, 1); }
.cht-below { position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--bar-solid, var(--bg)); pointer-events: none; }
.page.chat-page > .body { flex: 1; min-height: 0; display: flex; }
.cht-view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cht-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.cht-who .av { flex: none; }
.cht-who-t { min-width: 0; display: flex; flex-direction: column; }
.cht-who-t b { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cht-who-t small { font-size: 13px; color: var(--fg-3); }
.cht-who-t small:empty { display: none; }
.cht-banner { margin: 8px 12px 0; padding: 14px; border-radius: 26px; background: var(--bg-elev); text-align: center; }
.cht-banner[hidden] { display: none; }
.cht-banner p { margin: 0 6px 12px; font-size: 15px; line-height: 1.4; color: var(--fg-2); }
.cht-banner-b { display: flex; gap: 10px; }
.cht-banner-b .btn { flex: 1; min-height: 46px; border-radius: 12px; font-size: 16px; }
.cht-keys { margin: 12px 24px 0; font-size: 13px; line-height: 1.4; color: var(--fg-3); text-align: center; }
.cht-keys[hidden] { display: none; }
/* the messages scroll; the ↓ button sits over their bottom right */
.cht-area { position: relative; flex: 1; min-height: 0; display: flex; }
.cht-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }
.cht-msgs { flex: 1 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 10px 10px; }
.cht-more .spinner { margin: 8px auto; width: 22px; height: 22px; }
/* the day — Telegram's header 34 high (7 + 20 + 7), the chip sticks on top while its day scrolls */
.cht-day { position: sticky; top: 7px; z-index: 2; align-self: center; margin: 7px 0; padding: 0 9px; height: 20px; line-height: 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--fg-2); background: color-mix(in srgb, var(--bg) 70%, var(--chip));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cht-sys, .cht-first { align-self: center; max-width: 90%; padding: 2px 8px; font-size: 13px; line-height: 1.4; color: var(--fg-3); text-align: center; }
.cht-first { margin: auto; font-size: 15px; }

/* A message — Telegram's numbers (ChatMessageItemCommon, PresentationChatBubbleSettings): corners 16, towards the same
   sender's neighbour 8; text 6 above and below, 11 at the sides; one sender's messages 2 apart, others' 6; the width up
   to the column minus 36 */
.cm { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: min(calc(100% - 36px), 560px); }
.cm.cont { margin-top: -4px; }
.cm.me { align-self: flex-end; align-items: flex-end; }
.cm-who { padding-left: 11px; font-size: 14px; font-weight: 600; color: var(--link); }
.cm-bub { position: relative; min-width: 40px; padding: 6px 11px; border-radius: 16px; background: var(--bg-elev); font-size: 16px; line-height: 21px;
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; box-shadow: 0 0 0 .5px var(--line);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1); }
.cm:not(.me):not(.last) .cm-bub { border-bottom-left-radius: 8px; }
.cm:not(.me).cont .cm-bub { border-top-left-radius: 8px; }
.cm.me .cm-bub { background: var(--link); color: #fff; box-shadow: none; }
.cm.me:not(.last) .cm-bub { border-bottom-right-radius: 8px; }
.cm.me.cont .cm-bub { border-top-right-radius: 8px; }
body.wide .cm-bub { -webkit-user-select: text; user-select: text; }
/* the time and ticks at the end of the last line (they float right and the line makes room) */
.cm-meta { float: right; position: relative; top: 5px; display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; font-size: 12px; line-height: 16px;
  color: var(--fg-3); white-space: nowrap; }
.cm.me .cm-meta { color: rgba(255, 255, 255, .75); }
.cm-tick { display: inline-grid; }
.cm-tick svg { width: 16px; height: 16px; }
.cm-tick svg path { stroke-width: 2.1; }
.cm-tick.fail { color: #ffd60a; }
.cm.sending .cm-bub { opacity: .75; }
.cm-dim { display: inline-flex; align-items: center; gap: 6px; font-style: italic; opacity: .75; }
.cm-dim svg { width: 15px; height: 15px; flex: none; }
/* the quote of what it answers — as Telegram's (ChatMessageReplyInfoNode, MessageInlineBlockBackgroundView): aligned with
   the text, corners 4, the bar 3 at its left (cut by the corners), the text 11 in from its edge and 6 short of the right,
   the name and the line at 14 px, 2 apart; 4 down to the message */
.cm-quote { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; margin: 0 0 4px; padding: 3px 6px 3px 11px;
  overflow: hidden; border-radius: 4px; background: color-mix(in srgb, var(--link) 10%, transparent); font-size: 14px; line-height: 18px; text-align: left; }
.cm-quote::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--link); }
.cm.me .cm-quote { background: rgba(255, 255, 255, .16); }
.cm.me .cm-quote::before { background: #fff; }
.cm-quote b { font-weight: 600; color: var(--link); }
.cm.me .cm-quote b { color: #fff; }
.cm-quote span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-quote:active { opacity: .7; }
/* reactions inside the bubble at its bottom, the time on their right — Telegram's (ReactionButtonListComponent): a
   capsule 30 high, the emoji 20, the count 11 bold, 6 between capsules; mine — filled */
.cm-foot { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 1px; }
.cm-foot .cm-meta { float: none; top: 0; margin: 0 0 1px auto; }
.cm-rs { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-r { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 11px 0 7px; border-radius: 15px; font-size: 20px; line-height: 1;
  background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); }
.cm-r:not(:has(b)) { padding-right: 7px; }
.cm-r b { margin-left: 2px; font-size: 11px; font-weight: 700; }
.cm-r.on { background: var(--link); color: #fff; }
.cm.me .cm-r { background: rgba(255, 255, 255, .2); color: #fff; }
.cm.me .cm-r.on { background: #fff; color: var(--link); }
.cm-r.pop .cm-re { animation: cmPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cmPop { 0% { transform: scale(.2); } 60% { transform: scale(1.25); } 100% { transform: none; } }
/* a press before the menu (chats.js pressStart): the bubble gives in over 0.2 s to 15 px narrower (--hs), as Telegram's
   ContextControllerSourceNode; lifted into its menu — the copy stands in for it there */
.cm-bub.hold { transform: scale(var(--hs, .94)); transition: transform .2s linear; }
.cm.lifted .cm-bub { visibility: hidden; }
/* new ones rise in from below, own from the right; gone ones melt where they stood, the rest close up */
.cm.in { animation: cmIn .3s cubic-bezier(.2, .9, .3, 1) both; transform-origin: 0 100%; }
.cm.me.in { transform-origin: 100% 100%; }
@keyframes cmIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.cm.out { overflow: hidden; opacity: 0; margin-top: -6px; transition: height .26s cubic-bezier(.3, 0, .2, 1), opacity .16s ease, margin-top .26s ease; pointer-events: none; }
.cm.flash .cm-bub { animation: cmFlash 1.2s ease; }
@keyframes cmFlash { 0%, 40% { filter: brightness(1.2); transform: scale(1.02); } 100% { filter: none; transform: none; } }
/* ↓ to the newest: a round button over the messages, the count of new on it */
.cht-down { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center;
  background: var(--bg-elev); color: var(--fg-2); box-shadow: 0 0 0 .5px var(--line), 0 4px 14px rgba(0, 0, 0, .14);
  opacity: 0; transform: translateY(10px) scale(.8); pointer-events: none; transition: opacity .2s ease, transform .28s cubic-bezier(.2, .9, .3, 1); }
.cht-down.on { opacity: 1; transform: none; pointer-events: auto; }
.cht-down svg { width: 24px; height: 24px; }
.cht-down-n { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: grid; place-items: center; background: var(--link); color: #fff; font-size: 12px; font-weight: 700; }

/* --- a message's menu on a phone (chats.js msgFocus) — Telegram's numbers; the message itself is the bubble's copy */
.mf-probe { position: fixed; left: -9px; top: 0; width: 0; height: 0; padding-top: var(--safe-t); padding-bottom: var(--safe-b); pointer-events: none; visibility: hidden; }
.mf { position: fixed; inset: 0; z-index: 74; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mf-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .18); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0; transition: opacity .22s ease; }
.mf.on .mf-shade { opacity: 1; }
.mf-row { position: fixed; margin: 0; max-width: none; transition: transform .42s cubic-bezier(.2, .9, .25, 1), opacity .2s ease; }
.mf.off .mf-row { transition-duration: .22s, .2s; }
.mf-row .cm-bub.cut { overflow: hidden; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.mf-reacts { position: fixed; display: flex; gap: 8px; height: 46px; padding: 6px; border-radius: 23px; background: var(--bg-elev);
  box-shadow: 0 0 0 .5px var(--line), 0 10px 30px rgba(0, 0, 0, .16); opacity: 0; transform: scale(.4); transform-origin: 0 100%;
  transition: opacity .16s ease, transform .4s cubic-bezier(.2, 1.25, .4, 1); }
.mf-reacts.me { transform-origin: 100% 100%; }
.mf-reacts button { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; font-size: 27px; line-height: 1; transition: transform .12s ease; }
.mf-reacts button:active, .mf-reacts button.hover { transform: scale(1.2); }
.mf-reacts button.on { background: color-mix(in srgb, var(--link) 22%, transparent); }
.mf-menu { position: fixed; min-width: 220px; max-width: min(280px, calc(100vw - 24px)); padding: 10px 0; background: var(--bg-elev);
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 0 0 .5px var(--line), 0 12px 40px rgba(0, 0, 0, .18); opacity: 0; transform: scale(.6); transform-origin: 0 0;
  transition: opacity .16s ease, transform .36s cubic-bezier(.2, 1.1, .4, 1); }
.mf-menu.me { transform-origin: 100% 0; }
.mf.on .mf-reacts, .mf.on .mf-menu { opacity: 1; transform: none; }
.mf.off .mf-reacts, .mf.off .mf-menu { transition-duration: .14s, .2s; }
.mf-i { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 20px 0 18px; font-size: 17px; line-height: 22px; text-align: left; color: var(--fg); }
.mf-i > span { position: relative; flex: 1; }
.mf-i svg { position: relative; width: 24px; height: 24px; margin: 0 4px; flex: none; color: var(--fg); }
.mf-i.danger, .mf-i.danger svg { color: var(--danger); }
.mf-i:active::before, .mf-i.hover::before { content: ''; position: absolute; top: 0; bottom: 0; left: 10px; right: 10px; border-radius: 20px; background: var(--chip); }
@media (prefers-color-scheme: dark) { .mf-shade { background: rgba(0, 0, 0, .42); } }

/* the field: a reply or an edit above it, the text grows up to a few lines; the round button concentric with the field
   (field 20 = button 16 + 4) */
/* under the field — the safe area and a margin, never less than 24 (29.11: Telegram may report a zero safe area — the
   field 8 from the edge went under a screen protector's frame) */
.cht-compose { padding: 8px 10px max(calc(var(--safe-b) + 12px), 24px); border-top: .5px solid var(--line); background: var(--bar); }
/* typing — the keyboard covers the home bar: no room left for it under the field */
.page.chat-page .cht-view.typing .cht-compose { padding-bottom: 8px; }
.cht-ctx { display: flex; align-items: center; gap: 10px; padding: 2px 0 8px 8px; color: var(--link); }
.cht-ctx[hidden] { display: none; }
.cht-ctx > svg { width: 22px; height: 22px; flex: none; }
.cht-ctx-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.cht-ctx-t span { color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cht-field { display: flex; align-items: flex-end; gap: 6px; min-height: 40px; padding: 4px 4px 4px 14px; border-radius: 20px; background: var(--chip); }
.cht-field:focus-within { box-shadow: inset 0 0 0 1.5px var(--link); }
.cht-input { flex: 1; min-width: 0; height: 32px; max-height: 140px; padding: 6px 0; border: 0; outline: none; resize: none; background: none; color: var(--fg);
  font: inherit; font-size: 16px; line-height: 20px; transition: height .14s cubic-bezier(.2, .9, .3, 1); }
.cht-field { position: relative; }
.cht-mirror { position: absolute; left: 14px; top: 0; visibility: hidden; pointer-events: none; padding: 6px 0; font: inherit; font-size: 16px; line-height: 20px;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.cht-send { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--fg-3); color: var(--bg); opacity: .45;
  transition: background .15s ease, opacity .15s ease; }
.cht-compose.has .cht-send { background: var(--link); color: #fff; opacity: 1; }
.cht-send svg { width: 19px; height: 19px; }
.cht-send svg path { stroke-width: 2.5; }

/* --- wide: the list on the left, the chat next to it (as Telegram Desktop); the section doesn't scroll as a page */
body.wide .page.chats-page { overflow: hidden; padding-bottom: 0; }
/* from the same left edge as other sections' content (--bp): the title stands where «История» and «Избранное» do */
body.wide .page.chats-page > .body { position: absolute; inset: 0 0 0 var(--bp); padding: 0; }
body.wide .cht-wrap { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; height: 100%; }
body.wide .cht-wrap.gated { grid-template-columns: 1fr; }
body.wide .cht-wrap.gated .cht-main { display: none; }
body.wide .cht-side { min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); }
body.wide .cht-head { margin-right: 10px; }
body.wide .cht-sbox { margin-top: 14px; }
body.wide .cht-row { min-height: 66px; padding: 7px 12px; border-radius: 12px; margin: 0 6px; width: calc(100% - 12px); }
body.wide .cht-row:hover { background: var(--chip); }
body.wide .cht-row.on { background: color-mix(in srgb, var(--link) 18%, transparent); }
body.wide .cht-row::after { display: none; }
body.wide .cht-main { min-width: 0; min-height: 0; display: flex; }
body.wide .cht-vhead { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 8px 12px 8px 18px; border-bottom: 1px solid var(--line); }
body.wide .cht-compose { padding: 10px 18px 14px; }
body.wide .cht-msgs { padding: 14px 18px 16px; }
.cht-pick { flex: 1; display: grid; place-items: center; color: var(--fg-3); font-size: 15px; }
.cht-vhead { display: none; }
body.wide .cht-wrap.gated .cht-side { border-right: 0; }
body.wide .cht-gate { max-width: 560px; }
/*# sourceMappingURL=app.css.map */
