/* Монтажная студия: медиатека · стиль/инспектор · превью-редактор · многодорожечный таймлайн.
   Тёмная тема — основная (как в монтажных программах), светлая — полная пара. Акцент — жёлтый маркер студии. */
:root {
	--bg: #f3f2ee;
	--panel: #ffffff;
	--panel-2: #ecebe6;
	--panel-3: #e3e1db;
	--line: #dcdbd4;
	--line-2: #c9c7bf;
	--ink: #16171a;
	--ink-2: #3c3d42;
	--muted: #6d6b64;
	--sel: #e8b700;
	--sel-soft: rgba(232, 183, 0, 0.16);
	--on-sel: #16171a;
	--ok: #1f9d63;
	--warn: #b7791f;
	--err: #d93b40;
	--wave: #5b8def;
	--shadow: 0 1px 2px rgba(20, 20, 15, 0.06), 0 8px 24px rgba(20, 20, 15, 0.08);
	--radius: 14px;
	--ui: 'Onest', 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--display: 'Unbounded', 'Onest', system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
	--media-w: 250px;
	--pv-w: 400px;
	--tl-h: 190px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--bg: #0d0e10;
		--panel: #16171a;
		--panel-2: #1e2024;
		--panel-3: #26282d;
		--line: #2a2c31;
		--line-2: #3a3d43;
		--ink: #f3f1ec;
		--ink-2: #d1cfc9;
		--muted: #9b988f;
		--sel: #ffe14d;
		--sel-soft: rgba(255, 225, 77, 0.12);
		--on-sel: #16171a;
		--ok: #3ecf8e;
		--warn: #f0b429;
		--err: #ff5d62;
		--wave: #7aa7ff;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
		color-scheme: dark;
	}
}
:root[data-theme='dark'] {
	--bg: #0d0e10;
	--panel: #16171a;
	--panel-2: #1e2024;
	--panel-3: #26282d;
	--line: #2a2c31;
	--line-2: #3a3d43;
	--ink: #f3f1ec;
	--ink-2: #d1cfc9;
	--muted: #9b988f;
	--sel: #ffe14d;
	--sel-soft: rgba(255, 225, 77, 0.12);
	--on-sel: #16171a;
	--ok: #3ecf8e;
	--warn: #f0b429;
	--err: #ff5d62;
	--wave: #7aa7ff;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 14px/1.45 var(--ui);
	-webkit-font-smoothing: antialiased;
	display: grid;
	grid-template-rows: 52px minmax(0, 1fr);
	overflow: hidden;
}
body.tl-open {
	grid-template-rows: 52px minmax(0, 1fr) 5px var(--tl-h);
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
button {
	cursor: pointer;
}
button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}
:focus-visible {
	outline: 2px solid var(--sel);
	outline-offset: 2px;
}
[hidden] {
	display: none !important;
}
.spacer {
	flex: 1;
}
.muted {
	color: var(--muted);
	font-size: 12.5px;
}
kbd {
	font: 600 10.5px var(--mono);
	padding: 1px 5px;
	border-radius: 5px;
	background: var(--panel-2);
	color: var(--muted);
}
body.dragging,
body.dragging * {
	user-select: none !important;
	-webkit-user-select: none !important;
}
body.rs-col,
body.rs-col * {
	cursor: col-resize !important;
}
body.rs-row,
body.rs-row * {
	cursor: row-resize !important;
}

/* ——— кнопки и поля ——— */
.btn {
	height: 38px;
	padding: 0 16px;
	border-radius: 11px;
	border: 1px solid var(--line);
	background: var(--panel);
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
}
.btn:hover {
	border-color: var(--line-2);
}
.btn.sm {
	height: 32px;
	padding: 0 12px;
	font-size: 13px;
	border-radius: 9px;
}
.btn.xs {
	height: 26px;
	padding: 0 9px;
	font-size: 12px;
	border-radius: 7px;
}
.btn.primary {
	background: var(--sel);
	border-color: var(--sel);
	color: var(--on-sel);
}
.btn.dark {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--bg);
}
.btn.danger {
	color: var(--err);
}
.btn.danger:hover {
	border-color: var(--err);
}
.iconbtn {
	height: 32px;
	min-width: 32px;
	padding: 0 10px;
	border-radius: 9px;
	border: 1px solid var(--line);
	background: var(--panel);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}
.iconbtn:hover {
	border-color: var(--line-2);
}
.iconbtn.sm {
	height: 26px;
	min-width: 26px;
	padding: 0 8px;
	font-size: 12px;
}
.iconbtn.xs {
	height: 24px;
	min-width: 24px;
	padding: 0 5px;
	font-size: 12px;
	border-color: transparent;
	background: transparent;
}
.iconbtn.xs:hover {
	background: var(--panel-2);
}
.iconbtn.tog.on {
	background: var(--sel-soft);
	border-color: var(--sel);
}
.linkbtn {
	border: 0;
	background: transparent;
	font-weight: 700;
	font-size: 12.5px;
	color: var(--ink-2);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--line-2);
	padding: 0;
}
.linkbtn.xs {
	font-size: 11.5px;
	color: var(--err);
	text-decoration-color: currentColor;
}
.linkbtn:hover {
	text-decoration-color: var(--sel);
}
.seg {
	display: inline-flex;
	padding: 3px;
	gap: 2px;
	border-radius: 11px;
	background: var(--panel-2);
}
.seg button {
	height: 30px;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	font-size: 13px;
	font-weight: 700;
	color: var(--muted);
	white-space: nowrap;
}
.seg button.on {
	background: var(--panel);
	color: var(--ink);
	box-shadow: var(--shadow);
}
.seg.sm button {
	height: 26px;
	padding: 0 9px;
	font-size: 12px;
}
.text {
	height: 34px;
	padding: 0 10px;
	border-radius: 9px;
	border: 1px solid var(--line);
	background: var(--panel);
	min-width: 0;
	width: 100%;
}
textarea.text {
	height: auto;
	padding: 8px 10px;
	resize: vertical;
	line-height: 1.35;
}
select.text {
	padding-right: 6px;
}
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 14px;
}
.chip {
	height: 28px;
	padding: 0 11px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: transparent;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-2);
}
.chip:hover {
	border-color: var(--line-2);
}
.chip.on {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}
.empty {
	padding: 28px;
	text-align: center;
	color: var(--muted);
	border: 1px dashed var(--line-2);
	border-radius: var(--radius);
}
.empty.sm {
	padding: 14px;
	font-size: 12.5px;
}

