/* Маркетплейс: редакционный манифест + интерактивный emotion-hero */

/* Кнопка «Архив» живёт в общем слое `src/visualizer/styles.css`, чтобы поведение было одинаковым на всех страницах. */

/* ─── Герой: спокойный редакционный градиент, синхронный с ползунком ─── */
#hero-wave-root {
    --hero-t: 0;
    --hero-brand-red: #d91c1c;
    --hero-brand-burgundy: #8f1530;
    --hero-palette-red: #d91c1c;
    --hero-palette-crimson: #f04452;
    --hero-palette-gold: #f0c24f;
    --hero-palette-fuchsia: #c43293;
    --hero-palette-violet: #6f47d6;
    --hero-selected-color: var(--hero-palette-red);
    --hero-selected-color-light: #f26b75;
    --hero-selected-color-deep: #8f1530;
    --hero-selected-glow: rgba(217, 28, 28, 0.34);
    --hero-gradient-title:
        linear-gradient(
            90deg,
            var(--hero-selected-color-light) 0%,
            var(--hero-selected-color) 45%,
            var(--hero-selected-color-deep) 100%
        );
}

.marketplace-hero .hero-wave-source {
    color: inherit;
}

.marketplace-hero .marketplace-hero-title .hero-wave-source,
.marketplace-hero .manifesto-tagline-en.hero-wave-source--mono {
    display: inline-block;
    background-repeat: no-repeat;
    background-size: 130% 100%;
    background-position: calc(50% + (var(--hero-t) - 0.5) * 18%) 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.16s ease-out, opacity 0.16s ease-out;
}

.marketplace-hero .marketplace-hero-title .hero-wave-source,
.marketplace-hero .manifesto-tagline-en.hero-wave-source--mono {
    background-image: var(--hero-gradient-title);
}

.marketplace-hero .hero-wave-source--accent {
    background-image: linear-gradient(
        90deg,
        var(--hero-selected-color-light) 0%,
        var(--hero-selected-color) 46%,
        var(--hero-selected-color-deep) 100%
    );
    background-repeat: no-repeat;
    background-size: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 12px var(--hero-selected-glow);
    transition:
        background-image 0.16s ease-out,
        text-shadow 0.16s ease-out,
        -webkit-text-fill-color 0.16s ease-out;
}

.marketplace-hero .hero-wave-source--muted {
    color: color-mix(in srgb, var(--color-text) 58%, transparent);
}

@media (prefers-reduced-motion: reduce) {
    .marketplace-hero .marketplace-hero-title .hero-wave-source,
    .marketplace-hero .manifesto-tagline-en.hero-wave-source--mono {
        transition: none !important;
        background-position: 50% 50% !important;
    }

    .marketplace-hero .hero-wave-source--accent {
        transition: none !important;
    }
}

/* ─── Герой: ритм типографики (моно / капс) поверх спокойного градиента ─── */
.marketplace-hero .hero-wave-source--mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 500;
    font-size: 0.92em;
    letter-spacing: 0.06em;
}

.marketplace-hero .hero-wave-source--caps {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.marketplace-hero .hero-wave-source--mono.hero-wave-source--caps {
    letter-spacing: 0.1em;
}

/* Вторая строка заголовка — моно вместо дисплейного шрифта */
.marketplace-hero .marketplace-hero-title__word.hero-wave-source--mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 700;
    font-size: 0.78em;
    letter-spacing: 0.1em;
}

