/* NST IV HTML5 Player: контейнер без внешней рамки и фона */
.nst-iv-html5,
.nst-iv-html5 * {
    box-sizing: border-box;
}


/* NST IV HTML5 Player: сброс внешних контейнеров shortcode/темы */
.nst-iv-player,
.nst-iv-player-wrap,
.nst-iv-shortcode,
.nst-iv-render,
.nst-iv-renderer,
.nst-iv-html5,
.wp-block-shortcode:has(.nst-iv-html5),
.entry-content > p:has(.nst-iv-html5),
.entry-content > div:has(> .nst-iv-html5) {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* NST IV HTML5 Player: сброс рамок темы */
.nst-iv-html5 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff;
    display: block !important;
    overflow: hidden !important;
    font-family: Arial, sans-serif;
}

/* NST IV HTML5 Player: экран плеера.
 * Геометрия сцены всегда 16:9 и дополнительно фиксируется runtime по реальной CSS-ширине контейнера.
 * Это не зависит от screen.width, DPR, videoWidth или физического разрешения устройства. */
.nst-iv-html5-shell {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    line-height: 0;
    isolation: isolate;
}

/* Fallback для старых Android WebView/Safari без CSS aspect-ratio.
 * После запуска JS runtime задаёт точную высоту в px; этот fallback нужен до первого JS layout. */
@supports not (aspect-ratio: 16 / 9) {
    .nst-iv-html5-shell::before {
        content: "";
        display: block;
        width: 100%;
        padding-top: 56.25%;
        pointer-events: none;
    }
}