/* ——— верхняя панель ——— */
.top {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 14px;
	border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	min-width: 0;
}
.brand {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-family: var(--display);
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
}
.brand i {
	width: 10px;
	height: 10px;
	border-radius: 3px;
	background: var(--sel);
	display: inline-block;
}
.brand small {
	font: 500 11px var(--mono);
	color: var(--muted);
}
.hist {
	position: relative;
	display: flex;
	gap: 4px;
}
.histpop {
	position: absolute;
	top: 40px;
	right: 0;
	z-index: 40;
	width: 320px;
	max-height: 60vh;
	overflow: auto;
	padding: 10px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--panel);
	box-shadow: var(--shadow);
}
.hlist {
	display: grid;
	gap: 2px;
	margin-bottom: 8px;
}
.hitem {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 8px;
	border-radius: 7px;
	font-size: 12.5px;
}
.hitem:nth-child(odd) {
	background: var(--panel-2);
}
.hitem.undone {
	opacity: 0.45;
}
.hitem small {
	font: 11px var(--mono);
	color: var(--muted);
}
.saved {
	font: 12px var(--mono);
	color: var(--muted);
	white-space: nowrap;
}
.saved.saved {
	color: var(--ok);
}
.saved.error {
	color: var(--err);
}

/* ——— рабочая область: шаги | содержимое шага | превью ——— */
.work {
	display: grid;
	grid-template-columns: 236px minmax(340px, 1fr) 5px var(--pv-w);
	min-height: 0;
}
.rail {
	min-height: 0;
	overflow: auto;
	padding: 16px 12px 16px 14px;
	border-right: 1px solid var(--line);
}
.rail ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 2px;
}
.step {
	width: 100%;
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 10px;
	align-items: start;
	padding: 9px 10px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	text-align: left;
}
.step:hover {
	background: var(--panel-2);
}
.step .n {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	font: 700 12px var(--mono);
	border: 1px solid var(--line-2);
	color: var(--muted);
}
.step.done .n {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}
.step.on {
	background: var(--panel);
	box-shadow: var(--shadow);
}
.step.on .n {
	background: var(--sel);
	color: var(--on-sel);
	border-color: var(--sel);
}
.step .t {
	min-width: 0;
}
.step b {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	line-height: 1.25;
	color: var(--ink);
}
.step b .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--warn);
}
.step small {
	display: block;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.stage {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}
.eyebrow {
	font: 600 11.5px var(--mono);
	color: var(--muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.hint {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 13px;
}
.nav {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}
.backbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}
.curbox {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px;
	margin-bottom: 16px;
	border: 1px solid var(--sel);
	border-radius: 14px;
	background: var(--panel);
}
.curthumb {
	flex: none;
	width: 64px;
	aspect-ratio: 9 / 16;
	border-radius: 9px;
	background: var(--panel-3) center / cover no-repeat;
}
.curinfo {
	display: grid;
	gap: 2px;
	min-width: 0;
}
.curinfo b {
	font-size: 16px;
}
.curinfo .fieldrow {
	margin: 6px 0 0;
}
.vidsel {
	max-width: 70%;
	height: 30px;
	padding: 0 8px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--panel);
	font-weight: 700;
	font-size: 13px;
}
.seekrow {
	display: flex;
	align-items: center;
	gap: 10px;
}
.seek {
	flex: 1;
	accent-color: var(--sel);
}
.tc {
	font: 600 11.5px var(--mono);
	color: var(--muted);
	white-space: nowrap;
}
body.tl-open .seekrow {
	display: none;
}
.pvstage:fullscreen .seekrow {
	display: flex;
	width: min(560px, 92vw);
	align-self: center;
}
.pagedrop {
	display: none;
}
body.dropping .pagedrop {
	position: fixed;
	inset: 12px;
	z-index: 200;
	display: grid;
	place-content: center;
	text-align: center;
	gap: 6px;
	border: 2px dashed var(--sel);
	border-radius: 18px;
	background: color-mix(in srgb, var(--bg) 80%, transparent);
	backdrop-filter: blur(4px);
	font-size: 18px;
	pointer-events: none;
}
.split {
	background: var(--line);
	position: relative;
	z-index: 5;
	transition: background 0.15s;
}
.split.v {
	cursor: col-resize;
}
.split.h {
	cursor: row-resize;
}
.split:hover,
.split.on {
	background: var(--sel);
}
.split::after {
	content: '';
	position: absolute;
	inset: -4px;
}

/* ——— медиатека ——— */
.media {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
}
.mhead {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 12px 8px;
}
.mhead b {
	font-size: 15px;
}
.count {
	font: 600 11px var(--mono);
	padding: 2px 7px;
	border-radius: 20px;
	background: var(--panel-2);
	color: var(--muted);
}
.mtools {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 0 12px 8px;
}
.msearch {
	flex: 1;
	min-width: 0;
	height: 30px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--bg);
	font-size: 12.5px;
}
.mbatch {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	align-items: center;
	margin: 0 10px 8px;
	padding: 8px;
	border-radius: 10px;
	background: var(--sel-soft);
	font-size: 12.5px;
}
.mbatch > b {
	width: 100%;
}
.mlist {
	padding: 0 8px 12px;
	display: grid;
	align-content: start;
	gap: 4px;
}
.mrow {
	display: grid;
	grid-template-columns: 18px 48px minmax(0, 1fr) auto;
	gap: 8px;
	align-items: center;
	padding: 6px;
	border-radius: 10px;
	border: 1px solid transparent;
	cursor: pointer;
	user-select: none;
}
.mrow:hover {
	background: var(--panel-2);
}
.mrow.sel {
	background: var(--sel-soft);
}
.mrow.cur {
	border-color: var(--sel);
	background: var(--sel-soft);
}
.mchk {
	accent-color: var(--sel);
	margin: 0;
}
.mthumb {
	position: relative;
	width: 48px;
	aspect-ratio: 9 / 16;
	border-radius: 6px;
	background: var(--panel-3) center / cover no-repeat;
}
.mdur {
	position: absolute;
	right: 2px;
	bottom: 2px;
	font: 600 9px var(--mono);
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
	padding: 0 3px;
	border-radius: 3px;
}
.minfo {
	display: grid;
	gap: 1px;
	min-width: 0;
}
.mtitle {
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mrename {
	height: 26px;
	padding: 0 6px;
	border: 1px solid var(--sel);
	border-radius: 6px;
	background: var(--panel);
	font-size: 13px;
	width: 100%;
}
.mmeta {
	font-size: 11.5px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mmeta em {
	color: var(--warn);
	font-style: normal;
	font-weight: 700;
}
.mst {
	font-style: normal;
	font-weight: 700;
}
.mst.ok {
	color: var(--ok);
}
.mst.go {
	color: var(--warn);
}
.mst.err {
	color: var(--err);
}
.mst.spin::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	vertical-align: -1px;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.mact {
	display: flex;
	opacity: 0;
}
.mrow:hover .mact,
.mrow.cur .mact {
	opacity: 1;
}
.uploads {
	display: grid;
	gap: 4px;
	padding: 0 10px;
}
.uprow {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 8px;
	padding: 7px 9px;
	border-radius: 8px;
	background: var(--panel-2);
	font-size: 12px;
}
.uprow b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.bar {
	grid-column: 1 / -1;
	height: 4px;
	border-radius: 2px;
	background: var(--panel-3);
	overflow: hidden;
}
.bar i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--sel);
	transition: width 0.2s;
}
.mdrop {
	position: absolute;
	inset: 6px;
	display: none;
	place-content: center;
	text-align: center;
	gap: 4px;
	border: 2px dashed var(--sel);
	border-radius: 14px;
	background: color-mix(in srgb, var(--panel) 85%, var(--sel) 15%);
	z-index: 10;
	pointer-events: none;
}
.media.over .mdrop {
	display: grid;
}