/* Английская строка цитаты: моно + курсив */
.marketplace-hero .manifesto-strike .manifesto-tagline-en.hero-wave-source--mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Герой: тот же фон, что у .page-wrapper (не прозрачность поверх #e5e5e0 из visualizer/.hero-section) */
.marketplace-hero.hero-section {
    /* Тачпад на всю ширину колонки текста */
    --emotion-touchpad-width: 100%;
    border-bottom: none;
    background-image: none;
    background-color: var(--color-bg);
    border-radius: 0;
    overflow: visible;
    margin: 0;
    box-shadow: none;
}

/* Чистый #fff / #000 под GIF и колонку текста (не кремовый/серо-чёрный --color-bg) */
.light-theme .marketplace-hero.hero-section,
html.light-theme .marketplace-hero.hero-section,
.page-wrapper.light-theme .marketplace-hero.hero-section {
    background-color: #ffffff;
}

.dark-theme .marketplace-hero.hero-section,
html.dark-theme .marketplace-hero.hero-section,
.page-wrapper.dark-theme .marketplace-hero.hero-section {
    background-color: #000000;
}

.marketplace-hero .hero-content {
    border-right: none !important;
    position: relative;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
    padding-right: clamp(1.1rem, 2.4vw, 2rem);
    /* Колонка в grid не разъезжается под картинку */
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.light-theme .marketplace-hero .hero-content,
html.light-theme .marketplace-hero .hero-content {
    background-color: #ffffff;
}

.dark-theme .marketplace-hero .hero-content,
html.dark-theme .marketplace-hero .hero-content {
    background-color: #000000;
}

/* Текст героя: три блока — заголовок / два абзаца / цитата */
#hero-wave-root.hero-wave-root {
    min-width: 0;
    width: 100%;
    max-width: min(34em, 100%);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

/* Абзацы снова ведут себя как блоки: перенос по словам (после фикса пробелов в JS) */
#hero-wave-root .manifesto {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.hero-wave-block--body {
    display: flex;
    flex-direction: column;
    gap: clamp(0.65rem, 1.2vw, 1rem);
    margin-top: clamp(0.25rem, 0.8vw, 0.65rem);
}

.hero-wave-block--quote {
    margin-top: clamp(1rem, 2vw, 1.45rem);
    padding-top: clamp(0.9rem, 1.6vw, 1.2rem);
    border-top: 1px solid color-mix(in srgb, var(--color-text) 14%, var(--color-bg) 86%);
}

.marketplace-hero .hero-wave-block--body .manifesto-bridge {
    margin-top: 0;
}

.marketplace-hero .hero-wave-block--quote .manifesto-strike {
    margin-top: 0;
}

/* Заголовок: больше воздуха между строками — краткая над «Й» не сливается с верхней строкой */
.marketplace-hero .marketplace-hero-title.huge-title {
    line-height: 1.12;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.marketplace-hero .hero-wave-block--head {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.marketplace-hero .manifesto-lede,
.marketplace-hero .manifesto-bridge,
.marketplace-hero .manifesto-strike {
    text-align: left;
}

.marketplace-hero-title__line1 {
    display: block;
    line-height: 1.02;
    padding-bottom: 0;
}

/* Вторая строка: «ЭМОЦИЙ» — чуть плотнее к верхней строке */
.marketplace-hero-title__line2 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.55rem;
    margin-top: -0.02em;
}

.marketplace-hero-title__word {
    flex: 0 0 auto;
    line-height: 1.12;
    display: flex;
    align-items: center;
}

/* Буквы заголовка «ЭМОЦИЙ» в ряд без зазора flex-gap */
.marketplace-hero-title__word.hero-wave-source {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
}

/* Только тачпад — на всю ширину колонки */
.emotion-hero-hook-row {
    display: block;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.emotion-hero-hook-row .emotion-touchpad {
    flex: none;
    width: 100%;
    max-width: 100%;
    /* Явная высота: иначе surface с height:100% схлопывается в 0 */
    min-height: 4rem;
    height: 4rem;
    box-sizing: border-box;
}

/* Секция героя: не раздувать пустоту; высоту задаёт контент + колонка с фото */
.marketplace-hero.hero-section {
    min-height: 0;
    align-items: stretch;
}

@media (min-width: 901px) {
    .marketplace-hero.hero-section {
        min-height: min(82vh, 880px);
        grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
    }

    .marketplace-hero .hero-content {
        padding-left: clamp(2rem, 7vw, 7rem);
    }

    .marketplace-hero .hero-visual {
        margin-left: clamp(-1rem, -1.8vw, -0.4rem);
    }
}

.marketplace-hero .border-left {
    border-left: none !important;
}

@media (max-width: 900px) {
    .marketplace-hero .hero-content {
        border-bottom: none !important;
    }
}

/* Правая колонка: явно тот же фон, что у страницы (перебивает .hero-visual { background: var(--color-text) } из visualizer) */
.marketplace-hero .hero-visual {
    background-color: var(--color-bg);
    background-image: none;
}

.light-theme .marketplace-hero .hero-visual,
html.light-theme .marketplace-hero .hero-visual {
    background-color: #ffffff;
}

.dark-theme .marketplace-hero .hero-visual,
html.dark-theme .marketplace-hero .hero-visual,
.page-wrapper.dark-theme .marketplace-hero .hero-visual {
    background-color: #000000;
}

/* Одно GIF: заполняет колонку, без горизонтального панорамирования */
.emotion-panorama__track--single {
    width: 100%;
    min-width: 100%;
    overflow: hidden;
}

.emotion-panorama__stack--single {
    width: 100%;
    height: 100%;
    min-width: 100%;
}

.emotion-panorama__stack--single .emotion-hero-img--single {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* --- Emotion hero: одно широкое PNG, сдвиг по X (три фигуры на полотне) --- */
.hero-emotion-stage {
    position: relative;
    background: var(--color-bg);
    cursor: default;
    min-height: 0;
    align-self: stretch;
    height: 100%;
    overflow: hidden;
}

.marketplace-hero .hero-emotion-stage {
    min-height: min(58vh, 560px);
    background-color: var(--color-bg);
    background-image: none;
    isolation: isolate;
    contain: paint;
}

/* PNG/GIF: углы кадра — чистый #000 / #fff, не --color-bg, иначе «ободок» */
.light-theme .marketplace-hero .hero-emotion-stage,
html.light-theme .marketplace-hero .hero-emotion-stage,
.page-wrapper.light-theme .marketplace-hero .hero-emotion-stage {
    background-color: #ffffff;
}

.dark-theme .marketplace-hero .hero-emotion-stage,
html.dark-theme .marketplace-hero .hero-emotion-stage,
.page-wrapper.dark-theme .marketplace-hero .hero-emotion-stage {
    background-color: #000000;
}

.light-theme .marketplace-hero .emotion-panorama,
html.light-theme .marketplace-hero .emotion-panorama,
.page-wrapper.light-theme .marketplace-hero .emotion-panorama {
    background-color: #ffffff;
}

.dark-theme .marketplace-hero .emotion-panorama,
html.dark-theme .marketplace-hero .emotion-panorama,
.page-wrapper.dark-theme .marketplace-hero .emotion-panorama {
    background-color: #000000;
}

.light-theme .marketplace-hero .emotion-panorama__stack--dbl,
html.light-theme .marketplace-hero .emotion-panorama__stack--dbl,
.page-wrapper.light-theme .marketplace-hero .emotion-panorama__stack--dbl {
    background-color: #ffffff;
}

.dark-theme .marketplace-hero .emotion-panorama__stack--dbl,
html.dark-theme .marketplace-hero .emotion-panorama__stack--dbl,
.page-wrapper.dark-theme .marketplace-hero .emotion-panorama__stack--dbl {
    background-color: #000000;
}

/* GIF справа: не прямоугольник — «капля»; без серой «ауралы» от box-shadow (только тонкий inset) */
.marketplace-hero .emotion-panorama {
    inset: 5% 3% 10% 3%;
    border-radius: 58% 42% 52% 48% / 46% 54% 44% 56%;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-text) 14%, transparent);
}

.marketplace-hero .emotion-panorama--shielded {
    position: absolute;
    z-index: 2;
}

.marketplace-hero .emotion-panorama--shielded::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

/*
 * В hero-emotion-main.gif светлая подложка по углам кадра (вокруг чёрного овала внутри файла).
 * Увеличиваем масштаб и обрезаем по контейнеру — свет уходит за край «капли», виден фон страницы.
 */
.marketplace-hero .emotion-panorama__stack--single.emotion-panorama__stack--dbl {
    overflow: hidden;
}

.marketplace-hero .emotion-panorama__stack--dbl .emotion-strip-img--layer-a,
.marketplace-hero .emotion-panorama__stack--dbl .emotion-strip-img--layer-b,
.marketplace-hero .emotion-panorama__stack--dbl .emotion-strip-canvas {
    transform: scale(1.3);
    transform-origin: 50% 36%;
}

.dark-theme .marketplace-hero .emotion-panorama--shielded::after,
html.dark-theme .marketplace-hero .emotion-panorama--shielded::after,
.page-wrapper.dark-theme .marketplace-hero .emotion-panorama--shielded::after {
    background:
        radial-gradient(circle at 50% 42%,
            transparent 0%,
            transparent 54%,
            rgba(0, 0, 0, 0.14) 70%,
            rgba(0, 0, 0, 0.36) 84%,
            rgba(0, 0, 0, 0.78) 100%);
}

.emotion-panorama {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 2;
}

.emotion-panorama__track {
    position: relative;
    display: block;
    height: 100%;
    width: max-content;
    min-width: 100%;
}

/* Стек: триптих (одно PNG), сдвиг тачпадом */
.emotion-panorama__stack {
    display: block;
    height: 100%;
    width: max-content;
}

/* Два слоя PNG-кадров: фон как у страницы — при панорамировании вправо не виден чистый #000 */
.emotion-panorama__stack--dbl {
    position: relative;
    background: var(--color-bg);
}

.emotion-panorama__stack--dbl .emotion-strip-img--layer-b {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: auto;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.emotion-panorama__stack--dbl .emotion-strip-img--layer-a {
    position: relative;
    z-index: 2;
    opacity: 1;
}

/* Canvas с кадрами: тот же масштаб, что у img; отрисовка синхронная — без пропуска при скрабе */
.emotion-panorama__stack--dbl .emotion-strip-canvas {
    position: relative;
    z-index: 2;
    display: block;
    height: 100%;
    width: auto;
    max-height: none;
    max-width: none;
    object-fit: unset;
    object-position: center 30%;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Высота колонки = опора; полотно масштабируется по высоте — без большой «дыры» снизу */
.emotion-panorama__stack .emotion-strip-img {
    display: block;
    height: 100%;
    width: auto;
    max-height: none;
    max-width: none;
    object-fit: unset;
    object-position: center 30%;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.hero-emotion-stage.is-char-hover {
    cursor: help;
}

/* Тачпад: на всю ширину колонки героя */
.marketplace-hero .emotion-touchpad {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 5;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 4rem;
    height: 4rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    border-radius: 0;
    border: var(--border-solid);
    background:
        linear-gradient(
            90deg,
            rgba(217, 28, 28, 0.98) 0%,
            rgba(217, 28, 28, 0.96) 16%,
            rgba(240, 68, 82, 0.96) 34%,
            rgba(240, 194, 79, 0.96) 56%,
            rgba(196, 50, 147, 0.96) 78%,
            rgba(111, 71, 214, 0.95) 100%
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.08));
    box-shadow:
        6px 6px 0 var(--color-text),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: grab;
}

.marketplace-hero .emotion-touchpad:active {
    cursor: grabbing;
}

.emotion-touchpad:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 3px;
}

.emotion-touchpad-surface {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    overflow: hidden;
}

/* 4 квадрата (шахматка 2×2) */
.emotion-touchpad-checker {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.2)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.22), transparent 20%),
        radial-gradient(circle at 44% 50%, rgba(255, 255, 255, 0.12), transparent 24%),
        radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.12), transparent 24%),
        radial-gradient(circle at 90% 50%, rgba(255, 255, 255, 0.18), transparent 20%);
    mix-blend-mode: screen;
    opacity: 0.55;
}

