/*
 * Файл содержит ТОЛЬКО кириллицу (это кириллический сабсет Unbounded), но
 * без unicode-range начертание заявляло, что покрывает вообще все символы.
 * Из-за этого латиница ("WAKUDO", "PREMIERE PRO" и т.п.) сначала пыталась
 * рисоваться этим файлом, не находила там глифов, проваливалась дальше по
 * цепочке на семейство Unbounded — и уже потом, когда доезжал латинский
 * сабсет, рывком перерисовывалась. Это и читалось как "сначала шрифт не
 * тот, потом резко меняется". Диапазон — тот же, что у кириллического
 * Unbounded в css/fonts.css: латиница теперь сразу берётся из своего
 * сабсета, лишнего шага подстановки нет.
 */
@font-face {
  font-family: "Unbounded WAKUDO";
  src: url("/fonts/unbounded-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
}

/* Тестовый глобальный режим: фирменный Unbounded используется на всём сайте. */
html,
body,
body *,
body *::before,
body *::after {
  font-family: "Unbounded WAKUDO", Unbounded, Arial, sans-serif !important;
}

body {
  font-synthesis: none;
}

/* Текущее оформление из content.html применяется уже на первом кадре. */
.hero-glow,
.hero-second-line {
  font-style: italic !important;
}

/* Увеличенный ритм между секциями. Анимационные transform/transition не меняются. */
.shorts-grid {
  margin-bottom: 180px !important;
}

/*
 * Если горизонтальное портфолио отключено (showHorizontal: false в
 * data/portfolio-videos.json, класс выставляет portfolio-render.js),
 * убираем отступ, который обычно разделяет две части портфолио.
 */
html.horizontal-portfolio-hidden .shorts-grid {
  margin-bottom: 0 !important;
}

/* Отступы #portfolio/#contacts/#principles переехали в css/layout-overrides.css
   (единственный источник теперь) — тут раньше были те же селекторы с
   !important, которые эти обычные правила молча перебивали, независимо от
   порядка подключения файлов. */

footer {
  border-top: 0 !important;
  padding-top: 72px !important;
}

footer > p {
  width: min(100%, 1152px);
  max-width: 1152px;
  margin: 38px auto 0 !important;
  padding: 0 24px;
  text-align: center !important;
}

footer .wakudo-footer-copyright {
  width: auto;
  max-width: none;
  margin: 13px 0 0 !important;
  padding: 0;
  text-align: left !important;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.42);
}

.site-header nav,
.site-header nav > *,
.hero-center-wrapper,
.hero-center-wrapper > *,
footer .max-w-6xl,
footer .max-w-6xl > * {
  min-width: 0;
}

.site-header .menu a,
.social-text-group a,
.btn,
.video-details-button,
.video-details-tag {
  white-space: nowrap;
}

.hero-h1,
.hero-p,
section h2,
section h3,
section p,
footer p {
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-h1,
section h2,
section h3 {
  text-wrap: balance;
}

/* Точечная калибровка выбранных элементов без изменения остального сайта. */
.hero-btn-link {
  font-size: 13px;
  font-weight: 480;
  letter-spacing: -0.025em;
}

.hero-premium-center .hero-center-wrapper {
  max-width: 1040px;
}

.hero-premium-center .hero-h1 {
  font-size: clamp(29px, 4.5vw, 46px);
  line-height: 1.07;
  letter-spacing: -0.018em;
}

.hero-premium-center .hero-second-line {
  letter-spacing: 0.01em;
}

#principles .space-y-4 h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

#principles .space-y-4 p {
  font-size: 13px;
  font-weight: 350;
  line-height: 1.5;
  letter-spacing: -0.025em;
}

/* Финальная дизайн-система: иерархия, длина строк и визуальный ритм. */
.site-header .menu a {
  font-size: 12px;
  font-weight: 450;
  letter-spacing: -0.01em;
}

.hero-badge,
.section-kicker {
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.2;
}

.hero-p {
  max-width: 720px;
  font-size: clamp(12.5px, 1.2vw, 15px);
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.022em;
}

.hero-features {
  gap: 44px;
}

.feat-txt {
  font-size: 10.5px;
  font-weight: 450;
  letter-spacing: 0.08em;
}

#portfolio .section-kicker,
#principles .section-kicker {
  margin-bottom: 13px;
}

