/* Edits – подбор клипов под текст песни (views/edits.js). Макет: design/edits/Edits.html */

.ed-page { --dim: #8F8F8F; display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.ed-page .page-head { margin-bottom: 4px; }

.ed-kicker { font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 4px 2px 0; margin-bottom: -6px; }
.ed-card { padding: 0; }
.ed-lyrics {
  display: block; width: 100%; min-height: 220px; resize: vertical; padding: 14px; border: 0; outline: 0;
  background: transparent; color: var(--light); font-size: 0.875rem; line-height: 1.7; border-radius: var(--r-card);
}
.ed-lyrics::placeholder { color: var(--dim); }
.ed-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 0.75rem; color: var(--dim); padding: 0 2px; margin-top: -6px; }
.ed-link { border: 0; background: transparent; padding: 0; font-size: 0.75rem; color: var(--mid); cursor: pointer; }
.ed-link:hover { color: var(--text); }

.ed-rows { padding: 0 14px; }
.ed-row { display: flex; align-items: center; gap: 12px; min-height: 54px; width: 100%; text-align: left; color: inherit; }
.ed-row + .ed-row, .ed-tl + .ed-tl { border-top: 1px solid var(--divider); }
.ed-row > svg { color: var(--light); }
.ed-row-link > svg:last-child, .ed-row-btn > svg:last-child { color: #444; }
.ed-row-btn { background: transparent; border: 0; cursor: pointer; font: inherit; }
.ed-row-t { flex: 1; font-size: 0.875rem; font-weight: 600; }
.ed-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-row-body .ed-row-t { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-row-d { font-size: 0.75rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Миниатюра клипа: вертикальная, с процентом совпадения */
.ed-th {
  position: relative; flex-shrink: 0; display: block; width: 72px; height: 104px; border-radius: 10px; overflow: hidden;
  background: var(--raised); border: 1px solid var(--border);
}
.ed-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-th-on { border: 2px solid var(--text); }
.ed-th-sm { width: 40px; height: 60px; border-radius: 8px; }
.ed-th-empty { display: flex; align-items: center; justify-content: center; color: var(--dim); }
.ed-pc { position: absolute; left: 5px; bottom: 5px; font-size: 0.75rem; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: rgba(10, 10, 10, .78); color: var(--text); }
.ed-ck { position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; border-radius: 6px; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.ed-more {
  flex-shrink: 0; width: 72px; height: 104px; border-radius: 10px; border: 1px dashed var(--line); color: var(--mid); font-size: 0.75rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.ed-more:hover { color: var(--text); border-color: var(--mid); }

.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.ed-chip { height: 30px; padding: 0 12px; display: flex; align-items: center; border-radius: 9px; background: var(--raised); border: 1px solid var(--line); font-size: 0.7812rem; color: var(--light); }

.ed-part { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ed-part-top { display: flex; align-items: center; justify-content: space-between; }
.ed-part-name { font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); }
.ed-part-time { font-size: 0.75rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.ed-part-line { font-size: 0.8438rem; color: var(--light); line-height: 1.5; }
.ed-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ed-strip::-webkit-scrollbar { display: none; }

/* Один клип */
.ed-hero { position: relative; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); background: var(--raised); aspect-ratio: 9 / 14; max-height: 460px; width: 100%; cursor: pointer; }
.ed-video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--raised); }
.ed-tag { position: absolute; left: 12px; top: 12px; font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 7px; background: rgba(10, 10, 10, .78); }
.ed-play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: rgba(10, 10, 10, .6); display: flex; align-items: center; justify-content: center; transition: opacity .15s;
}
.ed-play.hide { opacity: 0; pointer-events: none; }
.ed-hero-off .ed-video { opacity: .25; }
.ed-why { margin: 0; padding: 12px 14px; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.8125rem; color: var(--light); }
.ed-why li { display: flex; gap: 8px; line-height: 1.45; }
.ed-why b { color: var(--text); font-weight: 600; }

/* Раскадровка */
.ed-tl { position: relative; display: flex; align-items: center; gap: 2px; min-height: 76px; color: inherit; background: var(--card); transition: transform .18s cubic-bezier(.2, .9, .3, 1); }
.ed-tl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 76px; color: inherit; }
.ed-grip { width: 44px; height: 44px; margin-left: -12px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: #555; cursor: grab; touch-action: none; flex-shrink: 0; }
.ed-grip:hover { color: var(--light); }
.ed-tl.dragging { z-index: 5; transition: none; background: var(--raised); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); border-radius: 12px; }
.ed-tl.dragging .ed-grip { cursor: grabbing; color: var(--text); }
.ed-len { font-size: 0.7812rem; color: var(--mid); font-variant-numeric: tabular-nums; }

/* Кнопки внизу – штатные .sticky-actions кабинета (на телефоне фиксированы над нижним меню).
   У .main после анимации появления остаётся transform, и fixed считался бы от длины страницы,
   поэтому на экранах Edits анимацию снимаем */
.main:has(.ed-page, .pro-page) { animation: none; transform: none; }
.ed-dock .btn { flex: 1; }
.ed-delete { align-self: center; padding: 6px 12px; }

/* Принудительный выбор: стиль, тематика, цвета */
.ed-filters { display: flex; flex-direction: column; gap: 12px; }
.ed-fgroup { display: flex; flex-direction: column; gap: 8px; }
.ed-fgroup .ed-kicker { margin-bottom: 0; }
.ed-chip-btn { cursor: pointer; font: inherit; font-size: 0.7812rem; gap: 8px; }
.ed-chip-btn:disabled { opacity: .35; cursor: default; }
.ed-chip-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.ed-chip-n { font-size: 0.75rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.ed-chip-btn.on .ed-chip-n { color: #555; }
.ed-chip-on { border-color: var(--mid); color: var(--text); }
.ed-warn { color: var(--danger); }
.ed-atmo { font-size: 0.8125rem; color: var(--light); line-height: 1.5; margin-top: -4px; }

/* Строка «Стиль, тематика, цвета» – открывает шторку */
.ed-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: transparent; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 54px; }
.ed-row-main > svg { color: var(--light); }
.ed-row-chev { background: transparent; border: 0; padding: 0 0 0 4px; color: #444; cursor: pointer; display: flex; align-items: center; min-height: 54px; }
.sheet-foot .btn { height: 46px; }

/* Субтитры: пример и выбор стиля */
.ed-sub-stage { position: relative; align-self: center; width: 100%; max-height: 52vh; border-radius: var(--r-card); overflow: hidden; background: var(--raised); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.ed-sub-stage.ed-fmt-9-16 { aspect-ratio: 9 / 16; width: auto; height: 52vh; max-width: 100%; }
.ed-sub-stage.ed-fmt-1-1 { aspect-ratio: 1 / 1; }
.ed-sub-stage.ed-fmt-16-9 { aspect-ratio: 16 / 9; }
.ed-sub-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-sub-stage .spinner { position: absolute; display: none; }
.ed-sub-stage.loading .spinner { display: block; }
.ed-sub-stage.loading .ed-sub-video { opacity: .25; }
.ed-sub-stage.off::after { content: 'Пример не собрался'; position: absolute; color: var(--dim); font-size: 0.8125rem; }
.ed-sub-styles { display: flex; flex-wrap: wrap; gap: 6px; }

.ed-sub-text { min-height: 110px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }

.ed-result { overflow: hidden; }
.ed-result-video { display: block; width: 100%; max-height: 62vh; background: #000; }

/* Цвета субтитров и строки с длинными переключателями */
.ed-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ed-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; color: var(--light); font-size: 0.8125rem; font-weight: 700; }
.ed-swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.ed-swatch-auto { background: var(--raised); }
.ed-color-input { width: 34px; height: 34px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.ed-row-wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.ed-row-wrap .seg { width: 100%; }

/* ── Шрифты субтитров: подписи вариантов пишутся самим шрифтом, быстрый вид использует их же ── */
@font-face { font-family: 'UMTSub-Serif'; src: url('/static/fonts/subs/UMTSub-Serif.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-SerifItalic'; src: url('/static/fonts/subs/UMTSub-SerifItalic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-SerifCaps'; src: url('/static/fonts/subs/UMTSub-SerifCaps.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-SansLight'; src: url('/static/fonts/subs/UMTSub-SansLight.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-SansMedium'; src: url('/static/fonts/subs/UMTSub-SansMedium.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-SansItalic'; src: url('/static/fonts/subs/UMTSub-SansItalic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-SansItalicBold'; src: url('/static/fonts/subs/UMTSub-SansItalicBold.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Condensed'; src: url('/static/fonts/subs/UMTSub-Condensed.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Didone'; src: url('/static/fonts/subs/UMTSub-Didone.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-HeavyItalic'; src: url('/static/fonts/subs/UMTSub-HeavyItalic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-WideBlack'; src: url('/static/fonts/subs/UMTSub-WideBlack.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-WideBold'; src: url('/static/fonts/subs/UMTSub-WideBold.woff2') format('woff2'); font-display: swap; }

/* ── Область нажатия не меньше 44 px: внешний вид прежний, зона шире ── */
.ed-chip-btn, .ed-swatch { position: relative; }
.ed-chip-btn::after { content: ''; position: absolute; left: 0; right: 0; top: -7px; bottom: -7px; }
.ed-swatch::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.ed-chips, .ed-sub-styles { row-gap: 10px; }
.ed-swatches { gap: 14px; }
.ed-swatch { display: flex; align-items: center; justify-content: center; }
.ed-step { min-width: 44px; min-height: 44px; font-size: 1.125rem; }
.ed-link { min-height: 44px; padding: 0 6px; }
.ed-link:active, .ed-chip-btn:active, .ed-swatch:active, .ed-grip:active { transform: scale(.96); }
.ed-row-btn:active, .ed-row-main:active { opacity: .7; }

/* Заголовок в две строки: названия не обрезаются */
.ed-page .page-title.ellipsis { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }

/* ── Шторка субтитров: пример закреплён, настройки свёрнуты по группам ── */
.ed-sub-pin { position: sticky; top: -1px; z-index: 4; background: var(--card); padding: 2px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.ed-sub-stage.ed-fmt-9-16 { height: 24vh; max-height: 220px; }
.ed-sub-stage { background-size: cover; background-position: center; }
.ed-group { border-top: 1px solid var(--divider); padding-top: 4px; }
.ed-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 0.875rem; font-weight: 700; }
.ed-group summary::-webkit-details-marker { display: none; }
.ed-group summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--mid); border-bottom: 2px solid var(--mid); transform: rotate(45deg); transition: transform .18s; margin-right: 4px; }
.ed-group[open] summary::after { transform: rotate(-135deg); }
.ed-group-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }

/* Мгновенный приблизительный вид, пока сервер собирает точный кадр */
.ed-live { position: absolute; left: 50%; transform: translate(-50%, -50%); width: max-content; text-align: center; line-height: 1.25; pointer-events: none; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); z-index: 1; }
.ed-sub-stage:not(.loading) .ed-live { display: none; }
.ed-anim-fade { animation: ed-fade 1.6s ease-in-out infinite; }
.ed-anim-blur { animation: ed-blur 1.6s ease-in-out infinite; }
.ed-anim-pop { animation: ed-pop 1.2s cubic-bezier(.2, 1.3, .4, 1) infinite; }
.ed-anim-slide { animation: ed-slide 1.4s cubic-bezier(.2, .9, .3, 1) infinite; }
.ed-anim-zoom { animation: ed-zoom 1.4s cubic-bezier(.2, .9, .3, 1) infinite; }
@keyframes ed-fade { 0% { opacity: 0; } 30%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ed-blur { 0% { opacity: 0; filter: blur(8px); } 35%, 80% { opacity: 1; filter: blur(0); } 100% { opacity: 0; } }
@keyframes ed-pop { 0% { transform: translate(-50%, -50%) scale(.7); opacity: 0; } 25%, 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { opacity: 0; } }
@keyframes ed-slide { 0% { transform: translate(-50%, -10%); opacity: 0; } 30%, 85% { transform: translate(-50%, -50%); opacity: 1; } 100% { opacity: 0; } }
@keyframes ed-zoom { 0% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } 30%, 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { opacity: 0; } }

/* ── Выбор клипа: жест и подсказки ── */
.ed-hero { cursor: grab; user-select: none; -webkit-user-select: none; will-change: transform; }
.ed-hero-in { animation: ed-hero-in .26s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes ed-hero-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.ed-swipe-hint { position: absolute; top: 14px; padding: 6px 12px; border-radius: 10px; font-size: 0.8125rem; font-weight: 700; opacity: 0; pointer-events: none; background: rgba(10, 10, 10, .8); border: 2px solid; }
.ed-swipe-yes { left: 14px; border-color: var(--text); color: var(--text); transform: rotate(-6deg); }
.ed-swipe-no { right: 14px; border-color: var(--mid); color: var(--light); transform: rotate(6deg); }
.ed-hint { font-size: 0.75rem; color: var(--dim); text-align: center; margin-top: -6px; }

/* ── Ход сборки ── */
.ed-progress { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ed-progress-top { display: flex; align-items: center; gap: 10px; }
.ed-progress-title { flex: 1; font-size: 0.875rem; font-weight: 700; }
.ed-progress-top > span:last-child { font-size: 0.75rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.ed-progress-stage { font-size: 0.9375rem; color: var(--text); }
.ed-progress-note { font-size: 0.75rem; color: var(--dim); }

/* ── Отмена удаления ── */
.ed-snack { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-space) + var(--safe-b) + 14px); z-index: 80; max-width: 420px; margin: 0 auto; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); font-size: 0.875rem; animation: ed-snack-in .22s cubic-bezier(.2, .9, .3, 1) both; }
.ed-snack.out { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.ed-snack-btn { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--text); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
@keyframes ed-snack-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 901px) { .ed-snack { bottom: 24px; } }

/* ── Уменьшить движение: без бегущих анимаций и пружин ── */
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) {
  .ed-hero-in, .ed-snack, .ed-anim-fade, .ed-anim-blur, .ed-anim-pop, .ed-anim-slide, .ed-anim-zoom { animation: none !important; }
  .ed-tl, .ed-play, .ed-group summary::after { transition: none !important; }
}

/* Кнопка внизу не вылезает за экран: длинный текст шага обрезается многоточием */
.ed-dock .btn { min-width: 0; }
.ed-dock .btn > span:not(.spinner) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-dock .btn { white-space: nowrap; }
.ed-meta { align-items: center; }
/* Чипы выбора внутри строки: на всю ширину, с переносом */
.ed-choice { width: 100%; padding: 2px 0 6px; }

.ed-result-title { padding: 14px 14px 0; font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.25; }

/* Обязательное поле */
.ed-req { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); font-size: 0.75rem; font-weight: 600; color: var(--mid); vertical-align: 2px; letter-spacing: .02em; }
.ed-need { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

.ed-beat-note { width: 100%; white-space: normal; line-height: 1.4; padding-bottom: 4px; }

.ed-dock .btn { flex: 1 1 100%; }

.ed-error { border-color: #4a2523; color: var(--danger); line-height: 1.45; }

/* Приблизительный вид обработки на обложке */
.ed-vp-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 14px 4px; }
.ed-vp { position: relative; isolation: isolate; overflow: hidden; border-radius: 14px; background: var(--raised); height: 190px; }
.ed-vp-9-16 { aspect-ratio: 9 / 16; }
.ed-vp-1-1 { aspect-ratio: 1 / 1; height: 150px; }
.ed-vp-16-9 { aspect-ratio: 16 / 9; height: 130px; }
.ed-vp img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .25s; }
.ed-vp-tint { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; transition: background .25s; }
.ed-vp-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.ed-vp::after { content: ''; position: absolute; inset: 0; pointer-events: none; transition: opacity .25s; opacity: 0; }
.ed-vp[data-look='cinema']::after, .ed-vp[data-look='film']::after { opacity: 1; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.ed-vp[data-look='glow']::after { opacity: 1; background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .28), transparent 65%); mix-blend-mode: screen; }
.ed-fx-zoom img { animation: ed-fx-zoom .5s ease-out infinite; }
.ed-fx-shake img { animation: ed-fx-shake .5s linear infinite; }
.ed-fx-zoom.ed-fx-shake img { animation: ed-fx-zoom .5s ease-out infinite, ed-fx-shake .5s linear infinite; }
.ed-fx-flash .ed-vp-flash { animation: ed-fx-flash .5s ease-out infinite; }
@keyframes ed-fx-zoom { 0% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes ed-fx-shake { 0% { translate: 5px -4px; } 20% { translate: -4px 4px; } 40% { translate: 3px 2px; } 60% { translate: -2px -2px; } 100% { translate: 0 0; } }
@keyframes ed-fx-flash { 0% { opacity: .38; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .ed-fx-zoom img, .ed-fx-shake img, .ed-fx-flash .ed-vp-flash { animation: none !important; } }

/* Редактор текста по строкам */
.ed-pin-min .ed-sub-stage { display: none; }
.ed-pin-min { padding-bottom: 4px; }
.ed-cues { display: flex; flex-direction: column; gap: 8px; }
.ed-cue { display: flex; gap: 8px; align-items: flex-start; }
.ed-cue-t { flex: none; min-width: 44px; padding-top: 12px; font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--dim); }
.ed-cue-text { flex: 1; min-height: 52px; resize: vertical; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 0.9375rem; line-height: 1.35; }
.ed-cue-x { flex: none; width: 36px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--dim); cursor: pointer; }
.ed-paste summary { min-height: 44px; display: flex; align-items: center; font-size: 0.875rem; color: var(--mid); cursor: pointer; }
.ed-color-input.on { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 50%; }

.ed-wrap-note { white-space: normal; text-overflow: clip; line-height: 1.4; text-align: center; }
.ed-row-body .ed-wrap-note { text-align: left; }
.ed-paste { border-top: 1px solid var(--divider); }
.ed-paste[open] summary { color: var(--text); }
.ed-paste textarea { margin: 6px 0; width: 100%; }

/* Ход сборки на устройстве */
.ed-bar { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.ed-bar i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 4px; transition: width .2s; }

/* Простой вход и «Настроить подробнее» */
.ed-adv { display: flex; flex-direction: column; gap: 12px; }
.ed-adv[hidden] { display: none; }
.ed-adv-btn { width: 100%; text-align: left; cursor: pointer; }
.ed-adv-btn svg:last-child { transition: transform .2s; }
.ed-chev-open { transform: rotate(90deg); }
.ed-adv-box { border-top: 1px solid var(--divider); padding-top: 4px; }
.ed-adv-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 0.9375rem; font-weight: 700; }
.ed-adv-box > summary::-webkit-details-marker { display: none; }
.ed-adv-box > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--mid); border-bottom: 2px solid var(--mid); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.ed-adv-box[open] > summary::after { transform: rotate(-135deg); }
.ed-adv-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .ed-adv-btn svg:last-child, .ed-adv-box > summary::after { transition: none; } }

/* Готовое видео лежит в рамке нужной пропорции и не выходит за карточку */
.ed-result-box { position: relative; margin: 10px auto 6px; border-radius: 16px; overflow: hidden; background: #000; max-width: calc(100% - 28px); }
.ed-rb-9-16 { aspect-ratio: 9 / 16; height: min(80vh, 800px); width: auto; }
.ed-rb-1-1 { aspect-ratio: 1 / 1; width: min(calc(100% - 28px), 80vh); }
.ed-rb-16-9 { aspect-ratio: 16 / 9; width: calc(100% - 28px); }
.ed-result-box .ed-result-video { width: 100%; height: 100%; max-height: none; object-fit: contain; display: block; }

.ed-heard { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 4px; }
.ed-heard-t { font-size: 0.75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }

/* Последние: строка квадратных обложек из кадра видео */
.ed-th-sq { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 14px; }
.ed-recent { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; }
.ed-recent::-webkit-scrollbar { display: none; }
.ed-rc { flex: 0 0 116px; display: flex; flex-direction: column; gap: 6px; color: inherit; scroll-snap-align: start; min-width: 0; }
.ed-rc-t { font-size: 0.8125rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-rc-d { font-size: 0.75rem; color: var(--dim); }
.ed-rc:active { opacity: .75; }

/* Выбор куска трека */
.ed-wave { display: block; width: 100%; height: 104px; touch-action: none; cursor: grab; border-radius: 12px; background: var(--raised); }
.ed-wave:active { cursor: grabbing; }
.ed-wave-t { text-align: center; font-size: 0.9375rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.ed-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Последние: шестая плитка и окно со всеми проектами */
.ed-rc-more { background: transparent; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.ed-th-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-style: dashed; color: var(--mid); background: transparent; }
.ed-th-more b { font-size: 0.9375rem; color: var(--light); font-variant-numeric: tabular-nums; }
.ed-rc-more:hover .ed-th-more { border-color: var(--mid); color: var(--text); }
.ed-recent-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px; overflow: visible; margin: 0; padding: 0; }
.ed-recent-all .ed-rc { flex: none; }

/* Кадры эдита: видно, что их можно менять */
.ed-frames { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ed-frames-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ed-frames-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.ed-frames-strip::-webkit-scrollbar { display: none; }
.ed-fr { position: relative; flex: 0 0 auto; display: block; color: inherit; }
.ed-th-fr { width: 64px; height: 92px; border-radius: 10px; }
.ed-fr-edit { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 7px; background: rgba(10, 10, 10, .78); color: var(--text); display: flex; align-items: center; justify-content: center; }
.ed-fr-t { position: absolute; left: 4px; bottom: 4px; font-size: 0.75rem; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: rgba(10, 10, 10, .78); font-variant-numeric: tabular-nums; }
.ed-fr:active .ed-th { opacity: .8; transform: scale(.97); }
.ed-fr:hover .ed-th { border-color: var(--mid); }
.ed-frames-note { text-align: left; padding-bottom: 0; }

/* Нажатие: не меньше 44 px и видимый фокус с клавиатуры */
@media (pointer: coarse) { .ed-page .btn-sm, .ed-frames .btn-sm { min-height: 44px; } }
@media (pointer: fine) { .ed-page .btn-sm { min-height: 40px; } }
.ed-wave:focus-visible, .ed-grip:focus-visible, .ed-fr:focus-visible, .ed-rc:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }


/* ── Колонки: у каждой своя прокрутка на компьютере ── */
.ed-cl { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ed-col-side:empty { display: none; }
@media (min-width: 901px) {
  .ed-page.ed-start, .ed-page.ed-board, .ed-page.ed-clip { max-width: 1080px; margin-inline: auto; height: calc(100vh - 76px); min-height: 0; padding-bottom: 0; }
  .ed-start, .ed-board, .ed-clip { display: grid; column-gap: 32px; row-gap: 14px; grid-template-rows: auto auto minmax(0, 1fr); }
  .ed-start { grid-template-columns: minmax(0, 540px) minmax(0, 1fr); }
  .ed-board, .ed-clip { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
  .ed-page > .page-head { grid-row: 1; grid-column: 1 / -1; }
  .ed-page > .card-note, .ed-page > .ed-heard, .ed-page > .ed-heard-card { grid-row: 2; grid-column: 1 / -1; }
  .ed-cl { grid-row: 3; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; padding: 2px 6px 0 2px; margin: -2px -6px 0 -2px; }
  .ed-cl-l { grid-column: 1; }
  .ed-cl-r { grid-column: 2; }
  /* Кнопка действия – следующий элемент колонки сразу под настройками, обычного вида, без плашки и тени */
  .ed-cl .ed-dock {
    position: static; margin-top: 0; padding: 4px 0 4px; border: 0; background: none; box-shadow: none;
    left: auto; right: auto; width: auto; max-width: none;
  }
  .ed-dock .btn { flex: 1 1 100%; }
  /* Настройки на компьютере всегда раскрыты: полоска «Настроить подробнее» не нужна */
  .ed-board .ed-adv-box { border-top: 0; padding-top: 0; }
  .ed-board .ed-adv-box > summary { display: none; }

  .ed-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; overflow: visible; }
  .ed-rc { flex: none; }
  .ed-rc:hover .ed-th { border-color: var(--mid); }
}
.ed-cl > * { flex-shrink: 0; }


/* ── Полноэкранная загрузка ── */
.ed-build { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.ed-build.leaving { animation: ed-bld-out .28s ease-in both; }
@keyframes ed-bld-in { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
@keyframes ed-bld-out { to { opacity: 0; transform: scale(.985); } }
.ed-building { overflow: hidden; }
.ed-bld-glow2 { top: 44%; width: min(70vw, 420px); background: radial-gradient(circle, rgba(255, 255, 255, .13), transparent 66%); animation-duration: 7s; animation-delay: -2.5s; }
.ed-bld-glow { position: absolute; left: 50%; top: 44%; width: min(120vw, 760px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .10), transparent 62%); animation: ed-bld-glow 6s ease-in-out infinite; pointer-events: none; }
@keyframes ed-bld-glow { 0%, 100% { opacity: .5; transform: translate(-50%, -50%) scale(.9); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }
.ed-bld-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .06); }
.ed-bld-line i { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(.02); transition: transform .6s cubic-bezier(.2, .9, .3, 1); }
.ed-bld-body { position: relative; width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.ed-bld-kicker { font-family: var(--display); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mid); }
.ed-bld-visual { position: relative; height: 156px; width: 100%; display: flex; align-items: center; justify-content: center; margin: 10px 0 12px; }
.ed-bld-art { position: relative; width: 136px; height: 136px; }
.ed-bld-ico { position: absolute; inset: 0; color: var(--text); }
.ed-bld-ico svg { width: 100%; height: 100%; overflow: visible; }
.ed-bld-ico.in { animation: ed-ico-in .55s cubic-bezier(.2, .9, .3, 1) both; }
.ed-bld-ico.out { animation: ed-ico-out .4s ease-in both; }
@keyframes ed-ico-in { from { opacity: 0; transform: scale(.82); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ed-ico-out { to { opacity: 0; transform: scale(1.12); filter: blur(5px); } }
.ed-bld-ico svg * { transform-box: fill-box; transform-origin: center; }
/* движение значков: у каждого своё, по смыслу шага */
.ed-bld-ico .eq { animation: ed-eq 1.1s ease-in-out var(--d) infinite; }
@keyframes ed-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1.25); } }
.ed-bld-ico .ring { opacity: 0; animation: ed-ring 2.7s ease-out var(--d) infinite; }
@keyframes ed-ring { 0% { transform: scale(.7); opacity: .85; } 100% { transform: scale(3); opacity: 0; } }
.ed-bld-ico .beat { animation: ed-beat 0.9s ease-in-out infinite; }
@keyframes ed-beat { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.5); } }
.ed-bld-ico .heart { animation: ed-heart 1.4s ease-in-out infinite; }
@keyframes ed-heart { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.09); } 30% { transform: scale(1); } 45% { transform: scale(1.06); } }
.ed-bld-ico .ecg { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ed-draw 2.2s ease-in-out infinite; }
@keyframes ed-draw { 0% { stroke-dashoffset: 100; } 55%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
.ed-bld-ico .clap { transform-origin: 16% 100%; animation: ed-clap 1.6s ease-in-out infinite; }
.ed-bld-ico .clap { transform-box: view-box; transform-origin: 16px 42px; }
@keyframes ed-clap { 0%, 55%, 100% { transform: rotate(-18deg); } 70%, 85% { transform: rotate(0); } }
.ed-bld-ico .cell { animation: ed-cell 2.4s ease-in-out var(--d) infinite; }
@keyframes ed-cell { 0%, 100% { opacity: .3; } 40%, 60% { opacity: 1; } }
.ed-bld-ico .lens { transform-box: view-box; animation: ed-lens 4.8s ease-in-out infinite; }
@keyframes ed-lens { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(26px, 0); } 50% { transform: translate(26px, 26px); } 75% { transform: translate(0, 26px); } }
.ed-bld-ico .dot { animation: ed-dot 1.8s ease-in-out var(--d) infinite; }
@keyframes ed-dot { 0%, 100% { transform: scale(.55); opacity: .5; } 40%, 60% { transform: scale(1.4); opacity: 1; } }
.ed-bld-ico .card { animation: ed-stack 2.4s ease-in-out infinite; }
.ed-bld-ico .c1 { animation-delay: 0s; } .ed-bld-ico .c2 { animation-delay: .35s; } .ed-bld-ico .c3 { animation-delay: .7s; }
@keyframes ed-stack { 0%, 100% { transform: translate(0, 0); opacity: .4; } 50% { transform: translate(8px, -8px); opacity: 1; } }
.ed-bld-ico .seg { animation: ed-seg 2s ease-in-out var(--d) infinite; }
@keyframes ed-seg { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ed-bld-ico .head { transform-box: view-box; animation: ed-head 2.6s ease-in-out infinite; }
@keyframes ed-head { 0% { transform: translateX(0); } 100% { transform: translateX(70px); } }
.ed-bld-ico .drawc, .ed-bld-ico .drawk { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ed-drawone 1.8s ease-in-out infinite; }
.ed-bld-ico .drawk { animation-delay: .3s; }
@keyframes ed-drawone { 0% { stroke-dashoffset: 100; } 50%, 100% { stroke-dashoffset: 0; } }
.ed-bld-ttl, .ed-bld-hint { position: relative; width: 100%; }
.ed-bld-ttl { height: 2.2em; font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.01em; }
.ed-bld-hint { height: 3em; font-size: .9375rem; line-height: 1.45; color: var(--mid); }
.ed-bld-t, .ed-bld-h { position: absolute; left: 0; right: 0; top: 0; }
.ed-bld-t.in, .ed-bld-h.in { animation: ed-bld-text-in .5s cubic-bezier(.2, .9, .3, 1) both; }
.ed-bld-t.out, .ed-bld-h.out { animation: ed-bld-text-out .28s ease-in both; }
@keyframes ed-bld-text-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ed-bld-text-out { to { opacity: 0; transform: translateY(-12px); filter: blur(4px); } }
.ed-bld-segs { display: flex; gap: 5px; width: 100%; margin-top: 6px; }
.ed-bld-segs i { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ed-bld-segs i.done { background: var(--text); transition: background .4s; }
.ed-bld-segs i.active::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--text), transparent); animation: ed-bld-shimmer 1.3s ease-in-out infinite; }
@keyframes ed-bld-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ed-bld-foot { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 44px; }
.ed-bld-clock { font-size: .8125rem; color: var(--mid); font-variant-numeric: tabular-nums; }
.ed-bld-note { position: absolute; left: 24px; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: .75rem; color: var(--dim); }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) {
  .ed-build, .ed-build.leaving { animation: none; }
  .ed-bld-glow, .ed-bld-wave i, .ed-bld-segs i.active::after { animation: none; }
  .ed-bld-wave i { transform: scaleY(var(--h)); }
  .ed-bld-t.in, .ed-bld-h.in, .ed-bld-t.out, .ed-bld-h.out { animation: none; }
  .ed-bld-t.out, .ed-bld-h.out { display: none; }
  .ed-bld-line i, .ed-bld-check, .ed-bld-wave { transition: none; }
}

/* Кадры эдита – один блок: порядок и замена */
.ed-frames-list .ed-tl { background: transparent; }
.ed-frames-list .ed-tl + .ed-tl { border-top: 1px solid var(--divider); }
.ed-frames-note { text-align: left; padding: 0; }

/* Один клип: все варианты частью экрана */
.ed-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.ed-var { width: 100%; height: auto; aspect-ratio: 9 / 14; padding: 0; cursor: pointer; }
.ed-var:hover { border-color: var(--mid); }
.ed-var:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Подборка по частям на компьютере: карточки в две колонки */
@media (min-width: 901px) {
  .ed-page.ed-parts { max-width: 1080px; margin-inline: auto; }
  .ed-parts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
}
.ed-parts-grid { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 901px) { .ed-parts-grid { display: grid; } }

/* Полоски шагов: активная дышит и переливается, пройденные мягко светятся */
.ed-bld-segs i.done { box-shadow: 0 0 10px rgba(255, 255, 255, .25); }
.ed-bld-segs i.active { animation: ed-seg-pulse 1.6s ease-in-out infinite; }
@keyframes ed-seg-pulse { 0%, 100% { background: rgba(255, 255, 255, .16); } 50% { background: rgba(255, 255, 255, .34); } }
.ed-bld-line i::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9)); animation: ed-line-glint 2s ease-in-out infinite; }
.ed-bld-line i { position: relative; }
@keyframes ed-line-glint { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* Мягкий режим (системная настройка «меньше движения»): только плавное дыхание, без смещений и размытия */
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) {
  .ed-bld-glow { animation: ed-soft-breathe 7s ease-in-out infinite !important; }
  .ed-bld-glow2 { animation-duration: 9s !important; }
  @keyframes ed-soft-breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
  .ed-bld-ico.in, .ed-bld-ico.out { animation: none; }
  .ed-bld-ico.out { display: none; }
  .ed-bld-ico svg .a { animation-name: ed-soft-pulse !important; animation-duration: 2.4s !important; animation-timing-function: ease-in-out !important; animation-iteration-count: infinite !important; transform: none !important; stroke-dashoffset: 0 !important; }
  @keyframes ed-soft-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
  .ed-bld-segs i.active { animation: ed-seg-pulse 2.2s ease-in-out infinite !important; }
  .ed-bld-segs i.active::after { animation: none; }
  .ed-bld-line i::after { animation: ed-line-glint 3s ease-in-out infinite !important; }
}