/* Перетаскиваемый логотип */
.marketplace-hero .emotion-touchpad-thumb {
    position: absolute;
    left: 0;
    top: 0;
    --thumb-x: 0px;
    --thumb-y: 0px;
    width: 36px;
    height: 36px;
    margin: 0;
    transform: translate3d(var(--thumb-x), var(--thumb-y), 0) translate(-50%, -50%);
    z-index: 2;
    object-fit: contain;
    pointer-events: none;
    filter:
        drop-shadow(2px 0 0 rgba(255, 255, 255, 0.98))
        drop-shadow(-2px 0 0 rgba(255, 255, 255, 0.98))
        drop-shadow(0 2px 0 rgba(255, 255, 255, 0.98))
        drop-shadow(0 -2px 0 rgba(255, 255, 255, 0.98))
        drop-shadow(1.5px 1.5px 0 rgba(255, 255, 255, 0.92))
        drop-shadow(-1.5px 1.5px 0 rgba(255, 255, 255, 0.92))
        drop-shadow(1.5px -1.5px 0 rgba(255, 255, 255, 0.92))
        drop-shadow(-1.5px -1.5px 0 rgba(255, 255, 255, 0.92))
        drop-shadow(0 0 3px rgba(0, 0, 0, 0.95))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65))
        drop-shadow(0 0 12px var(--hero-selected-glow));
    opacity: 0.95;
    will-change: transform;
}