/* ——— панель: стиль / инспектор ——— */
.panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	background: var(--bg);
}
.ptabs {
	display: flex;
	gap: 4px;
	padding: 10px 14px 0;
	border-bottom: 1px solid var(--line);
}
.ptabs button {
	height: 34px;
	padding: 0 14px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	font-weight: 700;
	color: var(--muted);
}
.ptabs button.on {
	color: var(--ink);
	border-bottom-color: var(--sel);
}
.pbody {
	flex: 1;
	overflow: auto;
	padding: 14px 16px 24px;
	min-width: 0;
}
.steptabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	padding-bottom: 8px;
	margin-bottom: 8px;
	scrollbar-width: thin;
}
.stab {
	position: relative;
	height: 30px;
	padding: 0 11px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--panel);
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ink-2);
	white-space: nowrap;
}
.stab.on {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}
.stab .dot {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--warn);
}
.scope {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 6px;
}
.ovr {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: center;
	font-size: 12.5px;
	padding: 7px 10px;
	border-radius: 9px;
	background: color-mix(in srgb, var(--warn) 12%, transparent);
	margin-bottom: 12px;
}
.ovr.quiet {
	background: transparent;
	padding: 0 0 4px;
	color: var(--muted);
}
.phead h2 {
	margin: 4px 0 4px;
	font-family: var(--display);
	font-size: clamp(22px, 2.2vw, 30px);
	letter-spacing: -0.01em;
}
.phead p {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 13px;
	max-width: 70ch;
}
.tools {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}
.search {
	flex: 1;
	max-width: 360px;
	height: 34px;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 0 11px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--panel);
}
.search input {
	border: 0;
	outline: 0;
	background: transparent;
	width: 100%;
	font-size: 13px;
}
.search svg {
	width: 15px;
	height: 15px;
	color: var(--muted);
	flex: none;
}
.subpos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 12.5px;
	font-weight: 600;
}
.custom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	margin-bottom: 12px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	font-size: 13px;
}
.custom.on {
	border-color: var(--sel);
	box-shadow: 0 0 0 2px var(--sel);
}
.custom label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}
input[type='color'] {
	width: 38px;
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 7px;
	padding: 2px;
	background: var(--panel-2);
}

/* карточки вариантов */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}
.grid.wide {
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	text-align: left;
	overflow: hidden;
	transition:
		transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
		box-shadow 0.22s,
		border-color 0.2s;
}
.card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: var(--line-2);
}
.card.sel {
	border-color: var(--sel);
	box-shadow:
		0 0 0 2px var(--sel),
		0 12px 30px var(--sel-soft);
}
.card .check {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--sel);
	color: var(--on-sel);
	display: grid;
	place-items: center;
	transform: scale(0.4);
	opacity: 0;
	transition:
		transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3),
		opacity 0.2s;
}
.card.sel .check {
	transform: scale(1);
	opacity: 1;
}
.card .thumb {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #111;
}
.thumb > img.fr,
.thumb .sc img.fr {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fontthumb {
	aspect-ratio: auto !important;
	background: var(--panel-2) !important;
	padding: 14px 13px;
	display: grid;
	gap: 8px;
}
.hovhint {
	position: absolute;
	left: 3cqw;
	bottom: 3cqw;
	font: 700 3.6cqw var(--mono);
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
	padding: 1cqw 2cqw;
	border-radius: 1.4cqw;
	transition: opacity 0.2s;
	pointer-events: none;
}
.card:hover .hovhint {
	opacity: 0;
}
.thumb img.fr {
	transform-origin: 50% 35%;
}
.fontdyn {
	display: grid;
	gap: 8px;
}
.card .body {
	padding: 9px 11px 11px;
	display: grid;
	gap: 3px;
}
.card .title {
	font-weight: 800;
	font-size: 13.5px;
	line-height: 1.25;
}
.card .desc {
	font-size: 12px;
	color: var(--muted);
	line-height: 1.35;
}
.tag {
	justify-self: start;
	margin-top: 2px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font: 600 10px var(--mono);
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.tag::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
}
.tag.ready {
	color: var(--ok);
}
.tag.ready::before {
	background: currentColor;
}

/* настройки */
.sliders {
	display: grid;
	gap: 10px;
	margin-bottom: 12px;
}
.slider {
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	display: grid;
	gap: 4px;
	margin-bottom: 10px;
}
.slider .row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}
.slider output {
	font: 700 12px var(--mono);
	background: var(--panel-2);
	padding: 2px 7px;
	border-radius: 6px;
}
.slider input[type='range'] {
	width: 100%;
	accent-color: var(--sel);
}
.slider .ends {
	display: flex;
	justify-content: space-between;
	font-size: 11.5px;
	color: var(--muted);
}
.toggles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px;
	margin-bottom: 12px;
}
.toggle {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 3px 10px;
	align-items: center;
	padding: 11px 13px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	text-align: left;
}
.toggle.on {
	border-color: var(--sel);
}
.toggle b {
	font-size: 13px;
}
.toggle span {
	grid-column: 1;
	font-size: 11.5px;
	color: var(--muted);
}
.sw {
	grid-row: 1 / span 2;
	grid-column: 2;
	width: 38px;
	height: 22px;
	border-radius: 999px;
	background: var(--line-2);
	position: relative;
	transition: background 0.2s;
}
.sw::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toggle.on .sw {
	background: var(--sel);
}
.toggle.on .sw::after {
	transform: translateX(16px);
}

