/* ============================================================
   Режим стримера — nebula glass (from the Figma reference).

   Visual-only layer loaded after streamer-mode.css. No markup,
   behaviour or JS touched.
   • Backdrop: the ethereal-ribbon nebula (assets/streamer/), with a
     light vignette so text stays readable.
   • Glass: thin and clear — the ribbons read through it — tinted with
     the Figma colours #0F101A (base) and #444270 (violet), with an
     inner violet glow rising from the bottom edge.
   • Light: every surface has a luminous rim. The rim is a masked
     gradient border (::after) lit by white/lilac "glints" at the
     corners and along the bottom edge, like light caught in thick glass.
   • Active: violet glass bead with a bright lilac rim and soft bloom.
   ============================================================ */

.app-container.v2.sm-app {
	--neb-base: #0F101A;
	--neb-violet: #444270;
	--neb-lilac: #9b93ff;
	--neb-lilac-hot: #c9c3ff;
	--sm-accent: #7C6CF0;
	--sm-accent-hot: #b9b1ff;
	--sm-accent-soft: rgba(155, 147, 255, 0.16);
	--sm-accent-strong: rgba(155, 147, 255, 0.5);

	/* Big surface */
	--gl-fill: linear-gradient(165deg, rgba(68, 66, 112, 0.26) 0%, rgba(32, 32, 56, 0.26) 42%, rgba(15, 16, 26, 0.44) 100%);
	--gl-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.2),
		inset 0 0 0 1px rgba(255, 255, 255, 0.05),
		inset 0 0 44px rgba(155, 147, 255, 0.06),
		inset 0 -26px 46px -28px rgba(155, 147, 255, 0.28),
		0 30px 80px -20px rgba(5, 5, 12, 0.75);
	/* Pill / small control */
	--pl-fill: linear-gradient(180deg, rgba(68, 66, 112, 0.2) 0%, rgba(15, 16, 26, 0.46) 100%);
	--pl-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.16),
		inset 0 0 22px rgba(155, 147, 255, 0.05),
		inset 0 -12px 22px -14px rgba(155, 147, 255, 0.3),
		0 12px 28px -16px rgba(5, 5, 12, 0.85);
	/* Active violet bead */
	--ac-fill:
		radial-gradient(120% 90% at 50% -30%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 60%),
		linear-gradient(180deg, rgba(130, 118, 240, 0.62) 0%, rgba(68, 66, 112, 0.8) 100%);
	--ac-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.45),
		inset 0 -8px 16px -8px rgba(15, 16, 26, 0.6),
		0 0 0 1px rgba(201, 195, 255, 0.55),
		0 0 22px -2px rgba(155, 147, 255, 0.55),
		0 8px 20px -8px rgba(5, 5, 12, 0.8);
}

/* Backdrop — the monochrome nebula behind frosted glass.
   The page base sits on <body> (styles.css forces .app-container.v2 to
   `background: transparent !important`); the artwork itself lives on
   the fixed .sm-ambient layer, shown as-is (its frosted texture is part
   of the image). ::after is a smoky veil with a faint violet cast so the
   page's accents still belong to it. */