.dark-theme .marketplace-hero .emotion-touchpad {
    box-shadow:
        6px 6px 0 #2a2a2a,
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Левая колонка: ритм и акценты */
.marketplace-hero .manifesto-lede {
    font-size: 1.34rem;
    line-height: 1.68;
    font-weight: 500;
    letter-spacing: -0.015em;
    max-width: 34em;
}

.marketplace-hero .manifesto-lede .accent {
    color: var(--color-red);
    font-weight: 700;
}

.marketplace-hero .manifesto-lede .shout {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.95em;
}

.marketplace-hero .manifesto-lede .whisper {
    font-weight: 500;
    opacity: 0.88;
}

.marketplace-hero .manifesto-lede .mono-hit {
    display: inline;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #555;
}

.dark-theme .marketplace-hero .manifesto-lede .mono-hit {
    color: #aaa;
}

.marketplace-hero .manifesto-bridge .whisper {
    font-weight: 500;
    opacity: 0.88;
}

.marketplace-hero .manifesto-lede .break {
    display: block;
    margin-top: 0.85rem;
}

.marketplace-hero .manifesto-bridge {
    margin-top: 1rem;
    font-size: 1.12rem;
    line-height: 1.68;
    font-weight: 500;
    max-width: 34em;
    opacity: 0.94;
}

.dark-theme .marketplace-hero .manifesto-bridge {
    opacity: 0.92;
}

.marketplace-hero .manifesto-strike {
    margin-top: 1.35rem;
    padding-left: 1rem;
    border-left: 3px solid var(--color-red);
    font-size: 1.22rem;
    line-height: 1.62;
    font-weight: 500;
    max-width: 34em;
}

.marketplace-hero .manifesto-strike .mono-hit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
}