/* итог */
.sum {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	overflow: hidden;
	margin-bottom: 14px;
}
.sumrow {
	display: grid;
	grid-template-columns: 130px 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 9px 14px;
	border-top: 1px solid var(--line);
	font-size: 13px;
}
.sumrow:first-child {
	border-top: 0;
}
.sumrow .k {
	font: 600 11px var(--mono);
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.sumrow .v {
	font-weight: 700;
}
.box {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	padding: 14px 16px;
	margin-bottom: 14px;
}
.box h3 {
	margin: 0 0 8px;
	font-size: 15px;
}
.guide {
	display: grid;
	gap: 9px;
	font-size: 13px;
}
.guide p {
	margin: 0;
}
.guide b {
	display: block;
	font: 700 10.5px var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
}
.todoh {
	margin: 12px 0 0;
	font-weight: 700;
	font-size: 13px;
}
.todo {
	margin: 6px 0 0;
	padding-left: 18px;
	font-size: 12.5px;
	color: var(--ink-2);
}
.fieldrow {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 8px 0;
}
.fieldrow .text {
	flex: 1 1 180px;
	width: auto;
}
.qlist {
	display: grid;
	gap: 6px;
}
.qitem {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 8px;
	padding: 8px 10px;
	border-radius: 9px;
	background: var(--panel-2);
	font-size: 12.5px;
}
.qitem b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.qitem small {
	grid-column: 1 / -1;
	color: var(--muted);
}
.st {
	font: 700 10.5px var(--mono);
	padding: 2px 7px;
	border-radius: 6px;
	background: var(--panel);
	white-space: nowrap;
}
.st.ok {
	color: var(--ok);
}
.st.go {
	color: var(--warn);
}
.st.err {
	color: var(--err);
}

/* инспектор */
.ihead {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 8px;
}
.ihead b {
	font-size: 16px;
}
.kb {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border-radius: 8px;
	background: var(--ink);
	color: var(--bg);
	font-weight: 800;
}
.autotag {
	margin-left: auto;
	font: 600 10.5px var(--mono);
	padding: 3px 8px;
	border-radius: 20px;
	background: var(--sel-soft);
	color: var(--ink-2);
}
.autotag.man {
	background: var(--panel-2);
}
.reason {
	margin: 0 0 12px;
	padding: 9px 11px;
	border-radius: 9px;
	background: var(--panel-2);
	font-size: 12.5px;
	color: var(--ink-2);
}
.pbody section {
	padding: 12px 0;
	border-top: 1px solid var(--line);
}
.pbody section h4 {
	margin: 0 0 8px;
	font: 700 11px var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--muted);
}
.fld {
	display: grid;
	gap: 4px;
	margin-bottom: 8px;
	min-width: 0;
}
.fld > span {
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-2);
}
.fld small {
	font-size: 11.5px;
	color: var(--muted);
}
.grid2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 10px;
}
.grid3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 10px;
}
.numwrap {
	position: relative;
	display: block;
}
.numwrap i {
	position: absolute;
	right: 9px;
	top: 50%;
	transform: translateY(-50%);
	font: 600 11px var(--mono);
	color: var(--muted);
	font-style: normal;
	pointer-events: none;
}
.text.num {
	font: 600 13px var(--mono);
	padding-right: 26px;
}
.ro {
	font: 600 13px var(--mono);
	height: 34px;
	display: flex;
	align-items: center;
	color: var(--muted);
}
.wordchips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.chk {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
}
.chk input {
	accent-color: var(--sel);
}
.colrow {
	display: flex;
	gap: 6px;
}
.icongrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
	gap: 4px;
	max-height: 220px;
	overflow: auto;
	padding: 4px;
	border-radius: 9px;
	background: var(--panel-2);
}
.icongrid.big {
	grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
	max-height: none;
}
.icongrid button {
	aspect-ratio: 1;
	border: 1px solid transparent;
	border-radius: 7px;
	background: var(--panel);
	padding: 6px;
	display: grid;
	place-items: center;
	color: var(--ink);
}
.icongrid button.on {
	border-color: var(--sel);
	box-shadow: 0 0 0 2px var(--sel);
}
.icongrid svg {
	width: 100%;
	height: 100%;
}
.brthumb {
	display: block;
	width: 90px;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	border-radius: 8px;
	margin: 0 0 8px;
	background: var(--panel-2);
}
.iactions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}
.counts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	font-size: 12.5px;
	color: var(--muted);
}
.proto {
	font-size: 12px;
	color: var(--warn);
	margin: 4px 0 0;
}
.hintline {
	margin-top: 14px;
}

/* ——— превью ——— */
.preview {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	padding: 10px 14px 12px;
	background: var(--bg);
}
.pvhead {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: baseline;
	font-size: 12.5px;
	margin-bottom: 8px;
}
.pvhead b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pvhead span {
	font: 11px var(--mono);
	color: var(--muted);
	white-space: nowrap;
}
.pvstage {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.stagebox {
	flex: 1;
	min-height: 0;
	container-type: size;
	display: grid;
	place-items: center;
}
.phone {
	width: min(100cqw, calc((100cqh - 12px) * var(--arn, 0.5625) + 12px));
	padding: 6px;
	border-radius: 22px;
	background: #050505;
	box-shadow:
		0 0 0 1px var(--line-2),
		0 24px 50px rgba(0, 0, 0, 0.3);
}
.screen {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ar, 9 / 16);
	border-radius: 16px;
	overflow: hidden;
	background: #1a1b1f;
	container-type: size; /* 1 cqmin = 1/100 короткой стороны кадра — и в 9:16, и в 16:9 */
	isolation: isolate;
	cursor: pointer;
	user-select: none;
}
.screen.editing {
	cursor: default;
	box-shadow: inset 0 0 0 2px var(--sel);
}
.pvbar {
	display: flex;
	align-items: center;
	gap: 6px;
	justify-content: center;
	flex-wrap: wrap;
}
.play {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--panel);
	display: grid;
	place-items: center;
	flex: none;
	padding: 0;
}
.play svg {
	width: 16px;
	height: 16px;
}
.play.on {
	background: var(--sel);
	border-color: var(--sel);
	color: var(--on-sel);
}
.pill {
	height: 34px;
	padding: 0 12px;
	border-radius: 17px;
	border: 1px solid var(--line);
	background: var(--panel);
	font-size: 12.5px;
	font-weight: 700;
}
.pill.on {
	background: var(--sel);
	border-color: var(--sel);
	color: var(--on-sel);
}
select.pill {
	padding-right: 8px;
}
.pvcheck {
	display: grid;
	gap: 4px;
	padding: 8px 11px;
	border-radius: 10px;
	background: var(--panel-2);
	font-size: 12.5px;
	max-height: 160px;
	overflow: auto;
}
.pvcheck small {
	color: var(--muted);
}
.pvcheck.ok b {
	color: var(--ok);
}
.pvcheck.bad {
	background: color-mix(in srgb, var(--err) 12%, transparent);
}
.pvcheck.bad summary b {
	color: var(--err);
}
.pvcheck summary {
	cursor: pointer;
	list-style: none;
}
.pvcheck summary::-webkit-details-marker {
	display: none;
}
.pvcheck details[open] summary .muted {
	display: none;
}
.pvcheck details > :not(summary) {
	margin-top: 4px;
}
.hitrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}
.hitrow span {
	font-weight: 600;
	margin-right: 4px;
}
.tchip {
	height: 22px;
	padding: 0 7px;
	border-radius: 11px;
	border: 1px solid var(--line-2);
	background: var(--panel);
	font: 600 11px var(--mono);
}
.tchip:hover {
	border-color: var(--err);
}
.pvstage:fullscreen {
	--panel: #1e2024;
	--panel-2: #16171a;
	--line: #2a2c31;
	--line-2: #3a3d43;
	--ink: #f3f1ec;
	--muted: #9b988f;
	--shadow: none;
	color-scheme: dark;
	color: var(--ink);
	background: #000;
	padding: 14px;
}
.pvstage:fullscreen .pvcheck {
	position: fixed;
	right: 16px;
	top: 16px;
	width: 300px;
	max-height: 70vh;
}

