/* ═══════════════════════════════════════════════════════════════════
   v49: короткие видео («Обзор») — TikTok-стиль.
   Секции: сетка-превью, фуллскрин-плеер со свайпом, мастер создания.
   Запрет linear-gradient на кнопках/элементах соблюдён.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Заголовок секции видео в Обзоре ─────────────────────────────── */
.videos-section { margin-top: 22px; }
.videos-section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 10px;
}
.videos-section__title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--text-primary, #fff);
}
.videos-section__title img { width: 18px; height: 18px; filter: invert(1); opacity: .85; }
.videos-section__more {
  font-size: 13px; color: #a78bfa; text-decoration: none; font-weight: 600;
}

/* ── Сетка превью (TikTok-стиль: вертикальные плитки 9:16) ───────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (min-width: 768px) {
  .video-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
}
.video-tile {
  position: relative;
  aspect-ratio: 9 / 14;
  border-radius: 10px;
  overflow: hidden;
  background: #101014;
  cursor: pointer;
  border: none;
  padding: 0;
  text-align: left;
}
.video-tile__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.video-tile__fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #4b4b57; font-size: 26px;
}
.video-tile__overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 8px 7px;
  background: rgba(8, 8, 12, 0.01);
  box-shadow: inset 0 -34px 28px -18px rgba(0, 0, 0, 0.82);
  display: flex; flex-direction: column; gap: 3px;
  pointer-events: none;
}
.video-tile__title {
  font-size: 11px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.video-tile__meta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: rgba(255, 255, 255, 0.85);
}
.video-tile__meta img { width: 12px; height: 12px; filter: brightness(0) invert(1); opacity: .9; }
.video-tile__play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10, 10, 14, 0.55);
  display: grid; place-items: center;
  pointer-events: none;
}
.video-tile__play img { width: 14px; height: 14px; filter: brightness(0) invert(1); }
.video-empty {
  padding: 18px 2px; color: var(--text-secondary, #9c9c9c); font-size: 13.5px; line-height: 1.55;
}

/* ── Фуллскрин-плеер (вертикальная лента со снапом) ──────────────── */
.video-player {
  position: fixed; inset: 0; z-index: 4000;
  background: #000;
  display: none;
}
.video-player.is-open { display: block; }
.video-player__scroll {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.video-player__scroll::-webkit-scrollbar { display: none; }
.video-slide {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid; place-items: center;
  background: #000;
  overflow: hidden;
}
.video-slide__stage {
  position: relative;
  width: 100%; height: 100%;
  max-width: min(100vw, calc(100dvh * 9 / 16));
  margin: 0 auto;
  overflow: hidden;
  background: #000;
}
.video-slide__video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.video-slide__video.is-loading { opacity: 0; }
/* зум/фильтры применяются к видео (эффект без перекодирования) */
.video-slide__fx { transform-origin: 50% 45%; transition: filter .25s ease; }

/* правый рельс действий */
.video-rail {
  position: absolute; right: 10px; bottom: 118px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  z-index: 5;
}
.video-rail__author {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden; cursor: pointer;
  background: #23232b;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 18px;
  text-decoration: none;
}
.video-rail__author img { width: 100%; height: 100%; object-fit: cover; }
.video-rail__btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 0; cursor: pointer;
  color: #fff; font-size: 11.5px; font-weight: 600;
}
.video-rail__btn img {
  width: 30px; height: 30px;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.video-rail__btn .video-rail__disc {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
}

/* нижняя инфо-панель */
.video-info {
  position: absolute; left: 0; right: 62px; bottom: 0;
  padding: 64px 14px calc(26px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.01);
  box-shadow: inset 0 -70px 60px -48px rgba(0, 0, 0, 0.9);
  color: #fff; z-index: 4;
}
.video-info__authorline {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.video-info__name {
  font-size: 15.5px; font-weight: 700; color: #fff;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.video-info__date { font-size: 12px; color: rgba(255,255,255,.72); font-weight: 500; }
.video-info__title {
  font-size: 14.5px; font-weight: 600; margin: 0 0 4px;
  word-break: break-word;
}
.video-info__desc {
  font-size: 13.5px; color: rgba(255,255,255,.88);
  white-space: pre-wrap; word-break: break-word;
  margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.video-info__desc.is-expanded { -webkit-line-clamp: unset; }
.video-info__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.video-info__tag {
  color: #c4b5fd; font-weight: 600; font-size: 13px; text-decoration: none;
}
.video-info__views {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; font-size: 12.5px; color: rgba(255,255,255,.85); font-weight: 600;
}
.video-info__views img { width: 14px; height: 14px; filter: brightness(0) invert(1); opacity: .9; }

/* верхняя панель плеера */
.video-player__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: rgba(0, 0, 0, 0.01);
  box-shadow: inset 0 34px 28px -26px rgba(0, 0, 0, 0.8);
}
.video-player__close {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(20, 20, 26, 0.6);
  border: none; cursor: pointer;
  display: grid; place-items: center;
}
.video-player__close img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.video-player__sound {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(20, 20, 26, 0.6);
  border: none; cursor: pointer;
  display: grid; place-items: center;
}
.video-player__sound img { width: 17px; height: 17px; filter: brightness(0) invert(1); }
.video-player__counter {
  color: #fff; font-size: 13px; font-weight: 700;
  background: rgba(20, 20, 26, 0.55);
  padding: 7px 12px; border-radius: 999px;
}
.video-slide__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.16); z-index: 6;
}
.video-slide__progress i {
  display: block; height: 100%; width: 0%;
  background: #fff; border-radius: 0 2px 2px 0;
}

/* ── FAB-меню (Пост / Видео) ─────────────────────────────────────── */
.fab-sheet-backdrop {
  position: fixed; inset: 0; z-index: 3600;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.fab-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.fab-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3601;
  transform: translateY(105%);
  transition: transform .26s cubic-bezier(.22,.9,.3,1);
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px));
}
.fab-sheet.is-open { transform: translateY(0); }
.fab-sheet__card {
  background: #161618;
  border: 1px solid #2a2a2e;
  border-radius: 20px;
  padding: 14px;
  max-width: 480px; margin: 0 auto;
}
.fab-sheet__title {
  text-align: center; color: #9c9ca6; font-size: 13px; font-weight: 600;
  margin: 0 0 10px;
}
.fab-sheet__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fab-option {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 10px 15px;
  background: #1f1f24;
  border: 1px solid #2e2e35;
  border-radius: 16px;
  cursor: pointer; font: inherit;
  color: var(--text-primary, #fff);
}
.fab-option:active { transform: scale(.98); }
.fab-option__ico {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: #7c3aed;
}
.fab-option__ico--post { background: #2563eb; }
.fab-option__ico img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.fab-option__label { font-size: 14px; font-weight: 700; }
.fab-option__hint { font-size: 11.5px; color: #8b8b95; text-align: center; line-height: 1.35; }
.fab-sheet__cancel {
  margin-top: 10px; width: 100%;
  padding: 13px; border-radius: 999px;
  background: #232327; border: none; cursor: pointer;
  color: #fff; font-size: 14px; font-weight: 600; font-family: inherit;
}

/* ── Мастер создания видео ───────────────────────────────────────── */
.vidc-backdrop {
  position: fixed; inset: 0; z-index: 3700;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: stretch; justify-content: center;
}
.vidc-backdrop.is-open { display: flex; }
.vidc {
  background: #101014;
  width: 100%; max-width: 560px;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 0;
}
@media (min-width: 640px) {
  .vidc { border-radius: 20px; margin: auto; max-height: calc(100dvh - 40px); }
}
.vidc__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #232329;
}
.vidc__title { color: #fff; font-size: 16px; font-weight: 700; margin: 0; }
.vidc__close {
  width: 34px; height: 34px; border-radius: 50%;
  background: #1f1f25; border: none; cursor: pointer;
  display: grid; place-items: center;
}
.vidc__close img { width: 15px; height: 15px; filter: brightness(0) invert(1); }
.vidc__body { flex: 1; overflow-y: auto; padding: 16px; scrollbar-width: none; }
.vidc__body::-webkit-scrollbar { display: none; }
.vidc__foot {
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #232329;
  display: flex; gap: 10px;
}

/* шаг 1: источник */
.vidc-source { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vidc-source__opt {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 12px 22px;
  background: #1a1a20;
  border: 1.5px dashed #33333c;
  border-radius: 18px;
  cursor: pointer; font: inherit; color: #fff;
}
.vidc-source__opt img { width: 30px; height: 30px; filter: brightness(0) invert(1); opacity: .92; }
.vidc-source__opt b { font-size: 14.5px; }
.vidc-source__opt span { font-size: 11.5px; color: #8b8b95; text-align: center; line-height: 1.4; }

/* шаг 2: превью + эффекты */
.vidc-preview {
  position: relative;
  border-radius: 14px; overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 14;
  max-height: 52dvh;
  margin: 0 auto;
  width: auto;
}
.vidc-preview video, .vidc-preview canvas {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.vidc-fx { width: 100%; transform-origin: 50% 45%; }
.vidc-rec-dot {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
}
.vidc-rec-dot i {
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
  animation: vidc-blink 1s steps(2) infinite;
}
@keyframes vidc-blink { 50% { opacity: .25; } }
.vidc-controls { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.vidc-control__row { display: flex; align-items: center; gap: 10px; }
.vidc-control__label {
  font-size: 12.5px; color: #9c9ca6; font-weight: 600;
  min-width: 52px; display: inline-flex; align-items: center; gap: 6px;
}
.vidc-control__label img { width: 14px; height: 14px; filter: invert(1); opacity: .8; }
.vidc-zoom {
  flex: 1; appearance: none; height: 4px; border-radius: 2px;
  background: #2e2e36; outline: none;
}
.vidc-zoom::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; cursor: pointer;
}
.vidc-zoom::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; cursor: pointer; border: none;
}
.vidc-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.vidc-filters::-webkit-scrollbar { display: none; }
.vidc-filter-chip {
  flex: 0 0 auto;
  padding: 8px 14px; border-radius: 999px;
  background: #1f1f25; border: 1px solid #2e2e35;
  color: #cfcfd6; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.vidc-filter-chip.is-active { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.vidc-swap {
  align-self: center;
  padding: 9px 16px; border-radius: 999px;
  background: #1f1f25; border: 1px solid #2e2e35;
  color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
}
.vidc-swap img { width: 14px; height: 14px; filter: invert(1); }

/* шаг 3: описание */
.vidc-field { margin-bottom: 14px; }
.vidc-field label {
  display: block; font-size: 12.5px; font-weight: 700; color: #9c9ca6;
  margin-bottom: 7px;
}
.vidc-field input, .vidc-field textarea {
  width: 100%;
  background: #1a1a20; border: 1px solid #2c2c34; border-radius: 12px;
  color: #fff; font: inherit; font-size: 14.5px;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
}
.vidc-field input:focus, .vidc-field textarea:focus { border-color: #7c3aed; }
.vidc-hint { font-size: 12px; color: #6f6f7a; margin: -6px 0 14px; }
.vidc-mini-preview {
  border-radius: 12px; overflow: hidden; background: #000;
  width: 116px; aspect-ratio: 9 / 14;
  margin-bottom: 16px;
}
.vidc-mini-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* кнопки мастера */
.btn-vidc-primary {
  flex: 1;
  padding: 14px; border-radius: 999px;
  background: #ef4444; color: #fff;
  font-size: 15px; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer;
}
.btn-vidc-primary:disabled { opacity: .45; cursor: default; }
.btn-vidc-secondary {
  flex: 1;
  padding: 14px; border-radius: 999px;
  background: #232329; color: #fff;
  font-size: 15px; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer;
}
.vidc-error { color: #fca5a5; font-size: 13px; margin: 0 16px 10px; display: none; }
.vidc-progress {
  height: 4px; border-radius: 2px; background: #232329; overflow: hidden;
  margin: 0 16px 12px; display: none;
}
.vidc-progress i { display: block; height: 100%; width: 0%; background: #7c3aed; }

/* сетка видео в профиле */
.pf-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 768px) { .pf-video-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
.pf-video-empty {
  padding: 26px 4px; text-align: center; color: var(--text-secondary, #9c9c9c);
  font-size: 13.5px; line-height: 1.5;
}

/* ── v73 (fix): недостающий блок — drawer комментариев ──────────── */
.vc-drawer {
  position: fixed; inset: 0; z-index: 4300;
  display: none;
}
.vc-drawer.is-open { display: block; }
.vc-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; transition: opacity .2s ease;
}
.vc-drawer.is-open .vc-drawer__backdrop { opacity: 1; }
.vc-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: #16161c;
  border-left: 1px solid #2e2e35;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .24s ease;
}
.vc-drawer.is-open .vc-drawer__panel { transform: translateX(0); }
@media (max-width: 640px) {
  .vc-drawer__panel {
    left: 0; right: 0; width: 100%;
    border-left: none; border-top: 1px solid #2e2e35;
    top: auto; height: 78dvh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .vc-drawer.is-open .vc-drawer__panel { transform: translateY(0); }
}
.vc-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #2e2e35;
}
.vc-drawer__head h3 { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.vc-drawer__head button {
  background: none; border: none; cursor: pointer; padding: 6px;
  display: grid; place-items: center;
}
.vc-drawer__head button img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.vc-drawer__list { flex: 1; overflow-y: auto; padding: 12px 16px; scrollbar-width: none; }
.vc-drawer__list::-webkit-scrollbar { display: none; }
.vc-drawer__loading, .vc-drawer__empty {
  padding: 40px 10px; text-align: center;
  color: #8b8b95; font-size: 13.5px; line-height: 1.5;
}
.vc-drawer__foot {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #2e2e35;
}
.vc-drawer__foot input {
  flex: 1; min-width: 0;
  background: #1f1f25; border: 1px solid #2e2e35; border-radius: 999px;
  color: #fff; font: inherit; font-size: 14px;
  padding: 11px 16px; outline: none;
}
.vc-drawer__foot input:focus { border-color: #7c3aed; }
.vc-drawer__foot .btn-publish { flex: 0 0 auto; padding: 10px 18px; }

/* комментарии */
.vc-cmt { display: flex; gap: 10px; padding: 8px 0; }
.vc-cmt__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  overflow: hidden; flex: 0 0 auto;
  background: #26262e; color: #9c9ca6;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.vc-cmt__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc-cmt__body { flex: 1; min-width: 0; }
.vc-cmt__head a { color: #c9c9d4; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.vc-cmt__text { margin: 2px 0 4px; color: #fff; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.vc-cmt__date { font-size: 11px; color: #6f6f7a; margin-right: 10px; }
.vc-cmt__reply {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #8b8b95; font-size: 11.5px; font-weight: 600; font-family: inherit;
}
.vc-cmt__reply:hover { color: #c9c9d4; }
.vc-cmt__replies { margin-top: 6px; padding-left: 6px; border-left: 2px solid #2e2e35; }
.vc-cmt--reply { padding: 6px 0; }
.vc-cmt--reply .vc-cmt__avatar { width: 26px; height: 26px; font-size: 11px; }

/* v73 (fix): лайк — активное состояние */
.video-rail__like.is-liked img {
  filter: invert(0.35) sepia(1) saturate(18) hue-rotate(315deg) brightness(1.05);
  transform: scale(1.18);
  transition: transform .15s ease;
}
.video-rail__comment { /* SymR: якорь для будущих стилей; базовый вид у .video-rail__btn */ }