.dark-theme .marketplace-hero .manifesto-strike .mono-hit {
    color: #aaa;
}

.marketplace-hero .manifesto-strike .accent {
    color: var(--color-red);
    font-weight: 700;
}

.marketplace-hero .manifesto-strike .manifesto-tagline-en {
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.marketplace-hero .manifesto-strike .manifesto-tagline-colon {
    font-style: normal;
    margin-right: 0.2ch;
}

.hero-emotion-stage[data-zone='rage'] {
    box-shadow: inset 0 0 80px rgba(217, 28, 28, 0.06);
}

.hero-emotion-stage[data-zone='joy'] {
    box-shadow: inset 0 0 80px rgba(200, 160, 80, 0.07);
}

@media (max-width: 900px) {
    .emotion-hero-hook-row .emotion-touchpad,
    .marketplace-hero .emotion-touchpad {
        width: 100%;
        min-height: 3.25rem;
        height: 3.25rem;
    }

    .marketplace-hero .hero-emotion-stage {
        min-height: 42vh;
    }
}

@media (max-width: 480px) {
    .marketplace-hero-title__line2 {
        flex-wrap: wrap;
    }
}

/* Первый кадр: без анимации фона у обёртки — иначе заметна «вспышка» при смене класса темы */
.page-wrapper {
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Изоляция перерасчётов градиента по буквам */
#hero-wave-root {
    contain: layout style;
}

/* Нижний блок: откладываем работу движка до скролла */
#library {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
}