/* слои сцены (cqmin — от короткой стороны кадра, как в готовом ролике) */
.sc {
	position: absolute;
	inset: 0;
}
.sc video,
.sc img.fr {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
#pDecor,
#pOver,
#pUI,
#pDecor .sc {
	pointer-events: none;
}
.grain {
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.9'/></svg>");
}
.lb i {
	position: absolute;
	left: 0;
	right: 0;
	height: 13%;
	background: #000;
}
.lb i:first-child {
	top: 0;
}
.lb i:last-child {
	bottom: 0;
}
.hud i {
	position: absolute;
	width: 9cqmin;
	height: 9cqmin;
	border: 0.7cqmin solid var(--acc);
	opacity: 0.8;
}
.hud i:nth-child(1) {
	top: 6cqmin;
	left: 6cqmin;
	border-right: 0;
	border-bottom: 0;
}
.hud i:nth-child(2) {
	top: 6cqmin;
	right: 6cqmin;
	border-left: 0;
	border-bottom: 0;
}
.hud i:nth-child(3) {
	bottom: 6cqmin;
	left: 6cqmin;
	border-right: 0;
	border-top: 0;
}
.hud i:nth-child(4) {
	bottom: 6cqmin;
	right: 6cqmin;
	border-left: 0;
	border-top: 0;
}
.hud b {
	position: absolute;
	top: 7cqmin;
	left: 17cqmin;
	font: 700 3cqmin var(--mono);
	color: var(--acc);
	letter-spacing: 0.1em;
}
.layer {
	position: absolute;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	pointer-events: none;
}
.icon {
	display: inline-block;
	flex: none;
}
.icon svg {
	width: 100%;
	height: 100%;
	display: block;
}
.ico14 {
	width: 14px;
	height: 14px;
	vertical-align: -2px;
	margin-right: 3px;
}
#elLayer {
	pointer-events: none;
}
.el {
	position: absolute;
	pointer-events: none;
}
.el > .in {
	transform-origin: 50% 50%;
}
.screen.editing .el {
	pointer-events: auto;
	cursor: move;
}
.screen.editing .el:hover {
	outline: 1px dashed rgba(255, 225, 77, 0.8);
	outline-offset: 2px;
}
.ph-img {
	padding: 4cqmin;
	border: 0.4cqmin dashed rgba(255, 255, 255, 0.7);
	border-radius: 2cqmin;
	color: #fff;
	font: 600 3.4cqmin var(--ui);
	background: rgba(0, 0, 0, 0.4);
	text-align: center;
}
#selLayer {
	pointer-events: none;
	z-index: 900;
}
#selBox {
	position: absolute;
	border: 1.5px solid var(--sel);
	pointer-events: auto;
	cursor: move;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