#portfolio h2 {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

section#contacts > div {
  max-width: 1020px;
}

section#contacts h2 {
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

section#contacts p {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(12.5px, 1.25vw, 15px);
  font-weight: 350;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

/*
  Блок аудита проявляется не по таймеру, а когда его содержимое доходит
  до более поздней линии viewport. !important удерживает исходную анимацию
  скрытой до сигнала наблюдателя из videos.html.
*/
section#contacts.wakudo-audit-reveal-controlled:not(.wakudo-audit-reveal-ready)
  > div
  > div {
  opacity: 0 !important;
  transform: translateY(32px) !important;
}

section#contacts.wakudo-audit-reveal-controlled.wakudo-audit-reveal-ready
  > div
  > div {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (prefers-reduced-motion: reduce) {
  section#contacts.wakudo-audit-reveal-controlled > div > div {
    opacity: 1 !important;
    transform: none !important;
  }
}

#principles > .max-w-4xl {
  max-width: 920px;
}

#principles h2.hero-h1 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

#principles .space-y-4 h3 {
  font-size: 16px;
  font-weight: 480;
}

#principles .space-y-4 p {
  max-width: 760px;
}

footer .max-w-6xl {
  align-items: center !important;
}

footer nav,
.social-text-group {
  letter-spacing: 0.08em;
}

footer nav a,
.social-text-group a {
  font-size: 9.5px;
  font-weight: 500;
}

footer div > div:first-child p:first-child::after {
  font-size: 15px !important;
  letter-spacing: 0.06em;
}

footer div > div:first-child p + p,
footer > p {
  font-size: 9px;
  line-height: 1.55;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(168, 85, 247, 0.9);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .site-header {
    background: linear-gradient(
      180deg,
      rgba(4, 3, 9, 0.68),
      rgba(4, 3, 9, 0.36)
    ) !important;
    -webkit-backdrop-filter: saturate(125%) blur(10px) !important;
    backdrop-filter: saturate(125%) blur(10px) !important;
  }

  .shorts-grid {
    margin-bottom: 180px !important;
  }

  footer {
    padding-top: 60px !important;
  }

  footer > p {
    margin-top: 30px !important;
  }

  footer .wakudo-footer-copyright {
    margin-top: 12px !important;
    text-align: center !important;
  }

  .hero-badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .hero-p {
    max-width: 34rem;
    margin-bottom: var(--wakudo-hero-text-social-gap-mobile);
    font-size: 12px;
    line-height: 1.55;
  }

  .hero-features {
    gap: 20px;
  }

  .feat-txt {
    font-size: 9.5px;
  }

  .site-header .menu a,
  footer nav a {
    font-size: min(0.8rem, 3.5vw);
  }

  .hero-btn-link {
    font-size: 12px;
  }

  .hero-premium-center .hero-h1 {
    font-size: clamp(27px, 7.7vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .hero-premium-center .hero-second-line {
    letter-spacing: 0.012em;
  }

  #principles .space-y-4 h3 {
    font-size: 14px;
  }

  #principles .space-y-4 p {
    font-size: 11.5px;
    line-height: 1.55;
  }

  section#contacts h2 {
    max-width: 19em;
    font-size: clamp(27px, 8.4vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.045em;
  }

  section#contacts p {
    max-width: 32em;
    font-size: 11.5px;
    line-height: 1.6;
  }

  #principles h2.hero-h1 {
    font-size: 27px;
  }

  #principles .space-y-4 > div > div {
    padding: 18px;
    border-radius: 22px;
  }

  #principles .space-y-4 > div > div > div {
    gap: 14px;
  }

  #principles .apple-icon-container {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
}