/* Мобильная карусель процессов: смена карточки с анимацией (JS: pmSnapNext / pmSnapPrev) */
@keyframes pmSnapNext {
    from {
        opacity: 0.15;
        transform: translate(-50%, -50%) translate3d(22px, 12px, 0) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) translate3d(0, 0, 0) scale(1);
    }
}

@keyframes pmSnapPrev {
    from {
        opacity: 0.15;
        transform: translate(-50%, -50%) translate3d(-22px, 12px, 0) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) translate3d(0, 0, 0) scale(1);
    }
}

.carousel-container--processes.carousel-container--mobile-stack .product-card.active-card.pm-snap-in.pm-from-next {
    animation: pmSnapNext 0.42s cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

.carousel-container--processes.carousel-container--mobile-stack .product-card.active-card.pm-snap-in.pm-from-prev {
    animation: pmSnapPrev 0.42s cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .carousel-container--processes.carousel-container--mobile-stack .product-card.pm-snap-in {
        animation: none !important;
    }
}

.carousel-container--processes.carousel-container--mobile-stack .product-card {
    transition:
        opacity 0.38s ease,
        transform 0.38s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.carousel-container--processes.carousel-container--mobile-stack .product-card.active-card:hover {
    transform: translate(-50%, -50%) scale(1) !important;
    filter: none !important;
}

/* Карусель процессов: квадратное превью + компактный текст (как на корневой главной) */
.carousel-container--processes .product-card {
    width: min(260px, calc((100vw - 3rem) / 3 - 1rem));
    max-width: 260px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.9s cubic-bezier(0.175, 0.88, 0.32, 1.08), opacity 0.72s ease, filter 0.72s ease;
}

.carousel-container--processes .process-card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 128px;
    height: auto !important;
    min-height: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.carousel-container--processes .card-inner {
    max-height: min(400px, 82vh);
}

.carousel-container--processes .process-card-body .product-process-list {
    font-size: 0.58rem !important;
    margin-bottom: 0.4rem !important;
}

.carousel-container--processes .product-cover-neon {
    font-size: clamp(1rem, 8vw, 1.65rem);
}

/* Телефон: колонка с GIF не нужна — только текст и тачпад в одной колонке */
@media (max-width: 768px) {
    .marketplace-hero.hero-section {
        display: none !important;
    }

    .storefront--processes {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 0.7rem;
        padding-bottom: 1rem;
    }

    .storefront.p-lg {
        padding: 0.75rem !important;
    }

    .carousel-container--processes {
        margin-top: 0.45rem;
        touch-action: manipulation;
        -webkit-overflow-scrolling: touch;
        perspective: 900px;
    }

    .carousel-container--processes:not(.carousel-container--mobile-stack) {
        min-height: min(480px, 68vh);
    }

    .carousel-container--processes.carousel-container--mobile-stack {
        min-height: min(380px, 52vh);
        perspective: none;
    }

    .carousel-container--processes.carousel-container--mobile-stack .product-card {
        width: min(260px, calc(100vw - 1.25rem));
        max-width: none;
    }

    .carousel-container--processes .process-card-thumb {
        max-height: 112px;
    }

    .carousel-container--processes .btn-add {
        padding: 0.5rem 0.65rem !important;
        font-size: 0.82rem !important;
    }

    .carousel-container--processes:not(.carousel-container--mobile-stack) .product-card {
        width: min(260px, calc(100vw - 2rem));
        max-width: 280px;
    }
}