#selBox .hd {
	position: absolute;
	width: 11px;
	height: 11px;
	background: #fff;
	border: 1.5px solid var(--sel);
	border-radius: 3px;
	transform: translate(-50%, -50%) scale(var(--inv, 1));
}
#selBox .c.nw {
	left: 0;
	top: 0;
	cursor: nwse-resize;
}
#selBox .c.ne {
	left: 100%;
	top: 0;
	cursor: nesw-resize;
}
#selBox .c.sw {
	left: 0;
	top: 100%;
	cursor: nesw-resize;
}
#selBox .c.se {
	left: 100%;
	top: 100%;
	cursor: nwse-resize;
}
#selBox .e {
	left: 100%;
	top: 50%;
	cursor: ew-resize;
	border-radius: 6px;
	height: 18px;
	width: 7px;
}
#selBox .w {
	left: 0;
	top: 50%;
	cursor: ew-resize;
	border-radius: 6px;
	height: 18px;
	width: 7px;
}
#selBox.nowidth .e,
#selBox.nowidth .w {
	display: none;
}
#selBox .rot {
	left: 50%;
	top: -26px;
	border-radius: 50%;
	cursor: grab;
}
#selBox .rot::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 100%;
	width: 1.5px;
	height: 14px;
	background: var(--sel);
	transform: translateX(-50%);
}
#selBox .dims {
	position: absolute;
	left: 50%;
	top: calc(100% + 8px);
	transform: translateX(-50%) scale(var(--inv, 1));
	font: 600 10px var(--mono);
	color: #111;
	background: var(--sel);
	padding: 1px 5px;
	border-radius: 4px;
	white-space: nowrap;
}
.gd {
	position: absolute;
	background: #ff3fa4;
	pointer-events: none;
}
.gd.v {
	top: 0;
	bottom: 0;
	width: 1px;
}
.gd.h {
	left: 0;
	right: 0;
	height: 1px;
}
.pvpaused {
	position: absolute;
	inset: 0;
	display: none;
	place-items: center;
	pointer-events: none;
	z-index: 800;
}
.screen.paused:not(.editing):not(.demo) .pvpaused {
	display: grid;
}
.pvpaused i {
	width: 15cqmin;
	height: 15cqmin;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	display: grid;
	place-items: center;
	color: #fff;
	backdrop-filter: blur(6px);
}
.pvpaused svg {
	width: 7cqmin;
	height: 7cqmin;
	margin-left: 1cqmin;
}
.pvempty {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	text-align: center;
	gap: 4px;
	color: #bbb;
	font-size: 4cqmin;
	z-index: 850;
}
/* сетка соцсети */
.ui {
	position: absolute;
	inset: 0;
	pointer-events: none;
	color: #fff;
	font-family: -apple-system, 'SF Pro Text', 'Helvetica Neue', 'Onest', sans-serif;
	line-height: 1.2;
	z-index: 700;
}
.ui-el {
	position: absolute;
	text-shadow: 0 0.2cqmin 0.6cqmin rgba(0, 0, 0, 0.5);
}
.ui-el svg {
	filter: drop-shadow(0 0.2cqmin 0.4cqmin rgba(0, 0, 0, 0.45));
}
.ui-btn {
	display: grid;
	justify-items: center;
	gap: 0.6cqmin;
}
.ui-btn b {
	font-weight: 600;
	white-space: nowrap;
}
.ui-ava {
	border-radius: 50%;
	border: solid #fff;
	background: linear-gradient(135deg, #c9a58a, #7a5a4a);
}
.ui-ava i {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	border-radius: 50%;
	background: #fe2c55;
	display: grid;
	place-items: center;
	font-style: normal;
	font-weight: 700;
	line-height: 1;
}
.ui-nav {
	display: flex;
	justify-content: space-around;
	align-items: center;
	text-shadow: none;
}
.ui-nav > span {
	display: grid;
	justify-items: center;
	gap: 0.5cqmin;
}
.ui-plus {
	display: grid;
	place-items: center;
}
.ui-zone {
	position: absolute;
	border: 1px dashed rgba(255, 90, 90, 0.75);
	background: rgba(255, 60, 60, 0.08);
	border-radius: 0.8cqmin;
}
.ui-safe {
	position: absolute;
	border: 1px dashed rgba(255, 225, 77, 0.85);
	border-radius: 1cqmin;
}
.ui-safe span {
	position: absolute;
	left: 1cqmin;
	top: 0.6cqmin;
	font-family: var(--mono);
	color: rgba(255, 225, 77, 0.95);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ——— таймлайн ——— */
.timeline {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: var(--panel);
	user-select: none;
	-webkit-user-select: none;
}
.tlbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-bottom: 1px solid var(--line);
	flex-wrap: nowrap;
}
.tlzoom {
	display: flex;
	gap: 2px;
}
.tltime {
	font: 600 12px var(--mono);
	color: var(--muted);
	white-space: nowrap;
}
.addmenu {
	position: relative;
}
.addmenu summary {
	list-style: none;
}
.addmenu summary::-webkit-details-marker {
	display: none;
}
.addlist {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	z-index: 60;
	display: grid;
	grid-template-columns: repeat(2, minmax(120px, 1fr));
	gap: 3px;
	padding: 6px;
	border-radius: 11px;
	border: 1px solid var(--line);
	background: var(--panel);
	box-shadow: var(--shadow);
}
.addlist button {
	display: flex;
	align-items: center;
	gap: 7px;
	height: 30px;
	padding: 0 9px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	font-size: 12.5px;
	font-weight: 600;
	text-align: left;
	white-space: nowrap;
}
.addlist button:hover {
	background: var(--panel-2);
}
.addlist i {
	width: 18px;
	text-align: center;
	font-style: normal;
}
.tlbody {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: 116px minmax(0, 1fr);
}
.tlheads {
	overflow: hidden;
	border-right: 1px solid var(--line);
	background: var(--panel);
}
.rulerhead {
	height: 22px;
	border-bottom: 1px solid var(--line);
}
.thead {
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	padding: 0 6px 0 10px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ink-2);
	border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
	white-space: nowrap;
}
.thead[data-track='audio'] {
	height: 38px;
}
.thead.off span {
	opacity: 0.4;
	text-decoration: line-through;
}
.eye {
	border: 0;
	background: transparent;
	color: var(--muted);
	font-size: 12px;
	padding: 2px 4px;
	border-radius: 5px;
}
.eye:hover {
	background: var(--panel-2);
}
.tlscroll {
	position: relative;
	overflow: auto;
	min-width: 0;
	scrollbar-width: thin;
}
.tlcontent {
	position: relative;
	min-height: 100%;
}
.ruler {
	position: sticky;
	top: 0;
	z-index: 20;
	height: 22px;
	background: var(--panel);
	border-bottom: 1px solid var(--line);
	cursor: ew-resize;
}
.ruler i {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: var(--line-2);
}
.ruler i b {
	position: absolute;
	left: 4px;
	top: 3px;
	font: 600 10px var(--mono);
	color: var(--muted);
	white-space: nowrap;
}
.ruler u {
	position: absolute;
	bottom: 0;
	width: 1px;
	height: 5px;
	background: var(--line-2);
}
.trow {
	position: relative;
	height: 26px;
	border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.trow[data-track='audio'] {
	height: 38px;
}
.trow.off {
	opacity: 0.35;
}
.wave {
	position: absolute;
	pointer-events: none;
	z-index: 2;
}
.cutgap {
	position: absolute;
	top: 1px;
	bottom: 1px;
	z-index: 5;
	background: repeating-linear-gradient(135deg, rgba(229, 72, 77, 0.55) 0 3px, transparent 3px 6px);
	pointer-events: none;
}
/* ——— шаг «Смонтировать» и значок прогресса в шапке ——— */
.mtbox {
	border-color: var(--sel);
	box-shadow: 0 0 0 3px var(--sel-soft);
}
.mtbox .fieldrow > span:first-child {
	min-width: 42px;
	color: var(--muted);
}
.mtpath {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 700;
}
.mtdraft {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 6px 0 2px;
	font-size: 13px;
	cursor: pointer;
}
.mtgo {
	padding: 11px 20px;
	font-size: 15px;
}
.mtwarn {
	margin: 6px 0;
	padding: 8px 10px;
	border-radius: 9px;
	background: var(--sel-soft);
	font-size: 13px;
}
.mtsum {
	display: grid;
	gap: 8px;
	margin: 10px 0;
	font-size: 13.5px;
}
.bar.big {
	height: 8px;
	border-radius: 4px;
}
.mtrow a {
	color: var(--ink);
	font-weight: 700;
}
.st.mute {
	color: var(--muted);
}
.st.spin::before {
	content: '';
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 5px;
	border: 1.5px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}
.mtchip {
	display: inline-grid;
	gap: 3px;
	padding: 5px 10px;
	border: 1px solid var(--sel);
	border-radius: 9px;
	background: var(--sel-soft);
	color: var(--ink);
	font: 700 12px var(--ui);
	white-space: nowrap;
	cursor: pointer;
}
.mtchip[hidden] {
	display: none;
}
.mtchip .bar {
	height: 3px;
}
.mtchip.warn {
	background: var(--sel);
	color: var(--on-sel);
}
@media (prefers-reduced-motion: reduce) {
	.st.spin::before {
		animation: none;
	}
}
a.mst {
	text-decoration: none;
}
.trimmed {
	position: absolute;
	top: 0;
	bottom: 0;
	background: repeating-linear-gradient(135deg, var(--panel-2) 0 6px, transparent 6px 12px);
}
.blk {
	position: absolute;
	top: 3px;
	bottom: 3px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	overflow: hidden;
	font-size: 11px;
	font-weight: 600;
	color: #111;
	cursor: grab;
	background: var(--c, #9aa4ff);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
	z-index: 3;
}
.blk:active {
	cursor: grabbing;
}
.blk span {
	padding: 0 7px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	display: flex;
	align-items: center;
}
.blk.auto {
	background: repeating-linear-gradient(135deg, var(--c) 0 8px, color-mix(in srgb, var(--c) 82%, #fff) 8px 16px);
}
.blk.off {
	opacity: 0.35;
}
.blk.sel {
	box-shadow:
		0 0 0 2px var(--ink),
		0 0 0 4px var(--sel);
	z-index: 4;
}
.blk .hl,
.blk .hr {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 6px;
	cursor: ew-resize;
	z-index: 2;
}
.blk .hl {
	left: 0;
}
.blk .hr {
	right: 0;
}
.blk:hover .hl,
.blk:hover .hr {
	background: rgba(0, 0, 0, 0.18);
}
.k-video {
	--c: #5b8def;
	color: #fff;
}
.k-broll {
	--c: #b48cff;
}
.k-sub {
	--c: #ffe14d;
}
.k-text,
.k-cta {
	--c: #ff9f6b;
}
.k-card,
.k-counter,
.k-arrow,
.k-image {
	--c: #63d2a1;
}
.k-reaction,
.k-meme {
	--c: #ff7eb6;
}
.k-sfx {
	--c: #9aa4ff;
}
.k-music {
	--c: #7ad7e6;
}
.playhead {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0;
	z-index: 30;
	pointer-events: none;
}
.playhead::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: -1px;
	width: 2px;
	background: var(--err);
}
.playhead i {
	position: absolute;
	top: 0;
	left: -7px;
	width: 14px;
	height: 14px;
	background: var(--err);
	clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}

/* всплывашки */
.pop {
	position: fixed;
	z-index: 100;
	width: 300px;
	padding: 14px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--panel);
	box-shadow: var(--shadow);
	font-size: 13px;
}
.pop p {
	margin: 0 0 10px;
}
.pop .row {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
}
.toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 16px);
	opacity: 0;
	z-index: 90;
	padding: 10px 16px;
	border-radius: 11px;
	background: var(--ink);
	color: var(--bg);
	font-weight: 700;
	font-size: 13px;
	transition:
		opacity 0.25s,
		transform 0.3s;
	pointer-events: none;
	max-width: min(560px, 90vw);
	text-align: center;
}
body.tl-open .toast {
	bottom: calc(var(--tl-h) + 20px);
}
.toast.on {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* узкий экран: ниже 900 px панели идут столбиком */
@media (max-width: 1100px) {
	.brand small,
	.hist #histBtn {
		display: none;
	}
}
@media (max-width: 1180px) {
	.work {
		grid-template-columns: 200px minmax(300px, 1fr) 5px var(--pv-w);
	}
	.step small {
		display: none;
	}
}
/* половина экрана (≈700–1000 px): шаги — узкой колонкой с номерами (название — в подсказке и в заголовке шага),
   превью остаётся сбоку — примерка наведением видна сразу */