:root {
  /* Размеры VK/TG. Меняй только значения справа. */
  --wakudo-social-size: 64px;
  --wakudo-social-header-size: 44px;
  --wakudo-social-mobile-size: 64px;
  --wakudo-social-menu-size: 60px;

  /* Отступы между VK и TG. Значения как в исходной версии сайта. */
  --wakudo-social-gap: 2px;
  --wakudo-social-overlap: -5px;
  --wakudo-social-header-overlap: -4px;
  --wakudo-social-mobile-menu-gap: 18px;
  --wakudo-hero-text-social-gap-mobile: 16px;

  /* Отступ между подписью ("Обсудить проект:"/"Отправить на разбор:") и
     иконками VK/TG — общий для хиро и аудита, меняешь тут один раз, а не
     в двух файлах по отдельности. */
  --wakudo-label-icon-gap: 7px;
  --wakudo-label-icon-gap-compact: 5px;

  /* Серый текст пунктов внутри «Разбора ролика». */
  --wakudo-video-details-text-size: 10.5px;
  --wakudo-video-details-text-line-height: 1.24;
  --wakudo-video-details-mobile-text-size: 10px;
  --wakudo-video-details-mobile-text-line-height: 1.22;

  /* Единый дизайн плашек на всех вертикальных и горизонтальных роликах. */
  --wakudo-video-tag-background: #24182e;
  --wakudo-video-tag-background-optical-dark: #19111f;
  --wakudo-video-button-background: #2c1c38;
  --wakudo-video-button-background-hover: #342044;
  --wakudo-video-button-background-optical-dark: #211529;
  --wakudo-video-button-background-optical-dark-hover: #281832;
  --wakudo-video-button-border: transparent;
  --wakudo-video-button-border-hover: transparent;
  --wakudo-video-tag-border: transparent;
  --wakudo-video-pill-accent: #a855f7;
  --wakudo-video-pill-isolation-shadow:
    0 2px 5px rgba(0, 0, 0, 0.32),
    0 7px 16px rgba(0, 0, 0, 0.16);
}

.social-action-group {
  gap: var(--wakudo-social-gap) !important;
}

.social-icon-btn {
  width: var(--wakudo-social-size) !important;
  height: var(--wakudo-social-size) !important;
}

.site-header .social-icon-btn {
  width: var(--wakudo-social-header-size) !important;
  height: var(--wakudo-social-header-size) !important;
}

.social-action-group .social-icon-btn + .social-icon-btn {
  margin-left: var(--wakudo-social-overlap) !important;
}

.site-header .social-action-group .social-icon-btn + .social-icon-btn {
  margin-left: var(--wakudo-social-header-overlap) !important;
}

[data-slot="sheet-content"] .mobile-drawer-social {
  gap: var(--wakudo-social-mobile-menu-gap) !important;
}

[data-slot="sheet-content"] .mobile-drawer-social .social-icon-btn {
  width: var(--wakudo-social-menu-size) !important;
  height: var(--wakudo-social-menu-size) !important;
}

/* В мобильном меню используем те же белые значки, что и в шапке на ПК. */
[data-slot="sheet-content"] .mobile-drawer-social .social-icon-btn {
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

[data-slot="sheet-content"] .mobile-drawer-social .social-icon-btn--vk {
  background-image: url("/vk-header-96.webp?v=webp-20260806") !important;
}

[data-slot="sheet-content"] .mobile-drawer-social .social-icon-btn--tg {
  background-image: url("/tg-header-96.webp?v=webp-20260806") !important;
}

[data-slot="sheet-content"] .mobile-drawer-social .social-icon-btn img {
  opacity: 0 !important;
}

@media (max-width: 767px) {
  .social-icon-btn {
    width: var(--wakudo-social-mobile-size) !important;
    height: var(--wakudo-social-mobile-size) !important;
  }
}

/*
  Чистые 4x-растры для фиолетовых VK/TG-кнопок.
  Отдельные 240px-файлы не заставляют мобильный браузер резко уменьшать
  исходник 1024px и не содержат загрязнённого полупрозрачного контура.
*/
.hero-btns .social-icon-btn--vk,
section#contacts .social-icon-btn--vk {
  background: url("/vk-clean-128.webp?v=webp-20260806") center / contain no-repeat !important;
}

.hero-btns .social-icon-btn--tg,
section#contacts .social-icon-btn--tg {
  background: url("/tg-clean-128.webp?v=webp-20260806") center / contain no-repeat !important;
}

.hero-btns .social-icon-btn img,
section#contacts .social-icon-btn img {
  opacity: 0 !important;
}

.hero-btns {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
}

.hero-btns .social-action-group {
  margin-right: 0 !important;
}

/* Интерактивное описание вертикального ролика. */
.short-kinescope-frame:has(.video-details-control) {
  isolation: isolate;
}

.short-kinescope-frame:has(.video-details-control.is-open) {
  border-color: transparent !important;
  backface-visibility: hidden;
  will-change: transform, translate;
}