body:has(> .sm-app) { background: #0F101A !important; }

/* Violet light: the monochrome artwork is blended (luminosity) onto a
   violet field, so its bright threads glow violet and its darks stay
   dark. isolation keeps the blend inside this layer. */
.sm-ambient {
	isolation: isolate;
	background:
		radial-gradient(70% 60% at 30% 25%, #6d6890, transparent 70%),
		radial-gradient(70% 60% at 80% 80%, #726c98, transparent 70%),
		#55526e;
}
.sm-ambient::before,
.sm-ambient::after {
	display: block;
	content: '';
	position: absolute;
	top: auto; right: auto; bottom: auto; left: auto;
	width: auto; height: auto;
	border-radius: 0;
	opacity: 1;
	animation: none;
	transform: none;
}
.sm-ambient::before {
	inset: 0;
	background: #0F101A url('/assets/streamer/bg-streamer.jpg') center / cover no-repeat;
	/* No extra processing: the artwork already carries its own frosted-
	   glass texture; blurring/rippling it again smeared it. */
	filter: none;
	mix-blend-mode: luminosity;
}
.sm-ambient::after {
	inset: 0;
	filter: none;
	/* Darker veil: the artwork glows through, the page stays deep. */
	background:
		radial-gradient(110% 80% at 50% 40%, rgba(8, 8, 16, 0) 25%, rgba(4, 4, 10, 0.78) 100%),
		linear-gradient(180deg, rgba(8, 8, 16, 0.58), rgba(8, 8, 16, 0.7));
}

/* ── Text ── */
.sm-app .sm-topbar-eyebrow,
.sm-app .sm-eyebrow { color: var(--sm-accent-hot); }
.sm-app .sm-eyebrow::before { background: var(--sm-accent-hot); }
.sm-app .sm-title { color: #fff; text-shadow: 0 2px 20px rgba(15, 16, 26, 0.6); }
.sm-app .sm-subtitle { color: rgba(228, 226, 255, 0.62); }

/* ── Surfaces ── */
.sm-app .sm-panel,
.sm-app .sm-clips-toolbar,
.sm-app .sm-complete,
.sm-app .sm-processing-note,
.sm-app .sm-analysis-error,
.sm-app .sm-drawer,
.sm-app .sm-topic-inner,
.sm-app .sm-clip-card {
	position: relative;
	background: var(--gl-fill);
	box-shadow: var(--gl-shadow);
	backdrop-filter: blur(9px) saturate(150%);
	-webkit-backdrop-filter: blur(9px) saturate(150%);
}
.sm-app .sm-panel { border-radius: 40px; }
/* Keep the toolbar sticky (it relies on top:74px) — sticky already
   anchors the ::after rim, and `relative` would shift it 74px down. */
.sm-app .sm-clips-toolbar { position: sticky; border-radius: 30px; }
.sm-app .sm-topic-inner,
.sm-app .sm-clip-card { border-radius: 28px; }
.sm-app .sm-drawer { backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); background: linear-gradient(165deg, rgba(68, 66, 112, 0.42), rgba(15, 16, 26, 0.82)); }

/* ── Pills / controls ── */
.sm-app .sm-tabs,
.sm-app .sm-input-row,
.sm-app .sm-preset-summary,
.sm-app .sm-rail-step,
.sm-app .sm-dropzone,
.sm-app .sm-file-chip,
.sm-app .btn-secondary,
.sm-app .btn-back,
.sm-app .sm-drawer-tabs,
.sm-app .sm-seg,
.sm-app .sm-subpreset-inner,
.sm-app .sm-autoreview-option-inner,
.sm-app .sm-telegram-status,
.sm-app .sm-promo-row,
.sm-app .sm-drawer-close {
	position: relative;
	border-color: transparent;
	background: var(--pl-fill);
	box-shadow: var(--pl-shadow);
	backdrop-filter: blur(8px) saturate(140%);
	-webkit-backdrop-filter: blur(8px) saturate(140%);
}
.sm-app .sm-tabs { padding: 6px; }
.sm-app .sm-input-row,
.sm-app .sm-preset-summary { padding-top: 22px; padding-bottom: 22px; }
/* Two-line row — a full pill reads too round here. */
.sm-app .sm-preset-summary { border-radius: 24px; }
.sm-app .sm-input-row i,
.sm-app .sm-dropzone i { color: var(--neb-lilac-hot); }
.sm-app .sm-input-row:focus-within { box-shadow: var(--pl-shadow), 0 0 0 1px rgba(201, 195, 255, 0.5), 0 0 26px -6px rgba(155, 147, 255, 0.5); }
.sm-app .sm-input-row.is-error { box-shadow: var(--pl-shadow), 0 0 0 1px rgba(255, 107, 129, 0.6); }
.sm-app .sm-dropzone { border: 0; border-radius: 32px; }
.sm-app .sm-dropzone.is-dragover { box-shadow: var(--pl-shadow), 0 0 0 1px rgba(201, 195, 255, 0.6), 0 0 34px -6px rgba(155, 147, 255, 0.55); }
.sm-app .sm-file-chip { border-radius: 30px; }
.sm-app .sm-file-progress-bar,
.sm-app .sm-loading-progress-bar { background: linear-gradient(90deg, var(--neb-violet), var(--neb-lilac), var(--neb-lilac-hot)); box-shadow: 0 0 10px rgba(155, 147, 255, 0.6); }

/* ── Active states: violet glass bead ── */
.sm-app .sm-tab.is-active,
.sm-app .sm-rail-step.is-active,
.sm-app .sm-drawer-tab.is-active,
.sm-app .sm-seg-btn.is-active {
	background: var(--ac-fill);
	box-shadow: var(--ac-shadow);
	color: #fff;
}
.sm-app .sm-tab.is-active i { color: #fff; }
.sm-app .sm-rail-num { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.sm-app .sm-rail-step.is-active .sm-rail-num {
	background: radial-gradient(circle at 50% 30%, #b3a9ff, #7C6CF0);
	color: #fff;
	box-shadow: 0 0 10px rgba(155, 147, 255, 0.7);
}

/* ── Buttons ── */
.sm-app .btn-primary {
	position: relative;
	background:
		radial-gradient(120% 100% at 50% 120%, rgba(155, 147, 255, 0.28), rgba(155, 147, 255, 0) 60%),
		var(--pl-fill);
	box-shadow: var(--pl-shadow), 0 0 30px -10px rgba(155, 147, 255, 0.45);
	color: #fff;
	letter-spacing: 0.16em;
}
.sm-app .btn-primary:not(:disabled):hover {
	background:
		radial-gradient(120% 100% at 50% 120%, rgba(155, 147, 255, 0.45), rgba(155, 147, 255, 0) 62%),
		linear-gradient(180deg, rgba(68, 66, 112, 0.4), rgba(15, 16, 26, 0.5));
	box-shadow: var(--pl-shadow), 0 0 0 1px rgba(201, 195, 255, 0.5), 0 0 36px -8px rgba(155, 147, 255, 0.65);
}
.sm-app .btn-primary:disabled { opacity: 1; filter: none; color: rgba(228, 226, 255, 0.42); }
.sm-app .btn-primary:disabled .btn-arrow { opacity: 0.6; }

/* ── Topics / clips ── */
.sm-app .sm-topic-card:hover .sm-topic-inner { transform: translateY(-3px); }
.sm-app .sm-topic-card input:checked ~ .sm-topic-inner,
.sm-app .sm-subpreset-card input:checked ~ .sm-subpreset-inner,
.sm-app .sm-autoreview-option input:checked ~ .sm-autoreview-option-inner {
	box-shadow: var(--gl-shadow), 0 0 0 1px rgba(201, 195, 255, 0.6), 0 0 30px -6px rgba(155, 147, 255, 0.55);
}
.sm-app .sm-topic-card input:checked ~ .sm-topic-inner .sm-topic-check {
	background: radial-gradient(circle at 50% 30%, #b3a9ff, #7C6CF0);
	box-shadow: 0 0 12px rgba(155, 147, 255, 0.7);
}
.sm-app .sm-clip-field input,
.sm-app .sm-clip-field textarea { background: rgba(15, 16, 26, 0.5); border-color: rgba(255, 255, 255, 0.08); }
.sm-app .sm-clip-btn { border-radius: 999px; }

/* ── Luminous rim ───────────────────────────────────────────────
   A 1.5px gradient border (masked ::after) that is faint all round and
   flares white/lilac at the corners and along the bottom edge. */
.sm-app .sm-panel::after,
.sm-app .sm-clips-toolbar::after,
.sm-app .sm-complete::after,
.sm-app .sm-topic-inner::after,
.sm-app .sm-clip-card::after,
.sm-app .sm-tabs::after,
.sm-app .sm-input-row::after,
.sm-app .sm-preset-summary::after,
.sm-app .sm-rail-step::after,
.sm-app .sm-dropzone::after,
.sm-app .sm-file-chip::after,
.sm-app .btn-primary::after,
.sm-app .btn-secondary::after,
.sm-app .btn-back::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	padding: 1.5px;
	border-radius: inherit;
	pointer-events: none;
	background:
		radial-gradient(220px 70px at 92% 0%, #fff, rgba(255, 255, 255, 0) 70%),
		radial-gradient(90px 220px at 100% 22%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%),
		radial-gradient(260px 60px at 10% 100%, rgba(214, 209, 255, 1), rgba(201, 195, 255, 0) 70%),
		radial-gradient(420px 60px at 62% 100%, rgba(170, 162, 255, 1), rgba(155, 147, 255, 0) 70%),
		radial-gradient(90px 220px at 0% 70%, rgba(214, 209, 255, 0.8), rgba(201, 195, 255, 0) 70%),
		radial-gradient(200px 50px at 20% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
		linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
}
/* Bloom: soft light spilling from the brightest points of the panel rim. */
.sm-app .sm-panel::before {
	content: '';
	position: absolute;
	inset: -30px;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(120px 60px at calc(92% + 0px) 30px, rgba(255, 255, 255, 0.35), transparent 70%),
		radial-gradient(260px 60px at 60% calc(100% - 30px), rgba(155, 147, 255, 0.35), transparent 70%),
		radial-gradient(160px 60px at 14% calc(100% - 30px), rgba(201, 195, 255, 0.3), transparent 70%);
	filter: blur(10px);
}

/* Small controls get a subtler rim: one glint top-left, lilac bottom. */
.sm-app .sm-tabs::after,
.sm-app .sm-input-row::after,
.sm-app .sm-preset-summary::after,
.sm-app .sm-rail-step::after,
.sm-app .sm-file-chip::after,
.sm-app .btn-secondary::after,
.sm-app .btn-back::after {
	padding: 1px;
	background:
		radial-gradient(120px 34px at 16% 0%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%),
		radial-gradient(220px 34px at 80% 100%, rgba(170, 162, 255, 0.95), rgba(155, 147, 255, 0) 70%),
		radial-gradient(60px 60px at 100% 50%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%),
		linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18));
}
/* The big CTA's rim glows along its bottom, as in the reference. */
.sm-app .btn-primary::after {
	padding: 1.5px;
	background:
		radial-gradient(120px 36px at 10% 0%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
		radial-gradient(70% 40px at 50% 100%, rgba(155, 147, 255, 0.95), rgba(155, 147, 255, 0) 70%),
		radial-gradient(90px 40px at 96% 100%, rgba(201, 195, 255, 0.8), rgba(201, 195, 255, 0) 70%),
		linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16));
}
/* Keep text/icons above the rim layer. */
.sm-app .sm-panel > *, .sm-app .btn-primary > *, .sm-app .sm-input-row > *, .sm-app .sm-preset-summary > * { position: relative; z-index: 2; }

/* ── Switches ── */
.app-container.v2.sm-app .toggle-slider {
	background: rgba(15, 16, 26, 0.6);
	box-shadow: inset 0 2px 5px rgba(5, 5, 12, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
/* Pre-existing bug: a base rule left the knob at left:23px, so "on"
   pushed it outside the 46px track. Pin it inside. */
.app-container.v2.sm-app .toggle-slider::before { left: 3px; }
.app-container.v2.sm-app .toggle-switch input:checked ~ .toggle-slider {
	background: var(--ac-fill);
	box-shadow: var(--ac-shadow);
}
.app-container.v2.sm-app .toggle-switch input:checked ~ .toggle-slider::before {
	background: radial-gradient(circle at 50% 30%, #fff, #dcd8ff);
	box-shadow: 0 2px 6px rgba(5, 5, 12, 0.6);
}

/* ── Phones: lighter backdrop file, no fixed attachment (iOS) ── */
@media (max-width: 720px) {
	.sm-app .sm-panel { border-radius: 32px; }
}
/* Phones — as in the reference: full-width switch, the Telegram row
   stays one rounded row, a calmer CTA. */
@media (max-width: 520px) {
	/* .app-container already gives the 18px page gutter; a second 14px
	   here left a 320px phone only 224px of content. */
	.sm-app .sm-flow { padding-left: 0; padding-right: 0; }
	.sm-app .sm-panel { padding: 24px 16px 18px; }
	.sm-app .sm-tabs { display: flex; width: 100%; padding: 5px; }
	.sm-app .sm-tab { flex: 1 1 0; justify-content: center; padding: 11px 10px; font-size: 12px; }
	.sm-app .sm-input-row { padding: 18px 18px; }
	.sm-app .sm-preset-summary {
		flex-wrap: nowrap;
		border-radius: 22px;
		padding: 16px 12px 16px 18px;
		text-align: left;
	}
	.sm-app .sm-preset-summary-text { flex: 1; }
	.sm-app .sm-preset-summary .btn-secondary { flex: none; padding: 10px 14px; font-size: 11px; }
	.sm-app .btn-primary { padding: 18px 20px; font-size: 13px; letter-spacing: 0.12em; }
}

@media (prefers-reduced-motion: reduce) {
	.sm-app .sm-topic-card:hover .sm-topic-inner { transform: none; }
}

/* ============================================================
   Home-screen controls — same as SONYA's main page.
   «Ссылка / Файл», the link field, the file drop and «Продолжить» use
   the exact hero2 material from styles.css (.hero2-tabs / .hero2-input
   / .hero2-cta): translucent dark glass, the Figma diagonal inset bevel
   (#B3B3B3), Unbounded tabs, a centred field and the white-beveled
   active tab — so this page reads as the same product, not another
   service. Overrides the nebula look above for these controls only.
   ============================================================ */
.sm-app .sm-tabs,
.sm-app .sm-input-row,
.sm-app .sm-dropzone,
.sm-app .sm-preset-summary,
.sm-app .sm-preset-summary .btn-secondary,
.sm-app #sm-btn-1 {
	background: rgba(0, 0, 0, 0.28);
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(179, 179, 179, 0.72) inset,
		21.48px 21.48px 10.74px -21.48px rgba(179, 179, 179, 0.72) inset,
		0 10px 40px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	transition: transform 180ms ease, box-shadow 220ms ease, background 220ms ease;
}
.sm-app .sm-tabs::after,
.sm-app .sm-input-row::after,
.sm-app .sm-dropzone::after,
.sm-app .sm-preset-summary::after,
.sm-app .sm-preset-summary .btn-secondary::after,
.sm-app #sm-btn-1::after { display: none; }
.sm-app .sm-preset-summary .btn-secondary:hover {
	background: rgba(20, 20, 22, 0.55);
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(255, 255, 255, 0.85) inset,
		21.48px 21.48px 10.74px -21.48px rgba(255, 255, 255, 0.85) inset,
		0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Tabs pill (Ссылка / Файл) */
.sm-app .sm-tabs {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 72px;
	padding: 6px;
	gap: 6px;
	border-radius: 9999px;
}
.sm-app .sm-tab {
	flex: 1 1 0;
	justify-content: center;
	gap: 10px;
	padding: 0 18px;
	border-radius: 9999px;
	background: transparent;
	box-shadow: none;
	color: rgba(255, 255, 255, 0.58);
	font-family: 'Unbounded', 'Sora', system-ui, sans-serif;
	font-weight: 400;
	font-size: clamp(15px, 3.4vw, 19px);
	letter-spacing: 0.06em;
	text-transform: none;
	transition: color 200ms ease, background 260ms ease, box-shadow 260ms ease, transform 160ms ease;
}
.sm-app .sm-tab i { font-size: 0.78em; opacity: 0.85; color: inherit; }
.sm-app .sm-tab:hover { color: rgba(255, 255, 255, 0.82); background: rgba(255, 255, 255, 0.05); }
.sm-app .sm-tab:active { transform: scale(0.98); }
.sm-app .sm-tab.is-active {
	color: #fff;
	background: rgba(20, 20, 22, 0.78);
	box-shadow:
		-14px -14px 8px -14px rgba(255, 255, 255, 0.95) inset,
		14px 14px 8px -14px rgba(255, 255, 255, 0.6) inset,
		0 6px 20px rgba(0, 0, 0, 0.35);
}
.sm-app .sm-tab.is-active:hover { background: rgba(24, 24, 26, 0.82); }

/* Link field */
.sm-app .sm-input-row {
	height: 86px;
	padding: 0 28px;
	gap: 14px;
	border-radius: 9999px;
}
.sm-app .sm-input-row i { font-size: 18px; color: rgba(255, 255, 255, 0.72); flex-shrink: 0; }
.sm-app .sm-input-row input {
	font-family: var(--font-body);
	font-size: clamp(15px, 3.6vw, 20px);
	letter-spacing: 0.01em;
	text-align: center;
	color: #fff;
}
.sm-app .sm-input-row input::placeholder { color: rgba(255, 255, 255, 0.6); }
.sm-app .sm-input-row:focus-within {
	background: rgba(20, 20, 22, 0.55);
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(255, 255, 255, 0.85) inset,
		21.48px 21.48px 10.74px -21.48px rgba(255, 255, 255, 0.85) inset,
		0 10px 40px rgba(0, 0, 0, 0.35);
}
.sm-app .sm-input-row:focus-within i { color: rgba(255, 255, 255, 0.92); }
.sm-app .sm-input-row.is-error {
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(255, 107, 129, 0.75) inset,
		21.48px 21.48px 10.74px -21.48px rgba(255, 107, 129, 0.75) inset,
		0 10px 40px rgba(0, 0, 0, 0.35);
}

/* File drop — same material as the home file row */
.sm-app .sm-dropzone { border: 0; border-radius: 40px; }
.sm-app .sm-dropzone:hover { background: rgba(10, 10, 12, 0.38); }
.sm-app .sm-dropzone i { color: rgba(255, 255, 255, 0.72); }
.sm-app .sm-dropzone-title { font-family: var(--font-body); font-size: 17px; color: #fff; }
.sm-app .sm-dropzone-title span { color: #fff; }
.sm-app .sm-dropzone.is-dragover {
	background: rgba(20, 20, 22, 0.55);
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(255, 255, 255, 0.85) inset,
		21.48px 21.48px 10.74px -21.48px rgba(255, 255, 255, 0.85) inset,
		0 10px 40px rgba(0, 0, 0, 0.35);
}

/* «Продолжить» — the home «Продолжить» CTA */
.sm-app #sm-btn-1 {
	height: 68px;
	padding: 0 32px;
	border-radius: 9999px;
	font-family: 'Unbounded', 'Sora', system-ui, sans-serif;
	font-weight: 500;
	font-size: clamp(15px, 3.4vw, 18px);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}
.sm-app #sm-btn-1:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.sm-app #sm-btn-1:not(:disabled):hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, 0.13);
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(255, 255, 255, 0.9) inset,
		21.48px 21.48px 10.74px -21.48px rgba(255, 255, 255, 0.65) inset,
		0 12px 34px rgba(0, 0, 0, 0.4);
}
.sm-app #sm-btn-1:disabled { opacity: 0.5; color: #fff; }

@media (max-width: 520px) {
	.sm-app .sm-tabs { height: 60px; }
	.sm-app .sm-tab { font-size: 15px; padding: 0 10px; }
	.sm-app .sm-input-row { height: 72px; padding: 0 22px; }
	.sm-app #sm-btn-1 { height: 62px; padding: 0 26px; font-size: 15px; }
}

/* Step rail (Источник / Темы / Клипы) — home-screen pill material:
   translucent dark glass with the Figma diagonal bevel; the current
   step is the home «Ссылка» tab (graphite, white bevel), done steps
   get a quiet check. No violet here. */
.sm-app .sm-rail-step {
	padding: 8px 18px 8px 8px;
	background: rgba(0, 0, 0, 0.28);
	box-shadow:
		-14px -14px 8px -14px rgba(179, 179, 179, 0.72) inset,
		14px 14px 8px -14px rgba(179, 179, 179, 0.72) inset,
		0 8px 24px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
}
.sm-app .sm-rail-step::after { display: none; }
.sm-app .sm-rail-label {
	font-family: 'Unbounded', 'Sora', system-ui, sans-serif;
	font-weight: 400;
	font-size: 12.5px;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.58);
}
.sm-app .sm-rail-num {
	width: 26px; height: 26px;
	font-family: 'Unbounded', 'Sora', system-ui, sans-serif;
	font-size: 11px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.6);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.sm-app .sm-rail-step.is-active {
	background: rgba(20, 20, 22, 0.78);
	box-shadow:
		-14px -14px 8px -14px rgba(255, 255, 255, 0.95) inset,
		14px 14px 8px -14px rgba(255, 255, 255, 0.6) inset,
		0 6px 20px rgba(0, 0, 0, 0.35);
}
.sm-app .sm-rail-step.is-active .sm-rail-label { color: #fff; }
.sm-app .sm-rail-step.is-active .sm-rail-num {
	background: #fff;
	color: #141416;
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}
.sm-app .sm-rail-step.is-done .sm-rail-label { color: rgba(255, 255, 255, 0.82); }
.sm-app .sm-rail-step.is-done .sm-rail-num {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* ============================================================
   Клипы — calmer page: less text, no bright thumbnails.
   ============================================================ */
/* Header: the title says it; the long explainer goes. */
#sm-step-clips .sm-subtitle { display: none; }
#sm-step-clips .sm-panel-head { margin-bottom: 18px; }

/* Toolbar: compact, numbers quiet; colour only where it means something. */
.sm-app .sm-clips-toolbar { padding: 14px 18px; gap: 14px; margin-bottom: 14px; }
.sm-app .sm-stats { gap: 22px; }
.sm-app .sm-stat { flex-direction: row; align-items: baseline; gap: 7px; }
.sm-app .sm-stat-num { font-size: 16px; color: #fff; }
.sm-app .sm-stat-label { font-size: 11px; letter-spacing: 0.02em; text-transform: none; color: rgba(255, 255, 255, 0.5); }
.sm-app .sm-stat--approved .sm-stat-num,
.sm-app .sm-stat--skipped .sm-stat-num { color: #fff; }
.sm-app .sm-stat--failed .sm-stat-num { color: #e8a3ad; }
.sm-app .sm-auto-toggle-label span:last-child { display: none; }

/* «Можно закрыть вкладку…» — a quiet line, not another plaque. */
.sm-app .sm-processing-note {
	background: none;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	padding: 0 6px;
	margin-bottom: 14px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.42);
}
.sm-app .sm-processing-note::after { display: none; }

/* Cards: graphite glass previews instead of random bright gradients. */
.sm-app .sm-clips-grid { gap: 14px; }
.sm-app .sm-clip-thumb {
	aspect-ratio: 9 / 13;
	background:
		radial-gradient(90% 60% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 62%),
		linear-gradient(170deg, #1a1a1f 0%, #0e0e13 60%, #08080b 100%) !important;
}
.sm-app .sm-clip-thumb-placeholder i { color: rgba(255, 255, 255, 0.22); }
.sm-app .sm-clip-thumb-time,
.sm-app .sm-clip-thumb-badge {
	background: rgba(0, 0, 0, 0.35);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.sm-app .sm-clip-thumb-badge { color: rgba(255, 255, 255, 0.7); }
.sm-app .sm-clip-thumb-badge.is-failed { color: #e8a3ad; }
.sm-app .sm-clip-thumb-play {
	background: rgba(255, 255, 255, 0.1);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Body: field captions move into the fields (placeholders). */
.sm-app .sm-clip-body { padding: 12px; gap: 8px; }
.sm-app .sm-clip-field label {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.sm-app .sm-clip-field input,
.sm-app .sm-clip-field textarea {
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.28);
	border-color: rgba(255, 255, 255, 0.06);
	font-size: 13px;
}
.sm-app .sm-clip-field textarea { min-height: 0; height: 40px; }
.sm-app .sm-clip-field input::placeholder,
.sm-app .sm-clip-field textarea::placeholder { color: rgba(255, 255, 255, 0.32); }
.sm-app .sm-clip-field input:focus,
.sm-app .sm-clip-field textarea:focus { border-color: rgba(255, 255, 255, 0.35); }

/* Failed / retry: muted, not alarming red blocks. */
.sm-app .sm-clip-failed-msg { border-radius: 14px; background: rgba(232, 163, 173, 0.08); color: #e8a3ad; }
.sm-app .sm-clip-btn--retry { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sm-app .sm-clip-card.is-failed { box-shadow: var(--gl-shadow), 0 0 0 1px rgba(232, 163, 173, 0.28); }
/* Processing animation in monochrome — no teal/violet blobs. */
.sm-app .sm-clip-cloth,
.sm-app .sm-clip-cloth-fallback,
.sm-app .sm-clip-cloth-glare { filter: grayscale(1) brightness(0.9); }

/* «ШАГ 3» goes — the rail above already says where you are. */
#sm-step-clips .sm-eyebrow { display: none; }

/* Secondary clip actions live behind «⋯» (top-right of the card body). */
.sm-app .sm-clip-body { position: relative; }
.sm-app .sm-clip-more {
	position: absolute;
	top: -46px;
	right: 10px;
	z-index: 3;
	width: 32px; height: 32px;
	display: grid; place-items: center;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.85);
	background: rgba(0, 0, 0, 0.35);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.sm-app .sm-clip-more:hover,
.sm-app .sm-clip-card.is-more-open .sm-clip-more { background: rgba(255, 255, 255, 0.16); }
.sm-app .sm-clip-icon-actions { display: none; }
.sm-app .sm-clip-card.is-more-open .sm-clip-icon-actions { display: flex; animation: smMoreIn 0.18s ease-out both; }
@keyframes smMoreIn { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
	.sm-app .sm-clip-card.is-more-open .sm-clip-icon-actions { animation: none; }
}

/* ============================================================
   «Шаблон стримера» drawer — redesigned.
   One floating glass sheet (same family as the App Library), the home
   «Ссылка / Файл» pill for tabs, subtitle styles as a single row of
   vertical preview cards, and settings as grouped lists (rows with
   hairline dividers) instead of a separate plaque per control.
   ============================================================ */
.sm-app .sm-drawer-overlay { background: rgba(4, 4, 8, 0.55); padding: 12px; }
.sm-app .sm-drawer {
	width: min(480px, 100%);
	border-radius: 34px;
	overflow: hidden;
	background:
		radial-gradient(130% 40% at 50% -6%, rgba(255, 255, 255, 0.1), transparent 62%),
		linear-gradient(180deg, rgba(24, 24, 30, 0.86), rgba(10, 10, 16, 0.92));
	backdrop-filter: blur(30px) saturate(140%);
	-webkit-backdrop-filter: blur(30px) saturate(140%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.22),
		-21.48px -21.48px 10.74px -21.48px rgba(179, 179, 179, 0.55) inset,
		21.48px 21.48px 10.74px -21.48px rgba(179, 179, 179, 0.55) inset,
		0 30px 80px rgba(0, 0, 0, 0.6);
}
.sm-app .sm-drawer::after { display: none; }

.sm-app .sm-drawer-header { padding: 24px 22px 8px 28px; border: 0; }
.sm-app .sm-drawer-title { font-family: 'Unbounded', 'Sora', sans-serif; font-weight: 400; font-size: 19px; letter-spacing: 0.02em; }
.sm-app .sm-drawer-close {
	width: 38px; height: 38px;
	background: rgba(0, 0, 0, 0.28);
	box-shadow: -10px -10px 6px -10px rgba(179, 179, 179, 0.6) inset, 10px 10px 6px -10px rgba(179, 179, 179, 0.6) inset;
}

/* Tabs — the home pill */
.sm-app .sm-drawer-tabs {
	margin: 12px 20px 4px;
	padding: 5px;
	gap: 4px;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.3);
	box-shadow:
		-14px -14px 8px -14px rgba(179, 179, 179, 0.6) inset,
		14px 14px 8px -14px rgba(179, 179, 179, 0.6) inset;
	backdrop-filter: none;
}
.sm-app .sm-drawer-tabs::after { display: none; }
.sm-app .sm-drawer-tab {
	padding: 11px 4px;
	border: 0;
	border-radius: 999px;
	font-family: 'Unbounded', 'Sora', sans-serif;
	font-size: 11.5px;
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.55);
	transition: color 0.2s ease, background-color 0.26s ease, box-shadow 0.26s ease;
}
.sm-app .sm-drawer-tab:hover { color: rgba(255, 255, 255, 0.85); }
.sm-app .sm-drawer-tab.is-active {
	color: #fff;
	background: rgba(20, 20, 22, 0.82);
	box-shadow:
		-14px -14px 8px -14px rgba(255, 255, 255, 0.95) inset,
		14px 14px 8px -14px rgba(255, 255, 255, 0.6) inset,
		0 6px 18px rgba(0, 0, 0, 0.4);
}

.sm-app .sm-drawer-body { padding: 8px 20px 20px; }
.sm-app .sm-drawer-section-label {
	margin: 22px 8px 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: rgba(255, 255, 255, 0.42);
}

/* ── Subtitle styles: one row of vertical previews ── */
.sm-app .sm-subpreset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sm-app .sm-subpreset-inner {
	gap: 9px;
	padding: 0;
	border-radius: 0;
	overflow: visible;
	background: none;
	box-shadow: none;
	backdrop-filter: none;
}
.sm-app .sm-subpreset-inner::after { display: none; }
.sm-app .sm-subpreset-preview {
	aspect-ratio: 9 / 16;
	padding: 10% 8%;
	border-radius: 18px;
	background:
		radial-gradient(90% 55% at 50% 20%, rgba(255, 255, 255, 0.14), transparent 70%),
		linear-gradient(170deg, #2a2a33 0%, #15151b 55%, #0b0b10 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 24px -12px rgba(0, 0, 0, 0.8);
	container-type: inline-size;
	transition: box-shadow 0.22s ease, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.sm-app .sm-subpreset-card:hover .sm-subpreset-preview { transform: translateY(-2px); }
.sm-app .sm-subpreset-caption { font-family: 'Onest', system-ui, sans-serif; font-weight: 800; letter-spacing: 0.01em; text-transform: none; }
.sm-app .sm-subpreset-preview[data-sub-size="s"] .sm-subpreset-caption { font-size: 10cqw; font-weight: 700; }
.sm-app .sm-subpreset-preview[data-sub-size="m"] .sm-subpreset-caption { font-size: 13cqw; }
.sm-app .sm-subpreset-preview[data-sub-size="l"] .sm-subpreset-caption { font-size: 16cqw; }
.sm-app .sm-subpreset-caption em { font-style: normal; padding: 0 0.15em; border-radius: 0.2em; background: #fff; color: #141416; text-shadow: none; }
.sm-app .sm-subpreset-name { padding: 0 2px; font-size: 11.5px; line-height: 1.25; color: rgba(255, 255, 255, 0.62); text-align: center; }
.sm-app .sm-subpreset-check {
	position: absolute;
	top: 8px; right: 8px;
	width: 20px; height: 20px;
	display: grid; place-items: center;
	border-radius: 50%;
	font-size: 9px;
	color: #141416;
	background: #fff;
	opacity: 0;
	transform: scale(0.7);
	transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.23, 1, 0.32, 1);
}
.sm-app .sm-subpreset-card input:checked ~ .sm-subpreset-inner { box-shadow: none; }
.sm-app .sm-subpreset-card input:checked ~ .sm-subpreset-inner .sm-subpreset-preview {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 6px rgba(255, 255, 255, 0.08), 0 14px 28px -12px rgba(0, 0, 0, 0.85);
}
.sm-app .sm-subpreset-card input:checked ~ .sm-subpreset-inner .sm-subpreset-check { opacity: 1; transform: scale(1); }
.sm-app .sm-subpreset-card input:checked ~ .sm-subpreset-inner .sm-subpreset-name { color: #fff; }
.sm-app .sm-subpreset-card input:focus-visible ~ .sm-subpreset-inner .sm-subpreset-preview { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 3px; }
/* «Свой» — same frame, dashed light */
.sm-app .sm-subpreset-add .sm-subpreset-inner {
	aspect-ratio: 9 / 16;
	border: 1.5px dashed rgba(255, 255, 255, 0.18);
	border-radius: 18px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 16px;
}
.sm-app .sm-subpreset-add:hover .sm-subpreset-inner { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

/* ── Grouped settings list ── */
.sm-app .sm-preset-controls,
.sm-app .sm-autoreview-options,
.sm-app .sm-promo-list:not(:empty),
.sm-app [data-preset-panel="telegram"] {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 4px 16px;
	border-radius: 22px;
	background: rgba(0, 0, 0, 0.26);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.sm-app [data-preset-panel="telegram"]:not(.is-active) { display: none; }
.sm-app .sm-preset-controls > *,
.sm-app .sm-autoreview-options > *,
.sm-app .sm-promo-list > *,
.sm-app [data-preset-panel="telegram"] > * { box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06); }
.sm-app .sm-preset-controls > :first-child,
.sm-app .sm-autoreview-options > :first-child,
.sm-app .sm-promo-list > :first-child,
.sm-app [data-preset-panel="telegram"] > :first-child { box-shadow: none; }

/* Rows: label left, control right */
.sm-app .sm-seg-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 12px 0; }
.sm-app .sm-seg-label { font-size: 13.5px; color: rgba(255, 255, 255, 0.85); }
.sm-app .sm-seg {
	width: 190px;
	padding: 3px;
	gap: 2px;
	background: rgba(0, 0, 0, 0.32);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
	backdrop-filter: none;
}
.sm-app .sm-seg::after { display: none; }
.sm-app .sm-seg-btn { flex: 1 1 0; padding: 7px 6px; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.sm-app .sm-seg-btn.is-active {
	color: #141416;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.sm-app .sm-seg-toggle-row { padding: 13px 0; }
.sm-app .sm-seg-toggle-row span { font-size: 13.5px; color: rgba(255, 255, 255, 0.85); }

/* Auto-review: radio rows, no card per option */
.sm-app .sm-autoreview-options { padding: 4px 6px; }
.sm-app .sm-autoreview-option-inner {
	padding: 14px 10px;
	gap: 14px;
	border-radius: 16px;
	background: none;
	box-shadow: none;
	backdrop-filter: none;
}
.sm-app .sm-autoreview-option-inner::after { display: none; }
.sm-app .sm-autoreview-option:hover .sm-autoreview-option-inner { background: rgba(255, 255, 255, 0.03); }
.sm-app .sm-autoreview-option input:checked ~ .sm-autoreview-option-inner { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.sm-app .sm-autoreview-dot { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.sm-app .sm-autoreview-option input:checked ~ .sm-autoreview-option-inner .sm-autoreview-dot { box-shadow: inset 0 0 0 5px #fff; }
.sm-app .sm-autoreview-name { font-size: 14px; color: #fff; }
.sm-app .sm-autoreview-desc { font-size: 12px; color: rgba(255, 255, 255, 0.5); }

/* Telegram */
.sm-app .sm-telegram-row { padding: 14px 0; }
.sm-app .sm-telegram-status {
	padding: 14px 0;
	border-radius: 0;
	background: none;
	box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
	backdrop-filter: none;
}
.sm-app .sm-telegram-status::after { display: none; }
.sm-app .sm-telegram-status .btn-secondary { flex: none; padding: 9px 14px; font-size: 12px; text-transform: none; letter-spacing: 0.01em; }
.sm-app .sm-telegram-status-text { white-space: nowrap; }

/* Promo */
.sm-app .sm-promo-row { padding: 12px 0; border-radius: 0; background: none; backdrop-filter: none; }
.sm-app .sm-promo-row::after { display: none; }
.sm-app .sm-dropzone--compact { margin-top: 12px; padding: 22px 16px; border-radius: 22px; }

/* Footer — the home CTA */
.sm-app .sm-drawer-footer { padding: 14px 20px 20px; border: 0; }
.sm-app .sm-drawer .btn-primary.sm-btn-sm {
	width: 100%;
	height: 56px;
	border-radius: 999px;
	font-family: 'Unbounded', 'Sora', sans-serif;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	box-shadow:
		-21.48px -21.48px 10.74px -21.48px rgba(179, 179, 179, 0.72) inset,
		21.48px 21.48px 10.74px -21.48px rgba(179, 179, 179, 0.72) inset,
		0 10px 30px rgba(0, 0, 0, 0.35);
}
.sm-app .sm-drawer .btn-primary.sm-btn-sm::after { display: none; }
.sm-app .sm-drawer .btn-primary.sm-btn-sm:hover { background: rgba(255, 255, 255, 0.13); }

@media (max-width: 520px) {
	.sm-app .sm-drawer-overlay { padding: 8px; }
	.sm-app .sm-drawer { border-radius: 28px; }
	.sm-app .sm-subpreset-grid { gap: 8px; }
	.sm-app .sm-seg { width: 160px; }
}

/* ============================================================
   Phones — layout fixes: nothing overlaps, nothing leaves its card,
   no horizontal scroll, comfortable touch targets. Same materials,
   radii and type; only how rows wrap on narrow screens changes.
   ============================================================ */

/* The App Library button is fixed on <body> (z 21), while these drawers
   live inside .app-container's stacking context (z 1) — so on a phone it
   sat on the drawer title. The drawers are modal: step it aside meanwhile. */
@media (max-width: 560px) {
	body:has(.sm-app .sm-drawer-overlay:not(.is-hidden)) .sx-toggle { visibility: hidden; }
}

@media (max-width: 520px) {
	/* Drawer «Telegram»: status text may wrap; the connect button drops to
	   its own line instead of running past the sheet edge. */
	.sm-app .sm-telegram-status { flex-wrap: wrap; row-gap: 12px; }
	.sm-app .sm-telegram-status-text { white-space: normal; flex: 1 1 170px; min-width: 0; }
	.sm-app .sm-telegram-status .btn-secondary { margin-left: auto; max-width: 100%; white-space: normal; text-align: center; justify-content: center; min-height: 40px; }

	/* Touch targets: invisible hit areas where the look must not change,
	   real size where the control is a plain round button. */
	.sm-app .sm-seg-btn,
	.sm-app .sm-transcript-line-btn { position: relative; }
	.sm-app .sm-seg-btn::before { content: ""; position: absolute; inset: -6px 0; }
	.sm-app .sm-transcript-line-btn::before { content: ""; position: absolute; inset: -3px -6px; }
	.sm-app .sm-link-btn { padding: 10px 8px; }
	.sm-app .sm-file-chip-remove { width: 36px; height: 36px; }
	.sm-app .sm-clip-more { width: 36px; height: 36px; top: -48px; }
}

@media (max-width: 480px) {
	/* Clip cards (two per row from 381px): the action pair wraps instead of
	   pushing «Без подписей» into the neighbouring card. */
	.sm-app .sm-clip-actions { flex-wrap: wrap; }
	.sm-app .sm-clip-btn { flex: 1 1 auto; white-space: nowrap; min-height: 40px; }
	/* Time + status chips on the preview: the second chip wraps below
	   rather than squeezing the time to «5:1…». */
	.sm-app .sm-clip-thumb-topline { flex-wrap: wrap; align-items: flex-start; row-gap: 6px; }
	.sm-app .sm-clip-thumb-time { flex: 0 1 auto; }
	/* «⋯» actions: four equal buttons that always fit the card width. */
	.sm-app .sm-clip-icon-actions { gap: 6px; }
	.sm-app .sm-clip-icon-btn { flex: 1 1 0; min-width: 0; width: auto; height: 36px; font-size: 12px; }
}

@media (max-width: 400px) {
	/* «Шаблон стримера» tabs: four labels share the pill by their own
	   width (equal quarters were narrower than «Автоотбор»). */
	.sm-app .sm-drawer-tabs { margin-left: 14px; margin-right: 14px; gap: 2px; }
	.sm-app .sm-drawer-tab { flex: 1 1 auto; min-width: 0; padding: 11px 6px; font-size: 10.5px; letter-spacing: 0.01em; white-space: nowrap; }
}

@media (max-width: 340px) {
	/* 320px: four labels need ~316px, the pill has ~276px — two rows of two. */
	.sm-app .sm-drawer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 26px; }
	.sm-app .sm-drawer-tab { padding: 10px 6px; }
}

@media (max-width: 360px) {
	/* «Ссылка / Файл»: a little less inner padding so both pills fit 320px. */
	.sm-app .sm-tab { min-width: 0; padding: 0 6px; gap: 7px; }
}