@media (max-width: 1000px) {
	.work {
		grid-template-columns: 62px minmax(280px, 1fr) 5px min(var(--pv-w), 40vw);
	}
	.rail {
		padding: 12px 8px;
	}
	.step {
		grid-template-columns: 1fr;
		justify-items: center;
		padding: 7px 0;
	}
	.step .t {
		display: none;
	}
	.step .n {
		width: 30px;
		height: 30px;
		font-size: 12.5px;
	}
	.mtchip {
		font-size: 11px;
		padding: 4px 8px;
	}
	.saved {
		display: none;
	}
}
/* телефон и совсем узкое окно: всё столбиком, шаги — лентой с прокруткой, без наездов */
@media (max-width: 699px) {
	body,
	body.tl-open {
		overflow: auto;
		grid-template-rows: auto auto 0 auto;
	}
	.work {
		grid-template-columns: 1fr;
	}
	.rail {
		border-right: 0;
		border-bottom: 1px solid var(--line);
		padding: 8px 10px;
	}
	.rail ol {
		display: flex;
		gap: 4px;
		overflow-x: auto;
		scrollbar-width: thin;
	}
	.step {
		width: auto;
		flex: none;
		grid-template-columns: 26px auto;
		justify-items: start;
		align-items: center;
		gap: 7px;
		padding: 6px 10px 6px 6px;
	}
	.step .t {
		display: block;
	}
	.step b {
		white-space: nowrap;
		font-size: 13px;
	}
	.step small {
		display: none;
	}
	.step .n {
		width: 26px;
		height: 26px;
	}
	.split {
		display: none;
	}
	.preview {
		min-height: 560px;
	}
	.timeline {
		height: 260px;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
.mtmanual {
	margin: 4px 0 6px;
	font-size: 12.5px;
	color: var(--muted);
}
.mtmanual summary {
	cursor: pointer;
}

/* пустой экран превью: роликов нет */
.pvempty {
	position: absolute;
	inset: 0;
	z-index: 950; /* поверх сетки соцсетей (700) и рамки выделения (900) */
	display: grid;
	place-content: center;
	gap: 6px;
	padding: 20px;
	text-align: center;
	background: #16171a;
	color: #f3f2ee;
}
.pvempty[hidden] {
	display: none;
}
.pvempty b {
	font: 700 17px var(--ui);
}
.pvempty span {
	font-size: 13px;
	color: #a3a19a;
}

/* галочки — в стиле страницы, а не системные белые квадраты */
input[type='checkbox'] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid var(--line-2);
	border-radius: 5px;
	background: var(--panel);
	display: inline-grid;
	place-items: center;
	cursor: pointer;
	transition:
		background 0.12s,
		border-color 0.12s;
}
input[type='checkbox']::after {
	content: '';
	width: 9px;
	height: 5px;
	margin-top: -2px;
	border: 2px solid var(--on-sel);
	border-top: 0;
	border-right: 0;
	transform: rotate(-45deg) scale(0);
	transition: transform 0.12s;
}
input[type='checkbox']:checked {
	background: var(--sel);
	border-color: var(--sel);
}
input[type='checkbox']:checked::after {
	transform: rotate(-45deg) scale(1);
}
input[type='checkbox']:hover {
	border-color: var(--sel);
}
input[type='checkbox']:focus-visible {
	outline: 2px solid var(--sel);
	outline-offset: 2px;
}

.screen.novid .pvpaused {
	display: none !important;
}
.screen.novid {
	cursor: default;
}

/* формат ролика */
.fmtrow {
	margin-top: 8px;
}
.fmtrow > span:first-child {
	color: var(--muted);
}
.fmtrow .seg button small {
	opacity: 0.7;
	font-weight: 500;
}
.fmttag {
	font: 700 10.5px var(--mono);
	padding: 1px 5px;
	border-radius: 5px;
	background: var(--panel-3);
	color: var(--ink);
}

/* подсказки при наведении (tips.js) */
.tip {
	position: fixed;
	z-index: 3000;
	max-width: 290px;
	padding: 8px 11px;
	border-radius: 9px;
	background: #16171a;
	color: #f3f2ee;
	font: 500 12.5px/1.4 var(--ui);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
	pointer-events: none;
	opacity: 0;
	transform: translateY(3px);
	transition:
		opacity 0.12s,
		transform 0.12s;
}
.tip[hidden] {
	display: none;
}
.tip.on {
	opacity: 1;
	transform: none;
}
.tip::after {
	content: '';
	position: absolute;
	left: calc(var(--ax, 50%) - 5px);
	top: 100%;
	border: 5px solid transparent;
	border-top-color: #16171a;
}
.tip.below::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #16171a;
}
:root[data-theme='dark'] .tip,
:root:not([data-theme='light']) .tip {
	background: #f3f2ee;
	color: #16171a;
}
:root[data-theme='dark'] .tip::after,
:root:not([data-theme='light']) .tip::after {
	border-top-color: #f3f2ee;
}
:root[data-theme='dark'] .tip.below::after,
:root:not([data-theme='light']) .tip.below::after {
	border-top-color: transparent;
	border-bottom-color: #f3f2ee;
}
@media (prefers-color-scheme: light) {
	:root:not([data-theme='dark']) .tip {
		background: #16171a;
		color: #f3f2ee;
	}
	:root:not([data-theme='dark']) .tip::after {
		border-top-color: #16171a;
	}
	:root:not([data-theme='dark']) .tip.below::after {
		border-top-color: transparent;
		border-bottom-color: #16171a;
	}
}