.short-kinescope-frame .video-details-control {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 999;
  pointer-events: none;
  font-family: "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
}

/*
  Оставляем превью под панелью: оно становится мягкой глубиной для glass-эффекта,
  но не перехватывает нажатия, пока открыт разбор.
*/
.short-kinescope-frame:has(.video-details-control.is-open)
  > :not(.video-details-control) {
  visibility: visible !important;
  pointer-events: none !important;
}

/*
  Размываем само превью, а не прозрачную панель. Так backdrop-слой не
  пересобирает края при подъёме карточки, а штатный hover-зум сохраняется.
*/
.short-kinescope-frame:has(.video-details-control.is-open) > iframe {
  filter: blur(16px) saturate(88%) brightness(72%);
  transform: scale(1.1);
  transform-origin: center;
  will-change: transform, filter;
}

.short-kinescope-frame .video-details-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  gap: 7px;
  max-width: 140px;
  min-height: 28px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--wakudo-video-button-border);
  border-radius: 999px;
  background: var(--wakudo-video-button-background);
  box-shadow: var(--wakudo-video-pill-isolation-shadow);
  color: #fff;
  font: 650 7.4px/1 "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
  letter-spacing: 0.045em;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease,
    opacity 220ms ease;
}

.short-kinescope-frame .video-details-button:hover {
  transform: translateY(-1px);
  border-color: var(--wakudo-video-button-border-hover);
  background: var(--wakudo-video-button-background-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 3px 7px rgba(0, 0, 0, 0.34),
    0 9px 20px rgba(0, 0, 0, 0.18);
}

.short-kinescope-frame .video-details-button[data-optical-tone="dark"] {
  background: var(--wakudo-video-button-background-optical-dark);
}

.short-kinescope-frame .video-details-button[data-optical-tone="dark"]:hover {
  background: var(--wakudo-video-button-background-optical-dark-hover);
}

.short-kinescope-frame .video-details-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--wakudo-video-pill-accent);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.24);
  color: #fff;
  font: 700 13px/1 Arial, sans-serif;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms ease,
    box-shadow 180ms ease;
}

.short-kinescope-frame .video-details-button:hover .video-details-button-icon {
  transform: rotate(90deg);
  background: color-mix(in srgb, var(--wakudo-video-pill-accent) 82%, white);
  box-shadow: 0 0 13px rgba(168, 85, 247, 0.38);
}

.short-kinescope-frame .video-details-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  gap: 5px;
  min-height: 28px;
  max-width: 140px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid var(--wakudo-video-tag-border) !important;
  border-radius: 999px;
  background: var(--wakudo-video-tag-background);
  box-shadow: var(--wakudo-video-pill-isolation-shadow) !important;
  color: rgba(255, 255, 255, 0.74);
  font: 620 7.3px/1 "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.short-kinescope-frame .video-details-tag[data-optical-tone="dark"] {
  background: var(--wakudo-video-tag-background-optical-dark);
}

.short-kinescope-frame .video-details-tag,
.short-kinescope-frame:hover .video-details-tag,
.short-kinescope-frame:focus-within .video-details-tag {
  border: 1px solid var(--wakudo-video-tag-border) !important;
  outline: 0 !important;
  box-shadow: var(--wakudo-video-pill-isolation-shadow) !important;
}

.short-kinescope-frame .video-details-tag::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--video-tag-color, var(--wakudo-accent));
  box-shadow: 0 0 9px color-mix(in srgb, var(--video-tag-color, var(--wakudo-accent)) 82%, transparent);
}

.short-kinescope-frame .video-details-button:focus-visible,
.short-kinescope-frame .video-details-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.short-kinescope-frame .video-details-panel {
  position: absolute;
  inset: -2px;
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border-radius: inherit;
  background:
    linear-gradient(to bottom, rgba(3, 3, 7, 0.34) 0%, rgba(3, 3, 7, 0.10) 13%, transparent 24%, transparent 76%, rgba(3, 3, 7, 0.10) 87%, rgba(3, 3, 7, 0.34) 100%),
    linear-gradient(to right, rgba(3, 3, 7, 0.24) 0%, transparent 10%, transparent 90%, rgba(3, 3, 7, 0.24) 100%),
    radial-gradient(circle at 15% 5%, color-mix(in srgb, var(--wakudo-accent) 28%, transparent), transparent 38%),
    linear-gradient(
      155deg,
      rgb(15 10 24 / var(--wakudo-video-details-darkness, 0.82)),
      rgb(3 5 8 / calc(var(--wakudo-video-details-darkness, 0.82) - 0.08))
    );
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 20px 52px rgba(0, 0, 0, 0.46);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  z-index: 1000;
  backface-visibility: hidden;
  transform-style: flat;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-16px) scale(0.97);
  clip-path: inset(0 0 100% 0 round 20px);
  transition:
    opacity 260ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 460ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 460ms;
}