/* NST IV HTML5 Player: старые слои тоже сбрасываются, если CSS закеширован */
.nst-iv-bg-layer,
.nst-iv-scene-layer,
.nst-iv-menu-layer,
.nst-iv-transition-layer,
.nst-iv-html5-stage,
.nst-iv-html5-overlay,
.nst-iv-html5-ui-layer {
    container-type: inline-size !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* NST IV HTML5 Player: слои нового плеера */
.nst-iv-html5-stage {
    z-index: 1;
    background: #000;
}

/* NST IV HTML5 Player: интерфейс поверх видео */
.nst-iv-html5-overlay {
    z-index: 5;
    pointer-events: none;
    line-height: normal;
}

/* NST ENGINE: постоянный слой глобального интерфейса */
.nst-iv-html5-ui-layer {
    z-index: 20 !important;
    pointer-events: none !important;
    line-height: normal !important;
}

.nst-iv-html5-ui-layer--memo {
    z-index: 1000 !important;
}

.nst-iv-html5-ui-layer > * {
    pointer-events: auto;
}

/* NST IV HTML5 Player: видео всегда вписывается в экран */
.nst-iv-html5-video,
.nst-iv-html5 video,
.nst-iv-video-main {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #000 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* NST IV HTML5 Player: фон меню */
.nst-iv-html5-bg,
.nst-iv-html5-menu-bg-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* NST IV HTML5 Player: меню выбора */
.nst-iv-html5-menu {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    pointer-events: auto;
    background: transparent !important;
}

/* NST IV HTML5 Player: затемнение меню */
.nst-iv-html5-menu-dim {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0,0,0,.48);
    pointer-events: none;
}

/* NST IV HTML5 Player: содержимое меню */
.nst-iv-html5-menu-content {
    position: relative !important;
    z-index: 2;
    width: min(760px, 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

/* NST IV HTML5 Player: заголовок */
.nst-iv-html5-title {
    margin: 0 0 4px !important;
    color: #fff !important;
    font-size: clamp(22px, 3vw, 40px) !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-shadow: 0 3px 16px rgba(0,0,0,.8);
}

/* NST IV HTML5 Player: подзаголовок */
.nst-iv-html5-subtitle {
    margin: 0 0 8px !important;
    color: rgba(255,255,255,.9) !important;
    font-size: clamp(14px, 1.5vw, 20px) !important;
    line-height: 1.35 !important;
    text-align: center !important;
    text-shadow: 0 3px 14px rgba(0,0,0,.75);
}

/* NST IV HTML5 Player: кнопки выбора */
.nst-iv-html5-choice {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 10px;
    background: rgba(0,0,0,.68);
    color: #fff;
    padding: 14px 18px;
    font-size: 16px;
    line-height: 1.25;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

/* NST IV HTML5 Player: наведение */
.nst-iv-html5-choice:hover,
.nst-iv-html5-choice:focus {
    background: rgba(30,30,30,.82);
    border-color: rgba(255,255,255,.5);
    outline: none;
}

/* NST IV HTML5 Player: сообщения */
.nst-iv-html5-message,
.nst-iv-html5-error {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 18px !important;
    background: #000 !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

/* NST IV HTML5 Player: fullscreen */
.nst-iv-html5-shell:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    aspect-ratio: auto;
}


/* NST ENGINE 0.2.30.115: Visual Fullscreen with explicit safe-viewport centering.
 * The root occupies exactly the visual viewport. The 16:9 shell gets absolute x/y/w/h
 * from one JS geometry calculation, avoiding flex/content-box drift on iOS WebKit. */
html.nst-iv-html5-visual-fullscreen-lock,
body.nst-iv-html5-visual-fullscreen-lock {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

.nst-iv-html5.nst-iv-html5--visual-fullscreen {
    position: fixed !important;
    left: var(--nst-iv-visual-viewport-x, 0px) !important;
    top: var(--nst-iv-visual-viewport-y, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--nst-iv-visual-viewport-w, 100vw) !important;
    height: var(--nst-iv-visual-viewport-h, 100vh) !important;
    box-sizing: border-box !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    z-index: 2147483000 !important;
    display: block !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
}

.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-shell {
    position: absolute !important;
    left: var(--nst-iv-visual-scene-x, 0px) !important;
    top: var(--nst-iv-visual-scene-y, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--nst-iv-visual-scene-w, 100%) !important;
    height: var(--nst-iv-visual-scene-h, auto) !important;
    box-sizing: border-box !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    aspect-ratio: 16 / 9;
    background: #000 !important;
}

/* Visual Fullscreen uses exact visualViewport dimensions from JS; no 100dvh min-height is applied. */

/* NST IV HTML5 Player: мобильная адаптация */
@media (max-width: 640px) {
    .nst-iv-html5-shell {
        min-height: 0 !important;
    }

    .nst-iv-html5-menu {
        padding: 14px !important;
    }

    .nst-iv-html5-choice {
        padding: 12px 14px;
        font-size: 15px;
    }
}


/* NST IV HTML5 Player: меню действий по тапу/ПКМ */
.nst-iv-html5-action-menu {
    position: absolute !important;
    z-index: 20 !important;
    width: 148px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 8px !important;
    background: rgba(0,0,0,.86) !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.35) !important;
    pointer-events: auto !important;
    line-height: normal !important;
}

/* NST IV HTML5 Player: кнопки меню действий */
.nst-iv-html5-action-menu button {
    appearance: none !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    cursor: pointer !important;
}

/* NST IV HTML5 Player: наведение меню действий */
.nst-iv-html5-action-menu button:hover,
.nst-iv-html5-action-menu button:focus {
    background: rgba(255,255,255,.18) !important;
    outline: none !important;
}

/* NST IV HTML5 Player: собственные контролы без нативного fullscreen video */
.nst-iv-html5-controls {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    z-index: 18 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px !important;
    background: rgba(0,0,0,.72) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 10px !important;
    pointer-events: auto !important;
    line-height: normal !important;
    opacity: 1 !important;
    transition: opacity .18s ease !important;
}

/* NST IV HTML5 Player: автоскрытие контролов */
.nst-iv-html5-controls.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* NST IV HTML5 Player: кнопки контролов */
.nst-iv-html5-control-btn {
    appearance: none !important;
    min-width: 58px !important;
    height: 34px !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    font-size: 13px !important;
    line-height: 34px !important;
    text-align: center !important;
    cursor: pointer !important;
}

/* NST IV HTML5 Player: время */
.nst-iv-html5-time {
    min-width: 88px !important;
    color: rgba(255,255,255,.9) !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* NST IV HTML5 Player: прогресс */
.nst-iv-html5-progress {
    flex: 1 1 auto !important;
    min-width: 60px !important;
    height: 28px !important;
    margin: 0 !important;
    cursor: pointer !important;
}

/* NST IV HTML5 Player: мобильные контролы */
@media (max-width: 640px) {
    .nst-iv-html5-controls {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        gap: 6px !important;
        padding: 6px !important;
    }

    .nst-iv-html5-control-btn {
        min-width: 48px !important;
        height: 32px !important;
        padding: 0 7px !important;
        font-size: 12px !important;
        line-height: 32px !important;
    }

    .nst-iv-html5-time {
        display: none !important;
    }
}


/* NST IV HTML5 Player: SVG-иконки */
.nst-iv-html5 button svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    fill: currentColor !important;
    pointer-events: none !important;
}

/* NST IV HTML5 Player: верхние кнопки */
.nst-iv-html5-top-actions {
    position: absolute !important;
    inset: 0 !important;
    z-index: 19 !important;
    pointer-events: none !important;
}

/* NST IV HTML5 Player: кнопка сверху */
.nst-iv-html5-top-btn {
    appearance: none !important;
    position: absolute !important;
    top: 12px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,.58) !important;
    color: #fff !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.28) !important;
}

/* NST IV HTML5 Player: верхняя левая кнопка */
.nst-iv-html5-top-left {
    left: 12px !important;
}

/* NST IV HTML5 Player: верхняя правая кнопка */
.nst-iv-html5-top-right {
    right: 12px !important;
}

/* NST IV HTML5 Player: нижние контролы */
.nst-iv-html5-controls {
    width: auto !important;
    left: 50% !important;
    right: auto !important;
    bottom: 12px !important;
    transform: translateX(-50%) !important;
    gap: 7px !important;
    padding: 7px !important;
}

/* NST IV HTML5 Player: иконка контрола */
.nst-iv-html5-control-btn {
    min-width: 38px !important;
    width: 38px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* NST IV HTML5 Player: popup для громкости/перемотки */
.nst-iv-html5-popover {
    position: absolute !important;
    left: 50% !important;
    bottom: 62px !important;
    z-index: 21 !important;
    transform: translateX(-50%) !important;
    width: min(360px, calc(100% - 32px)) !important;
    padding: 10px !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,.82) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.35) !important;
    pointer-events: auto !important;
}

/* NST IV HTML5 Player: скрытый popup */
.nst-iv-html5-popover[hidden] {
    display: none !important;
}

/* NST IV HTML5 Player: ползунки popup */
.nst-iv-html5-seek-range,
.nst-iv-html5-volume-range {
    width: 100% !important;
    height: 30px !important;
    margin: 0 !important;
    display: block !important;
    cursor: pointer !important;
}

/* NST IV HTML5 Player: popup громкости уже */
.nst-iv-html5-volume-popover {
    width: 160px !important;
}

/* NST IV HTML5 Player: меню действий с иконками */
.nst-iv-html5-action-menu {
    width: auto !important;
    flex-direction: row !important;
}

/* NST IV HTML5 Player: кнопка меню действий */
.nst-iv-html5-action-btn {
    appearance: none !important;
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
    cursor: pointer !important;
}

/* NST IV HTML5 Player: hover кнопок */
.nst-iv-html5-top-btn:hover,
.nst-iv-html5-top-btn:focus,
.nst-iv-html5-control-btn:hover,
.nst-iv-html5-control-btn:focus,
.nst-iv-html5-action-btn:hover,
.nst-iv-html5-action-btn:focus {
    background: rgba(255,255,255,.18) !important;
    outline: none !important;
}

@media (max-width: 640px) {
    .nst-iv-html5-top-btn {
        top: 8px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .nst-iv-html5-top-left {
        left: 8px !important;
    }

    .nst-iv-html5-top-right {
        right: 8px !important;
    }

    .nst-iv-html5-controls {
        bottom: 8px !important;
    }
}

/* NST IV HTML5 Player: кнопки на финальном экране */
.nst-iv-html5-end-controls {
    position: absolute !important;
    left: 50% !important;
    bottom: 12px !important;
    z-index: 20 !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 7px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,.72) !important;
    pointer-events: auto !important;
    line-height: normal !important;
}

/* NST IV HTML5 Player: слой перехода между узлами */
.nst-iv-html5-transition {
    position: absolute !important;
    inset: 0 !important;
    z-index: 30 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity calc(var(--nst-iv-transition-duration, 350ms) / 2) ease !important;
}

/* NST IV HTML5 Player: активный переход */
.nst-iv-html5-transition.is-active {
    opacity: 1 !important;
}

/* NST IV HTML5 Player: fade/dark переход */
.nst-iv-html5-transition-fade,
.nst-iv-html5-transition-dark,
.nst-iv-html5-transition-custom {
    background: #000 !important;
}

/* NST IV HTML5 Player: blur переход */
.nst-iv-html5-transition-blur {
    background: rgba(0,0,0,.12) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

/* NST IV HTML5 Player: blur текущей сцены во время перехода */
.nst-iv-html5-stage-blur-transition {
    filter: blur(12px) !important;
    transform: scale(1.03) !important;
    transition: filter .18s ease, transform .18s ease !important;
}

@media (max-width: 640px) {
    .nst-iv-html5-end-controls {
        bottom: 8px !important;
        gap: 6px !important;
        padding: 6px !important;
    }
}


/* NST IV HTML5 Player: слой пользовательских UI-кнопок */
.nst-iv-html5-ui-elements {
    container-type: inline-size !important;
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 22 !important;
    pointer-events: none !important;
    line-height: normal !important;
    overflow: visible !important;
}

/* NST IV HTML5 Player: пользовательская кнопка поверх видео */
.nst-iv-html5-ui-button {
    appearance: none;
    position: absolute;
    /* Базовые значения сохраняют дизайн проекта, но CSS узла Button может их переопределять. */
    width: var(--nst-iv-ui-base-w, 180px);
    height: var(--nst-iv-ui-base-h, 44px);
    font-size: var(--nst-iv-ui-base-font, 15px);
    border-radius: var(--nst-iv-ui-base-radius, 12px);
    transform: translate(-50%, -50%) rotate(var(--nst-iv-ui-rotate, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    padding: 0 var(--nst-iv-ui-pad-x, 12px);
    max-width: none;
    max-height: none;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    pointer-events: none;
    opacity: 0;
    visibility: visible;
    user-select: none;
    -webkit-user-select: none;
}


/* NST IV HTML5 Player: текст поверх картинки-кнопки */
.nst-iv-html5-ui-button-label {
    position: relative;
    z-index: 2;
    display: inline-block;
    pointer-events: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* NST IV HTML5 Player: видимая пользовательская кнопка */
.nst-iv-html5-ui-button.is-visible {
    opacity: var(--nst-iv-ui-opacity, 1);
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) rotate(var(--nst-iv-ui-rotate, 0deg));
}

/* NST IV HTML5 Player: скрытие пользовательских кнопок вместе с интерфейсом */
.nst-iv-html5-controls-hidden .nst-iv-html5-hide-with-controls.is-visible {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* NST IV HTML5 Player: фокус пользовательской кнопки */
.nst-iv-html5-ui-button:hover,
.nst-iv-html5-ui-button:focus {
    filter: brightness(1.08);
    outline: none;
}

/* NST IV HTML5 Player: плавное скрытие верхних кнопок вместе с интерфейсом */
.nst-iv-html5-top-actions {
    opacity: 1 !important;
    transition: opacity .22s ease !important;
}

/* NST IV HTML5 Player: верхние кнопки скрыты при автоскрытии интерфейса */
.nst-iv-html5-controls-hidden .nst-iv-html5-top-actions {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* NST ENGINE 0.2.30.115: удалён старый cqw fallback.
   Он срабатывал в браузерах без container query units и своим !important
   принудительно возвращал Button к 180x44, игнорируя сохранённые размеры.
   Размер теперь всегда приходит из единого runtime scaling через CSS variables. */


/* Памятка поверх видео: строгий Windows-like overlay, один масштаб сцены. */
.nst-iv-html5-memo{
    position:absolute;
    contain:layout paint style;
    isolation:isolate;
    overflow:hidden;
    z-index:14;
    pointer-events:auto;
    background:#6B7A99;
    --nst-iv-memo-ease:cubic-bezier(.22,1,.36,1);
    line-height:normal;
    visibility:hidden;
    opacity:1;
    transform:translateZ(0);
    backface-visibility:hidden;
}
.nst-iv-html5-memo.is-visible{
    visibility:visible;
}
.nst-iv-html5-memo-stage{
    position:absolute;
    contain:layout paint;
    left:0;
    top:0;
    width:1920px;
    height:1080px;
    transform-origin:0 0;
    overflow:hidden;
    backface-visibility:hidden;
}
.nst-iv-html5-memo-backdrop-video{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    object-fit:cover;
    transform:scale(1.08);
    transform-origin:center center;
    opacity:.65;
    transition:none !important;
    pointer-events:none;
    backface-visibility:hidden;
}
.nst-iv-html5-memo-backdrop-video:is(canvas, img, video){
    display:block !important;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:center center !important;
}
.nst-iv-html5-memo-tint{
    position:absolute;
    inset:0;
    opacity:1;
    pointer-events:none;
    background:rgba(107,122,153,.10);
}
.nst-iv-html5-memo-video-card{
    position:absolute;
    left:0;
    top:0;
    width:1920px;
    height:1080px;
    transform:translate(0,0);
    opacity:1;
    border-radius:0 !important;
    overflow:hidden;
    box-shadow:none !important;
    backface-visibility:hidden;
    transition:
        left var(--nst-iv-memo-duration,650ms) var(--nst-iv-memo-ease),
        top var(--nst-iv-memo-duration,650ms) var(--nst-iv-memo-ease),
        width var(--nst-iv-memo-duration,650ms) var(--nst-iv-memo-ease),
        height var(--nst-iv-memo-duration,650ms) var(--nst-iv-memo-ease);
}
.nst-iv-html5-memo.is-open .nst-iv-html5-memo-video-card{
    left:var(--nst-iv-memo-video-x,900px);
    top:var(--nst-iv-memo-video-y,245px);
    width:var(--nst-iv-memo-video-w,800px);
    height:var(--nst-iv-memo-video-h,450px);
    border-radius:0 !important;
    box-shadow:none !important;
}
.nst-iv-html5-memo.is-returning-live .nst-iv-html5-memo-backdrop-video,
.nst-iv-html5-memo.is-returning-live .nst-iv-html5-memo-tint{
    opacity:0 !important;
}
.nst-iv-html5-memo.is-returning-live .nst-iv-html5-memo-video-card{
    opacity:1 !important;
    pointer-events:none !important;
}
/* Redmi/low-end return: full snapshot masks the live video without geometry animation. */
.nst-iv-html5-memo.is-returning-snapshot{
    opacity:1 !important;
    pointer-events:none !important;
}
.nst-iv-html5-memo.is-returning-snapshot .nst-iv-html5-memo-backdrop-video{
    opacity:1 !important;
    filter:none !important;
    -webkit-filter:none !important;
    transform:none !important;
}
.nst-iv-html5-memo.is-returning-snapshot .nst-iv-html5-memo-tint{
    opacity:0 !important;
}
.nst-iv-html5-memo.is-returning-snapshot.is-releasing{
    opacity:0 !important;
    transition:opacity var(--nst-iv-memo-return-fade-ms,140ms) ease !important;
}
.nst-iv-html5-memo-video-card video,
.nst-iv-html5-memo-video-card img,
.nst-iv-html5-memo-video-card canvas{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    background:transparent !important;
}

/* 0.2.30.115: live visual mirror used only during Legacy Memo return.
   It is layered over the frozen Memo frame; the real Player video stays untouched. */
.nst-iv-html5-memo-video-card .nst-iv-html5-memo-return-live-overlay{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    z-index:4 !important;
    display:block !important;
    object-fit:cover !important;
    object-position:center center !important;
    opacity:0 !important;
    pointer-events:none !important;
    background:transparent !important;
    transition:none !important;
}
.nst-iv-html5-memo-video-card .nst-iv-html5-memo-return-live-overlay.is-ready{
    opacity:1 !important;
}
.nst-iv-html5-memo-backdrop-video img,
.nst-iv-html5-memo-backdrop-video video,
.nst-iv-html5-memo-backdrop-video canvas{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.nst-iv-html5-memo-content{
    position:absolute;
    color:#fff;
    z-index:2;
    opacity:1;
    transform:none;
    transition:none;
    overflow:hidden;
    padding:0;
}
.nst-iv-html5-memo-title{
    margin:0 0 18px;
    font-size:44px;
    font-weight:700;
    line-height:1.08;
    color:#fff;
}
.nst-iv-html5-memo-text{
    width:100%;
    max-width:100%;
    height:100%;
    max-height:100%;
    overflow:hidden;
    white-space:normal;
    word-break:normal;
    overflow-wrap:break-word;
    font-size:34px;
    line-height:1.22;
    text-shadow:0 3px 18px rgba(0,0,0,.55);
}
.nst-iv-html5-memo-text p{
    margin:0 0 .75em;
}
.nst-iv-html5-memo-text p:last-child{
    margin-bottom:0;
}
.nst-iv-html5-memo-close{
    position:absolute;
    z-index:3;
    margin:0;
    padding:0 24px;
    border-radius:0 !important;
    border:1px solid rgba(255,255,255,.42);
    background:rgba(5,15,32,.72);
    color:#fff;
    cursor:pointer;
    font:600 24px/1 Arial, sans-serif;
    text-align:center;
    box-shadow:none !important;
}
/* Memo trigger uses saved border_radius scaled by JS. */

/* NST ENGINE Player: выбор качества */
.nst-iv-html5-quality-popover {
    width: 190px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.nst-iv-html5-quality-popover[hidden] {
    display: none !important;
}

.nst-iv-html5-quality-option {
    appearance: none !important;
    width: 100% !important;
    min-height: 34px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.06) !important;
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    padding: 7px 10px !important;
    cursor: pointer !important;
    text-align: center !important;
}

.nst-iv-html5-quality-option:hover,
.nst-iv-html5-quality-option:focus,
.nst-iv-html5-quality-option.is-active {
    background: rgba(255,255,255,.20) !important;
    border-color: rgba(255,255,255,.55) !important;
    outline: none !important;
}


/* Memo влияет только на контент сцены. Глобальный интерфейс Player живёт независимо от узлов. */
.nst-iv-html5.nst-iv-html5-memo-active .nst-iv-html5-memo {
    z-index: 14 !important;
}
.nst-iv-html5.nst-iv-html5-memo-active .nst-iv-html5-ui-elements {
    visibility: hidden !important;
    pointer-events: none !important;
}
.nst-iv-html5-runtime-audio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* NST ENGINE 0.2.28.40: Memo uses a dedicated chrome layer above the scene. */
.nst-iv-html5-memo-chrome {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483000 !important;
    pointer-events: none !important;
    overflow: visible !important;
    line-height: normal !important;
}

.nst-iv-html5-memo-chrome .nst-iv-html5-controls,
.nst-iv-html5-memo-chrome .nst-iv-html5-end-controls,
.nst-iv-html5-memo-chrome .nst-iv-html5-top-actions,
.nst-iv-html5-memo-chrome .nst-iv-html5-popover {
    z-index: 2147483001 !important;
}

.nst-iv-html5-memo-chrome .nst-iv-html5-controls,
.nst-iv-html5-memo-chrome .nst-iv-html5-end-controls,
.nst-iv-html5-memo-chrome .nst-iv-html5-popover,
.nst-iv-html5-memo-chrome .nst-iv-html5-top-btn {
    pointer-events: auto !important;
}

.nst-iv-html5.nst-iv-html5-memo-active .nst-iv-html5-memo-trigger {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* NST ENGINE Memo desktop return: snapshot remains visible during the existing geometry transition. */
.nst-iv-html5-memo.is-closing .nst-iv-html5-memo-video-card {
    opacity: 1 !important;
    pointer-events: none !important;
}
.nst-iv-html5-memo.is-closing .nst-iv-html5-memo-video-card canvas,
.nst-iv-html5-memo.is-closing .nst-iv-html5-memo-video-card img,
.nst-iv-html5-memo.is-closing .nst-iv-html5-memo-video-card video {
    opacity: 1 !important;
}

/* Return mask keeps the small card out of the compositing path. */
.nst-iv-html5-memo.is-closing.is-returning-snapshot .nst-iv-html5-memo-video-card {
    opacity:0 !important;
    visibility:hidden !important;
    transition:none !important;
    pointer-events:none !important;
}
.nst-iv-html5-memo.is-closing.is-returning-snapshot .nst-iv-html5-memo-video-card canvas,
.nst-iv-html5-memo.is-closing.is-returning-snapshot .nst-iv-html5-memo-video-card img,
.nst-iv-html5-memo.is-closing.is-returning-snapshot .nst-iv-html5-memo-video-card video {
    opacity:0 !important;
}


/* NST ENGINE 0.2.29.12: закрытый popup полностью неактивен */
.nst-iv-html5-popover[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* NST ENGINE Player 0.2.29.19: альтернативные индикаторы прогресса без показа времени. */
.nst-iv-html5-progress-visual {
    flex: 1 1 120px !important;
    min-width: 88px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
}

.nst-iv-html5-progress-visual--bar {
    position: relative !important;
    height: 6px !important;
    overflow: hidden !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.18) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.35) !important;
}

.nst-iv-html5-progress-visual--bar::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: var(--nst-iv-progress, 0%) !important;
    border-radius: inherit !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 0 10px rgba(255,255,255,.28) !important;
    transition: width .12s linear !important;
}

.nst-iv-html5-progress-visual--activity {
    gap: 4px !important;
}

.nst-iv-html5-progress-visual--activity span {
    width: 4px !important;
    height: 16px !important;
    display: block !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.9) !important;
    transform-origin: 50% 50% !important;
    animation: nst-iv-playback-activity .92s ease-in-out infinite !important;
}

.nst-iv-html5-progress-visual--activity span:nth-child(2) {
    animation-delay: -.69s !important;
}

.nst-iv-html5-progress-visual--activity span:nth-child(3) {
    animation-delay: -.46s !important;
}

.nst-iv-html5-progress-visual--activity span:nth-child(4) {
    animation-delay: -.23s !important;
}

.nst-iv-html5-progress-visual--activity.is-paused span {
    animation-play-state: paused !important;
    opacity: .42 !important;
    transform: scaleY(.45) !important;
}

@keyframes nst-iv-playback-activity {
    0%, 100% { transform: scaleY(.38); opacity: .45; }
    50% { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 640px) {
    .nst-iv-html5-progress-visual {
        min-width: 54px !important;
        flex-basis: 72px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nst-iv-html5-progress-visual--activity span {
        animation: none !important;
        opacity: .75 !important;
        transform: scaleY(.7) !important;
    }
}


/* NST ENGINE Player 0.2.29.20: постоянная активная полоса перемотки. */
.nst-iv-html5-progress-seek {
    --nst-iv-seek-track: rgba(255,255,255,.20);
    --nst-iv-seek-fill: rgba(255,255,255,.78);
    --nst-iv-seek-thumb: #d4d4d4;
    --nst-iv-seek-thumb-border: rgba(0,0,0,.42);
    flex: 1 1 150px !important;
    min-width: 96px !important;
    width: min(260px, 34vw) !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 4px !important;
    border: 0 !important;
    outline: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Явная светлая тема плеера и системная светлая схема используют нейтральные серые оттенки. */
.nst-iv-html5.nst-iv-html5-theme-light .nst-iv-html5-progress-seek,
.nst-iv-html5.is-light .nst-iv-html5-progress-seek,
.nst-iv-html5[data-theme="light"] .nst-iv-html5-progress-seek,
.nst-iv-html5[data-player-theme="light"] .nst-iv-html5-progress-seek {
    --nst-iv-seek-track: rgba(0,0,0,.16);
    --nst-iv-seek-fill: rgba(0,0,0,.62);
    --nst-iv-seek-thumb: #737373;
    --nst-iv-seek-thumb-border: rgba(255,255,255,.82);
}

.nst-iv-html5-progress-seek::-webkit-slider-runnable-track {
    width: 100% !important;
    height: 6px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background:
        linear-gradient(
            to right,
            var(--nst-iv-seek-fill) 0,
            var(--nst-iv-seek-fill) var(--nst-iv-seek-progress, 0%),
            var(--nst-iv-seek-track) var(--nst-iv-seek-progress, 0%),
            var(--nst-iv-seek-track) 100%
        ) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.25) !important;
}

.nst-iv-html5-progress-seek::-webkit-slider-thumb {
    width: 15px !important;
    height: 15px !important;
    margin-top: -4.5px !important;
    border: 1px solid var(--nst-iv-seek-thumb-border) !important;
    border-radius: 50% !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: var(--nst-iv-seek-thumb) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.32) !important;
}

.nst-iv-html5-progress-seek::-moz-range-track {
    width: 100% !important;
    height: 6px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--nst-iv-seek-track) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.25) !important;
}

.nst-iv-html5-progress-seek::-moz-range-progress {
    height: 6px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--nst-iv-seek-fill) !important;
}

.nst-iv-html5-progress-seek::-moz-range-thumb {
    width: 15px !important;
    height: 15px !important;
    border: 1px solid var(--nst-iv-seek-thumb-border) !important;
    border-radius: 50% !important;
    background: var(--nst-iv-seek-thumb) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.32) !important;
}

.nst-iv-html5-progress-seek:focus-visible::-webkit-slider-thumb {
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

@media (max-width: 640px) {
    .nst-iv-html5-progress-seek {
        min-width: 70px !important;
        width: min(180px, 38vw) !important;
        flex-basis: 100px !important;
    }
}


/* NST ENGINE 0.2.29.29: compact launcher styled exactly like the system control buttons. */
.nst-iv-html5-controls-launcher {
    position: absolute !important;
    z-index: 1100 !important;
    width: 38px !important;
    height: 34px !important;
    min-width: 38px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform-origin: center center !important;
}
.nst-iv-html5-controls-launcher svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}
.nst-iv-html5-controls-launcher svg circle {
    fill: rgba(0,0,0,.72) !important;
    stroke: currentColor !important;
}
.nst-iv-html5-controls-launcher:hover,
.nst-iv-html5-controls-launcher:focus-visible {
    background: rgba(255,255,255,.18) !important;
    outline: none !important;
}
.nst-iv-html5-controls-launcher[hidden] {
    display: none !important;
}
.nst-iv-html5-controls-launcher--bottom-left {
    left: max(14px, env(safe-area-inset-left)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
}
.nst-iv-html5-controls-launcher--bottom-right {
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
}
.nst-iv-html5-controls-launcher--top-left {
    left: max(14px, env(safe-area-inset-left)) !important;
    top: max(14px, env(safe-area-inset-top)) !important;
}
.nst-iv-html5-controls-launcher--top-right {
    right: max(14px, env(safe-area-inset-right)) !important;
    top: max(14px, env(safe-area-inset-top)) !important;
}
@media (max-width: 700px) {
    .nst-iv-html5-controls-launcher--bottom-left {
        left: max(10px, env(safe-area-inset-left)) !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
    }
    .nst-iv-html5-controls-launcher--bottom-right {
        right: max(10px, env(safe-area-inset-right)) !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
    }
    .nst-iv-html5-controls-launcher--top-left {
        left: max(10px, env(safe-area-inset-left)) !important;
        top: max(10px, env(safe-area-inset-top)) !important;
    }
    .nst-iv-html5-controls-launcher--top-right {
        right: max(10px, env(safe-area-inset-right)) !important;
        top: max(10px, env(safe-area-inset-top)) !important;
    }
}

/* NST ENGINE 0.2.29.29: collapse animation is CSS-state driven.
   Pointer hit-testing is deterministic: expanded controls are interactive immediately;
   collapsed controls stop receiving events immediately while opacity animates out. */
.nst-iv-html5 .nst-iv-html5-controls,
.nst-iv-html5 .nst-iv-html5-end-controls {
    opacity: 1 !important;
    visibility: visible !important;
    /* Keep the permanent horizontal centering transform while animating vertically. */
    transform: translateX(-50%) translateY(0) scale(1) !important;
    transition:
        opacity .21s cubic-bezier(.2,.7,.2,1),
        transform .21s cubic-bezier(.2,.7,.2,1),
        visibility 0s linear 0s !important;
}

.nst-iv-html5 .nst-iv-html5-top-actions {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    transition:
        opacity .21s cubic-bezier(.2,.7,.2,1),
        transform .21s cubic-bezier(.2,.7,.2,1),
        visibility 0s linear 0s !important;
}

.nst-iv-html5 .nst-iv-html5-controls,
.nst-iv-html5 .nst-iv-html5-end-controls {
    pointer-events: auto !important;
}

/* The top-actions wrapper itself never catches clicks; its buttons do. */
.nst-iv-html5 .nst-iv-html5-top-actions {
    pointer-events: none !important;
}
.nst-iv-html5 .nst-iv-html5-top-actions .nst-iv-html5-top-btn {
    pointer-events: auto !important;
}

.nst-iv-html5.nst-iv-html5-controls-collapsed .nst-iv-html5-controls,
.nst-iv-html5.nst-iv-html5-controls-collapsed .nst-iv-html5-end-controls,
.nst-iv-html5.nst-iv-html5-controls-suspended .nst-iv-html5-controls,
.nst-iv-html5.nst-iv-html5-controls-suspended .nst-iv-html5-end-controls {
    opacity: 0 !important;
    visibility: hidden !important;
    /* Never drop translateX(-50%): dropping it moves a centered panel half its width to the right. */
    transform: translateX(-50%) translateY(4px) scale(.985) !important;
    pointer-events: none !important;
    transition:
        opacity .21s cubic-bezier(.2,.7,.2,1),
        transform .21s cubic-bezier(.2,.7,.2,1),
        visibility 0s linear .21s !important;
}

.nst-iv-html5.nst-iv-html5-controls-collapsed .nst-iv-html5-top-actions,
.nst-iv-html5.nst-iv-html5-controls-suspended .nst-iv-html5-top-actions {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(4px) scale(.985) !important;
    pointer-events: none !important;
    transition:
        opacity .21s cubic-bezier(.2,.7,.2,1),
        transform .21s cubic-bezier(.2,.7,.2,1),
        visibility 0s linear .21s !important;
}

.nst-iv-html5-controls-launcher {
    will-change: opacity, transform !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
    transition:
        opacity .18s cubic-bezier(.2,.7,.2,1),
        transform .18s cubic-bezier(.2,.7,.2,1),
        background .18s ease !important;
}
.nst-iv-html5-controls-launcher[hidden],
.nst-iv-html5.nst-iv-html5-controls-suspended .nst-iv-html5-controls-launcher {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(.88) !important;
}


/* NST ENGINE 0.2.29.38: mobile landscape fullscreen side-gutter controls.
   This uses only real letterbox space outside the contained video image. */
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-controls {
    top: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    right: auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    padding: 7px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: none !important;
}
.nst-iv-html5.nst-iv-html5-side-controls--left .nst-iv-html5-controls {
    left: max(calc(var(--nst-iv-side-gutter, 80px) / 2), calc(env(safe-area-inset-left) + 28px)) !important;
    transform: translateX(-50%) !important;
}
.nst-iv-html5.nst-iv-html5-side-controls--right .nst-iv-html5-controls {
    left: auto !important;
    right: max(calc(var(--nst-iv-side-gutter, 80px) / 2), calc(env(safe-area-inset-right) + 28px)) !important;
    transform: translateX(50%) !important;
}
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-time {
    display: none !important;
}
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-progress-seek {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    flex-basis: 38px !important;
}
/* In a vertical rail the normal progress flex-basis becomes HEIGHT. Keep it compact. */
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-progress-visual {
    flex: 0 0 22px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
}
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-progress-visual--activity {
    gap: 3px !important;
}
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-progress-visual--activity span {
    width: 3px !important;
    height: 13px !important;
}
/* Side-gutter mode wins over the ordinary collapsed state. */
.nst-iv-html5.nst-iv-html5-side-controls.nst-iv-html5-controls-collapsed .nst-iv-html5-controls,
.nst-iv-html5.nst-iv-html5-side-controls.nst-iv-html5-controls-suspended .nst-iv-html5-controls {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
.nst-iv-html5.nst-iv-html5-side-controls.nst-iv-html5-controls-suspended .nst-iv-html5-controls {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


/* NST ENGINE 0.2.29.38: compact side-gutter rail refinements. */
.nst-iv-html5 .nst-iv-html5-side-collapse-btn {
    display: none !important;
}
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-side-collapse-btn {
    display: flex !important;
}

/* Narrower side rail: same 38x34 controls, less chrome between them. */
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-controls {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    gap: 2px !important;
    padding: 3px !important;
    border-radius: 8px !important;
}

/* Top-left restart/back keeps its original player position in side-gutter mode. */

/* Manual safety collapse in a side gutter: collapse the rail into the same compact launcher. */
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-controls-launcher--side {
    display: flex !important;
    width: 38px !important;
    height: 34px !important;
    min-width: 38px !important;
    min-height: 34px !important;
    top: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    transform: none !important;
}
.nst-iv-html5.nst-iv-html5-side-controls .nst-iv-html5-controls-launcher--side[hidden] {
    display: none !important;
}
.nst-iv-html5.nst-iv-html5-side-controls--left .nst-iv-html5-controls-launcher--side-left {
    left: max(calc(var(--nst-iv-side-gutter, 80px) / 2), calc(env(safe-area-inset-left) + 23px)) !important;
    right: auto !important;
}
.nst-iv-html5.nst-iv-html5-side-controls--right .nst-iv-html5-controls-launcher--side-right {
    right: max(calc(var(--nst-iv-side-gutter, 80px) / 2), calc(env(safe-area-inset-right) + 23px)) !important;
    left: auto !important;
}

/* Manual collapse must win even in side mode. */
.nst-iv-html5.nst-iv-html5-side-controls.nst-iv-html5-controls-collapsed .nst-iv-html5-controls {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* NST ENGINE 0.2.29.38: side manual collapse always leaves a recoverable launcher. */
.nst-iv-html5.nst-iv-html5-side-controls.nst-iv-html5-controls-collapsed .nst-iv-html5-controls-launcher--side:not([hidden]) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
/* Align the collapsed side launcher with the same gutter axis as the rail. */
.nst-iv-html5.nst-iv-html5-side-controls--left .nst-iv-html5-controls-launcher--side-left {
    transform: translateX(-50%) !important;
}
.nst-iv-html5.nst-iv-html5-side-controls--right .nst-iv-html5-controls-launcher--side-right {
    transform: translateX(50%) !important;
}

/* NST ENGINE 0.2.30.53: portrait mobile controls stay expanded like the
   landscape side-gutter controls and are lifted above the browser fullscreen notice. */
.nst-iv-html5.nst-iv-html5-portrait-controls .nst-iv-html5-controls,
.nst-iv-html5.nst-iv-html5-portrait-controls .nst-iv-html5-end-controls {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px)) !important;
}

.nst-iv-html5.nst-iv-html5-portrait-controls .nst-iv-html5-top-actions {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.nst-iv-html5.nst-iv-html5-portrait-controls .nst-iv-html5-controls-launcher {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Fullscreen notices on mobile are rendered at the lower edge of the viewport. */
.nst-iv-html5.nst-iv-html5-portrait-controls .nst-iv-html5-shell:fullscreen .nst-iv-html5-controls,
.nst-iv-html5.nst-iv-html5-portrait-controls .nst-iv-html5-shell:fullscreen .nst-iv-html5-end-controls {
    bottom: max(32px, calc(env(safe-area-inset-bottom) + 20px)) !important;
}

/* NST ENGINE 0.2.30.115: clean scene edges.
 * Remove theme/browser decoration around the Player and suppress pseudo-element
 * separators in Visual Fullscreen. These rules do not participate in scene geometry. */
.nst-iv-player,
.nst-iv-player-wrap,
.nst-iv-shortcode,
.nst-iv-render,
.nst-iv-renderer,
.nst-iv-html5,
.nst-iv-html5-shell,
.nst-iv-html5-stage,
.nst-iv-html5-overlay,
.nst-iv-html5-ui-layer {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.nst-iv-html5:focus,
.nst-iv-html5:focus-visible,
.nst-iv-html5-shell:focus,
.nst-iv-html5-shell:focus-visible,
.nst-iv-html5-stage:focus,
.nst-iv-html5-stage:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.nst-iv-html5.nst-iv-html5--visual-fullscreen,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-shell,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-stage,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-overlay,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-ui-layer {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Runtime already supplies exact 16:9 dimensions in Visual Fullscreen, therefore
 * no aspect-ratio spacer or theme pseudo-element is needed there. */
.nst-iv-html5.nst-iv-html5--visual-fullscreen::before,
.nst-iv-html5.nst-iv-html5--visual-fullscreen::after,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-shell::before,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-shell::after,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-stage::before,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-stage::after,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-overlay::before,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-overlay::after,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-ui-layer::before,
.nst-iv-html5.nst-iv-html5--visual-fullscreen .nst-iv-html5-ui-layer::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: none !important;
}

/* Theme wrappers may draw horizontal separator lines with pseudo-elements. */
.nst-iv-player::before,
.nst-iv-player::after,
.nst-iv-player-wrap::before,
.nst-iv-player-wrap::after,
.nst-iv-shortcode::before,
.nst-iv-shortcode::after,
.nst-iv-render::before,
.nst-iv-render::after,
.nst-iv-renderer::before,
.nst-iv-renderer::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: none !important;
}

/* NST ENGINE Memo 2.0: isolated Overlay Scene. Exit only fades the overlay; the card never grows back to fullscreen. */
.nst-iv-html5-memo-v2 {
    position: absolute;
    contain: layout paint style;
    isolation: isolate;
    overflow: hidden;
    z-index: 14;
    pointer-events: auto;
    visibility: hidden;
    opacity: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
    background: #6B7A99;
    --nst-iv-memo-v2-ease: cubic-bezier(.22,1,.36,1);
}

/* Memo 2.0 становится видимым до запуска входной анимации. */
.nst-iv-html5-memo-v2.is-visible {
    visibility: visible;
}

/* Единая базовая сцена 1920x1080 масштабируется runtime целиком. */
.nst-iv-html5-memo-v2-stage {
    position: absolute;
    left: 0;
    top: 0;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    transform-origin: 0 0;
    contain: layout paint;
    backface-visibility: hidden;
}

/* Неподвижный кадр используется как фон Memo 2.0. */
.nst-iv-html5-memo-v2-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.06);
    transform-origin: center center;
    pointer-events: none;
}

/* Цветовой слой Memo 2.0. */
.nst-iv-html5-memo-v2-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Вход: карточка кадра уезжает из полного экрана в заданные координаты. */
.nst-iv-html5-memo-v2-video-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    opacity: 1;
    border-radius: 0;
    box-shadow: none;
    backface-visibility: hidden;
    transition:
        left var(--nst-iv-memo-v2-enter-ms,420ms) var(--nst-iv-memo-v2-ease),
        top var(--nst-iv-memo-v2-enter-ms,420ms) var(--nst-iv-memo-v2-ease),
        width var(--nst-iv-memo-v2-enter-ms,420ms) var(--nst-iv-memo-v2-ease),
        height var(--nst-iv-memo-v2-enter-ms,420ms) var(--nst-iv-memo-v2-ease);
}

/* Конечная геометрия карточки задаётся настройками узла. */
.nst-iv-html5-memo-v2.is-open .nst-iv-html5-memo-v2-video-card {
    left: var(--nst-iv-memo-v2-video-x,900px);
    top: var(--nst-iv-memo-v2-video-y,245px);
    width: var(--nst-iv-memo-v2-video-w,800px);
    height: var(--nst-iv-memo-v2-video-h,450px);
}

/* Кадр внутри карточки всегда заполняет её без собственной анимации. */
.nst-iv-html5-memo-v2-video-card > canvas,
.nst-iv-html5-memo-v2-video-card > img,
.nst-iv-html5-memo-v2-video-card > video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    background: transparent;
}

/* Текст входит отдельно от движения карточки. */
.nst-iv-html5-memo-v2-content {
    position: absolute;
    z-index: 2;
    overflow: hidden;
    padding: 0;
    color: #fff;
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity var(--nst-iv-memo-v2-enter-ms,420ms) ease,
        transform var(--nst-iv-memo-v2-enter-ms,420ms) var(--nst-iv-memo-v2-ease);
}

/* Контент появляется после старта единой входной фазы. */
.nst-iv-html5-memo-v2.is-open .nst-iv-html5-memo-v2-content {
    opacity: 1;
    transform: translateY(0);
}

/* Заголовок Memo 2.0. */
.nst-iv-html5-memo-v2-title {
    margin: 0 0 18px;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.08;
    color: #fff;
}

/* Основной текст Memo 2.0. */
.nst-iv-html5-memo-v2-text {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: break-word;
    font-size: 34px;
    line-height: 1.22;
    text-shadow: 0 3px 18px rgba(0,0,0,.55);
}

/* Кнопка продолжения входит вместе с контентом. */
.nst-iv-html5-memo-v2-close {
    position: absolute;
    z-index: 3;
    margin: 0;
    padding: 0 24px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 0;
    background: rgba(5,15,32,.72);
    color: #fff;
    cursor: pointer;
    font: 600 24px/1 Arial, sans-serif;
    text-align: center;
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity var(--nst-iv-memo-v2-enter-ms,420ms) ease,
        transform var(--nst-iv-memo-v2-enter-ms,420ms) var(--nst-iv-memo-v2-ease);
}

/* Кнопка готова после входа Overlay Scene. */
.nst-iv-html5-memo-v2.is-open .nst-iv-html5-memo-v2-close {
    opacity: 1;
    transform: translateY(0);
}

/* Выход Memo 2.0: только fade всей сцены, без обратного увеличения карточки. */
.nst-iv-html5-memo-v2.is-closing {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--nst-iv-memo-v2-exit-ms,260ms) ease;
}

/* На выходе геометрия карточки фиксируется: legacy return animation не может вмешаться. */
.nst-iv-html5-memo-v2.is-closing .nst-iv-html5-memo-v2-video-card,
.nst-iv-html5-memo-v2.is-closing .nst-iv-html5-memo-v2-content,
.nst-iv-html5-memo-v2.is-closing .nst-iv-html5-memo-v2-close {
    transition-property: opacity, transform;
}

/* Button сохраняет базовый reset, но допускает переопределение CSS узла. */
.nst-iv-html5 .nst-iv-html5-ui-button {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    text-transform: none;
    letter-spacing: normal;
    text-indent: 0;
    text-decoration: none;
    vertical-align: baseline;
    outline: 0;
}

/* Memo Continue остаётся изолированной от CSS темы сайта. */
.nst-iv-html5 .nst-iv-html5-memo-close,
.nst-iv-html5 .nst-iv-html5-memo-v2-close {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    vertical-align: baseline !important;
    outline: 0 !important;
}

/* NST ENGINE 0.2.30.115: legacy Memo Continue защищён от глобальных button{} правил. */
.nst-iv-html5 .nst-iv-html5-memo-close {
    position: absolute !important;
    z-index: 3 !important;
    padding: 0 24px !important;
    border: 1px solid rgba(255,255,255,.42) !important;
    border-radius: 0 !important;
    background: rgba(5,15,32,.72) !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: pointer !important;
    font: 600 24px/1 Arial, sans-serif !important;
    text-align: center !important;
}

/* NST ENGINE 0.2.30.115: Memo 2.0 Continue полностью принадлежит Player, а не теме сайта. */
.nst-iv-html5 .nst-iv-html5-memo-v2-close {
    position: absolute !important;
    z-index: 3 !important;
    margin: 0 !important;
    padding: 0 24px !important;
    border: 1px solid rgba(255,255,255,.42) !important;
    border-radius: 0 !important;
    background: rgba(5,15,32,.72) !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: pointer !important;
    font: 600 24px/1 Arial, sans-serif !important;
    text-align: center !important;
}

/* NST ENGINE 0.2.30.115: сохранённый Button/Memo trigger не принимает цвет/фон/рамку темы. */
.nst-iv-html5 .nst-iv-html5-ui-button {
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
}

/* NST ENGINE 0.2.30.115: Video.js is the media transport; NST ENGINE keeps its own UI. */
.nst-iv-html5 .nst-engine-videojs-media {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
}

.nst-iv-html5 .nst-engine-videojs-media .vjs-tech,
.nst-iv-html5 .nst-engine-videojs-media video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
}

.nst-iv-html5 .nst-engine-videojs-media .vjs-control-bar,
.nst-iv-html5 .nst-engine-videojs-media .vjs-big-play-button,
.nst-iv-html5 .nst-engine-videojs-media .vjs-loading-spinner,
.nst-iv-html5 .nst-engine-videojs-media .vjs-poster,
.nst-iv-html5 .nst-engine-videojs-media .vjs-text-track-display,
.nst-iv-html5 .nst-engine-videojs-media .vjs-error-display,
.nst-iv-html5 .nst-engine-videojs-media .vjs-modal-dialog {
    display: none !important;
}

/* Button target preload stays outside the visible scene, but remains renderable for Video.js/HTML5 decode. */
.nst-iv-html5 .nst-engine-videojs-media.nst-engine-videojs-media--preload {
    position: absolute !important;
    inset: auto !important;
    left: -99999px !important;
    top: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    visibility: visible !important;
    display: block !important;
    pointer-events: none !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Seamless pre-start wrapper never paints its own black layer over the active video. */
.nst-iv-html5 .nst-engine-videojs-media.nst-engine-videojs-media--prestart {
    background: transparent !important;
    pointer-events: none !important;
}

/* NST ENGINE 0.2.30.115: media playback is never started on hidden transition targets. */

/* NST ENGINE: ожидание готового кадра между Video-сценами без затемнения текущего кадра. */
.nst-iv-html5 .nst-iv-html5-video-scene-wait {
    position: absolute !important;
    inset: 0 !important;
    z-index: 29 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* NST ENGINE: индикатор загрузки нового декодированного кадра. */
.nst-iv-html5 .nst-iv-html5-video-scene-wait-spinner {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 3px solid rgba(255,255,255,.28) !important;
    border-top-color: rgba(255,255,255,.95) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.22) !important;
    animation: nst-iv-video-scene-wait-spin .72s linear infinite !important;
}

@keyframes nst-iv-video-scene-wait-spin {
    to { transform: rotate(360deg); }
}


/* Memo 3: independent Button-based overlay. Animation is driven by the Web Animations API. */
.nst-iv-html5-memo-v3{
    position:absolute!important;inset:auto!important;z-index:1000!important;overflow:hidden!important;pointer-events:auto!important;
    visibility:visible!important;display:block!important;opacity:1!important;background:#27364a!important;
}
.nst-iv-html5-memo-v3-stage{position:absolute!important;left:0!important;top:0!important;transform-origin:0 0!important;overflow:hidden!important;}
.nst-iv-html5-memo-v3-backdrop{position:absolute!important;inset:0!important;z-index:0!important;overflow:hidden!important;pointer-events:none!important;opacity:0;}
.nst-iv-html5-memo-v3-backdrop-mirror{position:absolute!important;inset:-6%!important;z-index:0!important;display:block!important;width:112%!important;height:112%!important;max-width:none!important;max-height:none!important;margin:0!important;opacity:0!important;visibility:visible!important;object-fit:cover!important;object-position:center center!important;filter:blur(var(--nst-iv-memo-v3-background-blur,18px))!important;transform:translateZ(0) scale(1.03)!important;transform-origin:center center!important;pointer-events:none!important;background:#27364a!important;}
.nst-iv-html5-memo-v3-backdrop-mirror.is-ready{opacity:1!important;}
.nst-iv-html5-memo-v3-backdrop-tint{position:absolute!important;inset:0!important;z-index:1!important;pointer-events:none!important;}
.nst-iv-html5-memo-v3-frame{position:absolute;z-index:2!important;overflow:hidden!important;transform:none!important;transform-origin:0 0!important;opacity:1;border-radius:0;box-shadow:none;will-change:left,top,width,height,opacity;}
/* Memo 3: the original live media is moved into the animated card without cloning. */
.nst-iv-html5-memo-v3-frame .nst-iv-html5-memo-v3-live-media{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;background:#000!important;}
.nst-iv-html5-memo-v3-content{position:absolute;z-index:3!important;overflow:auto;color:#fff;font:16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:pre-wrap;opacity:0;transform:translateY(16px);will-change:opacity,transform;}
.nst-iv-html5-memo-v3-title{font-size:28px;font-weight:700;line-height:1.2;margin:0 0 18px;}
.nst-iv-html5-memo-v3-text{white-space:pre-wrap;overflow-wrap:anywhere;}
.nst-iv-html5-memo-v3-close-wrap{position:absolute!important;z-index:4!important;display:block!important;opacity:0;pointer-events:auto!important;will-change:opacity;}
.nst-iv-html5 .nst-iv-html5-memo-v3-close{position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;min-width:0!important;max-width:none!important;min-height:0!important;max-height:none!important;padding:0 14px!important;appearance:none!important;-webkit-appearance:none!important;cursor:pointer!important;opacity:1!important;}
/* Тонкий индикатор задержки Continue. */
.nst-iv-html5 .nst-iv-html5-memo-v3-close-wait{position:absolute!important;right:12px!important;top:50%!important;width:12px!important;height:12px!important;margin-top:-6px!important;border:1px solid rgba(255,255,255,.28)!important;border-top-color:currentColor!important;border-radius:50%!important;box-sizing:border-box!important;opacity:0!important;pointer-events:none!important;}
.nst-iv-html5 .nst-iv-html5-memo-v3-close.is-waiting .nst-iv-html5-memo-v3-close-wait{opacity:1!important;animation:nst-iv-memo-v3-close-wait .55s linear infinite!important;}
@keyframes nst-iv-memo-v3-close-wait{to{transform:rotate(360deg);}}
.nst-iv-html5 .nst-iv-html5-memo-v3-trigger{appearance:none!important;-webkit-appearance:none!important;}