/* «Кому применить выбор» — вверху шагов 2–10 */
.scopecard {
	margin: 4px 0 12px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
}
.scopehead {
	font: 700 11.5px var(--mono);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 8px;
}
.scopeopts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}
.scopeopts button {
	display: grid;
	gap: 2px;
	padding: 8px 10px;
	border: 1.5px solid var(--line);
	border-radius: 10px;
	background: var(--panel-2);
	color: var(--ink);
	text-align: left;
	cursor: pointer;
}
.scopeopts button b {
	font-size: 13px;
}
.scopeopts button small {
	font-size: 11.5px;
	color: var(--muted);
}
.scopeopts button.on {
	border-color: var(--sel);
	background: var(--sel-soft);
}
.scopeopts button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.scopethumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}
.scopethumb {
	position: relative;
	width: 30px;
	height: 52px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	background: #222 center / cover;
	opacity: 0.35;
	filter: grayscale(0.7);
	cursor: pointer;
	transition:
		opacity 0.15s,
		filter 0.15s;
}
.scopethumb.hit {
	opacity: 1;
	filter: none;
	border-color: var(--sel);
}
.scopethumb.cur {
	outline: 2px solid var(--ink);
	outline-offset: 1px;
}
.scopethumb .own {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--warn);
	box-shadow: 0 0 0 1.5px #fff;
}
.scopethumb .eye {
	position: absolute;
	left: 50%;
	bottom: -15px;
	transform: translateX(-50%);
	font: 700 8.5px var(--mono);
	font-style: normal;
	color: var(--ink);
	white-space: nowrap;
}
.scopethumbs:has(.eye) {
	padding-bottom: 12px;
}
.scopesay {
	margin: 10px 0 0;
	font-size: 13px;
}
.scopenote {
	margin: 4px 0 0;
	font-size: 11.5px;
	color: var(--muted);
}
@media (max-width: 1180px) {
	.scopeopts button small {
		display: none;
	}
}
/* шаг 1: что значат отметки */
.mbatchsay {
	flex-basis: 100%;
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--ink-2);
}
.sbadge {
	font: 700 10.5px var(--mono);
	padding: 1px 6px;
	border-radius: 5px;
	background: var(--panel-3);
	color: var(--muted);
}
.sbadge.own {
	background: color-mix(in srgb, var(--warn) 22%, transparent);
	color: var(--ink);
}

/* ——— внутри платформы (botsforosteo.ru): её цвета, шрифт Inter и тема — платформа передаёт #ui=platform&theme=…
   Токены — из главной страницы платформы (index.html :root). Рамки выделения поверх видео остаются жёлтыми — их видно на любом кадре ——— */
:root.platform {
	--bg: #0b0814;
	--panel: #15102a;
	--panel-2: #1a1432;
	--panel-3: #1c1638;
	--line: rgba(255, 255, 255, 0.07);
	--line-2: rgba(255, 255, 255, 0.12);
	--ink: #f5f2ff;
	--ink-2: #c5bfdf;
	--muted: #8c87a8;
	--sel: #9b6efd;
	--sel-soft: rgba(155, 110, 253, 0.16);
	--on-sel: #ffffff;
	--ok: #4ecdc4;
	--warn: #ffb547;
	--err: #ff7a7a;
	--wave: #4facfe;
	--shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
	--ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color-scheme: dark;
}
:root.platform[data-theme='light'] {
	--bg: #f6f5fb;
	--panel: #ffffff;
	--panel-2: #f0eef7;
	--panel-3: #e8e5f2;
	--line: rgba(20, 16, 40, 0.08);
	--line-2: rgba(20, 16, 40, 0.14);
	--ink: #181128;
	--ink-2: #4d4866;
	--muted: #888399;
	--sel: #7c4dff;
	--sel-soft: rgba(124, 77, 255, 0.12);
	--on-sel: #ffffff;
	--ok: #1f9d63;
	--warn: #b7791f;
	--err: #d93b40;
	--wave: #4f7cff;
	--shadow: 0 1px 3px rgba(20, 16, 40, 0.06), 0 6px 20px rgba(20, 16, 40, 0.08);
	color-scheme: light;
}
/* название уже есть в строке навигации платформы, тема — её */
:root.platform .top .brand,
:root.platform #theme {
	display: none;
}
:root.platform .phead h2 {
	font-weight: 800;
	letter-spacing: -0.02em;
}