/* Что мы услышали в треке */
.ed-heard-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ed-heard-head { display: flex; align-items: center; gap: 10px; }
.ed-heard-card .ed-heard-t { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); }
.ed-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.ed-eq i { display: block; width: 3px; height: 100%; border-radius: 2px; background: var(--text); transform-origin: bottom; transform: scaleY(.4); animation: ed-eq-b 1.2s ease-in-out infinite; }
.ed-eq i:nth-child(2) { animation-delay: -.3s; } .ed-eq i:nth-child(3) { animation-delay: -.6s; } .ed-eq i:nth-child(4) { animation-delay: -.9s; }
@keyframes ed-eq-b { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .ed-eq i { animation: none; } .ed-eq i:nth-child(1) { transform: scaleY(.5); } .ed-eq i:nth-child(2) { transform: scaleY(1); } .ed-eq i:nth-child(3) { transform: scaleY(.7); } .ed-eq i:nth-child(4) { transform: scaleY(.4); } }
.ed-heard-main { font-family: var(--display); font-weight: 700; font-size: 1.375rem; line-height: 1.2; letter-spacing: -.01em; }
.ed-heard-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-hc { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); font-size: .8125rem; color: var(--light); }
.ed-hc::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 8px var(--c, #fff); }
.ed-hc-0 { --c: #e8e8e8; } .ed-hc-1 { --c: #b9b9b9; } .ed-hc-2 { --c: #9b9b9b; } .ed-hc-3 { --c: #d4d4d4; }

/* Колонки на компьютере: без ползунка, края плавно растворяются, кнопка снизу на всю ширину */
@media (min-width: 901px) {
  .ed-cl { scrollbar-width: none; padding-top: 16px; padding-bottom: 30px; margin-top: -16px; margin-bottom: 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 34px), transparent 100%); }
  .ed-cl::-webkit-scrollbar { display: none; }
  .ed-board, .ed-start, .ed-clip { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .ed-board > .ed-dock { grid-row: 4; grid-column: 1 / -1; position: static; padding: 6px 0 0; background: none; border: 0; width: auto; max-width: none; }
  .ed-board > .ed-dock .btn { flex: 1 1 100%; height: 56px; font-size: 1rem; }
}

.ed-heard-ico { display: inline-flex; color: var(--text); }

/* ── Экран загрузки: «Волна» (выбранный макет) ── */
.ed-build { display: block; padding: 0; }
.ed-bld-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-bld-top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(28px + env(safe-area-inset-top, 0px)) 32px 0; }
.ed-bld-kicker { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mid); }
.ed-bld-mid { position: absolute; left: 0; right: 0; top: 30%; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 24px; text-align: center; }
.ed-bld-pct { font-family: var(--display); font-weight: 700; font-size: clamp(56px, 17vmin, 150px); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(255, 255, 255, .25); }
.ed-bld-mid .ed-bld-ttl { width: min(560px, 100%); }
.ed-bld-mid .ed-bld-hint { width: min(460px, 100%); }
.ed-bld-bot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.ed-bld-bot .ed-bld-note { position: static; }
.ed-build.done .ed-bld-pct { text-shadow: 0 0 60px rgba(255, 255, 255, .45); }

/* Что услышали в треке – справочная строка, а не главный элемент экрана */
.ed-page > .ed-heard-card, .ed-heard-card { background: none; border: 0; box-shadow: none; padding: 0 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ed-heard-card .ed-heard-t { font-size: .75rem; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--mid); margin-right: 2px; }
.ed-heard-ico { color: var(--mid); }
.ed-hc { height: 26px; padding: 0 10px; font-size: .75rem; color: var(--mid); background: transparent; border: 1px solid var(--line); gap: 0; }
.ed-hc::before { display: none; }

/* Шторка субтитров: закреплённый пример перекрывает зазор над собой, ничего не просвечивает */
.ed-sub-pin { top: -8px; margin-top: -8px; padding-top: 10px; }
.ed-sub-pin::after { content: ''; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px; background: linear-gradient(var(--card), transparent); pointer-events: none; }
@media (max-width: 900px) { .ed-sub-pin { top: -6px; margin-top: -6px; padding-top: 8px; } }

/* «Услышали в треке»: именно строка, не колонка */
.ed-heard-card { flex-direction: row; justify-content: flex-start; }
/* Низ колонок: последний блок целиком выходит из зоны затухания и не прилипает к кнопке */
@media (min-width: 901px) {
  .ed-cl { padding-bottom: 56px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 44px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 44px), transparent 100%); }
}