.short-kinescope-frame .video-details-control.is-open .video-details-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.short-kinescope-frame .video-details-control.is-open .video-details-tag {
  opacity: 0;
  transform: translateY(-8px);
}

.short-kinescope-frame .video-details-control.is-open .video-details-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  clip-path: inset(0 0 0 0 round 20px);
  transition-delay: 0s;
}

.short-kinescope-frame .video-details-control.is-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1001;
  border: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wakudo-accent) 46%, transparent);
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.short-kinescope-frame .video-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--wakudo-accent) 28%, transparent);
}

.short-kinescope-frame .video-details-head h3 {
  margin: 0;
  max-width: 210px;
  font: 700 20px/1.2 "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
  letter-spacing: -0.03em;
}

.short-kinescope-frame .video-details-close {
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0 0 3px;
  border: 1px solid color-mix(in srgb, var(--wakudo-accent) 55%, white);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: 300 25px/1 Arial, sans-serif;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.short-kinescope-frame .video-details-close:hover {
  transform: rotate(6deg) scale(1.04);
  background: color-mix(in srgb, var(--wakudo-accent) 22%, transparent);
}

.short-kinescope-frame .video-details-panel ul {
  display: grid;
  gap: 15px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.short-kinescope-frame .video-details-panel li {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: start;
  gap: 11px;
  color: rgba(255, 255, 255, 0.76);
  font: 500 13px/1.45 "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms ease, transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.short-kinescope-frame .video-details-marker {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--video-detail-color, var(--wakudo-accent));
  box-shadow: 0 0 14px color-mix(in srgb, var(--video-detail-color, var(--wakudo-accent)) 85%, transparent);
}

.short-kinescope-frame .video-details-control.is-open li {
  opacity: 1;
  transform: translateY(0);
}

.short-kinescope-frame .video-details-control.is-open li:nth-child(1) { transition-delay: 150ms; }
.short-kinescope-frame .video-details-control.is-open li:nth-child(2) { transition-delay: 200ms; }
.short-kinescope-frame .video-details-control.is-open li:nth-child(3) { transition-delay: 250ms; }
.short-kinescope-frame .video-details-control.is-open li:nth-child(4) { transition-delay: 300ms; }
.short-kinescope-frame .video-details-control.is-open li:nth-child(5) { transition-delay: 350ms; }

/* Компактная цветовая раскладка подробного разбора ролика. */
.short-kinescope-frame .video-details-panel.has-groups {
  padding: 16px 15px 13px;
  font-family: "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-head {
  align-items: center;
  padding-bottom: 9px;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-head h3 {
  max-width: 230px;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 650;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-close {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  font-size: 22px;
}

.short-kinescope-frame .video-details-content {
  min-height: 0;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 9px;
  padding: 5px 0 7px;
}

.short-kinescope-frame .video-details-section {
  margin: 0;
  padding: 0;
}

.short-kinescope-frame .video-details-section h4 {
  margin: 0 0 4px;
  color: var(--video-detail-color);
  font: 700 12px/1.12 "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
  letter-spacing: 0.055em;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-section ul {
  gap: 2px;
  margin: 0;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-section li {
  grid-template-columns: 6px 1fr;
  gap: 7px;
  color: #ddd9e2;
  font-family: "Unbounded WAKUDO", Unbounded, Arial, sans-serif;
  font-size: var(--wakudo-video-details-text-size);
  font-weight: 450;
  line-height: var(--wakudo-video-details-text-line-height);
  letter-spacing: -0.025em;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-marker {
  width: 4px;
  height: 4px;
  margin-top: 4px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--video-detail-color) 78%, transparent);
}

/* Горизонтальные ролики используют тот же компонент в компактной сетке. */
.short-kinescope-frame.video-details-horizontal {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9 !important;
}

.short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups {
  padding: 14px 18px 13px;
}

.short-kinescope-frame.video-details-horizontal .video-details-head {
  padding-bottom: 9px;
}

.short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-head h3 {
  max-width: none;
  font-size: 16px;
}

.short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-content {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-content: start;
  justify-content: initial;
  gap: 14px 20px;
  margin-top: 9px;
  padding: 2px 3px 5px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.55) transparent;
}

.short-kinescope-frame.video-details-horizontal .video-details-section h4 {
  margin-bottom: 4px;
  font-size: 12px;
}

.short-kinescope-frame.video-details-horizontal .video-details-section {
  grid-column: span 2;
}

.short-kinescope-frame.video-details-horizontal .video-details-section:nth-child(4) {
  grid-column: 2 / span 2;
}

.short-kinescope-frame.video-details-horizontal .video-details-section:nth-child(5) {
  grid-column: 4 / span 2;
}

.short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-section ul {
  gap: 2px;
}

.short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-section li {
  grid-template-columns: 6px 1fr;
  gap: 7px;
  font-size: var(--wakudo-video-details-text-size);
  line-height: var(--wakudo-video-details-text-line-height);
}

.short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-marker {
  width: 4px;
  height: 4px;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .short-kinescope-frame .video-details-panel {
    padding: 22px 20px;
    background:
      linear-gradient(to bottom, rgba(3, 3, 7, 0.38) 0%, rgba(3, 3, 7, 0.12) 13%, transparent 24%, transparent 76%, rgba(3, 3, 7, 0.12) 87%, rgba(3, 3, 7, 0.38) 100%),
      linear-gradient(to right, rgba(3, 3, 7, 0.28) 0%, transparent 11%, transparent 89%, rgba(3, 3, 7, 0.28) 100%),
      radial-gradient(circle at 15% 5%, color-mix(in srgb, var(--wakudo-accent) 25%, transparent), transparent 38%),
      linear-gradient(
        155deg,
        rgb(15 10 24 / calc(var(--wakudo-video-details-darkness, 0.82) + 0.05)),
        rgb(3 5 8 / calc(var(--wakudo-video-details-darkness, 0.82) - 0.02))
      );
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .short-kinescope-frame .video-details-head h3 {
    font-size: 18px;
  }

  .short-kinescope-frame .video-details-panel.has-groups {
    padding: 15px 14px 12px;
  }

  .short-kinescope-frame .video-details-panel.has-groups .video-details-head h3 {
    font-size: 15px;
  }

  .short-kinescope-frame .video-details-panel.has-groups .video-details-content {
    gap: 10px;
    margin-top: 8px;
    padding-top: 5px;
    padding-bottom: 7px;
  }

  .short-kinescope-frame .video-details-section h4 {
    font-size: 11px;
  }

  .short-kinescope-frame .video-details-panel.has-groups .video-details-section li {
    font-size: var(--wakudo-video-details-mobile-text-size);
    line-height: var(--wakudo-video-details-mobile-text-line-height);
  }

  .short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups {
    padding: 10px 12px;
  }

  .short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-head h3 {
    font-size: 15px;
  }

  .short-kinescope-frame.video-details-horizontal .video-details-close {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 18px;
  }

  .short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 7px;
    padding: 2px 1px 4px;
  }

  .short-kinescope-frame.video-details-horizontal .video-details-section h4 {
    font-size: 11px;
  }

  .short-kinescope-frame.video-details-horizontal .video-details-section,
  .short-kinescope-frame.video-details-horizontal .video-details-section:nth-child(4),
  .short-kinescope-frame.video-details-horizontal .video-details-section:nth-child(5) {
    grid-column: auto;
  }

  .short-kinescope-frame.video-details-horizontal .video-details-panel.has-groups .video-details-section li {
    font-size: var(--wakudo-video-details-mobile-text-size);
    line-height: var(--wakudo-video-details-mobile-text-line-height);
  }
}

@media (prefers-reduced-motion: reduce) {
  .short-kinescope-frame .video-details-button,
  .short-kinescope-frame .video-details-panel,
  .short-kinescope-frame .video-details-panel li {
    transition-duration: 0.01ms !important;
  }
}