/* ── Главный экран: дропзона (макет А) ── */
.ed-track { position: relative; }
.ed-drop { border: 1.5px dashed #3a3a3a; border-radius: 20px; min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .05), transparent 70%); cursor: pointer; transition: border-color .25s, background .25s; }
.ed-drop:hover, .ed-track.ed-over .ed-drop { border-color: #8a8a8a; background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .09), transparent 70%); }
.ed-drop:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.ed-drop[hidden], .ed-loaded[hidden] { display: none; }
.ed-drop-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--raised); border: 1px solid #2c2c2c; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; animation: ed-float 3.6s ease-in-out infinite; }
@keyframes ed-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { .ed-drop-ico { animation: none; } }
.ed-drop-t { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.ed-drop-d { color: var(--mid); font-size: .8125rem; line-height: 1.45; }
.ed-track.ed-need .ed-drop, .ed-track.ed-need .ed-loaded { border-color: var(--danger); }
.ed-track.ed-over .ed-loaded { border-color: #8a8a8a; }
.ed-loaded { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ed-loaded-head { display: flex; align-items: center; gap: 12px; }
.ed-loaded-head > svg { color: var(--light); flex: none; }
.ed-loaded-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-loaded-name b { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-loaded-name span { font-size: .75rem; color: var(--dim); }
.ed-wave-in { height: 68px; }
.ed-loaded-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ed-loaded-foot .ed-row-d { white-space: normal; }

/* Последние – одна строка плиток под кнопкой */
.ed-drop1 .ed-recent { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 12px; }
.ed-drop1 .ed-rc { flex: 0 0 112px; }
@media (min-width: 901px) {
  .ed-page.ed-drop1 { max-width: 620px; margin-inline: auto; }
  .ed-drop1 > .ed-dock { position: static; padding: 2px 0 0; background: none; border: 0; box-shadow: none; width: auto; max-width: none; left: auto; right: auto; }
  .ed-drop1 > .ed-dock .btn { flex: 1 1 100%; }
  .ed-drop1 .ed-recent { display: flex; }
}

/* Переход на экран процесса: содержимое поднимается чуть позже круга */
/* Без задержки и без fill-mode: если у webview анимация не стартует (экран занят сборкой видео), текст остаётся видимым, а не пропадает в opacity 0 */
.ed-build > .ed-bld-top, .ed-build > .ed-bld-mid, .ed-build > .ed-bld-bot { animation: ed-bld-rise .8s cubic-bezier(.2, .9, .3, 1); }
@keyframes ed-bld-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Перетаскивание трека: область «поднимается» навстречу файлу */
.ed-drop { transition: transform .45s cubic-bezier(.2, 1.1, .3, 1), border-color .25s, background .3s, box-shadow .4s; }
.ed-track.ed-over .ed-drop { transform: scale(1.025); border-style: solid; border-color: #fff;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 70%);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .06), 0 20px 60px rgba(255, 255, 255, .08); animation: ed-over-glow 1.4s ease-in-out infinite; }
@keyframes ed-over-glow { 0%, 100% { box-shadow: 0 0 0 5px rgba(255, 255, 255, .05), 0 20px 60px rgba(255, 255, 255, .06); } 50% { box-shadow: 0 0 0 11px rgba(255, 255, 255, .09), 0 24px 70px rgba(255, 255, 255, .14); } }
.ed-drop-ico { transition: transform .45s cubic-bezier(.2, 1.4, .3, 1), background .3s, color .3s; }
.ed-track.ed-over .ed-drop-ico { animation: none; transform: translateY(-10px) scale(1.18); background: #fff; color: #0A0A0A; }
.ed-drop-t { transition: opacity .2s; }
.ed-drop.ed-out { animation: ed-pane-out .22s ease-in both; }
.ed-loaded.ed-out { animation: ed-pane-out .22s ease-in both; }
.ed-loaded.ed-land, .ed-drop.ed-land { animation: ed-pane-land .7s cubic-bezier(.2, 1.15, .3, 1) both; }
@keyframes ed-pane-out { to { opacity: 0; transform: scale(.97) translateY(-6px); filter: blur(3px); } }
@keyframes ed-pane-land { from { opacity: 0; transform: translateY(26px) scale(.95); filter: blur(5px); } 60% { opacity: 1; filter: none; } to { opacity: 1; transform: none; filter: none; } }

/* ── UMT Pro: страница тарифов (#/edits/pro) – обычные карточки кабинета ───────────────────── */
.pro-slot:empty { display: none; }
.pro-pill { text-decoration: none; cursor: pointer; height: 30px; padding: 0 12px; }
.pro-page { display: flex; flex-direction: column; gap: 16px; max-width: 1040px; margin: 0 auto; width: 100%; }
.pro-cols { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.pro-in { padding: 16px 18px 6px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pro-in .ed-kicker { align-self: flex-start; }
.pro-perks { width: 100%; }
.pro-choose { display: flex; flex-direction: column; gap: 12px; }
.pro-sub-card .kv-val { text-align: right; }
.pro-cancel-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--divider); color: inherit; font: inherit; text-align: left; padding: 10px 0 0; }
.pro-cancel-row svg { color: #444; }
.pro-endnote { padding-top: 10px; border-top: 1px solid var(--divider); }
.pro-limit { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--light); }
.pro-limit b { color: var(--text); font-size: 15px; }
.pro-packs.card { display: flex; flex-direction: column; gap: 8px; padding: 0; background: none; border: 0; animation: none; }
.pro-pk { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-card); transition: border-color .15s, background .15s; }
.pro-pk.on { border-color: var(--text); background: var(--hover); box-shadow: 0 0 0 1px var(--text); }
.pro-pk.own { cursor: default; opacity: .72; }
.pro-rd { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #555; flex: none; position: relative; }
.pro-pk.on .pro-rd { border-color: var(--text); }
.pro-pk.on .pro-rd::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--text); }
.pro-pk.own .pro-rd { border-style: dashed; }
.pro-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pro-nn { font-size: 18px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pro-nn small { font-size: 12.5px; font-weight: 400; color: var(--mid); letter-spacing: 0; }
.pro-for { color: var(--dim); font-size: 12px; line-height: 1.35; }
.pro-rt { text-align: right; flex: none; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.pro-pr { font-size: 16px; font-weight: 700; }
.pro-pe { color: var(--light); font-size: 12px; }
.pro-mail { gap: 6px; }
.pro-fine { color: var(--dim); font-size: 12px; line-height: 1.5; }
.pro-cancel { display: flex; flex-direction: column; gap: 10px; color: var(--light); font-size: 14px; line-height: 1.5; }
.pro-cancel p { margin: 0; }
.pro-cancel .ed-kicker { margin-top: 6px; }
.sheet:has(.pro-cancel) .sheet-foot { flex-direction: column; }
.sheet:has(.pro-cancel) .sheet-foot .btn { width: 100%; }
/* «Оставить подписку» главная и крупная, «Отключить» меньше и тише */
.sheet:has(.pro-cancel) .sheet-foot .pro-cancel-yes { height: 38px; font-size: 13px; font-weight: 500; color: var(--mid); background: none; border-color: transparent; }
.sheet:has(.pro-cancel) .sheet-foot .pro-cancel-yes:active { color: var(--text); }
.pro-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pro-reasons .chip-btn { height: 44px; padding: 0 10px; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; transition: transform .12s ease-out, background-color .15s ease, border-color .15s ease, color .15s ease; }
.pro-reasons .chip-btn:active { transform: scale(.97); }
.pro-hint-wrap { display: grid; grid-template-rows: 0fr; margin-top: -10px; opacity: 0; transition: grid-template-rows .26s cubic-bezier(.23, 1, .32, 1), margin-top .26s cubic-bezier(.23, 1, .32, 1), opacity .18s ease-out; }
.pro-hint-wrap.open { grid-template-rows: 1fr; margin-top: 0; opacity: 1; }
.pro-hint-clip { min-height: 0; overflow: hidden; }
.pro-cancel-hint { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--divider); border-radius: 14px; transform: translateY(6px); transition: transform .26s cubic-bezier(.23, 1, .32, 1); }
.pro-hint-wrap.open .pro-cancel-hint { transform: none; }
.sheet:has(.pro-cancel) .sheet-foot .btn { transition: transform .12s ease-out, color .15s ease; }
.sheet:has(.pro-cancel) .sheet-foot .btn:active, .pro-cancel-hint .btn:active { transform: scale(.98); }
.pro-cancel-hint .btn { width: 100%; }
.pro-cancel-alt { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 2px; background: none; border: 0; border-top: 1px solid var(--divider); color: var(--light); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pro-cancel-alt:active { color: var(--text); }
.pro-cancel-alt svg { flex-shrink: 0; color: #666; }
@media (prefers-reduced-motion: reduce) {
  .pro-hint-wrap { transition: opacity .15s ease; margin-top: 0; }
  .pro-hint-wrap:not(.open) { display: none; }
  .pro-cancel-hint { transform: none; transition: none; }
  .pro-reasons .chip-btn, .sheet:has(.pro-cancel) .sheet-foot .btn { transition: none; }
  .sheet:has(.pro-cancel) .sheet-foot .btn:active, .pro-cancel-hint .btn:active, .pro-reasons .chip-btn:active { transform: none; }
}
/* превью эдита – обычный экран телефона, без свечения и теней вокруг */
.pro-phone { --pw: 150px; width: var(--pw); aspect-ratio: 9 / 18.5; border-radius: 24px; background: #000; border: 1px solid #333; padding: 4px; position: relative; flex: none; }
.pro-scr { position: absolute; inset: 4px; border-radius: 20px; overflow: hidden; background: #111; }
.pro-scr::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 28%, transparent 55%, rgba(0, 0, 0, .72)); pointer-events: none; }
.pro-clip { position: absolute; inset: -8%; opacity: 0; transition: opacity .45s; }
.pro-clip.on { opacity: 1; }
.pro-clip { animation: pro-drift 7s ease-in-out infinite alternate; }
.pro-clip.k0 { background: radial-gradient(circle at 70% 28%, #ffe29a 0 9%, rgba(255, 226, 154, .25) 10% 22%, transparent 23%), linear-gradient(165deg, #ff7a45, #b0267e 55%, #2a0a52); }
.pro-clip.k1 { background: radial-gradient(ellipse at 50% 115%, #aaf7e6 0 26%, transparent 27%), radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .22), transparent 40%), linear-gradient(180deg, #0b3d91, #00a896 70%, #02353c); animation-delay: -2s; }
.pro-clip.k2 { background: repeating-linear-gradient(100deg, rgba(255, 255, 255, .06) 0 14px, transparent 14px 28px), linear-gradient(200deg, #ff2e93, #5b21b6 55%, #0b0626); animation-delay: -4s; }
.pro-clip.k3 { background: radial-gradient(circle at 30% 60%, #fff3b0 0 5%, rgba(255, 209, 102, .4) 6% 20%, transparent 21%), linear-gradient(200deg, #ef476f, #ffd166 60%, #7a2e0e); animation-delay: -1s; }
.pro-clip.k4 { background: conic-gradient(from 210deg at 60% 70%, #0a1a3f, #2a5298, #4cc9f0, #1e3c72 55%, #0a1a3f); animation-delay: -3s; }
@keyframes pro-drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-3%, 3%); } }
.pro-clip.on { transform: none; }
.pro-sub { position: absolute; left: 8%; right: 8%; bottom: 20%; z-index: 2; text-align: center; font-weight: 800; font-size: 12px; line-height: 1.15; text-transform: uppercase; }
.pro-sub span { display: inline-block; opacity: 0; transform: translateY(6px); animation: pro-wd .3s ease-out forwards; margin: 0 .14em; color: #d8d8d8; }
.pro-sub span.hl { color: #fff; }
@keyframes pro-wd { to { opacity: 1; transform: none; } }
.pro-ptop { position: absolute; z-index: 2; top: 5%; left: 8%; right: 8%; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; color: #ddd; }
.pro-prog { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: 6%; height: 2px; background: rgba(255, 255, 255, .2); border-radius: 2px; overflow: hidden; }
.pro-prog i { display: block; height: 100%; width: 0; background: #fff; }
/* после оплаты */
.pro-done { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 36px 20px 28px; max-width: 520px; margin: 24px auto 0; width: 100%; }
.pro-ok { width: 56px; height: 56px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; color: #555; transition: background .4s, color .4s, border-color .4s; }
.pro-done:not(.ready) .pro-ok:not(.warn) { animation: pro-pulse 1.6s ease-in-out infinite; }
.pro-done.ready .pro-ok { background: var(--text); color: var(--bg); border-color: var(--text); }
.pro-ok.warn { color: var(--text); }
@keyframes pro-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.pro-done-t { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.pro-done-s { color: var(--mid); font-size: 14px; line-height: 1.5; max-width: 380px; }
.pro-done-b { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; margin-top: 12px; }
.pro-done-b .btn[hidden] { display: none; }
/* компьютер: две независимые колонки, всё на одном экране (вариант 3) */
@media (min-width: 900px) {
  .pro-cols { grid-template-columns: 320px 1fr; gap: 20px; }
  .pro-in { position: sticky; top: 16px; padding-bottom: 14px; }
  .pro-phone { --pw: 170px; }
}
/* телефон: превью маленькое, пакеты короткими строками, кнопка закреплена внизу (вариант 1) */
@media (max-width: 899px) {
  .pro-in { flex-direction: row; align-items: center; padding: 14px 16px; gap: 16px; flex-wrap: nowrap; }
  .pro-in .ed-kicker { display: none; }
  .pro-phone { --pw: 84px; border-radius: 16px; padding: 3px; }
  .pro-scr { inset: 3px; border-radius: 13px; }
  .pro-sub { font-size: 7px; }
  .pro-ptop { display: none; }
  .pro-perks { flex: 1; min-width: 0; }
  .pro-perks .row { min-height: 40px; padding: 5px 0; gap: 10px; }
  .pro-perks .row-icon { width: 28px; height: 28px; border-radius: 8px; }
  .pro-perks .row-sub { display: none; }
  .pro-pk { min-height: 58px; }
  .pro-for { display: none; }
}

/* оплата: почта и кнопка в одной строке справа (компьютер) или кнопка внизу экрана (телефон) */
.pro-pay { display: flex; flex-direction: column; gap: 12px; }
.pro-pay > .btn { display: none; }
@media (min-width: 900px) {
  .pro-pay { flex-direction: row; align-items: flex-end; gap: 12px; }
  .pro-pay .pro-mail { flex: 1; min-width: 0; }
  .pro-pay > .btn { display: inline-flex; flex: 1.1; min-width: 0; }
  .pro-dock { display: none; }
  /* тарифы сеткой в три колонки */
  .pro-packs.card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pro-pk { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 16px 14px; min-height: 0; position: relative; }
  .pro-pk .pro-rd { position: absolute; top: 14px; right: 14px; }
  .pro-pk .pro-nn { font-size: 30px; line-height: 1; letter-spacing: -.03em; flex-direction: column; align-items: flex-start; gap: 6px; }
  .pro-pk .pro-nn small { font-size: 12.5px; }
  .pro-pk .pro-mid { gap: 8px; flex: 0 0 auto; }
  .pro-pk .pro-for { min-height: 32px; }
  .pro-pk .pro-rt { text-align: left; margin-top: auto; border-top: 1px solid var(--divider); padding-top: 10px; width: 100%; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .pro-pk .pro-pr { font-size: 17px; }
}

/* плашка с остатком – в правом верхнем углу шапки, на телефоне тоже, а не отдельной строкой */
.page-head:has(.pro-slot) { flex-wrap: nowrap; align-items: flex-start; }
.page-head:has(.pro-slot) > .grow { min-width: 0; }
.pro-slot { flex: none; padding-top: 4px; }
/* кнопки внизу: сплошной фон, под ними ничего не просвечивает, в том числе в зазоре над нижним меню и под ним */
@media (max-width: 899px) {
  .ed-dock { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ed-dock::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: calc(var(--tabbar-space) + var(--safe-b) + 40px); background: var(--bg); z-index: -1; }
}

/* ─── Проверка распознанного текста: выезжает на экране сборки, фон и волна за ним размываются ─── */
.ed-build > .ed-bld-mid.away, .ed-build > .ed-bld-bot.away { animation: none; opacity: 0; transform: translateY(-12px); pointer-events: none; }
.ed-bld-mid, .ed-bld-bot { transition: opacity .4s ease, transform .4s cubic-bezier(.2, .9, .3, 1); }
.ed-build > .ed-bld-top { pointer-events: none; }                               /* «Edits» и таймер остаются на фоне и размываются вместе с волной */
.ed-lyr { position: absolute; inset: 0; z-index: 6; overflow-y: auto; overscroll-behavior: contain; background: rgba(10, 10, 10, .28);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .9, .3, 1); display: flex; flex-direction: column; }
.ed-lyr.in { opacity: 1; transform: none; }
.ly-in { width: min(720px, 100%); margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 64px) 16px 24px; flex: 1 0 auto; }
.ly-head { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.ly-title { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.ly-sub { color: var(--light); font-size: 13.5px; line-height: 1.45; margin-top: 6px; opacity: .8; }
.ly-list { padding: 0; overflow: hidden; background: rgba(16, 16, 16, .55); border-color: rgba(255, 255, 255, .1); }
.ly-row { border-top: 1px solid rgba(255, 255, 255, .07); transition: background .2s; }
.ly-row:first-child { border-top: 0; }
.ly-main { display: flex; align-items: flex-start; gap: 6px; padding: 8px 6px 8px 8px; }
.ly-row.playing { background: rgba(255, 255, 255, .06); box-shadow: inset 2px 0 0 #fff; }
.ly-t { box-sizing: border-box; background: none; border: 0; border-radius: 9px; color: var(--mid); font: inherit; font-size: 12px; width: 68px; height: 32px; padding: 0 10px; margin: 0; flex: none; align-self: flex-start; text-align: left; outline: 0; font-variant-numeric: tabular-nums; letter-spacing: 0; transition: background .2s, color .2s; }
.ly-t:hover { background: rgba(255, 255, 255, .05); }
.ly-t:focus { background: rgba(255, 255, 255, .1); color: #fff; }
.ly-t.bad { box-shadow: inset 0 0 0 1px var(--danger); }
.ly-text { flex: 1; min-width: 0; line-height: 1.5; font-size: 16px; padding: 4px 8px; margin: 0 2px; outline: 0; border-radius: 8px; word-break: break-word; }
.ly-text:focus { background: rgba(255, 255, 255, .07); }
.ly-w.doubt { border-bottom: 1px dotted var(--mid); padding-bottom: 1px; }
.ly-main .btn-icon { width: 34px; height: 34px; flex: none; color: var(--mid); }
.ly-main .ly-del { opacity: .6; }
.ly-undo { display: none; flex: 1; text-align: left; background: none; border: 0; color: var(--mid); font: inherit; font-size: 14px; padding: 8px 0; cursor: pointer; }
.ly-row.gone .ly-main > :not(.ly-undo) { display: none; }
.ly-row.gone .ly-undo { display: block; }
.ly-add { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--light); font: inherit; font-size: 14px; padding: 13px 16px; cursor: pointer; }
.ly-hint { color: var(--mid); font-size: 12.5px; line-height: 1.45; margin: 12px 2px 0; }
.ly-hint .ly-w { color: var(--light); }
.ly-none { padding: 22px 18px; text-align: center; background: rgba(16, 16, 16, .55); }
.ly-none-t { font: 700 17px var(--display); margin-bottom: 8px; }
.ly-none-s { color: var(--mid); font-size: 14px; line-height: 1.5; }
.ly-dock { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 22px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, rgba(10, 10, 10, .7) 55%, rgba(10, 10, 10, 0)); width: min(720px, 100%); margin: 0 auto; }
@media (min-width: 900px) { .ly-dock { flex-direction: row-reverse; justify-content: flex-start; } .ly-dock .btn { width: auto; padding-inline: 26px; } .ly-title { font-size: 26px; } }
@media (max-width: 480px) { .ly-main { gap: 2px; padding-left: 6px; } .ly-t { width: 64px; padding: 0 8px; } .ly-main .btn-icon { width: 32px; height: 32px; } }
@media (prefers-reduced-motion: reduce) { .ed-lyr { transition: opacity .2s; transform: none; } .ed-bld-mid, .ed-bld-bot { transition: opacity .2s; } }

/* Субтитры на компьютере: предпросмотр слева и не уезжает, настройки справа */
.ed-sub-split > .ed-sub-opts { margin-top: 12px; }
@media (min-width: 900px) {
  .sheet-wide:has(.ed-sub-split) { max-width: 1020px; width: min(1020px, 94vw); }
  .ed-sub-split { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
  .ed-sub-split > .ed-sub-pin { position: sticky; top: 0; margin-top: 0; padding-top: 0; align-self: start; }
  .ed-sub-split > .ed-sub-pin::after { display: none; }
  .ed-sub-split > .ed-sub-pin.ed-pin-min .ed-sub-stage { display: block; }          /* при правке текста видео не сворачиваем: места хватает */
  .ed-sub-split > .ed-sub-opts { margin-top: 0; }
  /* видео почти во всю высоту окна: от шапки до нижних кнопок */
  .ed-sub-split .ed-sub-stage.ed-fmt-9-16 { height: calc(min(88vh, 900px) - 235px); max-height: none; }
  .ed-sub-split .ed-sub-stage.ed-fmt-1-1, .ed-sub-split .ed-sub-stage.ed-fmt-16-9 { width: 100%; max-height: none; }
}

/* «Вид видео» на компьютере: картинка сбоку и не уезжает, настройки рядом */
@media (min-width: 901px) {
  .ed-rows:has(> .ed-vp-wrap) { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .ed-rows:has(> .ed-vp-wrap) > .ed-vp-wrap { grid-column: 1; grid-row: 1 / span 24; position: sticky; top: 12px; align-self: start; padding: 0 12px 0 0; }
  .ed-rows:has(> .ed-vp-wrap) > :not(.ed-vp-wrap) { grid-column: 2; }
  .ed-rows:has(> .ed-vp-wrap) .ed-vp-9-16 { height: min(48vh, 400px); }
  .ed-rows:has(> .ed-vp-wrap) .ed-vp-1-1 { height: auto; width: 100%; max-width: 226px; }
  .ed-rows:has(> .ed-vp-wrap) .ed-vp-16-9 { height: auto; width: 100%; max-width: 226px; }
  .ed-rows:has(> .ed-vp-wrap) .ed-wrap-note { font-size: 12px; text-align: center; }
}

.ed-sub-toggle { border-top: 1px solid var(--divider); padding-top: 12px; }
.ed-flat { padding-top: 0; }

/* Тише: один главный элемент на экране – кнопка «Собрать заново».
   «Вид видео» остаётся плашкой (она группирует), но внутри без линий и обводок, выбранное мягко, а не белой заливкой */
.ed-rows:has(> .ed-vp-wrap) { padding: 18px 18px 10px; }
.ed-rows:has(> .ed-vp-wrap) .ed-vp-opts > .ed-row, .ed-rows:has(> .ed-vp-wrap) .ed-vp-opts > .ed-row + .ed-row { border-top: 0; padding-top: 14px; padding-bottom: 10px; }
.ed-rows:has(> .ed-vp-wrap) .ed-vp-opts > .ed-row:first-child { padding-top: 0; }
.ed-rows:has(> .ed-vp-wrap) .ed-vp-opts > .ed-row > svg { display: none; }                        /* значки у каждого заголовка – лишний шум */
.ed-rows:has(> .ed-vp-wrap) .ed-row-t { font-weight: 500; font-size: .8125rem; color: var(--light); }
.ed-rows:has(> .ed-vp-wrap) .ed-chip { border-color: transparent; background: var(--hover); color: var(--mid); }
.ed-rows:has(> .ed-vp-wrap) .ed-chip-btn.on { background: rgba(255, 255, 255, .14); color: var(--text); border-color: transparent; font-weight: 600; }
.ed-rows:has(> .ed-vp-wrap) .ed-beat-note { color: var(--dim); font-size: .75rem; }
.ed-rows:has(> .ed-vp-wrap) .ed-wrap-note { color: var(--dim); }
/* Остальной экран доски */
.ed-result > .ed-kicker { display: none; }                                             /* «Готовый эдит» повторяет заголовок страницы */
.ed-result-title { font-family: var(--font); font-weight: 600; font-size: .9375rem; color: var(--light); letter-spacing: 0; }
.ed-hc { height: auto; padding: 0; background: transparent; border: 0; color: var(--mid); }   /* «Услышали в треке» – строкой, без шести рамок */
.ed-hc + .ed-hc::before { content: '·'; display: inline; width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; color: var(--dim); margin-right: 8px; }

/* Правая колонка доски на компьютере стоит на месте, крутятся только настройки «Вида видео» */
@media (min-width: 901px) {
  .ed-cl-r:has(.ed-vp-opts) { overflow: hidden; display: flex; flex-direction: column; }
  .ed-cl-r:has(.ed-vp-opts) .ed-adv-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .ed-cl-r:has(.ed-vp-opts) .ed-adv-body { flex: 1; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); row-gap: 12px; }
  .ed-cl-r:has(.ed-vp-opts) .ed-adv-body > .ed-rows { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(150px, 36%, 250px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: 14px; overflow: hidden; }
  .ed-cl-r:has(.ed-vp-opts) .ed-adv-body > .ed-rows > .ed-vp-wrap { grid-column: 1; grid-row: 1; position: static; }
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-opts { grid-column: 2; grid-row: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; padding-right: 6px; }
}

@media (min-width: 901px) {
  .ed-cl-r:has(.ed-vp-opts) .ed-adv-body > .ed-rows { align-items: stretch; }
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-opts { align-self: stretch; height: 100%; }
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap { align-self: start; }
}

/* Подпись лежит в углу окна видео (в интерфейсе, на самом ролике её нет) */
.ed-result-credit { position: absolute; top: 0; left: 0; right: 0; padding: 12px 14px 22px; font-size: .75rem; font-weight: 500; line-height: 1.3; color: rgba(255,255,255,.9); background: linear-gradient(rgba(0,0,0,.6), transparent); pointer-events: none; overflow-wrap: anywhere; text-shadow: 0 1px 6px rgba(0,0,0,.5); z-index: 1; }
@media (min-width: 901px) {
  .ed-cl-l > .ed-result { flex: none; height: 100%; display: flex; flex-direction: column; padding: 14px; }
  .ed-cl-l > .ed-result .ed-result-box { flex: 1; min-height: 0; margin: 0 auto; max-width: 100%; }
  .ed-cl-l > .ed-result .ed-rb-9-16 { height: auto; width: auto; aspect-ratio: 9 / 16; }
}
/* Колонки, которые не прокручиваются целиком: без запаса сверху и снизу, края карточек ровно по колонке */
@media (min-width: 901px) {
  .ed-cl-l:has(.ed-result), .ed-cl-r:has(.ed-vp-opts) { padding: 0; margin: 0; mask-image: none; -webkit-mask-image: none; }
}

/* Подсказка под значком «i» */
.ed-tip { position: relative; display: inline-flex; }
.ed-tip-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--mid); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ed-tip-btn:hover, .ed-tip-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); color: var(--text); }
.ed-tip-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ed-tip-pop { position: absolute; z-index: 20; right: 0; bottom: calc(100% + 8px); width: min(260px, 72vw); padding: 10px 12px; border-radius: 12px; background: var(--raised, #1a1a1a); border: 1px solid var(--border); font-size: .75rem; line-height: 1.4; color: var(--light); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); text-align: left; }
.ed-tip.down .ed-tip-pop { bottom: auto; top: calc(100% + 8px); }
.ed-vp-wrap { position: relative; }
.ed-vp-wrap > .ed-tip { position: absolute; top: 8px; right: 8px; z-index: 2; }
.ed-vp-wrap > .ed-tip .ed-tip-btn { background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .85); }
.ed-result-dl { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 0; }
@media (min-width: 901px) { .ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap { position: relative; } }

@media (min-width: 901px) {
  .ed-board { grid-template-columns: minmax(0, var(--lw, 420px)) minmax(0, 1fr); }
}
@media (min-width: 901px) { .ed-cl-r:has(.ed-vp-opts) .ed-adv-body > .ed-rows > .ed-vp-wrap { position: relative; } }
.ed-vp-wrap .ed-tip-pop { width: min(210px, 90vw); }
.ed-result-credit { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.25; color: var(--text); }
/* «i» у картинки: под ней по центру, подсказка открывается вправо, поверх настроек, а не поверх картинки */
.ed-vp-wrap > .ed-tip { position: relative; top: auto; right: auto; display: flex; width: 30px; margin: 8px auto 0; }
.ed-vp-wrap > .ed-tip .ed-tip-btn { background: rgba(255, 255, 255, .08); color: var(--mid); }
.ed-vp-wrap .ed-tip-pop { left: calc(100% + 10px); right: auto; top: auto; bottom: 0; width: min(220px, 60vw); }
.ed-vp-wrap .ed-tip.down .ed-tip-pop { top: auto; bottom: 0; }
@media (min-width: 901px) {
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-opts { padding-bottom: 16px; }
  .ed-cl-l { scroll-snap-type: y proximity; }
  .ed-cl-l > * { scroll-snap-align: start; }
}
.ed-cl-l { overflow-anchor: none; }
/* Стрелка строки «Субтитры» – у правого края; «i» – в правом верхнем углу картинки-примера */
.ed-row-btn > .ed-row-body { flex: 1; min-width: 0; }
.ed-row-btn > svg:last-child { margin-left: auto; flex: none; }
.ed-vp-wrap > .ed-tip { position: absolute; top: 8px; right: 8px; width: auto; margin: 0; z-index: 2; }
.ed-vp-wrap > .ed-tip .ed-tip-btn { background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .85); }
.ed-vp-wrap .ed-tip-pop, .ed-vp-wrap .ed-tip.down .ed-tip-pop { left: auto; right: 0; top: calc(100% + 8px); bottom: auto; width: min(200px, 60vw); }
.ed-rows > .ed-row-btn { width: 100%; }
.ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap { width: fit-content; max-width: 100%; }
@media (min-width: 901px) {
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap { width: 100%; }
  .ed-cl-r:has(.ed-vp-opts) .ed-vp.ed-vp-9-16 { width: 100%; height: auto; aspect-ratio: 9 / 16; }
}
@media (min-width: 901px) {
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap { width: 100%; padding: 0 12px 0 0; }
  .ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap > .ed-tip { right: 20px; }
}
@media (min-width: 901px) {
  .ed-cl-r:has(.ed-vp-opts) .ed-adv-body > .ed-rows:not(:has(.ed-vp-opts)) { display: block; overflow: visible; }
}
/* Телефон: картинка-пример слева у заголовков, «i» в её правом верхнем углу, отступ до заголовка */
@media (max-width: 900px) {
  .ed-rows > .ed-vp-wrap { width: fit-content; max-width: 100%; padding: 0; align-items: flex-start; margin-bottom: 14px; }
  .ed-rows > .ed-vp-wrap > .ed-tip { right: 8px; }
}
@media (max-width: 900px) { .ed-rows > .ed-vp-wrap .ed-vp-9-16 { height: 222px; } }

/* Кружок «свой цвет» в ряду цвета видео */
.ed-dot { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: inline-block; align-self: center;
  background: conic-gradient(#ff4d4d, #ffb84d, #5ee26b, #4dc9ff, #7a5cff, #ff5cc8, #ff4d4d); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35); }
.ed-dot.on { background: var(--dot, #3b6cff); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.ed-dot-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.ed-dot:focus-within { outline: 2px solid var(--text); outline-offset: 3px; }

/* Цвет видео: прямоугольные образцы вместо подписей. Ч/б – чёрное и белое пополам, остальные – своим цветом */
.ed-sw { flex: none; width: 46px; height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .16); cursor: pointer; padding: 0; background-clip: padding-box; }
.ed-sw:hover { border-color: rgba(255, 255, 255, .4); }
.ed-sw.on { border-color: transparent; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.ed-sw:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.ed-dot { width: 46px; height: 30px; border-radius: 8px; background: linear-gradient(90deg, #ff4d4d, #ffb84d, #5ee26b, #4dc9ff, #7a5cff, #ff5cc8); box-shadow: none; border: 1px solid rgba(255, 255, 255, .16); background-clip: padding-box; }
.ed-dot.on { border-color: transparent; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.ed-sw, .ed-dot { width: 34px; height: 28px; }

/* Свой градиент: образец + пара выбора цвета (тени, света) */
.ed-dot-wrap { display: contents; }
.ed-dot.on { background: var(--dot); }
.ed-grad { flex: 1 1 100%; display: flex; gap: 10px; padding-top: 4px; }
.ed-grad[hidden] { display: none; }
.ed-grad-f { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--mid); cursor: pointer; }
.ed-grad-in { width: 34px; height: 28px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: none; cursor: pointer; }
.ed-grad-in::-webkit-color-swatch-wrapper { padding: 0; }
.ed-grad-in::-webkit-color-swatch { border: 0; border-radius: 7px; }
.ed-grad-in::-moz-color-swatch { border: 0; border-radius: 7px; }

/* Плашка выбора своего цвета: обычная плашка кабинета */
.ed-pk { position: fixed; z-index: 500; width: 236px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); animation: none; }
.ed-pk-seg { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; }
.ed-pk-m { flex: 1; border: 0; background: none; color: var(--dim); font: inherit; font-size: .75rem; padding: 7px 0; border-radius: 8px; cursor: pointer; }
.ed-pk-m.on { background: rgba(255, 255, 255, .14); color: var(--text); font-weight: 600; }
.ed-pk-tabs { display: flex; gap: 6px; }
.ed-pk-tabs[hidden] { display: none; }
.ed-pk-t { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: none; color: var(--dim); font: inherit; font-size: .75rem; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.ed-pk-t.on { color: var(--text); border-color: var(--text); }
.ed-pk-t b { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .2); flex: none; }
.ed-pk-sv { position: relative; height: 96px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.ed-pk-hue { position: relative; height: 12px; border-radius: 6px; cursor: pointer; touch-action: none; background: linear-gradient(90deg, #f33, #fb3, #4d6, #3cf, #74f, #f4a, #f33); }
.ed-pk-sv i, .ed-pk-hue i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); pointer-events: none; }
.ed-pk-hue i { top: 50%; }
.ed-dot.on { background: var(--dot); }
/* Образцы цвета – аккуратные квадраты */
.ed-sw, .ed-dot { width: 30px; height: 30px; border-radius: 8px; }

/* Образцы цвета: заливка во внутреннем блоке, внешний блок скругляет и обрезает – углы не вылезают за грань */
.ed-sw, .ed-dot { position: relative; overflow: hidden; background: none; background-clip: border-box; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; }
.ed-sw.on, .ed-dot.on { background: none; border-color: transparent; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.ed-fill { position: absolute; inset: 0; border-radius: 7px; overflow: hidden; display: block; }
.ed-dot .ed-fill { background: var(--dot, linear-gradient(90deg, #ff4d4d, #ffb84d, #5ee26b, #4dc9ff, #7a5cff, #ff5cc8)); }
.ed-sw.on .ed-fill, .ed-dot.on .ed-fill { inset: -1px; border-radius: 8px; }
/* Подсказка у картинки открывается вправо от её левого края, а не за край экрана */
.ed-vp-wrap > .ed-tip { position: static; }
.ed-vp-wrap > .ed-tip .ed-tip-btn { position: absolute; top: 8px; right: 8px; z-index: 2; }
.ed-vp-wrap .ed-tip-pop, .ed-vp-wrap .ed-tip.down .ed-tip-pop { left: 0; right: auto; top: 46px; bottom: auto; width: min(220px, 80vw); }
@media (min-width: 901px) { .ed-cl-r:has(.ed-vp-opts) .ed-vp-wrap > .ed-tip .ed-tip-btn { right: 20px; } }

/* «Кадры эдита» сворачиваются */
.ed-frames-t { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.ed-frames-t svg { color: var(--mid); transition: transform .2s; }
.ed-frames-t[aria-expanded="true"] svg { transform: rotate(180deg); }
.ed-frames-t:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.ed-frames-body { display: flex; flex-direction: column; gap: 12px; }
.ed-frames-body[hidden] { display: none; }

.ed-fit-note { font-size: .75rem; color: var(--dim); padding-top: 8px; }

/* Страница тарифов: слева превью и список трат кредитов */
.pro-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pro-costs { padding: 14px 16px 6px; display: flex; flex-direction: column; }
.pro-costs .ed-kicker { margin-bottom: 4px; }
.pro-cost { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--divider); }
.pro-costs .ed-kicker + .pro-cost { border-top: 0; }
.pro-cost-n { flex: none; font-size: 12px; color: var(--light); white-space: nowrap; }
.pro-cost-n { display: inline-flex; align-items: center; gap: 5px; }
.pro-cost-n svg { flex: none; }
.pro-cost-w { color: var(--dim); }

/* Выбор бита из каталога (эдит битмейкера) */
.ed-beatpick { display: grid; gap: 6px; max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; }
.ed-bp { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; transition: background .15s ease; -webkit-tap-highlight-color: transparent; }
.ed-bp:hover { background: var(--hover); }
.ed-bp:active { background: var(--raised); }
.ed-bp:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.ed-bp-cv { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--raised); }
.ed-bp-t { display: grid; min-width: 0; }
.ed-bp-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-bp-t span { color: var(--mid); font-size: 12.5px; }

/* Предпросмотр надписи на экране эдита битмейкера */
.ed-tp { margin: 2px 16px 10px; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); display: grid; gap: 4px; text-align: center; }
.ed-tp b { font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: anywhere; }
.ed-tp span { color: var(--light); font-size: .8125rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.ed-tp em { font-style: normal; color: var(--dim); font-size: .75rem; }

/* Чипы «по сетке»: две колонки одинаковой ширины */
.ed-chips.ed-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.ed-chips.ed-grid2 .ed-chip-btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }

/* Выбранный чип в конструкторе надписи: без белой заливки, чтобы не спорить с кнопкой «Создать эдит» – рамка, галочка и подсветка фона */
.ed-chips.ed-grid2 .ed-chip-btn { position: relative; background: transparent; color: var(--mid); border: 1px solid var(--border); transition: background .15s ease, border-color .15s ease, color .15s ease; }
.ed-chips.ed-grid2 .ed-chip-btn.on { background: #2a2a2a; color: var(--text); border-color: transparent; box-shadow: none; }
.ed-chips.ed-grid2 .ed-chip-btn { display: inline-flex; align-items: center; justify-content: center; }

/* Превью для битмейкера: название бита по центру кадра и мелко под ним подпись, как на готовом ролике */
.pro-bt { position: absolute; z-index: 2; left: 6%; right: 6%; top: 50%; transform: translateY(-50%); display: grid; gap: 3px; justify-items: center; text-align: center; opacity: 0; }
.pro-bt.in { animation: pro-bt-in .5s cubic-bezier(.22, 1, .36, 1) forwards; }
.pro-bt b { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: -.02em; line-height: 1.05; color: #fff; }
.pro-bt span { font-size: 6.5px; line-height: 1.3; color: #9a9a9a; letter-spacing: .03em; text-transform: uppercase; }
@keyframes pro-bt-in { from { opacity: 0; transform: translateY(calc(-50% + 6px)); } to { opacity: 1; transform: translateY(-50%); } }
@media (min-width: 900px) { .pro-bt b { font-size: 15px; } .pro-bt span { font-size: 7.5px; } }
@media (max-width: 899px) { .pro-bt b { font-size: 8px; } .pro-bt span { font-size: 4.5px; } }
@media (prefers-reduced-motion: reduce) { .pro-bt, .pro-bt.in { animation: none; opacity: 1; } }

/* Проверка текста при выпуске релиза: тот же экран, но поверх всего кабинета */
.ed-lyr.ds-lyr { position: fixed; z-index: 130; background: #0A0A0A; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Окно UMT +: иконки без плашек */
.pro-perks .row-icon { background: none; border: 0; box-shadow: none; width: 26px; height: 26px; color: var(--light); }
.pro-perks .row { gap: 12px; }

/* ── Edits v2: окна с фото-плитками, «Мои отрывки», три варианта ── */
.v2-look, .v2-subs { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.v2-look { padding: 12px 14px 4px; }
.v2-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-tab { height: 34px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line); color: var(--light); font: inherit; font-size: 0.8125rem; cursor: pointer; text-decoration: none; }
.v2-tab.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.v2-panel { display: flex; flex-direction: column; gap: 10px; }
.v2-grp { font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 4px 2px -2px; }
.v2-hint { font-size: 0.75rem; color: var(--mid); }
.v2-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v2-tile { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 8px 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.v2-tile.on { border: 2px solid var(--text); padding: 7px 7px 9px; }
.v2-tile:active { transform: scale(.98); }
.v2-fr { display: flex; align-items: center; gap: 3px; min-width: 0; }
.v2-f { position: relative; flex: 1; min-width: 0; height: 58px; border-radius: 6px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; font-style: normal; }
.v2-f.big { height: 96px; }
.v2-f img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v2-ar { color: #555; font-size: 10px; font-weight: 400; }
.v2-tw { position: relative; font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap; }
.v2-st { position: relative; max-width: 92%; text-align: center; line-height: 1.1; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); overflow: hidden; }
.v2-nm { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.8125rem; font-weight: 600; }
.v2-nm-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-new, .v2-tag { margin-left: auto; flex: none; font-style: normal; font-size: 10px; font-weight: 600; border-radius: 5px; padding: 1px 5px; }
.v2-new { background: var(--text); color: var(--bg); }
.v2-tag { color: var(--mid); border: 1px solid var(--line); }
.v2-tag + .v2-new { margin-left: 0; }
.v2-dd { font-size: 0.7187rem; color: var(--dim); line-height: 1.35; margin-top: -3px; }
.v2-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v2-font { position: relative; height: 74px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; font: inherit; cursor: pointer; }
.v2-font.on { border: 2px solid var(--text); }
.v2-font-s { font-size: 23px; line-height: 1.1; white-space: nowrap; }
.v2-font small { font-size: 10.5px; color: var(--dim); }
.v2-font .v2-new { position: absolute; top: 5px; right: 5px; font-size: 9px; padding: 0 4px; }
/* фактура и обработка на плитках */
.v2-f.grain::after { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/></filter><rect width='80' height='80' filter='url(%23n)' opacity='.55'/></svg>"); mix-blend-mode: overlay; }
.v2-f.scan::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 3px); }
.v2-f.vig::before { content: ''; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 18px 6px rgba(0, 0, 0, .85); }
.v2-f.dust::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .7) 0 1px, transparent 2px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .6) 0 1px, transparent 2px), radial-gradient(circle at 45% 80%, rgba(255, 255, 255, .5) 0 1px, transparent 2px), radial-gradient(circle at 82% 22%, rgba(255, 255, 255, .5) 0 1px, transparent 2px); }
.v2-f.rgb img { filter: drop-shadow(2px 0 0 rgba(255, 0, 80, .6)) drop-shadow(-2px 0 0 rgba(0, 220, 255, .6)); }
.v2-f.pix img { image-rendering: pixelated; }

/* «Мои отрывки» */
.v2-snips { display: flex; flex-direction: column; gap: 10px; }
.v2-snip { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.v2-snip.on { border-color: var(--text); }
.v2-snip-top { display: flex; align-items: center; gap: 12px; }
.v2-play { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.v2-play.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.v2-snip-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v2-snip-t b { font-size: 0.9375rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-snip-t span { font-size: 0.75rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.v2-wave { position: relative; height: 40px; display: flex; align-items: center; gap: 1.5px; }
.v2-wave i { flex: 1; border-radius: 2px; background: #2a2a2a; }
.v2-wave i.s { background: #6a6a6a; }
.v2-wave i.p { background: var(--text); }
.v2-win { position: absolute; top: -3px; bottom: -3px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 7px; pointer-events: none; }
.v2-quote { display: flex; flex-direction: column; font-size: 0.8437rem; color: var(--light); line-height: 1.5; border-left: 2px solid var(--line); padding-left: 10px; }
.v2-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-chip { font-size: 0.7187rem; padding: 3px 9px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line); color: var(--light); font-variant-numeric: tabular-nums; }
.v2-snip-foot { display: flex; align-items: center; gap: 10px; }
.v2-snip-foot small { flex: 1; font-size: 0.75rem; color: var(--mid); }
.v2-eds { display: flex; }
.v2-eds img, .v2-eds i { width: 26px; height: 38px; border-radius: 6px; object-fit: cover; border: 2px solid var(--card); margin-left: -8px; background: var(--raised); }
.v2-eds > :first-child { margin-left: 0; }
.v2-menu-row { width: 100%; }
.v2-menu-row.danger, .v2-menu-row.danger .ed-row-t { color: var(--danger); }
.v2-edlist { display: flex; flex-direction: column; gap: 8px; }
.v2-edlink { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.v2-edlink img, .v2-edlink i { width: 34px; height: 50px; border-radius: 6px; object-fit: cover; background: var(--raised); }
.v2-edlink span { flex: 1; }
.ed-snip-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ed-snip-q { font-size: 0.8125rem; color: var(--light); border-left: 2px solid var(--line); padding-left: 10px; }
.ly-save { margin-top: 12px; }
.ly-save .input { margin: 0 14px 14px; width: calc(100% - 28px); }

/* мгновенный вид новых анимаций субтитров */
.ed-anim-letters { animation: ed-letters 1.8s steps(14, end) infinite; }
.ed-anim-type { animation: ed-letters 1.8s steps(8, end) infinite; }
.ed-anim-hit { animation: ed-pop 1.2s cubic-bezier(.2, 1.3, .4, 1) infinite; }
.ed-anim-karaoke { animation: ed-karaoke 1.8s linear infinite; }
.ed-anim-shake { animation: ed-shake .5s ease-in-out infinite; }
.ed-anim-wave { animation: ed-wave 1s ease-in-out infinite; }
.ed-anim-wipe { animation: ed-wipe 1.6s cubic-bezier(.3, .7, .3, 1) infinite; }
.ed-anim-float { animation: ed-float 1.8s ease-in-out infinite; }
@keyframes ed-wipe { 0% { clip-path: inset(0 100% 0 0); } 28%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes ed-float { 0%, 12% { opacity: 0; } 25%, 70% { transform: translate(-50%, -50%); opacity: 1; } 100% { transform: translate(-50%, -88%); opacity: 0; } }
@keyframes ed-letters { 0% { clip-path: inset(0 100% 0 0); } 70%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes ed-karaoke { 0% { opacity: .4; } 40%, 100% { opacity: 1; } }
@keyframes ed-shake { 0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); } 50% { transform: translate(-50%, -50%) rotate(2deg); } }
@keyframes ed-wave { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -56%); } }
@media (prefers-reduced-motion: reduce) {
  .v2-tile:active { transform: none; }
  .ed-anim-letters, .ed-anim-type, .ed-anim-hit, .ed-anim-karaoke, .ed-anim-shake, .ed-anim-wave, .ed-anim-wipe, .ed-anim-float { animation: none; }
}
@font-face { font-family: 'UMTSub-Drip'; src: url('/static/fonts/subs/UMTSub-Drip.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Heavy'; src: url('/static/fonts/subs/UMTSub-Heavy.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Yeseva'; src: url('/static/fonts/subs/UMTSub-Yeseva.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Hand'; src: url('/static/fonts/subs/UMTSub-Hand.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Deco'; src: url('/static/fonts/subs/UMTSub-Deco.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Marker'; src: url('/static/fonts/subs/UMTSub-Marker.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Pixel'; src: url('/static/fonts/subs/UMTSub-Pixel.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Ruslan'; src: url('/static/fonts/subs/UMTSub-Ruslan.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Callig'; src: url('/static/fonts/subs/UMTSub-Callig.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Grotesk'; src: url('/static/fonts/subs/UMTSub-Grotesk.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Amatic'; src: url('/static/fonts/subs/UMTSub-Amatic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Oswald'; src: url('/static/fonts/subs/UMTSub-Oswald.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Spray'; src: url('/static/fonts/subs/UMTSub-Spray.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-Monument'; src: url('/static/fonts/subs/UMTSub-Monument.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'UMTSub-PairGeologica'; src: url('/static/fonts/subs/UMTSub-PairGeologica.woff2') format('woff2'); font-display: swap; }

/* Edits v2, чистка: вкладки одним рядом с прокруткой, без лишних линий */
.v2-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.v2-tabs::-webkit-scrollbar { display: none; }
.v2-tab { flex: none; }
.ed-sub-opts .v2-look { padding: 0; }
.ed-sub-pin .ed-vp-wrap { padding: 4px 0 0; }
.ed-sub-toggle .ed-row { min-height: 44px; }
.ed-adv-box.ed-adv-flat { border-top: 0; padding-top: 0; }
.v2-subs .v2-panel > details.ed-group { border-top: 0; padding-top: 0; }
.v2-subs .v2-panel > details.ed-group > summary { display: none; }

/* ═══ Edits v2: редактор «Субтитры» и «Вид видео» (edits_editor.js) ═══ */
body.ed2-open { overflow: hidden; }
.ed2 { position: fixed; inset: 0; z-index: 130; background: var(--bg); will-change: transform; overscroll-behavior: contain; }
.ed2-in { position: relative; height: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; isolation: isolate; user-select: none; -webkit-user-select: none; }
/* iOS: у полей внутри предка с user-select: none клавиатура открывается и тут же закрывается – поля ввода возвращают выделение */
.ed2-in input, .ed2-in textarea, .ed2-in [contenteditable] { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
@media (min-width: 560px) { .ed2-in { border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }
.ed2-amb { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(38px) brightness(.5) saturate(1.5); }
.ed2-top { position: absolute; left: 0; right: 0; top: 0; z-index: 6; padding: max(12px, env(safe-area-inset-top, 0px)) 16px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ed2-tt b { font: 700 17px/1.2 var(--display); letter-spacing: -.01em; }
.ed2-r1 { display: flex; align-items: center; gap: 12px; }
.ed2-capt { display: block; font-size: 12px; color: var(--light); margin-top: 2px; }
.ed2-sw { width: 48px; height: 30px; border-radius: 99px; background: #2a2a2a; position: relative; flex: none; border: 0; padding: 0; cursor: pointer; transition: background .2s cubic-bezier(.32,.72,0,1); }
.ed2-sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #8a8a8a; transition: transform .25s cubic-bezier(.32,.72,0,1), background .2s; }
.ed2-sw::before { content: ''; position: absolute; inset: -8px -4px; }
.ed2-sw[aria-checked='true'] { background: #fff; } .ed2-sw[aria-checked='true']::after { transform: translateX(18px); background: #0A0A0A; }
.ed2-done { height: 44px; padding: 0 20px; border-radius: 12px; background: #fff; color: #0A0A0A; font: inherit; font-weight: 700; font-size: 14px; border: 0; cursor: pointer; transition: transform .1s; }
.ed2-done:active { transform: scale(.96); }
.ed2-stage { position: absolute; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; align-items: flex-start; }
.ed2-stage > .ed-sub-stage, .ed2-stage > .ed2-vs { position: relative; flex: none; max-width: 100%; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .12); background-size: cover; background-position: center; }
.ed2-stage .ed-sub-stage.ed-fmt-9-16, .ed2-stage .ed2-vs-9-16 { height: 100%; width: auto; max-height: none; aspect-ratio: 9 / 16; }
.ed2-stage .ed-sub-stage.ed-fmt-1-1, .ed2-stage .ed2-vs-1-1 { width: min(100%, var(--sh, 300px)); height: auto; max-height: none; aspect-ratio: 1 / 1; }
.ed2-stage .ed-sub-stage.ed-fmt-16-9, .ed2-stage .ed2-vs-16-9 { width: 100%; height: auto; max-height: none; aspect-ratio: 16 / 9; }
.ed2 .ed-live { animation-iteration-count: 2 !important; }
.ed2 .ed-sub-stage:not(.loading):not(.replaying) .ed-live { display: block; visibility: hidden; }
.ed2 .ed-sub-stage.replaying .ed-live { display: block; visibility: visible; }
.ed2 .ed-sub-stage.replaying .ed-sub-video { opacity: .25; }
.ed2 .ed-sub-stage.nosubs .ed-sub-video { visibility: hidden; } .ed2 .ed-sub-stage.nosubs .ed-live { display: none !important; } .ed2 .ed-sub-stage.nosubs .spinner { display: none; }
.ed2-fp { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; background: rgba(10, 10, 10, .86); border: 1px solid #4a4a4a; border-radius: 8px; padding: 3px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; display: flex; gap: 6px; align-items: center; max-width: 92%; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ed2-fp[hidden], .ed2-dash[hidden], .ed2-ring[hidden] { display: none; }
.ed2-fp i { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); flex: none; }
.ed2-dash { position: absolute; z-index: 3; border: 1.5px dashed rgba(255, 255, 255, .6); border-radius: 8px; pointer-events: none; }
.ed2-ring { position: absolute; z-index: 3; border: 2px solid #fff; border-radius: 8px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .2); pointer-events: none; }
.ed2-rep { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; z-index: 5; background: rgba(20, 20, 20, .7); border: 1px solid rgba(255, 255, 255, .18); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .12s; }
.ed2-rep:active { transform: scale(.92); }
.ed2-rep.pulse::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); animation: ed2-ring 1.6s ease-out 3; }
@keyframes ed2-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.ed2-coach { position: absolute; left: 8px; right: 8px; bottom: 60px; z-index: 6; background: rgba(10, 10, 10, .92); border: 1px solid #4a4a4a; border-radius: 12px; padding: 9px 9px 9px 12px; font-size: 12.5px; display: flex; align-items: center; gap: 10px; line-height: 1.3; }
.ed2-coach b { flex: none; color: #0A0A0A; background: #fff; border-radius: 8px; padding: 7px 11px; font-size: 12px; cursor: pointer; }
.ed2-sheet { position: absolute; left: 0; right: 0; z-index: 4; display: flex; flex-direction: column; background: rgba(17, 17, 17, .74); -webkit-backdrop-filter: blur(26px) saturate(165%); backdrop-filter: blur(26px) saturate(165%); border-top: 1px solid rgba(255, 255, 255, .1); border-radius: 22px 22px 0 0; will-change: transform; touch-action: none; }
.ed2-drag { flex: none; cursor: grab; touch-action: none; }
.ed2-gb { width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); margin: 8px auto 0; }
.ed2-ph { height: 60px; padding: 0 16px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.ed2-l1 { display: flex; align-items: center; gap: 10px; min-height: 26px; } .ed2-l1 b { font-size: 15px; }
.ed2-vl { flex: 1; min-width: 0; font-size: 13px; color: var(--light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed2-rs { font: inherit; font-size: 13px; color: #fff; height: 44px; margin: -10px -8px -10px 0; padding: 0 8px; display: flex; align-items: center; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.ed2-rs[hidden] { display: none; }
.ed2-l2 { font-size: 12px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed2-pc { padding: 2px 16px 8px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; touch-action: pan-y; }
.ed2-pc::-webkit-scrollbar { display: none; }
.ed2-body { display: flex; flex-direction: column; gap: 8px; }
.ed2-body.enter { animation: ed2-in .22s cubic-bezier(.32,.72,0,1) both; } .ed2-body.enter.l { --dx: -14px; } .ed2-body.enter.r { --dx: 14px; }
@keyframes ed2-in { from { opacity: 0; transform: translateX(var(--dx, 0)); } to { opacity: 1; transform: none; } }
.ed2-tools { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; background: rgba(14, 14, 14, .78); -webkit-backdrop-filter: blur(26px) saturate(165%); backdrop-filter: blur(26px) saturate(165%); border-top: 1px solid rgba(255, 255, 255, .08); }
.ed2-tg { height: 14px; cursor: grab; touch-action: none; display: flex; align-items: flex-end; justify-content: center; } .ed2-tg i { width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); margin-bottom: 3px; transition: opacity .2s; }
.ed2-tb { display: flex; padding: 0 6px max(14px, var(--safe-b, 0px)); }
.ed2-tl { flex: 1; min-width: 0; height: 60px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mid); font: inherit; font-size: 10.5px; position: relative; border: 0; background: none; cursor: pointer; transition: background .18s cubic-bezier(.32,.72,0,1), color .18s; }
.ed2-tl.on { background: #fff; color: #0A0A0A; font-weight: 700; } .ed2-tl:not(.on):active { background: #1d1d1d; transform: scale(.96); }
.ed2-tl span { white-space: nowrap; }
.ed2-bd { position: absolute; top: 7px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #121212; } .ed2-tl.on .ed2-bd { background: #0A0A0A; border-color: #fff; }
.ed2-ic { display: inline-flex; }
.ed2-snack { position: absolute; left: 16px; right: 16px; bottom: 112px; z-index: 9; background: #232323; border: 1px solid #3a3a3a; border-radius: 14px; padding: 6px 6px 6px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .22s cubic-bezier(.32,.72,0,1), transform .22s cubic-bezier(.32,.72,0,1); }
.ed2-snack.show { opacity: 1; transform: none; pointer-events: auto; }
.ed2-snack button { height: 44px; padding: 0 14px; border-radius: 10px; background: #fff; color: #0A0A0A; font: inherit; font-weight: 700; border: 0; cursor: pointer; } .ed2-snack button[hidden] { display: none; }
.ed2-pager { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ed2-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.ed2-pages::-webkit-scrollbar { display: none; }
.ed2-page { flex: 0 0 100%; scroll-snap-align: start; display: grid; gap: 8px 10px; align-content: start; }
.ed2-g { display: grid; gap: 8px 10px; flex: none; }
.ed2-dots { display: flex; justify-content: center; gap: 6px; height: 8px; } .ed2-dots i { width: 6px; height: 6px; border-radius: 3px; background: #3a3a3a; transition: width .25s cubic-bezier(.32,.72,0,1), background .2s; } .ed2-dots i.on { width: 18px; background: #fff; }
.ed2-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; position: relative; }
.ed2-cp { height: var(--ch, 72px); border-radius: 11px; overflow: hidden; position: relative; background: #000; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: transform .12s cubic-bezier(.32,.72,0,1), border-color .15s; width: 100%; }
.ed2-cell:active .ed2-cp { transform: scale(.96); }
.ed2-cell.on .ed2-cp { border: 2px solid #fff; }
.ed2-cp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ed2-s { position: relative; text-align: center; line-height: 1.05; padding: 0 4px; max-width: 100%; overflow: hidden; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.ed2-cn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.ed2-nw { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 9px; font-weight: 700; background: #fff; color: #0A0A0A; border-radius: 5px; padding: 1px 5px; z-index: 2; }
.ed2-ck { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 6px; background: #fff; color: #0A0A0A; display: flex; align-items: center; justify-content: center; z-index: 2; }
.ed2-fr3 { display: flex; gap: 2px; width: 100%; height: 100%; padding: 3px; } .ed2-fr3 i { flex: 1; border-radius: 4px; background-size: cover; background-position: center; background-color: #000; }
.ed2-seg { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; font-size: 13px; flex: none; }
.ed2-inl .ed2-seg { flex: 1; }
.ed2-seg button { flex: 1; min-height: 34px; text-align: center; border-radius: 8px; color: var(--light); font: inherit; border: 0; background: none; cursor: pointer; transition: background .18s cubic-bezier(.32,.72,0,1), color .18s; }
.ed2-seg button[aria-checked='true'] { background: #2a2a2a; color: #fff; font-weight: 700; } .ed2-seg button:disabled { opacity: .4; cursor: default; }
.ed2-inl { display: flex; align-items: center; gap: 10px; flex: none; min-height: 38px; } .ed2-lb { flex: none; font-size: 13px; color: var(--light); }
.ed2-a1 { font-size: 12px; color: var(--mid); } .ed2-a2 { font-size: 19px; color: var(--mid); }
.ed2-range { position: relative; flex: 1; height: 40px; touch-action: none; cursor: pointer; }
.ed2-tr { position: absolute; left: 0; right: 0; top: 18px; height: 4px; background: #2e2e2e; border-radius: 2px; } .ed2-fl { position: absolute; left: 0; top: 18px; height: 4px; background: #fff; border-radius: 2px; }
.ed2-st { position: absolute; top: 14px; width: 2px; height: 12px; background: #555; margin-left: -1px; border-radius: 1px; }
.ed2-kn { position: absolute; top: 8px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.ed2-sg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px 0; justify-items: center; flex: none; }
.ed2-swc { width: 44px; height: 44px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; color: #0A0A0A; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; transition: transform .12s cubic-bezier(.32,.72,0,1); }
.ed2-swc::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--c, #222); border: 1px solid #3a3a3a; }
.ed2-swc > * { position: relative; } .ed2-swc:active { transform: scale(.92); }
.ed2-swc[aria-checked='true'] { box-shadow: 0 0 0 4px #fff inset; } .ed2-swc[aria-checked='true']::before { inset: 7px; }
.ed2-swc.auto { color: #fff; font-weight: 700; } .ed2-swc input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ed2.comp .ed2-swc { width: 38px; height: 38px; }
.ed2-okl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--light); flex: none; } .ed2-okl i { width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #0A0A0A; display: flex; align-items: center; justify-content: center; flex: none; font-style: normal; font-size: 12px; } .ed2-okl i.w { background: #3a3a3a; color: #fff; }
.ed2-chips { display: flex; gap: 8px; flex: none; flex-wrap: wrap; } .ed2-chip { height: 36px; padding: 0 13px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); font: inherit; font-size: 13px; color: var(--light); display: flex; align-items: center; position: relative; cursor: pointer; } .ed2-chip::after { content: ''; position: absolute; inset: -4px 0; }
.ed2-chip[aria-pressed='true'] { background: #fff; color: #0A0A0A; border-color: #fff; font-weight: 600; }
.ed2-opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 0 14px; height: 64px; flex: none; width: 100%; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ed2-opt[aria-checked='true'] { border: 2px solid #fff; padding: 0 13px; } .ed2-opt b { font-size: 15px; } .ed2-opt span { display: block; font-size: 12.5px; color: var(--mid); font-weight: 400; }
.ed2-opt .rd { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #666; flex: none; display: flex; align-items: center; justify-content: center; } .ed2-opt[aria-checked='true'] .rd { background: #fff; border-color: #fff; color: #0A0A0A; }
.ed2-hint { font-size: 12px; color: var(--mid); flex: none; }
.ed2-lab { font-size: 12px; color: var(--mid); display: flex; justify-content: space-between; flex: none; }
.ed2 .ed-group { border-top: 0; padding-top: 0; } .ed2 .ed-group > summary { display: none; }
.ed2-vs { position: relative; overflow: hidden; border-radius: 16px; background: #000; border: 1px solid rgba(255, 255, 255, .12); isolation: isolate; }
.ed2-vs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .25s; }
.ed2-vs img.b { opacity: 0; } .ed2-vtint { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; }
.ed2-ov { position: absolute; inset: 0; pointer-events: none; display: none; }
.ed2-ov.grain { display: block; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/></filter><rect width='90' height='90' filter='url(%23n)' opacity='.6'/></svg>"); mix-blend-mode: overlay; }
.ed2-ov.vig { display: block; box-shadow: inset 0 0 40px 14px rgba(0, 0, 0, .85); }
.ed2-ov.dust { display: block; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.8) 0 1px, transparent 2px), radial-gradient(circle at 70% 60%, rgba(255,255,255,.7) 0 1px, transparent 2px), radial-gradient(circle at 45% 82%, rgba(255,255,255,.6) 0 1px, transparent 2px), radial-gradient(circle at 82% 20%, rgba(255,255,255,.6) 0 1px, transparent 2px); }
.ed2-ov.scan { display: block; background: repeating-linear-gradient(0deg, rgba(0,0,0,.32) 0 1px, transparent 1px 3px); }
.ed2-ov.flashl { display: block; background: #fff; opacity: 0; } .ed2-ov.blackl { display: block; background: #000; opacity: 0; }
.ed2-vs.mo-push img.a { animation: ed2-m-push 3s ease-in-out both; } .ed2-vs.mo-sway img.a { animation: ed2-m-sway 2.4s ease-in-out 2; } .ed2-vs.mo-ramp img.a { animation: ed2-m-ramp 2.4s ease-out both; } .ed2-vs.mo-rev img.a { animation: ed2-m-rev 3s ease-in-out both; }
@keyframes ed2-m-push { from { transform: scale(1); } to { transform: scale(1.22); } } @keyframes ed2-m-sway { 0%, 100% { transform: rotate(-1.8deg) scale(1.1); } 50% { transform: rotate(1.8deg) scale(1.1); } }
@keyframes ed2-m-ramp { 0% { transform: translateX(34px) scale(1.12); filter: blur(4px); } 35% { transform: none; filter: blur(0); } } @keyframes ed2-m-rev { from { transform: scale(1.22); } to { transform: scale(1); } }
@keyframes ed2-t-flash { 0% { opacity: 0; } 45%, 55% { opacity: 1; } 100% { opacity: 0; } } @keyframes ed2-t-out { 0%, 48% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes ed2-t-fade { from { opacity: 1; } to { opacity: 0; } } @keyframes ed2-t-slide { from { transform: none; } to { transform: translateX(-102%); } } @keyframes ed2-t-whip { from { transform: none; filter: blur(0); } to { transform: translateX(-120%); filter: blur(10px); } }
@keyframes ed2-t-zoom { from { transform: none; opacity: 1; } to { transform: scale(2.4); opacity: 0; } } @keyframes ed2-t-pop { from { clip-path: circle(0 at 50% 50%); } to { clip-path: circle(80% at 50% 50%); } }
@keyframes ed2-t-gl { 0% { filter: none; } 25% { filter: hue-rotate(120deg) saturate(3); transform: translateX(-6px); } 50% { filter: hue-rotate(260deg); transform: translateX(8px) skewX(4deg); } 75% { opacity: .4; } 100% { opacity: 0; } }
@keyframes ed2-b-flash { 0% { opacity: .65; } 100% { opacity: 0; } } @keyframes ed2-b-shake { 0%, 100% { transform: none; } 20% { transform: translate(-5px, 3px) scale(1.04); } 45% { transform: translate(5px, -3px) scale(1.04); } 70% { transform: translate(-3px, 2px) scale(1.03); } }
@keyframes ed2-b-pulse { 0% { transform: scale(1); } 20% { transform: scale(1.09); } 100% { transform: scale(1); } } @keyframes ed2-b-rgb { 0% { filter: hue-rotate(70deg) saturate(2.2); } 100% { filter: none; } } @keyframes ed2-b-freeze { 0%, 40% { filter: contrast(1.5) brightness(1.15); } 100% { filter: none; } }
.ed2 :focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .ed2-sw, .ed2-sw::after, .ed2-seg button, .ed2-tl, .ed2-dots i, .ed2-snack { transition: none !important; } .ed2-body.enter { animation: none; } .ed2-rep.pulse::after { animation: none; } }
@media (prefers-reduced-transparency: reduce) { .ed2-sheet, .ed2-tools { background: #111; -webkit-backdrop-filter: none; backdrop-filter: none; } .ed2-fp, .ed2-rep { backdrop-filter: none; -webkit-backdrop-filter: none; background: #151515; } }
@media (prefers-contrast: more) { .ed2-cp, .ed2-chip, .ed2-opt { border-color: #777; } }

.ed2-in:focus { outline: none; }
.ed2 .ed-sub-stage .spinner { top: 12px; right: 12px; left: auto; bottom: auto; margin: 0; width: 18px; height: 18px; }

.tg-fullscreen .ed2-top { padding-top: calc(max(var(--tg-top, 0px), 96px) + 6px); }
.ed2 .ed-sub-stage:not(.loading):not(.off) { background-image: none !important; }
.ed2 .ed-sc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.ed2 .ed-sub-stage .ed-vp-tint { z-index: 1; }
.ed2 .ed-sub-stage.nosubs .ed-sc { display: none; }

/* плитки: обводка внутри, фото режется по скруглению даже с фильтром (Safari) */
.ed2-cp { isolation: isolate; clip-path: inset(0 round 11px); }
.ed2-cell.on .ed2-cp { border: 1px solid transparent; }
.ed2-cp::after { content: ''; position: absolute; inset: 0; border-radius: 11px; pointer-events: none; z-index: 4; box-shadow: inset 0 0 0 0 #fff; transition: box-shadow .15s; }
.ed2-cell.on .ed2-cp::after { box-shadow: inset 0 0 0 2.5px #fff; }
/* цвет всего видео: ровные круги, выбранный отмечен внутренним кольцом и не режется соседями */
.ed2-body .ed-choice { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 0; padding: 4px 0; }
.ed2-body .ed-sw, .ed2-body .ed-dot { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); box-shadow: none; overflow: hidden; position: relative; isolation: isolate; }
.ed2-body .ed-sw .ed-fill, .ed2-body .ed-dot .ed-fill { position: absolute; inset: 0; border-radius: 50%; }
.ed2-body .ed-sw.on, .ed2-body .ed-dot.on { border-color: transparent; box-shadow: none; }
.ed2-body .ed-sw.on::after, .ed2-body .ed-dot.on::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px rgba(0, 0, 0, .55); z-index: 2; }

.ed-result-wrap { width: 100%; height: 100%; }
.ed-result-miss { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; justify-content: center; height: 100%; min-height: 160px; padding: 20px; background: var(--raised); }
.ed-result-miss span { color: var(--mid); font-size: 0.875rem; }
.ed-vwrap { position: absolute; inset: 0; overflow: hidden; }
.ed-vwrap .ed-sub-video { position: absolute; inset: 0; }
.ed2-vtint.ed2-duo-lo { mix-blend-mode: lighten; }

/* готовый кусок отрисован на устройстве: обработка, цвет и субтитры уже в видео, наложения не нужны */
.ed2 .ed-sub-stage.rendered .ed-sc, .ed2 .ed-sub-stage.rendered .ed2-vtint, .ed2 .ed-sub-stage.rendered .ed2-ov { display: none; }
.ed2 .ed-sub-stage.rendered .ed-vwrap { filter: none !important; }

.ed2 .ed-sub-stage.loading .ed-sub-video { opacity: 1; }

/* плитки эффектов играют сам эффект: видно, что он делает */
.ed2-cp img.fxm { animation: 2.6s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.ed2-cp img.fxm-push { animation-name: fxm-push; }
.ed2-cp img.fxm-sway { animation-name: fxm-sway; animation-duration: 1.8s; }
.ed2-cp img.fxm-ramp { animation-name: fxm-ramp; animation-timing-function: cubic-bezier(.1, .9, .2, 1); animation-duration: 1.6s; }
.ed2-cp img.fxm-rev { animation-name: fxm-push; animation-direction: alternate-reverse; }
.ed2-cp img.fxm-none { animation: none; }
@keyframes fxm-push { from { transform: scale(1); } to { transform: scale(1.4); } }
@keyframes fxm-sway { from { transform: rotate(-4deg) translateX(-5%) scale(1.2); } to { transform: rotate(4deg) translateX(5%) scale(1.2); } }
@keyframes fxm-ramp { 0% { transform: scale(1) translateX(0); } 35% { transform: scale(1.35) translateX(-6%); } 100% { transform: scale(1.5) translateX(-8%); } }

.ed2-trn { position: absolute; inset: 0; display: block; overflow: hidden; }
.ed2-trn i { position: absolute; inset: 0; background-size: cover; background-position: center; display: block; }
.ed2-trn i.a { animation: 2.4s infinite; animation-timing-function: ease-in-out; }
.ed2-trn.fxt-cut i.a { animation-name: fxt-cut; animation-timing-function: steps(1, end); }
.ed2-trn.fxt-fade i.a { animation-name: fxt-fade; }
.ed2-trn.fxt-dissolve i.a { animation-name: fxt-dissolve; }
.ed2-trn.fxt-zoom i.a { animation-name: fxt-zoom; }
.ed2-trn.fxt-slide i.a { animation-name: fxt-slide; }
.ed2-trn.fxt-whip i.a { animation-name: fxt-whip; }
.ed2-trn.fxt-glitch i.a { animation-name: fxt-glitch; animation-timing-function: steps(6, end); }
.ed2-trn.fxt-flash i.a { animation-name: fxt-cut; animation-timing-function: steps(1, end); }
.ed2-trn.fxt-flash::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; animation: fxt-flash 2.4s infinite; }
.ed2-trn.fxt-black i.a { animation-name: fxt-black; }
.ed2-trn.fxt-black::after { content: ''; position: absolute; inset: 0; background: #000; opacity: 0; animation: fxt-flash 2.4s infinite; animation-timing-function: ease-in-out; }
.ed2-trn.fxt-pop i.a { animation: none; }
.ed2-trn.fxt-pop i.b { animation: fxt-pop 2.4s infinite cubic-bezier(.32, .72, 0, 1); z-index: 1; }
@keyframes fxt-cut { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes fxt-fade { 0%, 30% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes fxt-dissolve { 0%, 25% { opacity: 1; filter: blur(0); } 60%, 100% { opacity: 0; filter: blur(3px); } }
@keyframes fxt-zoom { 0%, 30% { opacity: 1; transform: scale(1); } 60%, 100% { opacity: 0; transform: scale(2.2); } }
@keyframes fxt-slide { 0%, 30% { transform: translateX(0); } 60%, 100% { transform: translateX(-100%); } }
@keyframes fxt-whip { 0%, 30% { transform: translateX(0); filter: blur(0); } 50% { filter: blur(5px); } 60%, 100% { transform: translateX(-110%); filter: blur(5px); } }
@keyframes fxt-glitch { 0%, 30% { transform: none; opacity: 1; } 36% { transform: translateX(8%) skewX(10deg); filter: hue-rotate(90deg); } 44% { transform: translateX(-10%); filter: hue-rotate(200deg); } 52%, 100% { opacity: 0; } }
@keyframes fxt-flash { 0%, 38% { opacity: 0; } 50% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes fxt-black { 0%, 25% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes fxt-pop { 0%, 30% { transform: scale(0); } 60%, 100% { transform: scale(1); } }

.ed2-cp img.fxb { animation: 1s infinite; transform-origin: 50% 50%; }
.ed2-cp img.fxb-flash { animation-name: fxb-flash; }
.ed2-cp img.fxb-shake { animation-name: fxb-shake; animation-duration: .5s; }
.ed2-cp img.fxb-zoom { animation-name: fxb-zoom; }
.ed2-cp img.fxb-freeze { animation-name: fxb-freeze; animation-timing-function: steps(1, end); }
.ed2-cp img.fxb-rgb { animation-name: fxb-rgb; }
@keyframes fxb-flash { 0% { filter: brightness(2.2); } 40%, 100% { filter: brightness(1); } }
@keyframes fxb-shake { 0%, 100% { transform: scale(1.08) translate(0, 0); } 25% { transform: scale(1.08) translate(-4%, 3%); } 50% { transform: scale(1.08) translate(3%, -3%); } 75% { transform: scale(1.08) translate(-2%, -2%); } }
@keyframes fxb-zoom { 0% { transform: scale(1.3); } 45%, 100% { transform: scale(1); } }
@keyframes fxb-freeze { 0% { transform: scale(1); } 15% { transform: scale(1.04); } 20%, 60% { transform: scale(1.04); filter: contrast(1.3) grayscale(.5); } 61%, 100% { transform: scale(1.1); filter: none; } }
@keyframes fxb-rgb { 0% { filter: hue-rotate(110deg) saturate(2.4); } 45%, 100% { filter: none; } }
@media (prefers-reduced-motion: reduce) { .ed2-cp img.fxm, .ed2-cp img.fxb, .ed2-trn i, .ed2-trn::after { animation: none !important; } }

.ed2-tg { height: 26px; }
.ed2-tools { touch-action: pan-x; }
.ed2-tools .ed2-tg { touch-action: none; }
.ed2-stage { cursor: pointer; transition: opacity .18s ease-out; }
/* «Текст» и открытая клавиатура: без видео, панель от самого верха, сверху значок «Сохранить», список плавно уходит в градиент */
.ed2-drag { position: relative; }
.ed2-save { display: none; position: absolute; right: 16px; top: max(12px, env(safe-area-inset-top, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: #fff; color: #0A0A0A; place-items: center; cursor: pointer; transition: transform .1s; z-index: 2; }
.ed2-save:active { transform: scale(.94); }
.ed2-save svg { width: 20px; height: 20px; stroke-width: 2.6; }
.ed2.full .ed2-stage, .ed2.full .ed2-top { opacity: 0; pointer-events: none; }
.ed2.full .ed2-sheet { border-radius: 0; border-top: 0; background: rgba(14, 14, 14, .92); }
.ed2.full .ed2-gb { display: none; }
.ed2.full .ed2-ph { height: auto; min-height: 60px; padding: max(12px, env(safe-area-inset-top, 0px)) 76px 10px 16px; }
.ed2.full .ed2-save { display: grid; }
/* под кнопками Telegram («Назад», «˅», «···»): как у шапки редактора */
.ed2.full .ed2-ph { padding-top: calc(10px + max(var(--tg-top, 0px), env(safe-area-inset-top, 0px))); }
.ed2-save { top: calc(6px + max(var(--tg-top, 0px), env(safe-area-inset-top, 0px))); }
.tg-fullscreen .ed2.full .ed2-ph { padding-top: calc(max(var(--tg-top, 0px), 96px) + 6px); }
.tg-fullscreen .ed2-save { top: calc(max(var(--tg-top, 0px), 96px) + 2px); }
.ed2.full .ed2-pc { padding-top: 12px; padding-bottom: 40px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 36px), transparent 100%); }
@media (prefers-reduced-motion: reduce) { .ed2-stage { transition: none; } }
/* пока собирается новый кусок: никакого старого кадра и быстрых примеров – только индикатор загрузки по центру */
.ed2 .ed-sub-stage.loading:not(.quick) .ed-vwrap, .ed2 .ed-sub-stage.loading:not(.quick) .ed-sc, .ed2 .ed-sub-stage.loading:not(.quick) .ed2-vtint,
.ed2 .ed-sub-stage.loading:not(.quick) .ed2-ov, .ed2 .ed-sub-stage.loading:not(.quick) .ed-live { visibility: hidden; }
.ed2 .ed-sub-stage.loading .spinner { top: 50%; left: 50%; right: auto; bottom: auto; margin: -14px 0 0 -14px; width: 28px; height: 28px; z-index: 6; }

/* Экран готового эдита на телефоне (Edits v2): видео слева, три настройки справа, всё на одном экране */
.ed2b { gap: 10px; }
.ed2b-mid { display: flex; gap: 12px; align-items: stretch; }
.ed2b-vid { position: relative; flex: none; width: 169px; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--border); align-self: flex-start; }
.ed2b-9-16 { aspect-ratio: 9 / 16; } .ed2b-1-1 { aspect-ratio: 1 / 1; } .ed2b-16-9 { aspect-ratio: 16 / 9; }
.ed2b-vid .ed-result-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed2b-vid .ed-result-video { width: 100%; height: 100%; max-height: none; object-fit: contain; display: block; }
.ed2b-vid .ed-result-miss { padding: 12px; min-height: 0; font-size: .8rem; }
.ed2b-credit { position: absolute; left: 10px; right: 10px; bottom: 8px; font: 600 .72rem var(--font); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed2b-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.ed2b-state { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.ed2b-state b { font: 700 .9rem var(--display); letter-spacing: -.02em; } .ed2b-state span { font-size: .76rem; color: var(--mid); line-height: 1.35; }
.ed2b-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ed2b-tile { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 64px; background: var(--raised); border: 1px solid var(--border); border-radius: 18px; color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none; transition: transform .12s cubic-bezier(.32, .72, 0, 1); }
.ed2b-tile:active { transform: scale(.97); } .ed2b-tile > svg:first-child { color: var(--mid); flex: none; } .ed2b-tile > svg:last-child { color: var(--dim); flex: none; margin-left: auto; }
.ed2b-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .ed2b-nm { font-weight: 600; font-size: .9rem; }
.ed2b-vl, .ed2b-tx .ed-row-d { font-size: .76rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ed2b-share { display: flex; gap: 8px; } .ed2b-sbtn { flex: 1; height: 46px; border-radius: 14px; background: var(--raised); border: 1px solid var(--border); color: var(--text); font: 500 .85rem var(--font); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.ed2b-sbtn:active { transform: scale(.97); }
.ed2b-heard { display: flex; align-items: flex-start; gap: 8px; background: none; border: 0; padding: 0 2px; color: var(--dim); font: 400 .78rem/1.4 var(--font); text-align: left; cursor: pointer; }
.ed2b-heard .ed-heard-ico { flex: none; margin-top: 1px; color: var(--dim); } .ed2b-heard > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed2b-heard.open > span { white-space: normal; }
.ed2b .ed-frames { margin: 0; }
@media (max-height: 720px) { .ed2b-vid { width: 138px; } .ed2b-tile { min-height: 52px; padding: 0 10px; gap: 10px; } .ed2b-sbtn { height: 40px; } }

.ed2b-frames { padding: 12px 0 12px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ed2b-fh { display: flex; align-items: center; justify-content: space-between; padding-right: 12px; }
.ed2b-order { display: flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--mid); font: 500 .8125rem var(--font); cursor: pointer; padding: 6px 4px; min-height: 36px; }
.ed2b-order svg { transition: transform .2s; } .ed2b-order[aria-expanded='true'] svg { transform: rotate(180deg); }
.ed2b-strip { display: flex; gap: 8px; overflow-x: auto; padding-right: 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.ed2b-strip::-webkit-scrollbar { display: none; }
.ed2b-fr { flex: none; width: 62px; display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--mid); scroll-snap-align: start; transition: transform .12s cubic-bezier(.32, .72, 0, 1); }
.ed2b-fr:active { transform: scale(.95); }
.ed2b-fr img, .ed2b-fe { width: 62px; height: 92px; border-radius: 10px; object-fit: cover; background: var(--raised2, #1c1c1c); border: 1px solid var(--border); display: block; }
.ed2b-ft { font: 500 .7rem var(--font); font-variant-numeric: tabular-nums; text-align: center; color: var(--dim); }
.ed2b-frames .ed-frames-body { padding-right: 12px; }
@media (max-height: 720px) { .ed2b-fr { width: 54px; } .ed2b-fr img, .ed2b-fe { width: 54px; height: 80px; } }

.ed2b-share { align-items: center; gap: 10px; }
.ed2b-sent { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: .8125rem; line-height: 1.3; padding-left: 2px; }
.ed2b-sent svg { flex: none; color: var(--mid); }
.ed2b-dl { flex: none; width: 150px; background: #fff; color: #0A0A0A; border-color: #fff; }
.ed2b-wide { flex: 1; }
/* лента кадров занимает оставшуюся высоту экрана: на высоких телефонах кадры крупнее, пустоты нет */
.ed2b-fr img, .ed2b-fe { height: clamp(92px, 11.5vh, 150px); width: auto; aspect-ratio: 9 / 16; }
.ed2b-fr { width: auto; }
@media (max-height: 720px) { .ed2b-fr img, .ed2b-fe { height: 80px; } }
/* аудит apple-design: на экране одна главная кнопка (белая «Собрать»), остальное вторично; цель нажатия не меньше 44 px; край ленты намекает, что её можно листать */
.ed2b-dl { background: var(--raised); color: var(--text); border-color: var(--border); }
.ed2b-order { min-height: 44px; }
.ed2b-strip { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
@media (prefers-reduced-motion: reduce) { .ed2b-tile, .ed2b-fr, .ed2b-sbtn, .ed2b-order svg { transition: none; } }

/* вариант B, вторая итерация: видео крупнее на всю высоту, три плитки столбцом, карточки кадров нет */
.ed2b-vid { width: min(212px, 25vh); }
.ed2b-tile { padding: 0 12px; gap: 10px; min-height: 0; align-items: flex-start; flex-direction: column; justify-content: center; }
.ed2b-tile > svg:first-child { margin-top: 0; }
.ed2b-tx { gap: 3px; width: 100%; }
.ed2b-deck { display: flex; margin-top: 8px; }
.ed2b-deck img { width: 30px; height: 44px; object-fit: cover; border-radius: 7px; border: 2px solid var(--raised); margin-left: -12px; background: #000; }
.ed2b-deck img:first-child { margin-left: 0; }
.ed2b-sbtn.ok { color: var(--mid); } .ed2b-sbtn.ok svg { color: #7bd88f; }
.ed2b-dl { background: var(--raised); }
.ed2b-order-row { align-items: center; min-height: 44px; border-top: 1px solid var(--border); padding-top: 4px; }
.ed2b-order-row > span { flex: 1; white-space: nowrap; }
@media (max-height: 720px) { .ed2b-vid { width: 138px; } .ed2b-deck { display: none; } }
.ed2b-vid { width: min(228px, 27vh); }
.ed2b-tile { position: relative; overflow: hidden; }
.ed2b-deck { position: absolute; top: 12px; right: 10px; margin: 0; }
.ed2b-deck img { width: 22px; height: 32px; border-radius: 6px; margin-left: -10px; }
@media (max-height: 720px) { .ed2b-vid { width: 138px; } }

/* одна сетка: ширина видео задаёт и колонку действий под ним */
.ed2b { --vw: min(228px, 27vh); }
.ed2b-vid { width: var(--vw); }
.ed2b-share { display: grid; grid-template-columns: var(--vw) minmax(0, 1fr); gap: 12px; }
.ed2b-order-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--mid); }
/* слот видео всегда один и тот же (9:16): квадратное и горизонтальное видео вписывается в него с полями, экран выглядит одинаково при любом формате */
.ed2b-vid .ed-result-video { object-fit: contain; background: #000; }
@media (max-height: 720px) { .ed2b { --vw: 138px; } }

/* плитки: крупные, значок в кружке сверху, название и значение внизу; видео больше и со свечением из его же кадра */
.ed2b { --vw: min(236px, 28.5vh); }
.ed2b-slot { position: relative; flex: none; width: var(--vw); align-self: flex-start; }
.ed2b-slot .ed2b-vid { width: 100%; position: relative; z-index: 1; }
.ed2b-amb { position: absolute; inset: -14px -10px; z-index: 0; background-size: cover; background-position: center; filter: blur(26px) saturate(1.6); opacity: .6; border-radius: 30px; pointer-events: none; }
.ed2b-tile { justify-content: space-between; align-items: flex-start; padding: 12px 12px 12px; gap: 0; }
.ed2b-tile > svg:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--raised2, #1c1c1c); color: var(--text); }
.ed2b-tx { gap: 3px; width: 100%; }
.ed2b-nm { font-size: .92rem; line-height: 1.15; }
.ed2b-vl, .ed2b-tx .ed-row-d { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.25; }
.ed2b-deck { top: 12px; right: 10px; }
.ed2b-share { grid-template-columns: var(--vw) minmax(0, 1fr); }
@media (max-height: 720px) { .ed2b { --vw: 138px; } .ed2b-amb { filter: blur(20px) saturate(1.5); } }

/* что услышали: тихий блок без карточки, метки в два ряда, занимает свободное место под кнопками */
.ed2b-tags { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 0; }
.ed2b-tags-h { display: flex; align-items: center; gap: 8px; font: 600 .72rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ed2b-tags-h .ed-heard-ico { color: var(--dim); display: inline-flex; } .ed2b-tags-h svg { width: 16px; height: 16px; }
.ed2b-tags-l { display: flex; flex-wrap: wrap; gap: 6px; }
.ed2b-tag { font: 500 .78rem var(--font); color: var(--mid); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; line-height: 1.2; }
.ed2b-tags-l { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); justify-content: start; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
.ed2b-tags-l::-webkit-scrollbar { display: none; }
.ed2b-tag { white-space: nowrap; }
.ed2b-amb { inset: -22px -18px; filter: blur(30px) saturate(1.9) brightness(1.7); opacity: .85; }

/* Экран готового эдита в стиле редакторов (Edits v2, телефон): сцена с видео и стеклянная панель инструментов */
.ed3b { gap: 12px; }
.ed3b-stage { position: relative; flex: none; height: calc(var(--sh) + 28px); border-radius: 26px; overflow: hidden; background: var(--raised); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; --sh: clamp(280px, 44.5vh, 430px); }
.ed3b-amb { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(30px) saturate(1.8) brightness(1.5); opacity: .8; }
.ed3b-slot { position: relative; height: var(--sh); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); z-index: 1; }
.ed3b-vid { position: absolute; inset: 0; }
.ed3b-vid .ed-result-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed3b-vid .ed-result-video { width: 100%; height: 100%; max-height: none; object-fit: contain; display: block; background: #000; }
.ed3b-vid .ed-result-miss { padding: 12px; min-height: 0; font-size: .8rem; }
.ed3b-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.ed3b-state { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.ed3b-state b { font: 700 .9rem var(--display); letter-spacing: -.02em; } .ed3b-state span:not(.spinner) { font-size: .78rem; color: var(--mid); line-height: 1.35; }
.ed3b-chip { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: rgba(20, 20, 20, .66); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: 500 .78rem var(--font); cursor: pointer; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ed3b-chip.ok svg { color: #7bd88f; } .ed3b-chip:active { transform: scale(.96); }
.ed3b-tools { flex: none; display: flex; gap: 2px; padding: 6px; border-radius: 24px; background: rgba(28, 28, 28, .72); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
.ed3b-tool { flex: 1 1 0; min-width: 0; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 4px; border: 0; border-radius: 18px; background: none; color: var(--mid); font: inherit; text-decoration: none; cursor: pointer; transition: transform .12s cubic-bezier(.32, .72, 0, 1), background .15s; }
.ed3b-tool:active { transform: scale(.95); background: rgba(255, 255, 255, .08); }
.ed3b-tool svg { color: var(--text); margin-bottom: 2px; }
.ed3b-n { font: 600 .78rem var(--font); color: var(--text); white-space: nowrap; }
.ed3b-v { font: 400 .68rem/1.2 var(--font); color: var(--dim); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; display: block; }
.ed3b-why { display: flex; gap: 10px; align-items: flex-start; background: none; border: 0; padding: 0 2px; color: var(--dim); font: 400 .8rem/1.4 var(--font); text-align: left; cursor: pointer; }
.ed3b-why svg { margin-top: 2px; flex: none; } .ed3b-why b { color: var(--mid); font-weight: 500; }
.ed3b-why span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } .ed3b-why.open span { -webkit-line-clamp: unset; }
@media (max-height: 720px) { .ed3b-stage { --sh: 230px; } .ed3b-tool { min-height: 64px; } }
@media (prefers-reduced-motion: reduce) { .ed3b-tool, .ed3b-chip { transition: none; } }

/* Вариант E3: сцена на весь экран. Заголовок на сцене, видео по центру, стеклянная панель внизу сцены */
.ed3b { gap: 0; }
.ed3b-stage { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; height: auto; min-height: 0; border-radius: 28px; padding: 0 0 10px; --sh: clamp(300px, 55.5vh, 520px); }
.ed3b-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px 8px; }
.ed3b-back { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--mid); border-radius: 50%; text-decoration: none; flex: none; }
.ed3b-h { font: 800 1.2rem/1.1 var(--display); letter-spacing: -.03em; margin: 0; }
.ed3b-meta { margin-left: auto; font: 400 .78rem var(--font); color: var(--mid); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed3b-mid { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 4px 0 10px; }
.ed3b-chips { position: absolute; left: 12px; right: 12px; top: 56px; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.ed3b-chips > * { pointer-events: auto; }
.ed3b-chip.match { position: static; margin-right: auto; }
.ed3b-chip.match svg { color: #fff; }
.ed3b-chips .ed3b-chip { position: static; }
.ed3b-stage .ed3b-tools { margin: 0 10px; position: relative; z-index: 2; }
@media (max-height: 720px) { .ed3b-stage { --sh: 230px; } }

/* заголовок страницы снова сверху; окно сцены ниже и заполняет экран до кнопки */
.ed3b { gap: 12px; }
.ed3b-stage { --sh: clamp(300px, 51.2vh, 520px); padding-top: 12px; }
.ed3b-chips { top: 22px; }

/* без линии над кнопкой «Собрать»: сцена и кнопка читаются одним экраном */
.ed3b .ed-dock { border-top: 0; box-shadow: none; }

/* градиент Paper Shaders лежит под всем содержимым сцены; без WebGL остаётся размытый кадр */
.ed3b-stage { isolation: isolate; }
.ed3b-amb { z-index: -2; }
.ed3b-stage > .live-gl { z-index: -1; }
.ed3b-chip { white-space: nowrap; }
@media (max-width: 380px) { .ed3b-chip { font-size: .72rem; padding: 0 10px; gap: 4px; } }

/* всё поместилось на экран: страница не прокручивается */
html.ed3b-lock, html.ed3b-lock body { overflow: hidden; overscroll-behavior: none; height: 100%; }

/* без прыжка при загрузке: сцена невидима, пока не подогнана по высоте; дальнейшие подгонки плавные */
.ed3b-stage { transition: opacity .25s ease; }
.ed3b-stage.ed3b-fit { opacity: 0; }
.ed3b-slot { transition: height .2s ease; }
/* углы не торчат: iOS не обрезает по скруглению слои WebGL, видео и размытие, поэтому режем явно */
.ed3b-stage { clip-path: inset(0 round 28px); -webkit-mask-image: -webkit-radial-gradient(white, black); transform: translateZ(0); }
.ed3b-slot { clip-path: inset(0 round 18px); -webkit-mask-image: -webkit-radial-gradient(white, black); transform: translateZ(0); }
.ed3b-tools { clip-path: inset(0 round 24px); }
@media (prefers-reduced-motion: reduce) { .ed3b-stage, .ed3b-slot { transition: none; } }

/* под видео обычный серый градиент с прозрачностью, без цветного фона */
.ed3b-stage { background: linear-gradient(165deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .06) 55%, rgba(255, 255, 255, .10) 100%), var(--bg); border: 1px solid rgba(255, 255, 255, .08); }

/* Экран эдита (Edits v2, телефон): размер сцены задаёт вёрстка, а не JS. Блок страницы ровно по высоте окна, сцена занимает всё между
   заголовком и кнопкой «Собрать», видео сразу нужного размера. */
.main:has(> .ed3b) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; box-sizing: border-box; overflow: hidden; }
.ed3b { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding-bottom: 60px; gap: 12px; }
.ed3b .page-head { flex: none; }
.ed3b-stage { flex: 1 1 0; min-height: 0; height: auto; --sh: 0px; }
.ed3b-mid { flex: 1 1 0; min-height: 0; padding: 4px 0 10px; align-items: stretch; }
.ed3b-slot { height: 100%; max-width: 100%; align-self: center; transition: none; }
.ed3b-stage { transition: none; }
@media (prefers-reduced-motion: reduce) { .ed3b-stage, .ed3b-slot { transition: none; } }

/* серо-чёрный градиент Paper Shaders лежит под сценой; пока он грузится или нет WebGL, виден спокойный серый */
.ed3b-stage > .live-gl { z-index: -1; opacity: .9; }
/* чёрный градиент снизу сцены: под панелью инструментов тёмно, подписи читаются */
.ed3b-stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 45%, rgba(0, 0, 0, 0) 100%); }
.ed3b-stage .ed3b-tools { background: rgba(14, 14, 14, .62); }
/* темнее: градиент приглушён, чёрный снизу плотнее */
.ed3b-stage > .live-gl { opacity: .5; }
.ed3b-stage { background: linear-gradient(165deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .04) 100%), var(--bg); }
.ed3b-stage::after { height: 55%; background: linear-gradient(to top, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .82) 45%, rgba(0, 0, 0, 0) 100%); }

/* компьютер: тот же экран, что на телефоне, колонкой по центру; сцена занимает высоту окна, кнопка «Собрать» под ней */
@media (min-width: 901px) {
  .main:has(> .ed3b) { display: block; height: auto; overflow: visible; }
  .ed3b { max-width: 560px; width: 100%; margin: 0 auto; height: calc(100vh - 76px); min-height: 560px; padding-bottom: 0; display: flex; flex-direction: column; gap: 12px; }
  .ed3b > .ed-dock { position: static; flex: none; width: auto; max-width: none; padding: 0; background: none; border: 0; box-shadow: none; }
  .ed3b > .ed-dock::after { display: none; }
  .ed3b > .ed-dock .btn { height: 56px; }
}
@media (min-width: 901px) {
  .ed-page.ed-board.ed3b { max-width: 520px; width: 100%; margin-inline: auto; display: flex; flex-direction: column; grid-template-columns: none; height: calc(100vh - 76px); }
}

/* Отправка готового эдита в фоне: тонкая полоска у нижнего края, видна на любом экране (js/sendbg.js) */
.send-strip { position: fixed; left: 0; right: 0; bottom: 0; height: 3px; z-index: 70; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: rgba(255, 255, 255, .08); }
.send-strip.on { opacity: 1; }
.send-strip i { display: block; height: 100%; background: rgba(255, 255, 255, .85); transform-origin: left; transform: scaleX(.02); transition: transform .5s cubic-bezier(.2, .9, .3, 1); }
.send-strip.bad i { background: var(--danger, #ff6b5e); }
.send-strip.busy i { animation: send-breath 1.6s ease-in-out infinite; }
@keyframes send-breath { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .send-strip, .send-strip i { transition: none; } .send-strip.busy i { animation: none; } }

/* Пополнение базы клипов: награда – главное в шторке */
.ct-info { display: flex; flex-direction: column; gap: 14px; }
.ct-reward { border: 1px solid var(--border); border-radius: 16px; background: var(--raised); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ct-reward-t { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.ct-reward-d { font-size: 12.5px; color: var(--mid); }
.ct-pips { display: flex; gap: 6px; }
.ct-pips i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.ct-pips i.on { background: var(--text); }
.ct-how { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--light); }
.ct-stats { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ct-stats:empty { display: none; }
.ct-chip { font-size: 12.5px; color: var(--mid); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.ct-chip b { color: var(--text); font-weight: 600; }
.ct-more { font-size: 12px; color: var(--dim); }
.ct-list { max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; }
/* Кнопка «+» внутри поля ссылки: поле 48 px, кнопка 36 px, по 6 px зазора сверху, снизу и справа */
.ct-field { position: relative; }
.ct-field .input { height: 48px; padding-top: 0; padding-bottom: 0; padding-right: 54px; }
.ct-add { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: #e9e9e9; color: #0a0a0a; display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform .12s ease-out, opacity .12s; }
.ct-add:active { transform: scale(.94); }
.ct-add:disabled { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .ct-add { transition: none; } }

/* Карточка внизу экрана: строки как в меню выше; у «Заработайте кредит» справа три полоски прогресса */
.ct-pips-sm { width: 44px; flex: none; }
.ct-pips-sm i { height: 4px; }
/* Недавние эдиты: компактная лента, без второй строки подписи */
.ed-drop1 .ed-recent .ed-rc-d { display: none; }
.ed-drop1 .ed-recent .ed-rc { flex-basis: 92px; }

/* Зона загрузки: живой градиент-шейдер на фоне (js/shader_bg.js); содержимое поверх */
.ed-drop { position: relative; overflow: hidden; isolation: isolate; }
.ed-drop-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; border-radius: inherit; pointer-events: none; }
.ed-more-card > .ed-row-btn { padding: 0; }

/* «Искра» вместо ноты в зоне загрузки: без круга и подложки. Только transform и opacity */
.ed-drop-ico.ed-spark { width: 72px; height: 72px; border: 0; background: none; border-radius: 0; animation: none; margin-bottom: 8px; }
.ed-spark svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ed-spark path { transform-box: fill-box; transform-origin: center; }
.ed-spark .sp-big { animation: ed-sp-big 3s ease-in-out infinite; }
.ed-spark .sp-a { animation: ed-sp-small 1.6s ease-in-out infinite; }
.ed-spark .sp-b { animation: ed-sp-small 1.6s ease-in-out -.8s infinite; }
@keyframes ed-sp-big { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.82) rotate(18deg); } }
@keyframes ed-sp-small { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
.ed-track.ed-over .ed-drop-ico.ed-spark { transform: scale(1.15); background: none; color: inherit; }
.ed-track.ed-over .ed-spark .sp-big { animation-duration: 1.2s; }
.ed-track.ed-over .ed-spark .sp-a, .ed-track.ed-over .ed-spark .sp-b { animation-duration: .7s; }
@media (prefers-reduced-motion: reduce) { .ed-spark path { animation: none; } }

/* Короткое пояснение под названием в строке с переключателем: на узком экране переносится, а не обрезается многоточием */
.ed-row-body .ed-wrap-d { white-space: normal; overflow: visible; text-overflow: clip; }

/* Выбранный отрывок: содержимое «открытого файла» – первые строки текста в той же плашке, что волна у загруженного трека */
.ed-snip-lines { background: var(--raised); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: .875rem; line-height: 1.4; color: var(--light); }
.ed-snip-lines div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-snip-lines div:nth-child(n+3) { color: var(--mid); }
.ed-snip-lines div:nth-child(n+4) { color: var(--dim); }

/* Клавиатура: панель инструментов плавно уезжает вниз, после закрытия клавиатуры так же возвращается; шторка опускается на её место сразу, без анимации высоты: окно в это время само меняет размер, и две анимации подряд дают скачок */
.ed2-tools { transition: transform .26s cubic-bezier(.32, .72, 0, 1), opacity .2s ease-out; }
.ed2.kb .ed2-tools { transform: translate3d(0, 100%, 0); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ed2-tools { transition: none; } }

/* ── Публикация эдитов: шторка с иконками площадок (js/views/edits_publish.js) ─────────────────────────────────────────────── */
.pub { display: grid; gap: 0; }
.pub-intro { font-size: .8125rem; line-height: 1.5; margin: 0 0 14px; color: var(--mid); }
.pub-ib { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--light); background: none; border: 0; cursor: pointer; transition: transform .12s ease-out, background .2s, color .2s; }
.pub-ib:active { transform: scale(.92); background: #262626; }
.pub-ib.on { background: #fff; color: #0A0A0A; }
.pub-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pub-t { position: relative; width: 100%; min-width: 0; aspect-ratio: 1 / 1; border-radius: 22px; background: var(--card); border: 1.5px solid var(--border); display: grid; place-items: center; color: #fff; cursor: pointer; padding: 0;
  transition: transform .45s cubic-bezier(.32, .72, 0, 1), border-color .25s, background .25s, color .25s; animation: pub-pop .55s cubic-bezier(.32, .72, 0, 1) backwards; }
.pub-t:nth-child(2) { animation-delay: 60ms; } .pub-t:nth-child(3) { animation-delay: 120ms; } .pub-t:nth-child(4) { animation-delay: 180ms; }
.pub-t:active { transform: scale(.93); }
.pub-t[hidden] { display: none; }
.pub-gl { width: 36px; height: 36px; }
.pub-t.off { border-style: dashed; border-color: #3d3d3d; background: transparent; color: #7a7a7a; }
.pub-t.sel { background: #202020; border-color: #fff; }
.pub-t.fail { border-color: var(--danger); }
.pub-t.done { border-color: #fff; }
.pub-bd { position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; transform: scale(0); transition: transform .4s cubic-bezier(.32, .72, 0, 1); border: 2px solid #181818; }
.pub-bd svg { width: 13px; height: 13px; }
.pub-bd.plus, .pub-bd.min { background: #2a2a2a; color: #fff; }
.pub-bd.chk { background: #fff; color: #0A0A0A; }
.pub-bd.bad { background: var(--danger); color: #0A0A0A; }
.pub-t.off .pub-bd.plus, .pub-t.sel .pub-bd.chk, .pub-t.mg .pub-bd.min, .pub-t.fail .pub-bd.bad, .pub-t.done .pub-bd.chk { transform: scale(1); }
.pub-t.mg.sel .pub-bd.chk, .pub-t.mg .pub-bd.plus, .pub-t.go .pub-bd { transform: scale(0); }
/* кольцо идёт по контуру плитки, не шире её (SVG-обводка, маска ломалась в Safari) */
.pub-ring { position: absolute; inset: -1.5px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.pub-ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pub-ring rect { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 26 74; animation: pub-dash 1.1s linear infinite; }
.pub-t.busy .pub-ring, .pub-t.go .pub-ring { opacity: 1; }
.pub-msg { min-height: 44px; margin: 14px 2px 12px; font-size: .84rem; line-height: 1.35; color: var(--light); display: grid; gap: 3px; align-content: center; text-align: center; }
.pub-msg .e { color: var(--danger); }
.pub-seg { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.pub-sb { position: relative; height: 34px; min-width: 34px; padding: 0 9px; border-radius: 11px; display: grid; place-items: center; color: var(--light); background: var(--card); border: 1px solid var(--border); cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .12s ease-out; }
.pub-sb svg { width: 17px; height: 17px; }
.pub-sb:active { transform: scale(.93); }
.pub-sb.on { background: #fff; color: #0A0A0A; border-color: #fff; }
.pub-sb.auto { display: flex; gap: 6px; align-items: center; font-size: .78rem; font-weight: 600; padding: 0 11px; }
.pub-sb i { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #181818; transform: scale(0); transition: transform .3s cubic-bezier(.32, .72, 0, 1); }
.pub-sb.ov i { transform: scale(1); }
.pub-sb.on i { background: #0A0A0A; border-color: #fff; }
.pub-gap { flex: 1; }
.pub-copy { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 12px 16px 6px; margin-bottom: 6px; transition: border-color .2s; }
.pub-copy:focus-within { border-color: #666; }
.pub-meta { display: flex; align-items: center; gap: 8px; color: var(--mid); font-size: .75rem; line-height: 1.3; margin-bottom: 6px; }
.pub-meta svg { width: 15px; height: 15px; color: #fff; flex: none; }
.pub-nt { flex: 1; min-width: 0; }
.pub-copy .pub-ttl, .pub-copy .pub-dsc { display: block; width: 100%; min-width: 0; background: none; border: 0; color: #fff; outline: 0; resize: none; padding: 0; font: inherit; }
.pub-copy .pub-ttl { height: 40px; font-weight: 600; font-size: 1rem; }
.pub-copy .pub-dsc { height: 98px; line-height: 1.4; color: var(--light); font-size: .9rem; padding: 10px 0 8px; }
.pub-cnt { font-size: .72rem; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pub-cnt.bad { color: var(--danger); }
.pub-copy hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
.pub-copy.swap { animation: pub-swap .35s cubic-bezier(.23, 1, .32, 1); }
.pub-go { position: relative; width: 100%; height: 56px; border-radius: 18px; background: #fff; color: #0A0A0A; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 1rem;
  transition: transform .15s ease-out, background .25s, color .25s; }
.pub-go:active { transform: scale(.97); }
.pub-gi { position: relative; width: 22px; height: 22px; display: grid; }
.pub-gi svg { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity .2s, transform .4s cubic-bezier(.32, .72, 0, 1); }
.pub-gi .ic-ok, .pub-gi .ic-re { opacity: 0; transform: scale(.5); }
.pub-go.mode-ok .ic-up, .pub-go.mode-re .ic-up, .pub-go.mode-wait .ic-up { opacity: 0; transform: scale(.5); }
.pub-go.mode-ok .ic-ok, .pub-go.mode-re .ic-re { opacity: 1; transform: none; }
.pub-go[disabled] { background: #262626; color: #6a6a6a; cursor: not-allowed; }
.pub-go[disabled]:active { transform: none; }
.pub-go.mode-wait { background: #262626; color: #fff; }
.pub-spin { grid-area: 1 / 1; width: 20px; height: 20px; margin: 1px; border-radius: 50%; border: 2px solid #444; border-top-color: #fff; opacity: 0; animation: pub-spin .8s linear infinite; transition: opacity .2s; }
.pub-go.mode-wait .pub-spin { opacity: 1; }
@keyframes pub-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes pub-spin { to { transform: rotate(360deg); } }
@keyframes pub-dash { to { stroke-dashoffset: -100; } }
@keyframes pub-swap { from { opacity: .3; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .pub-t, .pub-ring rect, .pub-spin, .pub-copy.swap { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Окно публикации: время (сейчас или позже), настройки TikTok для публикации на страницу, список запланированного */
.pub-when { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; min-height: 34px; }
.pub-when > svg { width: 17px; height: 17px; color: var(--mid); flex: none; margin-right: 2px; }
.pub-chip { padding: 0 12px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pub-at { flex: 1; min-width: 0; height: 34px; border-radius: 11px; background: var(--card); border: 1px solid var(--border); color: #fff; padding: 0 10px; font: inherit; font-size: .82rem; color-scheme: dark; }
.pub-at:focus { outline: 0; border-color: #666; }
.pub-opt { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 12px 14px; margin-top: 8px; display: grid; gap: 8px; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-lb { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mid); margin-top: 2px; }
.pub-hint { font-size: .78rem; line-height: 1.35; color: var(--mid); }
.pub-hint.e { color: var(--danger); }
.pub-hint a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.pub-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; min-height: 32px; }
.pub-later { margin-top: 10px; display: grid; gap: 6px; }
.pub-lr { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--light); }
.pub-lr svg { width: 16px; height: 16px; flex: none; }
.pub-lr span { flex: 1; min-width: 0; }
.pub-x { height: 30px; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: #fff; font: inherit; font-size: .78rem; cursor: pointer; }
.pub-x:active { transform: scale(.95); }
.pub-x[disabled] { opacity: .5; }
/* Строка «Настройки» на главной шторке публикации: время и TikTok открываются во второй шторке */
.pub-more { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: transform .15s ease-out, border-color .2s; }
.pub-more:active { transform: scale(.98); }
.pub-more > svg:first-child { width: 18px; height: 18px; flex: none; color: var(--light); }
.pub-more > svg:last-child { width: 16px; height: 16px; flex: none; color: var(--dim); }
.pub-more-b { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pub-more-t { font-weight: 600; font-size: .92rem; }
.pub-more-s { font-size: .78rem; line-height: 1.3; color: var(--mid); overflow-wrap: anywhere; }
.pub-more.warn { border-color: rgba(255, 90, 90, .55); }
.pub-more.warn .pub-more-s { color: var(--danger); }
.pub-when { margin-top: 0; }
/* «Когда»: кнопка «Сейчас» открывает выбор даты; настройки сервиса лежат во вкладке сервиса */
.pub-when { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; min-height: 38px; }
.pub-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 14px; border-radius: 19px; background: var(--card); border: 1px solid var(--border); color: #fff; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s ease-out; }
.pub-pill:active { transform: scale(.97); }
.pub-pill svg { width: 17px; height: 17px; flex: none; }
.pub-pill svg:last-of-type { width: 15px; height: 15px; color: var(--dim); }
.pub-pill.on { background: #fff; color: #0A0A0A; border-color: #fff; }
.pub-pill.on svg:last-of-type { color: #0A0A0A; opacity: .55; }
.pub-pill.bad { border-color: var(--danger); color: var(--danger); background: var(--card); }
.pub-pill .pub-at { position: absolute; inset: 0; width: 100%; height: 100%; flex: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; opacity: 0; cursor: pointer; font-size: 16px; }
.pub-pillx { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border); color: var(--light); cursor: pointer; }
.pub-pillx svg { width: 15px; height: 15px; }
.pub-pillx:active { transform: scale(.93); }
.pub-sb.warn i { transform: scale(1); background: var(--danger); border-color: #181818; }

/* ── «Мои видео»: библиотека своих кадров, галочками отмечается, из чего собрать эдит ── */
.own-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .own-grid { grid-template-columns: repeat(4, 1fr); } }
.own-cell { position: relative; min-width: 0; }
.own-card {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--border); background: var(--raised); color: var(--text);
  transition: transform .12s ease-out, border-color .12s ease-out;
}
.own-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.own-card:active { transform: scale(.97); }
.own-card.on { border: 2px solid var(--text); }
.own-card:focus-visible, .own-del:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.own-ck { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(10, 10, 10, .55); border: 1.5px solid rgba(255, 255, 255, .8); color: transparent; }
.own-card.on .own-ck { background: var(--text); border-color: var(--text); color: var(--bg); }
.own-dur, .own-src { position: absolute; left: 6px; font-size: 0.75rem; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: rgba(10, 10, 10, .78); color: #fff; }
.own-dur { bottom: 6px; }
.own-src { bottom: 28px; font-weight: 500; }
.own-del {
  position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(10, 10, 10, .6); color: #fff; opacity: 0; transition: opacity .12s;
}
.own-cell:focus-within .own-del, .own-cell:active .own-del { opacity: 1; }
@media (hover: none) { .own-del { opacity: 1; } }
@media (hover: hover) and (pointer: fine) { .own-cell:hover .own-del { opacity: 1; } .own-card:hover { border-color: var(--mid); } }
.own-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center; border-style: dashed; cursor: default; }
.own-wait-t { font-size: 0.8125rem; font-weight: 600; }
.own-wait-n { font-size: 0.6875rem; color: var(--dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.own-note { font-size: 0.8125rem; color: var(--mid); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .own-card, .own-del { transition: none; } }

/* Калькулятор на странице тарифов: ползунки по действиям и подбор тарифа */
.pro-calc { display: grid; gap: 4px; padding: 14px 14px 12px; }
.pro-calc-row { display: grid; gap: 0; padding: 8px 0 2px; border-top: 1px solid var(--divider); }
.pro-calc-row:first-child { border-top: 0; padding-top: 2px; }
.pro-calc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; font-weight: 600; }
.pro-calc-top em { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--mid); margin-left: 8px; }
.pro-calc-v { font: 800 20px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pro-range { width: 100%; height: 28px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; outline: none; cursor: pointer; --p: 0%; touch-action: pan-y; }
.pro-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--text) var(--p), var(--line) var(--p)); }
.pro-range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line); }
.pro-range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--text); }
.pro-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); cursor: grab; transition: transform .12s ease-out; }
.pro-range:active::-webkit-slider-thumb { transform: scale(1.12); cursor: grabbing; }
.pro-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); cursor: grab; }
.pro-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
.pro-calc-out { display: grid; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--divider); }
.pro-calc-lead { margin: 0; font-size: 14px; line-height: 1.45; color: var(--light); }
.pro-calc-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--mid); }
@media (prefers-reduced-motion: no-preference) {
  .pro-calc-out .swap { animation: pro-swap .28s cubic-bezier(0.23, 1, 0.32, 1) both; }
  @keyframes pro-swap { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* Покупка: почта одной строкой, ссылки вместо лишних полей, ошибка рядом с тем, что исправить */
.pro-mail-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; font-size: 13.5px; color: var(--light); }
.pro-mail-t { flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-mail-row[hidden] { display: none; }
.pro-link { align-self: flex-start; padding: 6px 2px; background: none; border: 0; color: var(--light); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; flex: none; }
.pro-link:active { opacity: .6; }
.pro-err { margin: 6px 2px 0; font-size: 12.5px; line-height: 1.4; color: var(--danger); }
.pro-err[hidden] { display: none; }
.pro-pay-err { margin: 0; padding: 10px 12px; border: 1px solid #5c2622; border-radius: 12px; background: rgba(229, 83, 75, .08); }
@media (prefers-reduced-motion: no-preference) {
  .pro-err:not([hidden]) { animation: pro-swap .26s cubic-bezier(0.23, 1, 0.32, 1) both; }
}

/* Страховка от «раздвинутой» страницы: колонка сетки не шире экрана, как бы ни был длинен текст внутри (почта, подписи) */
.pro-cols { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pro-cols { grid-template-columns: 320px minmax(0, 1fr); } }
.pro-left, .pro-choose, .pro-pay, .pro-calc, .pro-calc-row, .pro-calc-top, .pro-pay > * { min-width: 0; }
.pro-range { min-width: 0; max-width: 100%; box-sizing: border-box; }
