/* CUTMO design system v2 — loaded after styles.css and landing.css; what is here wins.
   One font (Inter: the display face had no Cyrillic, every Russian heading fell back to the system font),
   no caps-with-spacing labels, five text sizes, four surfaces, one accent for the main action and what is
   picked, red only for what destroys, the timeline's lanes each their own quiet colour.
   The controls the browser drew (select, range, colour, file, number, confirm) are ours: js/01b-ui.js. */

:root {
  /* surfaces: page → panel → card / field → raised (hover, menus) */
  --bg:            #0A0C0A;
  --surface:       #111411;
  --surface-2:     #171B17;
  --surface-3:     #1F241F;
  --border:        rgba(240,244,236,0.08);
  --border-strong: rgba(240,244,236,0.16);
  --graphite:      #2E332E;

  /* text: main → secondary → hint */
  --text:          #F1F3EE;
  --text-muted:    #A4AAA3;
  --text-dim:      #868D86;   /* 4,7:1 even on the lightest card (#7A817A was 4,35:1 — below WCAG AA) */

  /* one accent; the meanings */
  --accent:        #D9FF3B;
  --accent-ink:    #0B0D05;
  --accent-soft:   rgba(217,255,59,0.12);
  --accent-line:   rgba(217,255,59,0.55);
  --danger:        #FF6B5E;
  --danger-soft:   rgba(255,107,94,0.12);
  --warn:          #FFC24B;
  --warn-soft:     rgba(255,194,75,0.12);
  --ok:            #5BD68A;
  --ok-soft:       rgba(91,214,138,0.12);

  /* the timeline's lanes */
  --lane-video:    #7F9BB8;
  --lane-gfx:      #A796F2;
  --lane-over:     #63C3DD;
  --lane-music:    #6CCB8E;
  --lane-snd:      #F0B56A;

  /* type: one family, five sizes */
  --font-display:  "Inter", system-ui, sans-serif;
  --font-body:     "Inter", system-ui, sans-serif;
  --font-mono:     "Inter", system-ui, sans-serif;
  --fs-xs: 12px; --fs-s: 13px; --fs-m: 14px; --fs-l: 16px; --fs-xl: 20px;
  --fs-label: 12px; --ls-label: 0;
  --fs-body-m: 14px; --fs-body-s: 13px;

  /* shape */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --shadow-pop: 0 12px 40px rgba(0,0,0,.55), 0 0 0 1px var(--border-strong);
  --ctl-h: 36px; --ctl-h-sm: 32px;
}

body { font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "ss01"; }
.brand span { font-family: "Space Grotesk", var(--font-body); }          /* the latin logo keeps its face */

/* ── type: no caps with wide spacing anywhere in the interface (the captions on the video are content, not UI) ── */
.label, .bk-h, .pay-kicker, .offer-badge, .join-card .jc-side, .track-name, .transcript .fh, .fp-sec .label {
  text-transform: none !important; letter-spacing: 0 !important;
  font: 500 var(--fs-xs)/1.3 var(--font-body) !important; color: var(--text-muted);
}
.mono { font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.small { font-size: var(--fs-s); }
h1, h2, h3, .panel-title, .drop-title, .stat b { font-family: var(--font-body); letter-spacing: -0.01em; }
.panel-title { font: 600 var(--fs-m)/1.2 var(--font-body); }
/* the smallest text is 12 px (there were 9, 10, 10.5 and 11) */
.media-card .nm, .export-item span, .ruler i b, .reel-card .du, .reel-card .ok, .track-item .meta, .reel-card .pc,
.gfx-item > span, .bi-tools button, .m-lbl, .mt-vol, .me-rng, .me-num, .mt-btn, .stock-item span, .tr-name,
.src-keep .smark, .src-keep .pmark, .pc-badge, .look-card span, .pc-warn, .ref-item .why, .range-ticks, .fx-group,
.lt-meta span, .rs-piece, .tx-chip small, .auth-legal, .pay-badge, .fb-thumb span, .fail-line code, .cf-facts i,
.lib-tabs .lib-tab, .cap-quick, .cap-tile small, .cap-mini em, .font-tile small, .gfx-tile i, .gi-f > span,
.gi-sec > span, .gfx-pick i, .gfx-empty, .media-card .dur, .media-card .badge, .file-tile .file-name, .src-keep .zmark,
.reel-card .sc, .reel-score, .export-item span {
  font-family: var(--font-body) !important; letter-spacing: 0 !important;
}
.media-card .nm, .export-item span, .reel-card .du, .track-item .meta, .stock-item span, .tr-name, .pc-badge,
.look-card span, .pc-warn, .ref-item .why, .lt-meta span, .tx-chip small, .auth-legal, .fb-thumb span, .cap-tile small,
.font-tile small, .gi-f > span, .gi-sec > span, .gfx-empty, .lib-tabs .lib-tab, .cap-quick, .fx-group { font-size: var(--fs-xs) !important; }
.ruler i b { font-size: 11px; color: var(--text-dim); }

/* ── decoration that was noise: [ ПРОСМОТР ], the source time over the picture ── */
.monitor-screen .bracket { display: none; }
.monitor-screen .badge-r { font-size: var(--fs-xs); color: var(--text-dim); background: rgba(10,12,10,.6); padding: 3px 8px; border-radius: var(--r-xs); }

/* ── buttons: primary (one a screen), secondary, ghost, danger; 36 px, 32 small, 44 under a finger ── */
.btn { height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-sm); font: 500 var(--fs-s)/1 var(--font-body);
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); gap: 8px; }
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn.sm, .select.sm { height: var(--ctl-h-sm); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: transparent; border-color: rgba(255,107,94,.4); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn:disabled, .btn[disabled] { background: var(--surface-2); border-color: var(--border); color: var(--text-dim); opacity: .7; }
.btn-icon { width: var(--ctl-h); height: var(--ctl-h); flex-basis: var(--ctl-h); border-radius: var(--r-sm);
  background: transparent; border: 1px solid transparent; color: var(--text-muted); }
.btn-icon:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }
.btn-icon:disabled { opacity: .35; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }

/* ── chips: smaller, square-ish, a tag not a pill; picked = the accent's tint ── */
.chip-btn { height: 30px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-muted); font: 500 var(--fs-s)/1 var(--font-body); }
.chip-btn:hover { color: var(--text); background: var(--surface-3); }
.chip-btn.active, .chip-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); border-color: var(--accent-line); }

/* ── segmented control (2–4 choices, one of them) ── */
.seg { padding: 2px; gap: 2px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.seg-btn { border-radius: var(--r-xs); color: var(--text-muted); }
.seg-btn.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* ── fields ── */
.input { height: var(--ctl-h); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font: 400 var(--fs-m) var(--font-body); color: var(--text); padding: 0 12px; }
textarea.input { height: auto; padding: 10px 12px; line-height: 1.45; }
.input:hover { border-color: rgba(240,244,236,.24); }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.input::placeholder { color: var(--text-dim); }
.field { gap: 6px; }
.field > .dim.small:first-child, .field > .label:first-child { font-size: var(--fs-xs); color: var(--text-muted); }

/* the real element under our control: in the page, out of sight — fixed at the corner: absolute, it stood where its
   control is, deep in a scrolling library, but measured from the page — the editor page grew 5 700 px tall under
   «Графика» and the wheel over the player scrolled the whole editor away */
.ui-native { position: fixed !important; top: 0 !important; left: 0 !important; width: 1px !important; height: 1px !important; opacity: 0 !important;
  pointer-events: none !important; overflow: hidden; clip-path: inset(50%); margin: 0 !important; }

/* select → .dd */
.dd { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0;
  height: var(--ctl-h); padding: 0 10px 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: 500 var(--fs-s)/1 var(--font-body); cursor: pointer; text-align: left; }
.dd.sm { height: var(--ctl-h-sm); }
.dd:hover { background: var(--surface-3); }
.dd[aria-expanded="true"] { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd:disabled { opacity: .5; cursor: default; }
.dd-v { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-chev { flex: 0 0 12px; width: 12px; height: 8px; fill: none; stroke: var(--text-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--dur-fast) var(--ease); }
.dd[aria-expanded="true"] .ui-chev { transform: rotate(180deg); }
.ui-pop { position: fixed; z-index: 1000; background: var(--surface-3); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  overflow: auto; overscroll-behavior: contain; padding: 4px; animation: ui-in .12s var(--ease); }
@keyframes ui-in { from { opacity: 0; transform: translateY(-4px); } }
.dd-menu { display: flex; flex-direction: column; max-width: min(360px, calc(100vw - 16px)); }
.dd-g { padding: 10px 10px 4px; font: 500 var(--fs-xs)/1.2 var(--font-body); color: var(--text-dim); }
.dd-o { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 6px 10px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); font: 400 var(--fs-s)/1.3 var(--font-body);
  text-align: left; cursor: pointer; }
.dd-o:hover, .dd-o:focus-visible { background: rgba(240,244,236,.07); outline: none; }
.dd-o.on { color: var(--text); font-weight: 600; }
.dd-o:disabled { color: var(--text-dim); cursor: default; }
.ui-ck { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.dd-o.on .ui-ck { visibility: visible; }
/* on a phone a menu is a sheet from below */
.ui-veil { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.5); animation: ui-fade .15s; }
@keyframes ui-fade { from { opacity: 0; } }
.ui-pop.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; max-height: 70vh; min-width: 0 !important; max-width: none;
  border-radius: 16px 16px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); animation: ui-up .2s var(--ease); }
@keyframes ui-up { from { transform: translateY(40px); opacity: 0; } }
.ui-pop.sheet .dd-o { min-height: 48px; font-size: var(--fs-m); }
.ui-sheet-h { padding: 8px 10px 10px; font: 600 var(--fs-m)/1.2 var(--font-body); color: var(--text); }

/* range → a slider: thin track, the filled part, a round knob */
input[type="range"].rng { -webkit-appearance: none; appearance: none; height: 20px; background: transparent; cursor: pointer;
  accent-color: var(--accent); --p: 50%; }
input[type="range"].rng::-webkit-slider-runnable-track { height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--p), var(--graphite) var(--p)); }
input[type="range"].rng::-moz-range-track { height: 4px; border-radius: 4px; background: var(--graphite); }
input[type="range"].rng::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"].rng::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: var(--text); border: 0; box-shadow: 0 0 0 4px rgba(0,0,0,.25); transition: transform var(--dur-fast); }
input[type="range"].rng::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; }
input[type="range"].rng:hover::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"].rng:focus-visible { outline: none; }
input[type="range"].rng:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 2px var(--accent); }
@media (pointer: coarse) { input[type="range"].rng { height: 32px; }
  input[type="range"].rng::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; } }

/* colour → a swatch */
.ui-sw { width: 32px; height: 32px; flex: 0 0 32px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); padding: 3px;
  background: var(--surface-2); cursor: pointer; }
.ui-sw::before { content: ""; display: block; width: 100%; height: 100%; border-radius: 5px; background: var(--c, #fff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ui-sw[aria-expanded="true"] { border-color: var(--accent-line); }
.sw-pop { padding: 10px; display: flex; flex-direction: column; gap: 10px; width: 212px; }
.sw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sw-o { aspect-ratio: 1; border-radius: var(--r-xs); border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.sw-o.on { box-shadow: 0 0 0 2px var(--surface-3), 0 0 0 4px var(--accent); }
.sw-hex { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--text-muted); }
.sw-hex .input { height: 32px; font-size: var(--fs-s); }
.color-field { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

/* file → a zone */
.dz { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: var(--r-md);
  border: 1px dashed var(--border-strong); background: var(--surface-2); cursor: pointer; color: var(--text-muted);
  transition: border-color var(--dur-fast), background var(--dur-fast); }
.dz:hover, .dz.over { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.dz-ic { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dz-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dz-t b { font: 600 var(--fs-s)/1.2 var(--font-body); color: var(--text); }
.dz-h { font-size: var(--fs-xs); }
.dz-f { margin-left: auto; font-size: var(--fs-xs); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.dz.has { border-style: solid; }

/* number → − field + */
.num { display: inline-flex; align-items: stretch; height: var(--ctl-h-sm); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface-2); overflow: hidden; }
.num:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.num input { width: 52px; border: 0 !important; background: transparent !important; color: var(--text); text-align: center; padding: 0 !important;
  font: 500 var(--fs-s) var(--font-body); -moz-appearance: textfield; box-shadow: none !important; }
.num input::-webkit-inner-spin-button, .num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num input:focus { outline: none; }
.num-b { width: 26px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font: 500 15px/1 var(--font-body); }
.num-b:hover { background: var(--surface-3); color: var(--text); }
@media (pointer: coarse) { .num { height: 44px; } .num-b { width: 40px; } }

/* details → a section with a chevron */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details:not(.faq-q):not(.faq details) > summary { display: flex; align-items: center; gap: 8px; }
details:not(.faq-q):not(.faq details) > summary::after { content: ""; flex: 0 0 8px; width: 8px; height: 8px; margin-left: auto; margin-right: 4px;
  border-right: 1.6px solid var(--text-muted); border-bottom: 1.6px solid var(--text-muted); transform: rotate(45deg) translateY(-2px);
  transition: transform var(--dur-fast) var(--ease); }
details[open]:not(.faq-q):not(.faq details) > summary::after { transform: rotate(225deg) translateY(-2px); }
details.start-more > summary::before { display: none; }

/* toggles: smaller, quieter */
.toggle { font-size: var(--fs-s); color: var(--text-muted); gap: 10px; min-height: 30px; position: relative; }   /* (its hidden
   input measured from the page stretched the editor under «Субтитры» / «Графика») */
.toggle input + span { flex-basis: 34px; height: 20px; background: var(--graphite); }
.toggle input + span::after { top: 3px; left: 3px; width: 14px; height: 14px; }
.toggle input:checked + span::after { transform: translateX(14px); }
.toggle:hover { color: var(--text); }

/* a question (uiConfirm) */
.ui-dlg-veil { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: ui-fade .15s; }
.ui-dlg { width: min(420px, 100%); background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 20px;
  animation: ui-in .15s var(--ease); }
.ui-dlg h3 { margin: 0 0 8px; font: 600 var(--fs-l)/1.3 var(--font-body); }
.ui-dlg p { margin: 0; color: var(--text-muted); font-size: var(--fs-m); line-height: 1.5; }
.ui-dlg h3 + p { margin-top: 0; }
.ui-dlg > p:first-child { color: var(--text); }
.ui-dlg-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* a note at the bottom */
.ui-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 1050; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 14px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 12px 10px 16px;
  border-radius: var(--r-md); background: var(--surface-3); box-shadow: var(--shadow-pop); color: var(--text); font-size: var(--fs-s);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); }
.ui-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ui-toast.ok { box-shadow: var(--shadow-pop), inset 3px 0 0 var(--ok); }
.ui-toast.err { box-shadow: var(--shadow-pop), inset 3px 0 0 var(--danger); }
.ui-toast.warn { box-shadow: var(--shadow-pop), inset 3px 0 0 var(--warn, #FFC24B); }
.ui-toast button { border: 0; background: transparent; color: var(--accent); font: 600 var(--fs-s) var(--font-body); cursor: pointer; padding: 6px 4px; }

/* thin scrollbars that sit over the content (on Windows a 17 px bar ate the library's width) */
* { scrollbar-width: thin; scrollbar-color: var(--graphite) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--graphite); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* touch: 44 px under a finger */
@media (pointer: coarse) {
  .btn, .dd, .input { min-height: 44px; }
  .chip-btn { height: 40px; }
  .ui-sw { width: 44px; height: 44px; flex-basis: 44px; }
}

/* ── ready wishes: a list of ticks in two columns, not a heap of pills (19-paywall-desktop-ask.js sayChips) ── */
.wish-chips, .ask-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; }
.wish-chips .chip-btn, .ask-chips .chip-btn, .start-card .wish-chips .chip-btn {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 6px; border: 0; border-radius: var(--r-xs);
  background: transparent; color: var(--text-muted); font: 400 var(--fs-s)/1.2 var(--font-body); text-align: left; }
.wish-chips .chip-btn::before, .ask-chips .chip-btn::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--border-strong); background: var(--surface-2) center / 12px no-repeat; transition: background-color var(--dur-fast); }
.wish-chips .chip-btn:hover, .ask-chips .chip-btn:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }
.wish-chips .chip-btn[aria-pressed="true"], .ask-chips .chip-btn[aria-pressed="true"] { color: var(--text); background: transparent; }
.wish-chips .chip-btn[aria-pressed="true"]::before, .ask-chips .chip-btn[aria-pressed="true"]::before { background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230B0D05' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
.wish-got:empty, .ask-got:empty { display: none; }
.got-chip { border-radius: var(--r-xs); background: var(--surface-3); color: var(--text); padding: 1px 6px; font-size: var(--fs-xs); }
@media (pointer: coarse) { .wish-chips .chip-btn, .ask-chips .chip-btn { height: 44px; } }

/* ── the «Кадр» menu: each group a segmented control, its title plain ── */
.fp-chips { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.fp-chips button { height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--text-muted);
  font: 500 var(--fs-s)/1 var(--font-body); cursor: pointer; }
.fp-chips button:hover { color: var(--text); background: var(--surface-3); }
.fp-chips button.on, .fp-chips button.active, .fp-chips button[aria-pressed="true"] { background: var(--surface-3); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-line); }
@media (pointer: coarse) { .fp-chips button { height: 40px; } }

/* ═════════ stage 2: the header's one action, the status line ═════════ */
/* one lime button in the header: «Подтвердить монтаж» → «Скачать видео» (a build's progress fills it) */
#btnBuild { display: none !important; }                    /* «Собрать видео» under the timeline: the header's button does it */
#dl.busy { position: relative; overflow: hidden; pointer-events: auto; }
#dl.busy::before { content: ""; position: absolute; inset: 0; width: var(--p, 0%); background: rgba(0,0,0,.18); transition: width .4s var(--ease); }
#dl.busy .ic { animation: dl-pulse 1.2s ease-in-out infinite; }
@keyframes dl-pulse { 50% { opacity: .35; } }
.topbar { height: 56px; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar .tb-right { gap: 4px; }
.topbar .tb-right > .btn-primary, .topbar .tb-right > #dl { margin-left: 8px; }
.topbar-progress { display: none; }                        /* the progress is in the button and the status now */
.proj { height: 32px; border: 0; background: transparent; font: 600 var(--fs-m)/1 var(--font-body); padding: 0 8px; border-radius: var(--r-sm); }
.proj:hover { background: var(--surface-3); }
#phaseLine { font-size: var(--fs-s); color: var(--text-dim); }
#phaseLine[hidden] { display: none; }
#phaseLine b { color: var(--text-muted); font-weight: 500; }
.fb-top { height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-muted);
  font: 500 var(--fs-s)/1 var(--font-body); box-shadow: none !important; }
.fb-top:hover { background: var(--surface-3); color: var(--text); filter: none; }
.acct-btn { height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-muted); font: 500 var(--fs-s)/1 var(--font-body); }
.acct-btn:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }
.help-btn { font-weight: 600; }
@media (max-width: 1250px) { .fb-top span { display: none; } }

/* the AI's edit, said in one quiet line over the timeline (it was a lime banner with three buttons) */
.confirm-bar .lbl-short { display: none; }
.confirm-bar { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin: 0 0 8px; padding: 6px 4px 6px 12px;
  border: 0; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent);
  color: var(--text-muted); font-size: var(--fs-s); }
.confirm-bar #confirmTxt { color: var(--text); }
.confirm-bar .btn { height: 30px; background: transparent; border-color: transparent; color: var(--text-muted); font-weight: 500; }
.confirm-bar .btn:hover { background: var(--surface-3); color: var(--text); }
/* the way into the cut review: a button you can see (it read as grey text by the side), outlined — not the lime one */
.confirm-bar #btnSeeSrc { border-color: var(--border-strong); color: var(--text); }
.confirm-bar #btnSeeSrc:hover { border-color: var(--text-muted); }
.confirm-bar #btnConfirm { width: 30px; height: 30px; color: var(--text-muted); }   /* the line's ✕ (the edit taken as it is) */
@media (max-width: 760px) { .confirm-bar .btn { height: 40px; flex: 0 1 auto; } }
#hdConfirm .lbl-short { display: none; }

/* ═════════ stage 2: home, projects, sign-in ═════════ */
.settings-fold { display: none !important; }                /* «Настройки монтажа»: the start window asks all of it now */
.side-hot b { color: var(--text) !important; }              /* a link is not the next step: no lime */
.side-item:hover { background: var(--surface-3); }
.proj-card { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.proj-card:hover { border-color: var(--border-strong); }
.proj-card.current { border-color: var(--accent-line); }
.pc-badge { background: var(--surface-3) !important; color: var(--text) !important; border-radius: var(--r-xs); font-size: var(--fs-xs); }
.pc-acts .btn-icon { width: 30px; height: 30px; flex-basis: 30px; background: rgba(10,12,10,.75); color: var(--text); backdrop-filter: blur(4px); }
.pc-acts .pc-del:hover { color: var(--danger); background: rgba(10,12,10,.9); }
@media (pointer: coarse) { .pc-acts .btn-icon { width: 40px; height: 40px; flex-basis: 40px; } }
/* «Обратная связь»: a small round button in the corner, not a tab across the page; never on a phone (it's in the menu) */
.fb-fab { top: auto !important; bottom: 20px !important; right: 20px !important; transform: none !important; writing-mode: horizontal-tb !important;
  width: 44px; height: 44px; padding: 0 !important; justify-content: center; border-radius: 50% !important;
  background: var(--surface-3) !important; color: var(--text-muted) !important; box-shadow: var(--shadow-pop) !important; border: 0 !important; }
.fb-fab span { display: none !important; }
.fb-fab svg { transform: none !important; }
.fb-fab:hover { color: var(--text) !important; padding: 0 !important; }
@media (max-width: 760px) { .fb-fab { display: none !important; } }
/* a tick (consent): a square, not a switch */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; color: var(--text-muted); font-size: var(--fs-s); line-height: 1.45; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check input + span { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--border-strong);
  background: var(--surface-2) center / 13px no-repeat; transition: background-color var(--dur-fast); }
.check input:checked + span { background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230B0D05' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
.check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check a { color: var(--text); }
.auth-err:not(:empty) { color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: var(--r-sm); }

/* ═════════ stage 2: «Как смонтировать?» ═════════ */
.start-card:not([hidden]):not(.docked) { width: min(820px, calc(100vw - 32px)); background: var(--surface); padding: 20px 24px 0;
  border-radius: var(--r-lg); box-shadow: 0 0 0 100vmax rgba(0,0,0,.62), var(--shadow-pop); scroll-padding-bottom: 80px; gap: 16px; }
.start-head b { font: 600 var(--fs-xl)/1.25 var(--font-body); letter-spacing: -0.01em; }
.start-dock { width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center; }
.start-dock:hover { background: var(--surface-3); color: var(--text); }
.cf-q { font: 600 var(--fs-m)/1.3 var(--font-body) !important; color: var(--text) !important; }
.cf-q .dim { font-weight: 400; color: var(--text-dim); }
.cf-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cf-card { grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "ic name" "hint hint" "facts facts"; align-content: start;
  gap: 4px 8px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); min-height: 0; }
.cf-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.cf-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.cf-ic { font-size: 16px; }
.cf-name { font: 600 var(--fs-s)/1.25 var(--font-body); }
.cf-hint { font-size: var(--fs-xs); line-height: 1.35; color: var(--text-muted); -webkit-line-clamp: 2; }
.cf-facts { display: block; margin-top: 2px; font-size: var(--fs-xs); line-height: 1.35; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-card.active .cf-facts { color: var(--text-muted); }
/* the plain choice: one wide row above the formats */
.cf-card.cf-none { grid-column: 1 / -1; grid-template-columns: 22px auto minmax(0, 1fr); grid-template-areas: "ic name hint"; align-items: center; }
.cf-card.cf-none .cf-facts { display: none; }
.cf-card.cf-none .cf-hint { -webkit-line-clamp: 1; }
.cf-note { padding: 12px 14px; border: 0; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); color: var(--text-dim); }
.cf-note-h { font-size: var(--fs-s); }
.cf-does { color: var(--text-muted); font-size: var(--fs-s); }
.wish-l { font-size: var(--fs-m); }
.start-more { border-top: 1px solid var(--border); padding-top: 12px; }
.start-more > summary { font: 600 var(--fs-m)/1.3 var(--font-body); }
#startMoreSum { font-weight: 400; color: var(--text-dim); }
.start-card:not(.docked) #startBtn { height: 52px; font-size: var(--fs-l); border-radius: 0 0 var(--r-lg) var(--r-lg); margin: 4px -24px 0; width: calc(100% + 48px); }
/* a phone: one column, every card the same height, the facts under the name */
@media (max-width: 640px) {
  .start-card:not([hidden]):not(.docked) { padding: 16px 16px 0; border-radius: 16px 16px 0 0; }
  .cf-chips { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cf-card, .cf-card.cf-none { grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "ic name" "ic hint" "ic facts"; align-items: start; padding: 10px 12px; }
  .cf-hint, .cf-card.active .cf-hint { display: -webkit-box; -webkit-line-clamp: 1; }
  .cf-card.cf-none .cf-facts { display: none; }
  .start-card:not(.docked) #startBtn { margin: 4px -16px 0; width: calc(100% + 32px); border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom); height: calc(52px + env(safe-area-inset-bottom)); }
}
@media (min-width: 641px) and (max-width: 860px) { .cf-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cf-facts { white-space: normal; overflow: visible; }

/* ═════════ stage 2: the editor fills the window ═════════ */
.tl-resize { display: none; }
@media (min-width: 901px) {
  #work.app:not([hidden]) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  #work .workspace { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  #work .panel.media.lib, #work .inspector { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; contain: size; }
  #work .monitor { min-height: 0; overflow: hidden; }
  #work .monitor-screen { min-height: 120px; }
  /* the picture gives way, never the controls under it: «Норм / Зря — вернуть» squeezed to a sliver and cut off
     (the bar shrank with the window like the picture does); too short a window scrolls them into reach */
  #work .monitor > :not(.monitor-screen) { flex-shrink: 0; }
  #work .monitor:has(#teachBar:not([hidden])) { overflow-y: auto; }
  #work .monitor:has(#teachBar:not([hidden])) .monitor-screen { min-height: 90px; }
  #work:has(#teachBar:not([hidden])) .timeline:not([hidden]) { max-height: min(var(--tl-max, 46vh), 34vh); }
  #work .monitor-screen video { max-height: 100%; }
  #work .timeline:not([hidden]) { position: relative; flex: 0 0 auto; max-height: var(--tl-max, 46vh); overflow-y: auto; overscroll-behavior: contain;
    padding-top: 10px; }
  .tl-resize { display: block; position: sticky; top: -10px; z-index: 12; height: 8px; margin: -10px -16px 2px; cursor: ns-resize; }
  .tl-resize::after { content: ""; display: block; width: 40px; height: 3px; margin: 2px auto 0; border-radius: 3px; background: var(--graphite);
    transition: background var(--dur-fast); }
  .tl-resize:hover::after, body.tl-resizing .tl-resize::after { background: var(--accent); }
  body.tl-resizing { cursor: ns-resize; user-select: none; }
  #work .log-wrap { display: none; }                        /* the processing log: a developer's tool */
  #work .track { height: 72px; }
}
/* a tablet: the preview, its timeline right under it, then the library and the settings (the inspector stood
   between them and the library's height left a black hole under the preview) */
@media (min-width: 761px) and (max-width: 900px) {
  #work .workspace { display: contents; }
  #work .media { order: 2; } #work .monitor { order: 3; } #work .timeline { order: 4; } #work .inspector { order: 6; max-height: none; }
  #work.app.ready .monitor { order: 2; } #work.app.ready .timeline { order: 3; } #work.app.ready .media { order: 5; }
  #work .panel { border-top: 1px solid var(--border); }
}
@media (min-width: 901px) { #work .panel.media.lib > *, #work .inspector > * { flex-shrink: 0; } }

/* ═════════ stage 3: the library — a rail of tabs on the left (as in CapCut), its content beside it ═════════ */
.lib-tab { color: var(--text-muted); border-radius: var(--r-sm); font: 500 11px/1.15 var(--font-body) !important; }
.lib-tab:hover { color: var(--text); background: var(--surface-3); }
.lib-tab.active { color: var(--text); background: var(--surface-3); }
.lib-tab.active svg { stroke: var(--accent); }
@media (min-width: 1101px) {
  #work .workspace { grid-template-columns: 312px minmax(0, 1fr) 320px; }
  #work .panel.media.lib { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-content: start; column-gap: 12px; row-gap: 12px;
    padding: 12px 14px 16px 8px; }
  #work .panel.media.lib > * { grid-column: 2; min-width: 0; }
  #work .panel.media.lib > .lib-tabs { grid-column: 1; grid-row: 1 / span 80; display: flex !important; flex-direction: column; gap: 2px;
    margin: 0; position: sticky; top: 0; align-self: start; }
  #work .lib-tab { padding: 9px 2px 7px; white-space: normal; text-align: center; }
  #work .lib-tab svg { width: 20px; height: 20px; }
}
@media (min-width: 1300px) { #work .workspace { grid-template-columns: 344px minmax(0, 1fr) 360px; } }
@media (min-width: 901px) { #work.app:not([hidden]) { overflow: clip; } }

/* ═════════ stage 3: preview, timeline lanes, music ═════════ */
.monitor-screen .badge-r { display: none; }                 /* the source time over the picture: noise */
.play { background: var(--text); color: var(--bg); }        /* the lime is for the next step, not for play */
.play:hover { transform: none; filter: brightness(.92); }
.transport .tc { font-size: var(--fs-s); color: var(--text); }
/* lanes: a name with a colour mark, each lane its own quiet colour; a picked item is always the lime outline */
.track-name { gap: 8px; flex-basis: 76px !important; color: var(--text-muted) !important; font-weight: 500 !important; }
.track-name::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--lane, var(--text-dim)); }
.track-name.lane-video { --lane: var(--lane-video); } .track-name.lane-gfx { --lane: var(--lane-gfx); }
.track-name.lane-over { --lane: var(--lane-over); } .track-name.lane-music { --lane: var(--lane-music); }
.track-name.lane-snd { --lane: var(--lane-snd); }
.ruler { margin-left: 76px; }
.track2 { border: 1px solid var(--border); border-style: solid; background: rgba(240,244,236,.015); border-radius: var(--r-sm); }
.gfx-item { background: rgba(167,150,242,.18); box-shadow: inset 0 0 0 1px rgba(167,150,242,.6); }
.gfx-item.picked { background: rgba(167,150,242,.3); box-shadow: inset 0 0 0 2px var(--accent); }
.broll-item { background: rgba(99,195,221,.18); box-shadow: inset 0 0 0 1px rgba(99,195,221,.65); }
.broll-item.pip { background: rgba(99,195,221,.12); }
.broll-item.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.m-clip { --wave: rgba(108,203,142,.6); background: rgba(108,203,142,.12); box-shadow: inset 0 0 0 1px rgba(108,203,142,.5); }
.m-clip.picked { --wave: rgba(108,203,142,.9); background: rgba(108,203,142,.2); box-shadow: inset 0 0 0 2px var(--accent); }
.m-clip .fh { border-color: var(--text); }
.m-lbl { top: auto; bottom: 3px; left: 8px; font: 500 11px/1.2 var(--font-body) !important; color: var(--text); }
.gfx-empty, .m-empty { font: 400 var(--fs-xs)/1 var(--font-body) !important; color: var(--text-dim); }
.src-keep.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.tl-bar { gap: 6px; }
.tl-bar .btn.sm { height: 32px; }
.btn-ai { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn-ai:hover { background: var(--surface-3); }
.tl-foot { gap: 16px; font-size: var(--fs-xs); }
.tl-foot .tl-msg { color: var(--text-muted); }
.playhead, .playhead::before { background: var(--text); }
/* the music's settings: «Свойства клипа» in rows — the whole music, then the picked piece */
.m-edit { background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; gap: 10px; }
.m-edit .mt-name { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; max-width: 280px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); }
.m-edit .mt-name > span { color: var(--lane-music); }
/* the track's name whole, on a second line when long (a library title «… (Chill-Out Mix)» was cut with «…») */
.m-edit .mt-name b { font-weight: 600; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; line-height: 1.25; }
.m-edit .mt-name { height: auto !important; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.m-edit .mt-name:hover { background: var(--surface-3); color: var(--text); }
.mt-vol, .me-rng, .me-num { font: 500 var(--fs-xs)/1.2 var(--font-body) !important; color: var(--text-muted); }
.mt-vol b, .me-rng b { font: 600 var(--fs-xs)/1 var(--font-body); color: var(--text); min-width: 38px; }
.me-num i { color: var(--text-dim); }
.me-h { font: 600 var(--fs-s)/1.2 var(--font-body); min-width: 96px; }
.mt-btn { height: 32px; padding: 0 12px; border-radius: var(--r-sm); font: 500 var(--fs-s)/1 var(--font-body); background: transparent; }
.mt-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.mt-btn.danger { color: var(--danger); border-color: rgba(255,107,94,.35); }
.mt-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.me-tip { font-size: var(--fs-xs); color: var(--text-dim); }
@media (pointer: coarse) { .mt-btn { height: 44px; } .m-edit .mt-name { min-height: 44px; } }
@media (min-width: 761px) and (max-width: 1100px) { .me-clip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .me-clip .grow { display: none; } }

/* ═════════ stage 3: the inspector ═════════ */
.tabs { gap: 18px; border-bottom: 1px solid var(--border); }
.tab { height: 40px; font: 500 var(--fs-s)/1 var(--font-body); color: var(--text-muted); }
.tab:hover { color: var(--text); }
.tab.active::after { background: var(--text); height: 2px; border-radius: 2px; }
/* Обзор: four figures in one quiet row */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.stat { background: transparent; border: 0; border-radius: 0; padding: 10px 8px; text-align: center; }
.stat + .stat { box-shadow: inset 1px 0 0 var(--border); }
.stat b { font: 600 var(--fs-l)/1.2 var(--font-body); }
.stat span { font-size: var(--fs-xs); color: var(--text-dim); }
.stat.hl b { color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.status-card .label { color: var(--text-muted); }
/* Текст: «Вырезать выделенное / Вернуть» only when something is selected — before, two grey buttons stood above their explanation */
.text-bar .btn:disabled { display: none; }
/* Экспорт: sections with plain titles, the formats as rows */
.out-sec > summary { min-height: 28px; }
.out-sec > summary .label { font: 600 var(--fs-m)/1.2 var(--font-body) !important; color: var(--text) !important; }
.out-sec > summary .dim.small { margin-left: 6px; font-size: var(--fs-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.out-sec[open] > summary { margin-bottom: 10px; }
.export-item { height: 44px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); font: 500 var(--fs-s) var(--font-body); }
.export-item:hover { background: var(--surface-3); border-color: var(--border-strong); }
.export-item span { color: var(--text-dim); font-size: var(--fs-xs); }
.export-item::after { content: ""; width: 14px; height: 14px; margin-left: 8px; flex: 0 0 14px; opacity: .55;
  background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23F1F3EE' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2.5v8m0 0l-3-3m3 3l3-3M3 13.5h10'/%3E%3C/svg%3E"); }
.export-item b { margin-right: auto; }
#work .lib-body > *, #work .media-grid { flex-shrink: 0; }

/* ═════════ stage 4: a phone — a tool bar at the bottom, the library and the settings as sheets ═════════ */
.m-bar, .m-veil { display: none; }
.toggle:has(input:disabled) { opacity: .5; cursor: default; }
@media (max-width: 900px) {
  #work.app.ready:not([hidden]) { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  #work.app.ready .m-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; height: calc(60px + env(safe-area-inset-bottom));
    padding: 0 4px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); }
  .m-bar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
    border: 0; background: transparent; color: var(--text-muted); font: 500 11px/1 var(--font-body); cursor: pointer; }
  .m-bar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .m-bar button.on { color: var(--text); }
  .m-bar button.on svg { stroke: var(--accent); }
  #work.app.ready .panel.media.lib, #work.app.ready .inspector { display: none; }
  body.m-lib #work.app.ready .panel.media.lib, body.m-insp #work.app.ready .inspector {
    display: flex; position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 66; max-height: 64vh;
    overflow-y: auto; overscroll-behavior: contain; border-radius: 16px 16px 0 0; background: var(--surface); border-top: 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.5); padding-top: 22px; animation: ui-up .2s var(--ease); }
  body.m-lib #work.app.ready .panel.media.lib::before, body.m-insp #work.app.ready .inspector::before {
    content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--graphite); }
  body.m-lib #work .m-veil, body.m-insp #work .m-veil { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.35); }
  body.m-lib #work.app.ready .lib-tabs { position: sticky; top: -22px; z-index: 2; background: var(--surface); padding-top: 4px; margin-top: -4px; }
  body.m-insp #work.app.ready .inspector .tabs { position: sticky; top: -22px; z-index: 2; background: var(--surface); }
  /* the player: a little less than half of the screen, so the timeline is under the thumb */
  #work.app.ready .monitor-screen video { max-height: 34vh; }
  /* the picked piece of music: its settings a sheet over the bar, the lane in sight above */
  #work.app.ready .m-edit:has(.me-clip) { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 67;
    max-height: 50vh; overflow-y: auto; margin: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.5); }
  .ui-toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .tl-foot span:not(.tl-msg) { display: none; }
}
@media (max-width: 900px) {
  /* a piece of music picked: the player steps back so the lane stays in sight above the piece's sheet */
  #work.app.ready:has(.m-edit .me-clip) .monitor-screen { height: 22vh !important; min-height: 0; }
  #work.app.ready .monitor-screen video { max-height: 100%; }
  #work.app.ready .monitor { padding: 8px 12px 6px; }
}
@media (max-width: 900px) {
  #work.app.ready .m-edit:has(.me-clip) { max-height: 42vh; }
  #work.app.ready .m-edit:has(.me-clip) > .me-row:first-child { display: none; }   /* the whole music: when no piece is picked */
}
@media (max-width: 900px) { #work.app.ready:has(.m-edit .me-clip) { padding-bottom: calc(50vh + 60px); } }

/* ═════════ stage 4: windows, the tour, the landing's labels ═════════ */
.reel-modal { background: rgba(0,0,0,.62); }
.reel-sheet { background: var(--surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.reel-head { padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font: 600 var(--fs-l)/1.3 var(--font-body); color: var(--text); }
.reel-head .btn-icon { color: var(--text-muted); }
@media (max-width: 760px) { .reel-sheet { border-radius: 0; } }
/* the first-visit tips: a quiet card, «Пропустить» readable */
.tour-tip { background: var(--surface-3); border: 0; border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: var(--fs-s); max-width: 320px; }
.tour-tip .linkish, .tour-tip button:not(.btn) { color: var(--text-muted); }
.tour-focus { outline-color: var(--accent-line) !important; }
/* the landing: its small labels in plain case like the app (the captions shown as captions keep theirs) */
.mq-label, .kicker, .cmp-tag, .vs-head > span, .hb span { text-transform: none !important; letter-spacing: 0 !important; }
.kicker { font-size: var(--fs-s) !important; }
.label + .dim, .dim.small { color: var(--text-dim); }

/* ═════════ fixes after the review of 2.99 ═════════ */
/* focus: a neutral ring — the lime ring on a red «Удалить» or on a window's × looked like a choice */
:focus-visible { outline: 2px solid rgba(240,244,236,.7); outline-offset: 2px; }
.input:focus, .dd[aria-expanded="true"], .num:focus-within { border-color: rgba(240,244,236,.4); box-shadow: 0 0 0 3px rgba(240,244,236,.08); }
/* the lime only for the next step and what is picked: everything else neutral or in its lane's colour */
.media-card .badge.done { background: var(--surface-3); color: var(--ok); }
.media-card.active { border-color: var(--border-strong); }
.src-keep .emark { background: rgba(10,12,10,.78) !important; color: var(--text) !important; border: 0 !important; }
.jmark { background: var(--text); }
.jmark:hover { background: var(--accent); }
input[type="range"].rng::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--text-muted) var(--p), var(--graphite) var(--p)); }
input[type="range"].rng::-moz-range-progress { background: var(--text-muted); }
.toggle input:checked + span { background: var(--ok); }
.toggle input:checked + span::after { background: #0B0D05; }
#tilePlanBar, .plan-meter i { background: var(--text-muted) !important; }
.drop, .home-drop, .hero-card .drop { border-color: var(--border-strong) !important; }
.drop:hover, .drop.over { border-color: var(--text-muted) !important; background: var(--surface-2) !important; }
.side-go, #msCta, .ms-cta { color: var(--text-muted) !important; text-decoration: none !important; }
.side-go:hover, #msCta:hover { color: var(--text) !important; }
.side-plan { border-color: var(--border) !important; }
/* desktop: the picked piece's settings stick to the bottom of the timeline — they were drawn under the window's edge */
@media (min-width: 901px) {
  #work .timeline .m-edit { position: sticky; bottom: -16px; z-index: 11; margin-bottom: -4px; box-shadow: 0 -10px 24px rgba(0,0,0,.45); }
}
/* a finger, as CapCut: a swipe over the timeline scrolls it — sideways, or its lanes up and down (every lane and piece
   was «touch-action: none»: nothing scrolled under a finger); a tap picks; a picked piece, a cut's edge, a handle are
   dragged (09-timeline-tools.js, 16-broll-music.js, 21c-graphics.js). The editor's page never zooms (a double tap) */
@media (pointer: coarse) {
  #work .track, #work .gfx-item, #work .m-clip, #work .broll-item { touch-action: pan-x pan-y; }
  #work .gfx-item.picked, #work .m-clip.picked, #work .broll-item.picked, #work .src-keep .h { touch-action: none; }
  #work { touch-action: manipulation; }
}
/* the rail from 1024 px (at 1100 the tabs were a 3 × 3 block over a sliver of content) */
@media (min-width: 901px) and (max-width: 1100px) {
  #work .workspace { grid-template-columns: 288px minmax(0, 1fr) 272px; }
  #work .panel.media.lib { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-content: start; column-gap: 10px; row-gap: 12px; padding: 12px 12px 16px 6px; }
  #work .panel.media.lib > * { grid-column: 2; min-width: 0; }
  #work .panel.media.lib > .lib-tabs { grid-column: 1; grid-row: 1 / span 80; display: flex !important; flex-direction: column; gap: 2px; margin: 0; position: sticky; top: 0; align-self: start; }
  #work .lib-tab { padding: 9px 2px 7px; white-space: normal; text-align: center; }
}
#work .inspector, #work .inspector > * { min-width: 0; }
#work .inspector .btn { white-space: normal; height: auto; min-height: var(--ctl-h); line-height: 1.25; padding-top: 6px; padding-bottom: 6px; }
#work .inspector input[type="range"] { width: 100%; min-width: 0; }
.topbar #dl, .topbar #hdConfirm { flex-shrink: 0; }
/* the header: until the edit is confirmed «Подтвердить» is the only action — «Скачать» comes after it */
#work:has(#hdConfirm:not([hidden])) #dl { display: none !important; }
/* the library's filter rows (transitions, graphics styles, moods): one row that scrolls, not three rows of pills */
.lib-body .chips, .lib-chips, .lib-body .gfx-styles { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
  mask-image: linear-gradient(to right, #000 85%, transparent); }
.lib-body .chips::-webkit-scrollbar, .lib-chips::-webkit-scrollbar { display: none; }
.lib-body .chips .chip-btn, .lib-chips .chip-btn { flex: 0 0 auto; }
/* the ruler: the last two labels never run into each other */
.ruler i:last-child b { left: auto; right: 4px; }
.ruler i:nth-last-child(2) b { opacity: var(--ruler-prev, 1); }
.stat span { white-space: nowrap; }
/* a phone and a tablet: «Кадр» is a sheet from below, its buttons under a finger */
@media (max-width: 900px) {
  .frame-pop:not([hidden]) { position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: auto !important;
    max-height: 70vh; overflow-y: auto; z-index: 90; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface); box-shadow: 0 -12px 40px rgba(0,0,0,.55); animation: ui-up .2s var(--ease); }
  .fp-chips { display: flex; } .fp-chips button { height: 44px; flex: 1 1 auto; }
  .start-dock { display: none; }
  .seg-btn { min-width: 44px; height: 40px; }
  #work .monitor-screen video { max-width: 100%; }
}
@media (min-width: 761px) and (max-width: 900px) {
  #work.app.ready .monitor { position: sticky; top: 0; z-index: 20; background: var(--bg); }
}
.up-drop { background: var(--surface-2) !important; border: 1px dashed var(--border-strong) !important; }
.up-drop:hover, .up-drop.over { background: var(--surface-3) !important; border-color: var(--text-muted) !important; }
.up-ico { background: var(--surface-3); }
.up-ico .drop-ico { stroke: var(--text); }
.plan-card { border-color: var(--border) !important; background: var(--surface) !important; }
.stat span { white-space: normal; display: block; line-height: 1.25; }
.stats { align-items: start; }
/* an empty lane is low: the music and its settings fit on a 900 px screen */
@media (min-width: 901px) {
  #work .track-row:has(> .track2:empty), #work .track-row:has(> #brollTrack:empty) { margin-top: 4px; }
  #work #brollTrack:empty, #work .gfx-row-tl .track2:has(#gfxEmpty:not([hidden])) { height: 26px; }
  #work .timeline:not([hidden]) { max-height: var(--tl-max, 50vh); }
}
/* a tablet's header: words go, icons stay — «Скачать» was pushed past the window's edge at 768 px */
@media (max-width: 900px) {
  .topbar .fb-top span, .topbar .acct-btn span, .topbar #dl .txt, #phaseLine, #origUp { display: none !important; }
  .topbar #dl { width: 40px; padding: 0; justify-content: center; }
  .topbar .proj { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .topbar .tb-left, .topbar .tb-right { min-width: 0; }
  .topbar .brand { min-width: 44px; min-height: 44px; justify-content: center; }
}
/* the row under the preview fits its column: the timecode, the transport, then «Кадр» and the captions' menu that give way */
.tc-right { min-width: 0; justify-content: flex-end; }
.tc-right .dd { min-width: 0; max-width: 220px; width: auto; flex: 0 1 auto; }
@media (min-width: 901px) and (max-width: 1250px) {
  .frame-btn span { display: none; }
  .transport .tc .dim { display: none; }
}
@media (min-width: 901px) and (max-width: 1600px) {
  .transport { display: flex; align-items: center; gap: 8px; }
  .transport > .tc { flex: none; }
  .transport > .transport-mid { flex: none; }
  .transport > .tc-right { flex: 1 1 0; min-width: 0; display: flex; gap: 6px; }
  .tc-right .dd { flex: 0 1 auto; min-width: 72px; }
}
@media (min-width: 1251px) and (max-width: 1600px) { .transport > .tc-right { justify-content: flex-end; } .transport > .transport-mid { margin-left: auto; } }
#gfxInsp { scroll-margin-top: 64px; }   /* a phone's sheet: under its sticky tabs */
.home-none { padding: 24px 0; text-align: center; }
/* a short window (1000 × 800): the rail's seven tabs fit the library's height — «Музыка» hid under the timeline */
@media (min-width: 901px) {
  #work .panel.media.lib > .lib-tabs { max-height: calc(100% - 4px); overflow-y: auto; scrollbar-width: none; }
}
@media (min-width: 901px) and (max-height: 880px) {
  #work .lib-tab { padding: 6px 2px 5px; gap: 2px; }
  #work .lib-tab svg { width: 18px; height: 18px; }
}
/* a phone's sheet of a music piece: the three seconds fields in one even row, the buttons reachable */
@media (max-width: 900px) {
  .me-clip:has(.me-num) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .me-clip .me-num { flex-direction: column; align-items: stretch; gap: 4px; }
  .me-clip .me-num .num { width: 100%; } .me-clip .me-num .num input { flex: 1; width: auto; min-width: 0; }
  .me-clip .me-num i { display: none; }
  .me-clip .toggle, .me-clip .mt-btn { grid-column: span 3; justify-content: center; }
  .me-clip .grow { display: none; }
  #work.app.ready .m-edit:has(.me-clip) { max-height: 48vh; padding-bottom: 16px; }
}
.ruler { cursor: pointer; }

/* the library's rail spanned 80 grid rows, and 80 row gaps of 12 px were ~950 px of black under «Медиа»: the rows have no
   gap now (an empty row is 0 px), the rail takes no height of the grid's (it sticks to the top and draws over), the
   content keeps its spacing by its own margin */
@media (min-width: 901px) {
  #work .panel.media.lib { row-gap: 0 !important; }
  #work .panel.media.lib > .lib-tabs { height: 0; max-height: none !important; overflow: visible !important; z-index: 3; }
  #work .panel.media.lib > :not(.lib-tabs) { margin-bottom: 12px; }
  #work .panel.media.lib > :not(.lib-tabs):last-child { margin-bottom: 0; }
  #work .panel.media.lib { min-height: 0; }
}
@media (min-width: 901px) { #work .panel.media.lib > .lib-tabs > * { flex-shrink: 0; } }

/* the figures said with a card: a row each — the figure with its words, its label, «отдельной графикой», × */
.gm-list { display: grid; gap: 6px; }
.gm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px 28px; gap: 6px; align-items: center; }
.gm-row .gm-out { color: var(--text-muted); }
.gm-row .gm-out:hover { color: var(--text); background: var(--surface-3); }
.gm-list .gl-add { justify-self: start; height: 30px; padding: 0 10px; border: 1px dashed var(--border-strong); border-radius: var(--r-sm);
  background: transparent; color: var(--text-muted); font: 500 var(--fs-s)/1 var(--font-body); cursor: pointer; }
.gm-list .gl-add:hover { color: var(--text); border-color: var(--text-muted); }
@media (max-width: 420px) { .gm-row { grid-template-columns: minmax(0, 1fr) 36px 36px; } .gm-row [data-ml] { grid-column: 1 / -1; grid-row: 2; } }
/* a figure's row in two lines: the figure with its buttons, its label under it (side by side they were cut short) */
.gm-row { grid-template-columns: minmax(0, 1fr) 28px 28px; grid-template-rows: auto auto; row-gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.gm-row [data-ml] { grid-column: 1 / -1; grid-row: 2; }
.gm-row [data-mv] { grid-column: 1; grid-row: 1; }
/* a card lifted off the drawing while it is dragged (21c-graphics.js gGhost) */
.gfx-ghost { position: absolute; pointer-events: none; z-index: 1; image-rendering: auto; }
.gfx-hit.dragging { outline: 1px dashed rgba(240,244,236,.55); outline-offset: 2px; }
.gi-parts { display: grid; gap: 8px; }
.gi-part { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; align-items: center; gap: 8px; font-size: var(--fs-s); color: var(--text-muted); }
.gi-part b { font-weight: 600; color: var(--text); text-align: right; font-size: var(--fs-xs); }
.gi-reset { justify-self: start; }
/* the picked figure's card: its label and its figure, each a handle of its own */
.gfx-part { position: absolute; display: block; cursor: move; touch-action: none; border-radius: 4px;
  outline: 1px dashed rgba(217,255,59,.55); outline-offset: 2px; z-index: 1; }
.gfx-part:hover, .gfx-part.dragging { outline: 2px solid var(--accent); background: rgba(217,255,59,.08); }

/* ═════════ the editor laid out as CapCut (the places and proportions people know; our colours and concept) ═════════
   the top bar: the save state on the left, the project's name in the middle, «Поделиться» and «Экспорт» on the right;
   three panels side by side ≈ 32 : 36 : 30 — the library with its sections across its top, the player with its title
   and its controls under the picture, the settings with their tabs; the timeline the whole width under them, ≈ 45 % of
   the window; each panel a card of its own with a narrow gap, their headers on one line */
@media (min-width: 901px) {
  #work .workspace { grid-template-columns: minmax(0, 32.5fr) minmax(0, 36fr) minmax(0, 30fr); gap: 6px; padding: 6px 6px 0;
    background: var(--bg); }
  #work .panel.media.lib, #work .monitor, #work .inspector { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
  #work .timeline:not([hidden]) { height: var(--tl-max, 44vh); max-height: none; margin: 6px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--surface); }
  #work .timeline:not([hidden]) .tl-resize { margin: -10px 0 2px; }
  #work .topbar { position: relative; }
  /* the name in the middle of the room the two sides leave (it was pinned to the window's centre: at 1440 px the
     buttons on the right reached past it — «Помощь» lay on the name) */
  #work .topbar .tb-left { flex: 1 1 auto; }
  #work .topbar .tb-right { flex: 0 0 auto; }
  #work .topbar #phaseLine, #work .topbar #origUp { order: 1; }
  #work .topbar .proj { order: 2; margin: 0 auto; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #work .tb-sep:has(+ .proj) { display: none; }
  /* the library: its sections across its top (an icon over a word), the section's content under them */
  #work .panel.media.lib { display: block; padding: 0; }
  #work .panel.media.lib > .lib-tabs { position: sticky; top: 0; z-index: 3; height: auto; max-height: none !important; overflow-x: auto !important;
    overflow-y: hidden !important; display: flex !important; flex-direction: row; gap: 2px; margin: 0; padding: 4px 6px;
    background: var(--surface); border-bottom: 1px solid var(--border); scrollbar-width: none; }
  #work .panel.media.lib > .lib-tabs::-webkit-scrollbar { display: none; }
  #work .lib-tab { flex: 1 1 0; min-width: 0; padding: 6px 2px 5px !important; gap: 3px; white-space: nowrap; }
  #work .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  /* the player's controls on one line, as CapCut's: the captions' menu says its choice short, never in a column */
  #work .transport .tc-right .dd { white-space: nowrap; max-width: 168px; min-width: 0; }
  #work .transport .tc-right .dd .dd-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  #work .lib-tab svg { width: 20px; height: 20px; }
  #work .panel.media.lib > :not(.lib-tabs) { margin: 12px 14px; }
  #work .panel.media.lib > :not(.lib-tabs):last-child { margin-bottom: 14px; }
  /* the player: a title like its neighbours', the picture, its controls */
  #work .mon-head { display: flex; align-items: center; gap: 8px; height: 52px; flex: 0 0 52px; margin: -12px -12px 10px; padding: 0 14px;
    border-bottom: 1px solid var(--border); font-weight: 600; font-size: var(--fs-s); min-width: 0; }
  #work .mon-head .dim { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #work.app.ready .monitor { padding: 12px 12px 8px; }
  /* the settings: their tabs on the same line as the other two headers */
  #work .inspector .tabs { min-height: 52px; align-items: stretch; margin: -16px -16px 14px; padding: 0 12px; gap: 4px;
    background: var(--surface); top: -16px; }
  #work .inspector .tabs .tab { display: flex; align-items: center; padding: 0 8px; }
}
.mon-head { display: none; }
/* a music piece's settings in the right panel (CapCut's place): a column — the whole music, then the piece */
@media (min-width: 901px) {
  #work .music-body .m-edit { position: static; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; display: grid; gap: 16px; }
  #work .music-body .me-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #work .music-body .me-row .grow, #work .music-body .me-clip .grow { display: none; }
  #work .music-body .mt-name { max-width: none; width: 100%; justify-content: flex-start; }
  #work .music-body .mt-name svg { margin-left: auto; }
  #work .music-body .mt-vol, #work .music-body .me-rng { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
  #work .music-body .me-clip { padding-top: 14px; border-top: 1px solid var(--border); }
  #work .music-body .me-clip + .me-clip { padding-top: 0; border-top: 0; }
  #work .music-body .me-clip:has(.me-num) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  #work .music-body .me-num { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  #work .music-body .me-num input { width: 100%; min-width: 0; }
  #work .music-body .me-num i { display: none; }
  #work .music-body .me-clip .toggle, #work .music-body .me-clip .mt-btn { grid-column: 1 / -1; }
  #work .music-body .mt-btn { width: 100%; justify-content: center; }
  #work .music-body .me-row:first-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #work .music-body .me-row:first-child > :not(.mt-btn) { grid-column: 1 / -1; }
  #work .music-body .me-row:first-child > [data-m="off"] { grid-column: 1 / -1; }
}
/* the captions' menu under the player: a «CC» mark, then the style's name */
#capQuick + .dd .dd-v::before { content: "CC"; display: inline-block; margin-right: 6px; padding: 1px 4px; border: 1.5px solid currentColor;
  border-radius: 3px; font: 700 9px/1.2 var(--font-body); vertical-align: 1px; color: var(--text-muted); }

/* ═════════ «Экспорт» (CapCut's window): the cover on the left, the settings in rows on the right, the length and the size
   with «Отмена / Экспорт» at the bottom ═════════ */
.ex-sheet { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }
.ex-sheet .reel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); margin: 0; }
.ex-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px; padding: 20px; overflow-y: auto; min-height: 0; }
.ex-cover { display: grid; gap: 10px; align-content: start; }
.ex-cover canvas { width: 100%; max-height: 52vh; object-fit: contain; border-radius: var(--r-md); background: #000; border: 1px solid var(--border); }
.ex-cover-btn { display: inline-flex; align-items: center; gap: 8px; justify-self: start; height: 32px; padding: 0 12px; border-radius: var(--r-sm);
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border); font: 500 var(--fs-s)/1 var(--font-body); cursor: pointer; }
.ex-cover-btn:hover { border-color: var(--text-muted); }
.ex-cover-btn .ic { width: 16px; height: 16px; }
.ex-form { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ex-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.ex-row > span:first-child { color: var(--text-muted); font-size: var(--fs-s); }
.ex-row .dd, .ex-row .input, .ex-row select { width: 100%; min-width: 0; }
.ex-static > span:last-child { color: var(--text-dim); font-size: var(--fs-s); }
.ex-static > span:first-child { color: var(--text-dim) !important; }
.ex-group { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); font-size: var(--fs-s); }
/* the original of a project edited from its 540p light copy: where it is (on its way, missing, there) */
.ex-orig { margin: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--graphite); color: var(--text-muted);
  font-size: var(--fs-s); line-height: 1.4; overflow-wrap: anywhere; }
.ex-orig[hidden] { display: none; }
.ex-orig.ok { background: transparent; padding: 0; color: var(--text-dim); }
.ex-orig .btn { margin: 6px 6px 0 0; }
.orig-up { height: 26px; padding: 0 10px; border: 1px solid var(--border); border-radius: 13px; background: transparent;
  color: var(--text-muted); font: 500 var(--fs-xs)/1 var(--font-body); white-space: nowrap; cursor: default; }
.orig-up[hidden] { display: none; }
.orig-up.miss { color: var(--warn); border-color: currentColor; cursor: pointer; }
.media-card .nm-orig { padding: 0 8px 6px; font-size: var(--fs-xs); color: var(--text-dim); }
.ex-group:first-of-type { border-top: 0; }
.ex-form .toggle { font-size: var(--fs-s); }
.ex-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--text-muted);
  font-size: var(--fs-s); min-width: 0; }
.ex-foot > .ic { width: 18px; height: 18px; flex: 0 0 auto; }
.ex-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-prog { position: relative; flex: 1 1 auto; max-width: 360px; height: 6px; border-radius: 3px; background: var(--graphite); margin-top: 14px; }
.ex-prog[hidden] { display: none; }
.ex-prog i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--accent); transition: width .3s var(--ease); }
.ex-prog::before { content: attr(data-t); position: absolute; left: 0; bottom: 10px; white-space: nowrap; color: var(--text); font-size: var(--fs-s); }
.ex-foot .btn { flex: 0 0 auto; min-width: 104px; }
@media (max-width: 760px) {
  .ex-body { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .ex-cover canvas { max-height: 28vh; }
  .ex-row { grid-template-columns: 120px minmax(0, 1fr); }
  .ex-foot { flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .ex-foot .grow { display: none; }
  .ex-foot .btn { flex: 1 1 0; }
  .ex-sum { flex: 1 1 100%; white-space: normal; }
}
/* the header's «Поделиться» and «Экспорт» (CapCut's corner); before the edit is confirmed «Подтвердить» is the only one */
/* the export window over everything, the phone's bar of tools too (its buttons were under that bar) */
.ex-modal { z-index: 120; }
@media (max-width: 760px) { .ex-sheet { width: 100vw; max-height: none; height: 100%; } .ex-body { flex: 1 1 auto; } }

/* the library's sections: the word under the icon while it fits (11 px, then 10 px); a narrower window — the icon, its name
   as the hint (a cut «Перехо…» said nothing); the captions' menu under a narrow player — its «CC» mark; the settings' tabs
   keep their words whole (the strip scrolls) */
@media (min-width: 901px) and (max-width: 1499px) {
  #work .lib-tab { font-size: 10px !important; padding: 6px 0 5px !important; }
  #work .panel.media.lib > .lib-tabs { gap: 0; padding: 4px; }
}
@media (min-width: 901px) and (max-width: 1239px) {
  #work .lib-tab { font-size: 0 !important; gap: 0; padding: 9px 0 !important; }
  #work .lib-tab svg { width: 22px; height: 22px; }
}
@media (min-width: 901px) and (max-width: 1599px) {
  #capQuick + .dd .dd-v { font-size: 0; }
  #capQuick + .dd .dd-v::before { margin-right: 0; }
  #work .transport .tc-right .dd { flex: 0 0 auto; }
}
/* (the tabs «Динамика» and «Настройки» — longer than «Темп» and «Экспорт»: six tabs still on one line from 901 px) */
@media (min-width: 901px) {
  #work .inspector .tabs { gap: 2px; }
  #work .inspector .tabs .tab { flex: 0 0 auto; padding: 0 4px; }
}
@media (min-width: 901px) and (max-width: 1239px) {
  #work .inspector .tabs { gap: 0; padding: 0 6px; }
  #work .inspector .tabs .tab { padding: 0 2px; font-size: 12px; letter-spacing: -0.01em; }
}
@media (min-width: 901px) and (max-width: 1099px) {
  #work .inspector .tabs .tab { padding: 0 1px; font-size: 11px; }
}

/* paywall: the promo code field (19-paywall-desktop-ask.js) */
.pay-promo { margin: 16px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 520px; }
.pay-promo .input { flex: 1 1 200px; height: 40px; text-transform: uppercase; letter-spacing: .04em; }
.pay-promo .btn { height: 40px; }
.pay-promo-msg { flex-basis: 100%; text-align: center; font-size: 13px; color: var(--text-muted); min-height: 1.2em; }
.pay-promo-msg.ok { color: var(--accent); } .pay-promo-msg.bad { color: var(--danger); }
.pay-price s { color: var(--text-dim); font-size: 14px; font-weight: 500; margin-left: 6px; }

/* «Мои проекты» without a plan: what to do first */
.plan-need { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 16px 20px; border-radius: var(--r-lg); border: 1px solid var(--accent-line); background: var(--accent-soft); }
.plan-need[hidden] { display: none; }
.plan-need > div:first-child { display: grid; gap: 4px; }
.plan-need-acts { display: flex; align-items: center; gap: 14px; }
@media (max-width: 600px) { .plan-need-acts { width: 100%; } .plan-need-acts .btn { flex: 1; height: 44px; } }

/* two plans side by side down to a phone (styles.css / landing.css); one column there */
@media (max-width: 680px) {
  .pay-grid, .lp .price-grid { grid-template-columns: 1fr; }
  .pay-head { padding-top: 44px; }                 /* the reason line stayed under the close button */
}
.period-btn { min-height: 40px; }

/* account: the plan line (17-pwa-admin-start.js paintAccount) */
.plan-pill.none { background: var(--warn-soft); color: var(--warn); }
.plan-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.admin-full { width: 100%; margin-bottom: 14px; white-space: normal; height: auto; min-height: 40px; padding: 8px 14px; }

/* the free plan's graphics limit, said in the graphics panel */
.gfx-limit { margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, rgba(255,255,255,.04));
  border: 1px solid var(--border); color: var(--text-muted, var(--text)); line-height: 1.4; }
.gfx-limit .linkish { margin-left: 4px; }
/* the offer's badge sits on the accent: dark letters (the shared grey label colour on lime could hardly be read) */
.offer-modal .offer-badge { color: var(--accent-ink); font-weight: 600 !important; }

/* a phone sheet's cross: just above the sheet's top right corner, over the dimmed screen (21d-layout.js places it) */
.m-x { position: fixed; right: 12px; z-index: 68; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text); }
.m-x[hidden] { display: none; }
@media (min-width: 901px) { .m-x { display: none !important; } }
.start-quota { margin: 6px 0 8px; text-align: center; }
.start-need { margin: 4px 0 6px; text-align: center; color: var(--accent); grid-column: 1 / -1; }
/* «Длинный ролик»: three knobs under the formats; «Свои материалы» under the wish */
.cf-knobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.cf-knobs .knob { display: grid; gap: 4px; min-width: 0; }
.cf-knobs .seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cf-knobs .seg button { flex: 1 1 0; min-width: 0; padding: 6px 2px; font: inherit; font-size: var(--fs-xs); color: var(--text-muted);
  background: transparent; border: 0; border-right: 1px solid var(--border); cursor: pointer; white-space: nowrap; }
.cf-knobs .seg button:last-child { border-right: 0; }
.cf-knobs .seg button.on { background: var(--accent-soft); color: var(--text); }
.mats { display: grid; gap: 6px; }
.start-card.cf-simple .wish, .start-card.cf-simple .vlook-sec, .start-card.cf-simple .mats, .start-card.cf-simple .ms-row,
.start-card.cf-simple .ms-cta { display: none !important; }
.mats-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .cf-knobs { grid-template-columns: minmax(0, 1fr); } }

/* the shortcuts: a card over everything, next to its ⌨ button */
.keys-help.keys-pop { position: fixed; z-index: 90; max-width: min(560px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0,0,0,.5); }

/* the YouTube description: the result under its button, the text long enough to read whole */
.yt-out { display: grid; gap: 10px; margin-top: 10px; }
.yt-out .yt-text { min-height: 220px; resize: vertical; font: 13px/1.5 var(--font-body); }
.yt-out .yt-title { min-height: 0; height: auto; resize: none; font: 600 14px/1.4 var(--font-body); }
.yt-titles { flex-wrap: wrap; }
.yt-titles .chip-btn { white-space: normal; text-align: left; height: auto; min-height: 32px; padding: 6px 10px; }

/* «Главные мысли» instead of subtitles (accents.py): its tile among the subtitle looks, its box, the library's auto tile */
.cap-mini .th-mini { position: absolute; inset: auto 4px 10%; display: flex; flex-wrap: wrap; gap: 3px; justify-content: center;
  font: 700 10px/1.25 var(--font-body); color: #fff; }
.th-mini > span { width: 100%; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.th-mini u { text-decoration: none; box-shadow: inset 0 -2px 0 var(--accent); }
.th-mini i { font-style: normal; font-size: 9px; line-height: 1.3; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; }
.th-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin: 0 0 12px; border: 1px solid var(--accent-line);
  border-radius: var(--r-md); background: var(--accent-soft); }
.th-box > p { margin: 0; }
.lib-body.th-on .cap-size, .lib-body.th-on .cap-pos, .lib-body.th-on .cap-font-sec { display: none; }
.gfx-tile.gfx-auto .gt-media { background: var(--accent-soft); }
.gfx-tile.gfx-auto .gt-icon { color: var(--accent); }
.gfx-tile.gfx-auto.busy { opacity: .6; pointer-events: none; }
.gfx-tile.gfx-auto.busy .gt-icon { animation: gfxBusy 1s ease-in-out infinite; }
@keyframes gfxBusy { 50% { transform: scale(.85); opacity: .6; } }
/* the director's why, under the inspector's actions */
.gi-why { margin: 2px 0 0; padding: 7px 9px; border-radius: 8px; background: var(--accent-soft); font-size: 12px; line-height: 1.35;
  color: var(--text); }
.gi-why b { color: var(--accent); font-weight: 600; }
/* their colour and font for all at once (#thColors, #thFonts) and a card's colour (.gi-sw) */
.th-look { display: grid; gap: 6px; }
.th-sw, .gi-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.th-sw .th-c, .gi-sw button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; min-width: 32px; padding: 4px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.th-sw .th-c.on, .gi-sw button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent-line); }
.th-sw i, .gi-sw i { width: 22px; height: 22px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.th-sw i.theme, .gi-sw i.theme { background: var(--accent); }
.th-sw i.mix { background: conic-gradient(#2F6BFF 0 25%, #FFD60A 0 50%, #30D158 0 75%, #FF4FA3 0); }
.th-sw small { font-size: var(--fs-xs); padding-right: 6px; }
.th-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.th-fonts .ft-s { white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: 15px; }
/* «Картинки по смыслу» in «Медиа» */
.pics-card { display: grid; gap: 6px; margin: 10px 0; }
.pics-card > p { margin: 0; }

/* a caption look of the motion library: its tile is a still of the server's drawing, the captions' band of it */
.cap-box.cap-mini.cap-pic { background: #15171a; }
.cap-box.cap-mini.cap-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 73%; display: block; }
/* the motion library's flash on the picture (21c-graphics.js gaFrameFx, as the export's eq) */
.fx-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 2; mix-blend-mode: screen; }
/* a piece's own zoom / shake (fx-push, fx-pull, fx-punchin, fx-shake animate scale, translate) multiplies and adds to the
   graphics' move of the picture (gaShift's inline scale, translate) — over it, the slide stayed without its zoom: a black stripe */
.monitor-screen video:is(#player, #player2) { animation-composition: add; }
/* the frame the picture's own shape (14-output-text paintMask): black outside it, over a zoomed-in picture's spill,
   under the captions and the graphics; the source's timecode stays on top */
.aspect-mask.edge { z-index: 3; border: 0; border-radius: 0; box-shadow: 0 0 0 9999px #000; }
.aspect-mask.edge span { display: none; }
.monitor-screen .badge-r { z-index: 5; }

/* frosted glass under the neon themes' panels (21c-graphics gaGlassPaint): over the picture, under the cards */
.gfx-glass { position: absolute; z-index: 3; pointer-events: none; }
.gfx-glass[hidden] { display: none; }
/* a round photo that is the speaker's own still (21c-graphics gaPhotoPaint), over its circle in the drawing */
.gfx-photos { position: absolute; inset: 0; pointer-events: none; }
.gfx-photos img { position: absolute; border-radius: 50%; object-fit: cover; }
.gfx-photos img[hidden] { display: none; }
/* a tier list's shelf in the card's settings (21c-graphics gTierRows): the colour the card gives it, a click moves it */
.gi-tiers .gl-row { gap: 6px; }
.gt-tier { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 0; font: 800 14px/1 var(--font-head, inherit);
           color: #16161a; cursor: pointer; }
.gt-tier.t-S { background: #FF5A5F; } .gt-tier.t-A { background: #FF9F43; } .gt-tier.t-B { background: #FFD23A; }
.gt-tier.t-C { background: #7BD66B; } .gt-tier.t-D { background: #5AA9FF; }
.gt-tier:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* «Без перехода / эффекта / фильтра»: the first tile of each list (07-timeline-pieces noneTile) — as big as the others,
   a crossed circle on a hatched ground, lit when it is what stands there now */
.none-tile .none-pic { display: grid; place-items: center; aspect-ratio: 16/9; border-radius: 6px; color: var(--text-dim);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 7px, var(--surface-3) 7px 14px); }
.look-tile.none-tile .none-pic { aspect-ratio: 16/10; border-radius: 7px; }
.none-tile .none-pic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.none-tile.active .none-pic { color: var(--accent); }
.none-tile .fx-group { color: var(--text-dim); }
/* the looks of the graphics as cards drawn in them (21c-graphics paintThemes): the top of the library's «Список» sample */
.gfx-themes:has(.gfx-th-tile) { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.gfx-th.gfx-th-tile { display: flex; flex-direction: column; align-items: stretch; gap: 5px; width: auto; height: auto; padding: 4px 4px 6px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; }
.gfx-th.gfx-th-tile.active { border: 1px solid var(--accent); box-shadow: 0 0 0 1px var(--accent); padding: 4px 4px 6px; }
.gfx-th.gfx-th-tile .gth-pic { display: block; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; }
.gth-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 4%; display: block; }
.gth-name { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); line-height: 1.25; padding: 0 2px; }
.gfx-th.gfx-th-tile .gth-name i { display: block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
/* «Главные мысли»: each colour as a thought written in it */
.th-sw .th-c.th-prev-tile { flex-direction: column; align-items: flex-start; gap: 3px; border-radius: 10px; padding: 7px 9px 6px;
  background: #121512; min-width: 0; }
.th-prev { font-weight: 800; font-size: 13px; color: #fff; white-space: nowrap; }
.th-prev u { text-decoration: none; color: var(--c); box-shadow: inset 0 -0.38em 0 color-mix(in srgb, var(--c) 28%, transparent); }
.th-sw .th-prev-tile small { padding: 0; color: var(--text-muted); }
/* the captions in the lower third, as the export puts them (reels.cap_margin): a tall frame — the bottom line at
   80 % of its height (it was 73 %); a wide one — near its bottom edge (it was a third up, almost its middle) */
:is(.phone, .cap-box) .ov-cap { bottom: calc(400 / 1920 * 100cqh); }
@container (min-aspect-ratio: 1 / 1) {
  .cap-box .ov-cap { bottom: 7cqh; }
  .cap-box .ov-cap.minimal { bottom: 5cqh; }
}
/* the start: a format is its picture, its name and one plain line (no grey facts under it); «Просто почистить» one
   of them, not a wide row of its own; the wish's examples are pills that read what they do, a tick when picked */
.cf-chips:has(.cf-plain) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cf-card.cf-plain { display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "ic name" "hint hint";
  gap: 3px 6px; padding: 9px 10px; align-content: start; text-align: left; }
.cf-card.cf-plain .cf-hint, .cf-card.cf-plain.active .cf-hint { display: block; -webkit-line-clamp: unset; overflow: visible; white-space: normal; }
.cf-note-f { display: block; margin-top: 4px; }
.wish-chips, .ask-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wish-chips .chip-btn, .ask-chips .chip-btn, .start-card .wish-chips .chip-btn { display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text-muted); font-size: var(--fs-s); }
.wish-chips .chip-btn::before, .ask-chips .chip-btn::before { content: none; display: none; }
.wish-chips .chip-btn:hover, .ask-chips .chip-btn:hover { border-color: var(--accent-line); color: var(--text); background: var(--surface-3); }
.wish-chips .chip-btn[aria-pressed="true"], .ask-chips .chip-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--text);
  background: var(--accent-soft); }
.wish-chips .chip-btn[aria-pressed="true"]::after, .ask-chips .chip-btn[aria-pressed="true"]::after { content: "✓"; color: var(--accent); font-weight: 700; }
@media (pointer: coarse) { .wish-chips .chip-btn, .ask-chips .chip-btn { height: 40px; } }
@media (max-width: 640px) {
  .cf-chips:has(.cf-plain) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── «Звуки» (21f-sounds.js): the lane under the music — a mark at each sound's moment; the library of them ── */
.snd-row .track2 { height: 28px; }
.snd-chip { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; gap: 4px; max-width: 96px; padding: 0 7px 0 4px;
  border: 0; border-radius: 6px; background: rgba(240,181,106,.14); box-shadow: inset 0 0 0 1px rgba(240,181,106,.55);
  color: var(--text); font: 500 11px/1 var(--font-body); white-space: nowrap; cursor: pointer; transform: translateX(-4px); }
.snd-chip i { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--lane-snd); }
.snd-chip span { overflow: hidden; text-overflow: ellipsis; }
.snd-chip.tight { padding: 0 3px; }
.snd-chip.tight span { display: none; }
.snd-chip:hover, .snd-chip:focus-visible { outline: none; background: rgba(240,181,106,.26); }   /* (never wider: it would cover its neighbour) */
.snd-chip.src-mine { background: rgba(240,181,106,.32); cursor: grab; }
.snd-chip.src-mine:active { cursor: grabbing; }
.snd-chip.picked { z-index: 3; box-shadow: inset 0 0 0 2px var(--accent); }
.snd-empty { position: absolute; inset: 0; border: 0; background: transparent; color: var(--text-dim); text-align: left; padding: 0 10px;
  font: 400 var(--fs-xs)/1 var(--font-body); cursor: pointer; }
.snd-empty:hover { color: var(--text); }
@media (pointer: coarse) { .snd-row .track2 { height: 36px; } .snd-chip.tight { min-width: 18px; } }
.snd-pop { display: flex; flex-direction: column; gap: 10px; padding: 12px; width: min(340px, calc(100vw - 16px)); }
.snd-pop.sheet { width: auto; }
.snd-pop-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font: 400 var(--fs-xs)/1.3 var(--font-body);
  color: var(--text-dim); }
.snd-pop-h b { font: 600 var(--fs-m)/1.2 var(--font-body); color: var(--text); }
.snd-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.snd-kinds .chip-btn { height: 28px; padding: 0 9px; }
.snd-pop-note { margin: 0; font: 400 var(--fs-s)/1.45 var(--font-body); color: var(--text-muted); }
.snd-vol { display: flex; align-items: center; gap: 10px; font: 400 var(--fs-s)/1 var(--font-body); color: var(--text-muted); }
.snd-vol input { flex: 1; accent-color: var(--accent); }
.snd-vol output { min-width: 40px; text-align: right; color: var(--text); }
.snd-pop-f { display: flex; gap: 8px; }
.snd-lib { display: flex; flex-direction: column; gap: 14px; }
.snd-grp h4 { margin: 0 0 6px; font: 500 var(--fs-xs)/1.2 var(--font-body); color: var(--text-dim); }
.snd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.snd-tile { display: flex; align-items: stretch; min-width: 0; border-radius: var(--r-sm); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border); }
.snd-try { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 8px; border: 0; background: transparent;
  color: var(--text); font: 500 var(--fs-s)/1.1 var(--font-body); text-align: left; cursor: pointer; }
.snd-try svg { flex: 0 0 14px; width: 14px; height: 14px; fill: var(--lane-snd); }
.snd-n { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.snd-n b { font: 500 var(--fs-s)/1.1 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd-n small { color: var(--text-dim); font: 400 11px/1 var(--font-body); white-space: nowrap; }
.snd-add { flex: 0 0 34px; border: 0; border-left: 1px solid var(--border); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: transparent;
  color: var(--text); font: 500 18px/1 var(--font-body); cursor: pointer; }
.snd-try:hover, .snd-add:hover { background: var(--surface-3); }
.snd-add:hover { color: var(--accent); }
@media (pointer: coarse) { .snd-try, .snd-add { min-height: 44px; } }

/* «CUTMO для Mac / Windows скачивается»: what to do with the file, three steps (19-paywall-desktop-ask.js appSteps) */
.app-steps { width: min(460px, 100%); }
.app-steps ol { margin: 10px 0 6px; padding-left: 22px; display: grid; gap: 10px; color: var(--text-muted); font: 400 var(--fs-s)/1.5 var(--font-body); }
.app-steps li::marker { color: var(--accent); font-weight: 600; }

/* a file card's «why»: an upload refused or waiting says it on the card, not only in the status line */
.nm-why { padding: 0 10px 8px; font: 400 var(--fs-xs)/1.35 var(--font-body); color: var(--warn); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ═════════ «Как смонтировать?»: line icons, the prompt within sight on a phone, a strip when put aside ═════════ */
svg.cf-ic { grid-area: ic; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
.cf-card.active svg.cf-ic { color: var(--accent); }
@media (max-width: 640px) {
  /* a format is its icon and name — what it does is said under the grid for the chosen one; the prompt comes into
     sight without scrolling past nine two-line cards */
  .start-card .cf-chips:has(.cf-plain) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .start-card .cf-card.cf-plain { grid-template-columns: 20px minmax(0, 1fr); grid-template-areas: "ic name"; align-items: center;
    gap: 8px; padding: 9px 10px; min-height: 44px; }
  .start-card .cf-card.cf-plain .cf-hint, .start-card .cf-card.cf-plain.active .cf-hint, .start-card .cf-facts { display: none; }
  .start-card .cf-name { font-size: var(--fs-s); line-height: 1.2; }
  .start-card:not([hidden]):not(.docked) { gap: 12px; }
  .start-card .wish-chips { gap: 6px; }
  .start-card .wish-chips .chip-btn { height: 34px; padding: 0 11px; }
}
/* a phone and a tablet: the «×» is there too; put aside, the window is a strip over the bottom menu — its title opens it
   again, its button starts the edit */
@media (max-width: 900px) {
  .start-dock { display: inline-flex; }
  .start-card.docked:not([hidden]) { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 60;
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 6px 6px 14px; border-radius: 14px;
    background: var(--surface-2); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
  #work.app.ready .start-card.docked:not([hidden]) { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .start-card.docked > :not(.start-head):not(#startBtn) { display: none !important; }
  .start-card.docked .start-head { flex: 1 1 auto; min-width: 0; }
  .start-card.docked .start-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-size: var(--fs-s); }
  .start-card.docked #startBtn { flex: 0 0 auto; width: auto; height: 40px; margin: 0; padding: 0 14px; border-radius: 10px; font-size: var(--fs-s); }
}
/* a 24-unit line icon at the 16-px size of a button: the same weight as the 16-unit ones */
.ic.i24 { stroke-width: 2.2; }
.gt-svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ═════════ a laptop's short window: the timeline never taller than what it holds, and all five tracks in sight ═════════
   (at 1366×650 «Музыка» and «Звуки» lay under the timeline's fold and the panels above were 288 px — the owner: «никто
   не хочет пролистывать»). The timeline takes what its tracks need up to its share; on a short window its rows are
   tighter, the confirm line slimmer, the keep/cut legend gone (the colours say it) */
@media (min-width: 901px) {
  #work .timeline:not([hidden]) { height: auto; max-height: var(--tl-max, 45vh); }
}
@media (min-width: 901px) and (max-height: 1000px) {
  #work .tl-foot { display: none; }
  #work .tl-bar { margin-bottom: 6px; }
  #work .tl-bar .btn-icon { height: 32px; }
  #work .confirm-bar { margin-bottom: 4px; padding-top: 0; padding-bottom: 0; }
  #work .confirm-bar .btn { height: 26px; }
  #work .ruler { height: 18px; }
  #work .track-row { margin-top: 3px; }
  #work .track { height: 46px; }
  #work .gfx-row-tl .track2 { height: 28px; }
  #work .music-row .track2 { height: 30px; }
  #work .snd-row .track2 { height: 24px; }
  #work #brollTrack:empty, #work .gfx-row-tl .track2:has(#gfxEmpty:not([hidden])) { height: 22px; }
}
/* a phone: the AI's edit in one line over the timeline — its figures, then «Посмотреть» and «Подтвердить» side by side
   (it was four lines and two full-width buttons: 150 px, the timeline under the fold) */
@media (max-width: 760px) {
  #work .confirm-bar { padding: 8px 8px 8px 12px; gap: 6px; }
  #work .confirm-bar #confirmTxt { flex: 1 1 100%; line-height: 1.35; }
  #work .confirm-bar .cb-hint { display: none; }
  #work .confirm-bar .lbl-long { display: none; }                /* «Что вырезано»: the two buttons on one row */
  #work .confirm-bar .lbl-short { display: inline; }
  #work .confirm-bar .btn { flex: 1 1 0; min-width: 0; height: 36px; padding: 0 8px; white-space: nowrap; font-size: var(--fs-s); }
}
/* «Кадр»: a turn is drawn as an arrow round (the ⟲ ⟳ signs came out as two dots in most fonts) */
.fp-chips button:has(> svg) { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; }
.fp-chips button > svg.ic { width: 14px; height: 14px; flex: 0 0 14px; }
/* a wide window: the row under the player is three columns; the right one gives way (the captions' menu shortens) —
   it was as wide as its content, and a long style name («динамичный…») pushed «Кадр» over «К следующему резу» */
@media (min-width: 1601px) {
  .transport { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .transport > .tc-right { min-width: 0; justify-self: stretch; display: flex; justify-content: flex-end; }
  #work .transport .tc-right .dd { flex: 0 1 auto; min-width: 0; }
}
/* … and under 2400 px its column has no room for the style's name: the menu is its «CC ▾», as on a laptop (the name
   cut to «жир…» read as nothing; at 2000 px «плашка на слове» came out «плашк…» in 88 px) */
@media (min-width: 1600px) and (max-width: 2399px) {
  #capQuick + .dd .dd-v { font-size: 0; }
  #capQuick + .dd .dd-v::before { margin-right: 0; }
  #work .transport .tc-right .dd { flex: 0 0 auto; }
}

/* ═════════ a phone, as CapCut: the editor is one screen — nothing below it to scroll to ═════════
   (the owner: «в капкате плашки снизу, промотать нельзя, а у нас бесконечные пролистывания — так не должно быть»).
   The top bar with «Подтвердить»; the player takes what is left; its controls one row; the timeline; the strip of
   tools at the bottom, sliding sideways with «Экспорт» pinned at its end. A tool's sheet comes up over the timeline,
   the player stays in sight and plays. Only a catalogue scrolls (music, graphics…), inside its sheet. */
@media (max-width: 900px) {
  #work.app.ready:not([hidden]) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; padding-bottom: 0; }
  /* the page under it never moves (a page's 72 px for the feedback button made it scroll) */
  html:has(#work.app.ready:not([hidden])), body:has(#work.app.ready:not([hidden])) { padding-bottom: 0; overflow: hidden; overscroll-behavior: none; }
  #work.app.ready > .topbar { flex: 0 0 auto; }
  #work.app.ready .monitor { position: relative; top: auto; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column;
    overflow: hidden; padding: 4px 10px 0; background: var(--bg); }
  #work.app.ready .monitor-screen { min-height: 0; margin: auto 0; }      /* (its height is the picture's: fitScreen) */
  #work.app.ready .monitor { order: 1; }
  #work.app.ready > .timeline:not([hidden]) { order: 2; }
  #work.app.ready > .m-bar { order: 3; }
  /* the header: the logo (to the projects), the history, ↶ ↷, «Подтвердить» — the account is on the projects' page.
     The name gives way (…) and the buttons keep their size: on a 440-px iPhone 16 Pro Max the name pushed
     «Подтвердить» past the screen's edge (at 390 the name was hidden, the check passed) */
  #work.app.ready .topbar .acct-btn { display: none; }
  #work.app.ready > .topbar { gap: 6px; padding: 0 10px; }
  #work.app.ready .topbar .tb-left { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  #work.app.ready .topbar .proj { flex: 0 1 auto; min-width: 0; max-width: none; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #work.app.ready .topbar .tb-right { flex: 0 0 auto; gap: 2px; }
  #work.app.ready .topbar .btn-icon, #work.app.ready .topbar .fb-top { width: 36px; min-width: 36px; height: 36px; padding: 0; }
  #work.app.ready .topbar .fb-top > span, #work.app.ready .topbar .brand span { display: none; }
  #work.app.ready .monitor-screen video { max-height: 100%; }
  #work.app.ready .monitor > :not(.monitor-screen) { flex-shrink: 0; }
  #work.app.ready > .timeline:not([hidden]) { flex: 0 1 auto; min-height: 0; max-height: 52dvh; overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 4px 10px 6px; border-top: 1px solid var(--border); }
  /* «Подтвердить» is the header's, as CapCut's «Экспорт»; the line over the timeline keeps the figures */
  #work #hdConfirm:not([hidden]) { display: inline-flex; height: 36px; padding: 0 12px; font-size: var(--fs-s); }
  #work #hdConfirm .lbl-long { display: none; }
  #work #hdConfirm .lbl-short { display: inline; }
  #work .confirm-bar { flex-wrap: nowrap; align-items: center; margin: 4px 0; padding: 4px 4px 4px 10px; }
  #work .confirm-bar #confirmTxt { flex: 1 1 auto; min-width: 0; font-size: var(--fs-xs); }
  #work .confirm-bar .btn { flex: 0 0 auto; height: 32px; }
  /* the player's controls: one row — the time, ⏮ ▶ ⏭, the captions' «CC ▾», full screen («Кадр» is in the strip) */
  #work.app.ready .transport { display: flex; align-items: center; gap: 4px; padding: 4px 0; }
  #work.app.ready .transport > .tc { flex: 1 1 0; min-width: 0; font-size: var(--fs-xs); }
  #work.app.ready .transport .tc .dim { display: none; }
  #work.app.ready .transport > .transport-mid { flex: 0 0 auto; gap: 2px; }
  #work.app.ready .transport > .tc-right { flex: 1 1 0; min-width: 0; display: flex; justify-content: flex-end; gap: 4px; grid-column: auto; }
  #work.app.ready .transport #btnFrame { display: none; }
  #work.app.ready .transport #capQuick + .dd { flex: 0 0 auto; width: auto; max-width: 76px; }
  #work.app.ready .transport #capQuick + .dd .dd-v { font-size: 0; }
  #work.app.ready .transport #capQuick + .dd .dd-v::before { margin-right: 0; }
  #work.app.ready .transport .play { width: 44px; height: 44px; }
  /* the timeline's own tools: one row — «Поверх» and «Попросить ИИ» are the strip's */
  #work.app.ready .tl-bar { flex-wrap: nowrap; gap: 4px; margin-bottom: 4px; }
  #work.app.ready .tl-bar #btnBroll, #work.app.ready .tl-bar #btnAsk { display: none; }
  #work.app.ready .tl-bar .seg-btn { height: 34px; min-width: 36px; }
  #work.app.ready .tl-bar .btn-icon { width: 34px; height: 34px; flex: 0 0 34px; }
  #work.app.ready .tl-bar .seg-btn.wide { padding: 0 10px; }
  /* tighter lanes: all of them in sight */
  #work.app.ready .ruler { height: 18px; }
  #work.app.ready .track-row { margin-top: 3px; }
  #work.app.ready .track { height: 50px; }
  #work.app.ready .gfx-row-tl .track2 { height: 28px; }
  #work.app.ready .music-row .track2 { height: 30px; }
  #work.app.ready #brollTrack:empty, #work.app.ready .gfx-row-tl .track2:has(#gfxEmpty:not([hidden])) { height: 22px; }
  #work.app.ready .tl-foot { display: none; }
  /* the whole music's settings only with a piece picked (its sheet): they lay under the timeline, a screen to scroll */
  #work.app.ready .m-edit:not(:has(.me-clip)) { display: none !important; }
  /* the strip */
  #work.app.ready .m-bar { position: relative; left: auto; right: auto; bottom: auto; z-index: 70; flex: 0 0 auto; display: flex; align-items: stretch;
    gap: 0; height: calc(60px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); }
  .m-bar .m-tools { flex: 1 1 auto; min-width: 0; display: flex; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .m-bar .m-tools::-webkit-scrollbar { display: none; }
  .m-bar .m-tools button { flex: 0 0 62px; scroll-snap-align: start; }
  .m-bar .m-pin { flex: 0 0 66px; border-left: 1px solid var(--border); }
  .m-bar .m-pin svg { stroke: var(--accent); }
  /* a sheet: over the timeline, above the strip; the player above it plays and is not dimmed */
  body.m-lib #work.app.ready .panel.media.lib, body.m-insp #work.app.ready .inspector {
    bottom: calc(60px + env(safe-area-inset-bottom)); height: min(56dvh, 560px); max-height: none; }
  body.m-lib.m-low #work.app.ready .panel.media.lib { height: min(38dvh, 400px); }
  body.m-lib #work .m-veil, body.m-insp #work .m-veil { display: none; }
  #work.app.ready .frame-pop:not([hidden]) { bottom: calc(60px + env(safe-area-inset-bottom)) !important; max-height: min(56dvh, 560px); }
  /* a sheet is its tool's own (the strip is the way between them): the library's eight sections and the settings' tabs
     over it said the same twice */
  body.m-lib #work.app.ready .panel.media.lib > .lib-tabs, body.m-insp #work.app.ready .inspector > .tabs { display: none !important; }
  body.m-lib #work.app.ready .panel.media.lib, body.m-insp #work.app.ready .inspector { padding-top: 18px; }
  /* «ИИ»: its window a sheet like the others (it floated over the player's buttons) */
  #work.app.ready .ask-pop:not([hidden]) { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); top: auto;
    transform: none; width: auto; max-height: min(56dvh, 560px); overflow-y: auto; overscroll-behavior: contain; margin: 0; z-index: 66;
    border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.5); }
  /* a piece of music picked: the player steps back, the timeline's own tools and the AI's line make room, its lane stays
     in sight and its settings start under the lane (the old way scrolled the page — the strip ended up mid-screen) */
  /* a piece's sheet: its five sections on one row; one «×» (the sheet's) */
  #work.app.ready .clip-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  #work.app.ready .clip-nav-btn { padding: 0 2px; font-size: var(--fs-xs); }
  body.m-insp #work.app.ready #clipClose { display: none; }
  #work.app.ready:has(.m-edit .me-clip) { padding-bottom: 0; }          /* (it made room to scroll the page) */
  #work.app.ready:has(.m-edit .me-clip) .monitor { flex: 0 0 auto; }
  #work.app.ready:has(.m-edit .me-clip) .monitor-screen { height: 18vh !important; flex: none !important; }
  #work.app.ready:has(.m-edit .me-clip) > .timeline { flex: 1 1 auto; max-height: none; }
  #work.app.ready:has(.m-edit .me-clip) .tl-bar, #work.app.ready:has(.m-edit .me-clip) .confirm-bar { display: none !important; }
  #work.app.ready .m-edit:has(.me-clip) { top: var(--m-lane, auto); bottom: calc(60px + env(safe-area-inset-bottom)); max-height: none; z-index: 67; }
  /* the cut review on a phone: the timeline steps aside for it — the player with the cut playing in it, the card right
     under it, the strip of tools; one screen, nothing to scroll (the card used to sit under the timeline, the picture
     off the top) */
  #work.app.ready:has(#teachBar:not([hidden])) > .timeline { display: none !important; }
  #work.app.ready .monitor:has(#teachBar:not([hidden])) { overflow: hidden; }
  #work.app.ready #teachBar { margin-top: 6px; padding: 10px; gap: 8px; max-height: none; overflow: visible; }
  #work.app.ready #teachBar .teach-what { font-size: var(--fs-s); line-height: 1.35; }
  #work.app.ready #teachBar .teach-ctx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
  #work.app.ready #teachActs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  #work.app.ready #teachActs > .teach-no { grid-column: span 3; order: 1; min-height: 42px; height: 42px; }
  #work.app.ready #teachActs > .teach-yes { grid-column: span 3; order: 2; min-height: 42px; height: 42px; }
  #work.app.ready #teachActs > .btn.sm { grid-column: span 2; order: 3; height: 36px; padding: 0 6px; font-size: var(--fs-xs); }
  #work.app.ready #teachActs:has(#teachMoreCut[hidden]) > .btn.sm { grid-column: span 3; }
}
/* the turn buttons of a piece: an arrow round, like «Кадр»'s */
.seg-btn:has(> svg.ic) { display: inline-flex; align-items: center; gap: 4px; }
.seg-btn > svg.ic { width: 14px; height: 14px; flex: 0 0 14px; }

/* ═════════ the right panel on a computer: a tab fits without scrolling (only a transcript or a catalogue scrolls) ═════════ */
@media (min-width: 901px) {
  /* «Стиль»: the style and «Расставить заново» on one row; «Обучение ИИ» says what it is on a hover */
  #work .tab-body[data-body="fx"]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 8px; align-items: end; }
  #work .tab-body[data-body="fx"] > * { grid-column: 1 / -1; margin: 0; }
  #work .tab-body[data-body="fx"] > .field { grid-column: 1; }
  #work .tab-body[data-body="fx"] > #fxApply { grid-column: 2; white-space: nowrap; }
  #work .taste-card > p.dim { display: none; }
  #work .taste-card .row2 .btn { white-space: nowrap; }
  #work #fxHint { display: none; }
  /* «Рилсы»: two columns, «Найти лучшие моменты» in sight (it was under the fold) */
  #work #reelsForm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  #work #reelsForm > * { grid-column: 1 / -1; margin: 0; }
  #work #reelsForm > .field:has(#reelLayout) { grid-column: 1; order: 3; }
  #work #reelsForm > .field:has(#reelCaps) { grid-column: 2; order: 3; }
  #work #reelsForm > .field:has(#reelMusic) { order: 4; }
  #work #reelsForm > .toggle { order: 5; }
  #work #reelsForm > #reelsGo { order: 6; }
  #work #reelsForm > #reelsMsg { order: 7; }
  /* «Экспорт»: format, quality and frame rate on one row; the folded sections' titles a line each */
  #work .out-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  #work .out-main > .row2 { display: contents; }
  #work .out-main > :not(.row2):not(.field) { grid-column: 1 / -1; }
  #work .out-main > #exBuild { grid-column: 1 / 3; }               /* «Скачать MP4» and «Поделиться» side by side */
  #work .out-main > #exShare { grid-column: 3; }
  #work .out-main .field { margin: 0; min-width: 0; }
  #work .out-sec > summary { padding-top: 8px; padding-bottom: 8px; min-height: 0; }
  #work .out-sec:not([open]) { padding-top: 0; padding-bottom: 0; }
  /* the folded sections: one list under the main card, a line each */
  #work .tab-body[data-body="export"]:not([hidden]) { gap: 0; }
  #work .tab-body[data-body="export"] > .out-main { margin-bottom: 10px; }
  #work .tab-body[data-body="export"] > .out-sec { margin: 0; border-radius: 0; border-top-width: 0; }
  #work .tab-body[data-body="export"] > .out-main + .out-sec { border-top-width: 1px; border-radius: var(--r-md) var(--r-md) 0 0; }
  #work .tab-body[data-body="export"] > .out-sec > summary { padding-top: 6px; padding-bottom: 6px; }
  #shareMsg:empty { display: none; }
}
/* «В другой редактор»: a folded section like the others (a 340-px list under them); none until the edit is ready */
.ex-other:has(#actions[hidden]) { display: none; }
.ex-other .export-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.ex-other .export-list > #exMsg { grid-column: 1 / -1; }
/* a picked music piece's settings: its «×» on a phone (a sheet with no way out but a tap somewhere else); a computer
   lets the piece go with a click beside it, as before */
.me-clip .me-x { display: none; }
@media (max-width: 900px) {
  #work.app.ready .me-clip:has(.me-x) { position: relative; }
  #work.app.ready .me-clip .me-x { display: inline-flex; position: absolute; top: -6px; right: 0; }
}

/* ═════════ «Стиль ролика» on the start card: the engine's looks as loops (htmlfx, 14b-looks.js) ═════════ */
.vlook-sec { display: grid; gap: 8px; min-width: 0; }
.vlook-sec[hidden] { display: none; }
.vlook-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px 8px; }
.vlook-tile { position: relative; display: grid; align-content: start; gap: 5px; min-width: 0; padding: 0; border: 0; background: none;
  color: var(--text-muted); cursor: pointer; text-align: center; font: 600 11px/1.2 var(--font-body); }
.vlook-tile b { font-weight: 600; overflow-wrap: anywhere; }
.vlook-tile .vl-pv { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 10px; background: #000;
  box-shadow: inset 0 0 0 1px var(--border); }
.vlook-tile .vl-pv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vlook-tile .vl-live { background: #000 url(/htmlfx/bg916.jpg) center / cover; }
.vlook-tile .vl-live iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0;
  pointer-events: none; background: transparent; }
.vlook-tile .vl-sw { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,.4), 0 0 0 5px rgba(255,255,255,.7); }
/* «Свой цвет»: the editor's own palette (01b-ui's swatch button) is the whole tile, unseen — the tile is what is pressed */
.vlook-tile.vlook-own .ui-sw { position: absolute; inset: 0; width: 100%; height: 100%; flex: none; opacity: 0; border: 0; cursor: pointer; }
.vlook-tile:hover { color: var(--text); }
.vlook-tile.active { color: var(--text); }
.vlook-tile.active .vl-pv { box-shadow: 0 0 0 2px var(--accent); }
.vlook-tile:focus-visible .vl-pv { outline: 2px solid var(--accent); outline-offset: 2px; }
.vlook-hint { margin: 0; min-height: 1.3em; }
/* a wide window: the look is the dialog's right column (the card stays as tall as it was — nothing to scroll) */
@media (min-width: 1180px) and (min-height: 700px) {
  .start-card:not([hidden]):not(.docked) { width: min(1180px, calc(100vw - 48px)); grid-template-columns: minmax(0, 1fr) 360px; column-gap: 26px; }
  .start-card:not(.docked) > * { grid-column: 1; }
  .start-card:not(.docked) > .start-head, .start-card:not(.docked) > #startBtn, .start-card:not(.docked) > .start-quota { grid-column: 1 / -1; }
  /* (over the left column's own rows — the format, the wish: eight rows of span made six empty ones, each with its gap) */
  .start-card:not(.docked) > .start-side { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
  .start-card:not(.docked) .vlook-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* (five a row: a long name breaks where a Russian word may — «фиоле-товый», not «фиолетовы / й») */
  .start-card:not(.docked) .vlook-tile b { font-size: 11px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; }
  /* (the right column fits a laptop's 900 px with «В моём стиле» and «Дополнительно» under it: the chosen look's line
     on one line) */
  .start-card:not(.docked) .vlook-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* a phone: one row of tiles that slides sideways (a catalogue), the prompt above stays in sight */
@media (max-width: 640px) {
  .vlook-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74px; overflow-x: auto; scrollbar-width: none;
    padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .vlook-row::-webkit-scrollbar { display: none; }
}
.start-card.docked .vlook-sec { display: none; }
/* the video's look in the editor's «Оформление»: the same looks, small (their posters), «Свой цвет» */
.gfx-vlooks { display: grid; gap: 6px; margin-bottom: 10px; }
.gfx-vlooks[hidden] { display: none; }
.gvl-h { font: 600 var(--fs-xs)/1.2 var(--font-body); color: var(--text-muted); }
.gvl-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px 6px; }
.gvl-cam { margin-top: 10px; flex-wrap: wrap; row-gap: 2px; }
.gvl-cam small { flex-basis: 100%; padding-left: 40px; font-size: var(--fs-xs); }
.gvl { position: relative; display: grid; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: center;
  color: var(--text-muted); font: 500 10.5px/1.2 var(--font-body); }
.gvl img, .gvl-own > i { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border); }
.gvl > i { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0,0,0,.5); }
.gvl-own > i { position: static; width: 100%; height: auto; border-radius: 8px; box-shadow: none; border: 1px dashed var(--border-strong);
  background: radial-gradient(circle, var(--c) 0 13px, rgba(255,255,255,.75) 13.5px 15px, transparent 15.5px) center / 100% 100% no-repeat, var(--surface-2); }
.gvl span { overflow-wrap: anywhere; }
.gvl.active { color: var(--text); }
.gvl.active img, .gvl.active.gvl-own > i { box-shadow: 0 0 0 2px var(--accent); }
.gvl-own .ui-sw { position: absolute; inset: 0; width: 100%; height: 100%; flex: none; opacity: 0; border: 0; cursor: pointer; }
/* «Новая графика» in the editor (21f-htmlfx.js): the engine's own page over the picture — over the captions, under the
   old drawing (as the export lays them); a rule the composer could not keep: a red dot on the card's block */
.gfx-hx { position: absolute; z-index: 4; pointer-events: none; overflow: hidden; }
/* (off, the engine's page keeps its layout: a page built in display:none measures 0 — no fitted text, no card heights) */
.gfx-hx.off { visibility: hidden; }
.gfx-hx-b { z-index: 2; mask-size: 100% 100%; -webkit-mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; }
.gfx-hx iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: transparent;
  pointer-events: none; color-scheme: normal; }
.gfx-item .qc-dot { position: absolute; top: 3px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: #FF4D4D; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45); pointer-events: auto; }

/* «Попросить ИИ»: the agent's proposal — what was done, the edit before and after on one scale, keep / take back */
.ask-plan { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2, #171A17);
  border: 1px solid var(--border); }
.ask-plan[hidden] { display: none; }
.ask-plan-h { display: flex; align-items: baseline; gap: 8px; }
.ask-plan-list { margin: 0; padding: 0 0 0 18px; display: grid; gap: 2px; font-size: 12.5px; color: var(--text); }
.ask-plan-list li::marker { color: var(--accent); }
.ask-plan-said { margin: 0; }
.ask-ba { display: grid; gap: 4px; }
.ask-ba-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; }
.ask-ba-lane { position: relative; height: 12px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ask-ba-lane i { position: absolute; top: 0; bottom: 0; background: var(--accent-soft); border-left: 1px solid var(--accent-line); }
.ask-ba-lane b { position: absolute; top: 2px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg);
  background: var(--accent); border-radius: 1px; }
.ask-plan-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ── «Какой вариант лучше?» after an export (21h-vote.js): a card in the corner, two short variants side by side ── */
.vote-card { position: fixed; right: 16px; bottom: 16px; z-index: 95; width: 380px; max-width: calc(100vw - 32px);
  background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 12px;
  display: flex; flex-direction: column; gap: 10px; animation: ui-fade .2s; }
.vote-card.wide { width: 520px; }
.vote-card .vc-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.vote-card .vc-head b { display: block; font-size: var(--fs-l); }
.vote-card .vc-sub { display: block; color: var(--text-muted); font-size: var(--fs-s); margin-top: 2px; }
.vote-card .vc-x { flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--r-sm); border: 0; background: transparent;
  color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.vote-card .vc-x:hover { background: var(--surface-3); color: var(--text); }
.vote-card .vc-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vote-card .vc-side { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vote-card .vc-frame { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 9 / 16;
  max-height: 46vh; border: 2px solid transparent; }
.vote-card.wide .vc-frame { aspect-ratio: 16 / 9; }
.vote-card .vc-frame video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer; }
.vote-card .vc-tag { position: absolute; top: 6px; left: 6px; background: rgba(10,12,10,.72); border-radius: var(--r-xs);
  padding: 1px 7px; font-size: var(--fs-xs); font-weight: 600; pointer-events: none; }
.vote-card .vc-side.won .vc-frame { border-color: var(--accent); }
.vote-card .vc-pick { position: relative; overflow: hidden; height: var(--ctl-h); justify-content: center; border-color: var(--accent-line); }
.vote-card .vc-pick i { position: absolute; inset: 0; width: 0; background: var(--accent-soft); }
.vote-card .vc-pick.watching i { width: 100%; transition: width 2.2s linear; }
.vote-card .vc-pick span { position: relative; }
.vote-card .vc-pick:not(:disabled):hover, .vote-card .vc-side.won .vc-pick { background: var(--accent); color: var(--accent-ink); }
.vote-card .vc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vote-card .vc-more { color: var(--text-muted); font-size: var(--fs-s); text-decoration: none; }
.vote-card .vc-more:hover { color: var(--text); }
@media (max-width: 900px) {                 /* a phone: a sheet over the strip of tools, the player above it */
  .vote-card, .vote-card.wide { left: 8px; right: 8px; width: auto; max-width: none;
    bottom: calc(68px + env(safe-area-inset-bottom)); }
  .vote-card .vc-frame { max-height: 34dvh; margin: 0 auto; }
}

/* a caption tile's picture is the player's caption box (.cap-box: z-index 4), a transition's veil z-index 3 — scrolled
   up, «без субтитров» and «Только главное» drew over the library's sticky tabs (z-index 3, on a phone 2). Each tile is a
   layer of its own — not the whole .lib-body: «Медиа» holds the start window (#startCard, fixed, z-index 70), and shut
   in the library's layer it went under the tabs, the player and the inspector */
#work .lib-body :is(.lib-item, .cap-tile, .look-tile, .gfx-tile, .font-tile, .tr-demo) { isolation: isolate; }
.cap-box.cap-mini { z-index: 0; }

/* the editor's own transitions (16b-trans.js): drawn over the player by WebGL; on the lane — a cut's, not a frame's */
.broll-view .trans-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.broll-view .trans-cv[hidden] { display: none; }
.broll-item.trans { background: rgba(200, 255, 80, .18); box-shadow: inset 0 0 0 1.5px rgba(200, 255, 80, .75); }

/* the paywall's minute packs («токены»): three buttons; first when it is minutes that ran out */
.pay-extra .pay-packs { display: flex; gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; }
.pay-extra > div:first-child { flex: 1 1 auto; min-width: 0; }
.pay-extra .pay-packs .pay-buy { width: auto; height: auto; min-height: 44px; padding: 6px 14px; display: grid; gap: 0; line-height: 1.2; }
.pay-extra .pay-packs .pay-buy span { font-size: 12px; opacity: .8; font-weight: 500; }
.pay-extra.first { margin: 0 0 14px; border-style: solid; border-color: var(--accent); }
@media (max-width: 820px) {
  .pay-extra .pay-packs { flex: 1 1 auto; min-width: 0; }
  .pay-extra .pay-packs .pay-buy { flex: 1 1 0; min-width: 0; padding: 6px 8px; }
}

/* «Длинный ролик»'s knobs: what the wish said of the same thing, under the knob */
.cf-knobs .knob-wish { display: block; font-size: 11px; color: var(--accent); line-height: 1.2; margin-top: 2px; }
.cf-knobs .knob-wish[hidden] { display: none; }

/* windows over everything of the editor: a phone's tool bar (70) and its sheets (66, «ИИ») sat over every window (50) —
   the plans opened under the AI's sheet, sign-in under the bar; the plans over the export window too (a limit met there) */
.reel-modal { z-index: 90; }
.pay-modal { z-index: 125; }
.offer-modal { z-index: 126; }

/* the start card's right column (a wide window): the look, then «Свои материалы» — they fit under it, the left column is
   no taller than the window (they pushed its hint and «Дополнительно» under the pinned «Начать монтаж») */
.start-side { display: grid; gap: 16px; min-width: 0; align-content: start; }
/* the knobs stay in one line when the words show under one of them («из пожелания») */
.cf-knobs { align-items: start; }
/* «Начать монтаж» waiting for the words («По промпту»): solid — the card's text under it showed through */
.start-card:not(.docked) #startBtn:disabled { opacity: 1; background: var(--surface-3, #24262b); color: var(--text-dim); }
/* a phone: «Что я сделаю» folded to its title — a tap opens it (the knobs and the wish stay in sight) */
@media (max-width: 640px) {
  .cf-note:not(.open) .cf-does, .cf-note:not(.open) .cf-note-f { display: none; }
  .cf-note .cf-note-h { cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
  .cf-note .cf-note-h::after { content: "›"; transform: rotate(90deg); color: var(--text-dim); }
  .cf-note.open .cf-note-h::after { transform: rotate(-90deg); }
}

/* «Свой переход» / «Свой звук» at the top of their library */
.lib-own { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.lib-own .dim { min-width: 0; }

/* «Длинный ролик»'s knobs: the rule over them, and a knob pressed against the words */
.cf-knobs .knobs-rule { grid-column: 1 / -1; margin: 0; }
.cf-knobs .knob-wish.over { color: var(--warn, #F5B042); }

/* «Быстро / Качественно» (the start card, «Попросить ИИ») and «Мои правила монтажа» */
.q-mode, .ask-mode { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 8px 0 6px; }
.q-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.q-seg button { padding: 6px 12px; font: inherit; font-size: var(--fs-sm, 13px); color: var(--text-muted); background: transparent;
  border: 0; border-right: 1px solid var(--border); cursor: pointer; }
.q-seg button:last-child { border-right: 0; }
.q-seg button.on { background: var(--accent-soft); color: var(--text); }
.q-tip { flex: 1 1 120px; min-width: 0; }
.start-card.cf-simple .q-mode { display: none !important; }
@media (pointer: coarse) { .q-seg button { min-height: 40px; } }
.rules-sheet { width: min(560px, 100%); }
.rules-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.rules-body > p { margin: 0; }
.start-side .q-mode { margin: -8px 0 0; }
.start-side .q-seg button { padding: 4px 12px; }
.start-side .ms-cta { margin: 0; }
.rules-text { width: 100%; min-height: 180px; resize: vertical; font-size: var(--fs-sm, 14px); line-height: 1.45; }
.rules-house { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text-muted); }
.rules-house ul { margin: 4px 0 0; padding-left: 18px; }
.rules-foot { display: flex; align-items: center; gap: 10px; }
.ask-plan-plan { margin-top: 6px; } .ask-plan-plan summary { cursor: pointer; color: var(--text-muted); } .ask-plan-plan p { white-space: pre-wrap; margin: 6px 0 0; max-height: 220px; overflow: auto; }

/* the result box says what was done: the line over it would say it twice */
.ask-pop:has(#askPlan:not([hidden])) #askGot { display: none; }
.q-seg[hidden], .q-tip[hidden] { display: none !important; }
/* a logo's card over the video (webpics.corner): the top corner away from the face; in a tall frame below the platform's
   own top bar */
.broll-view.pip.tl img, .broll-view.pip.tl video { inset: 4% auto auto 4%; }
.broll-view.pip.tall img, .broll-view.pip.tall video { top: 11%; }

/* the player's trouble card: what happened, that nothing is lost, one thing to do — a card in the middle of the
   picture, not the old lime pill that said «открой в другом браузере» (its words ran into the rounded edge) */
.teach-tag.net-tag { pointer-events: auto; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(12,14,12,.94); padding: 16px 20px; display: grid; gap: 6px; justify-items: center;
  max-width: min(400px, 88%); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.net-tag .nt-h { font: 700 15px/1.25 var(--font-body); color: var(--text); }
.net-tag .nt-p { font: 400 13px/1.4 var(--font-body); color: var(--text-muted); }
.net-tag .nt-btns { display: flex; gap: 8px; margin-top: 6px; }
.net-tag .nt-btns .btn { min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; }

/* a phone: a note comes at the top, over the picture — at the bottom it lay on the timeline's lanes */
@media (max-width: 900px) {
  .ui-toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -20px); max-width: calc(100vw - 32px); }
  .ui-toast.show { transform: translate(-50%, 0); }
}

/* the landing's footer links come up above the cookie notice while it waits for an answer (they lay under it) */
body.on-landing:has(#cookieBar:not([hidden])) .site-foot { padding-bottom: 120px; }
@media (max-width: 640px) { body.on-landing:has(#cookieBar:not([hidden])) .site-foot { padding-bottom: 200px; } }

/* the start card on a laptop (1440×900): it outgrew the window — «Дополнительно» open 62 px, «По промпту» 24 (108 with
   it). The right column spans the left one's rows, so its two rows of looks set the dialog's height (and stretched the
   wish's own rows apart): the looks are one row that slides sideways (a catalogue — five and a bit in sight: there is
   more), the wish's quick chips one row, its rows packed at the top, and the six formats 3 × 2 (4 + 2 left a hole) */
@media (min-width: 1180px) and (min-height: 700px) {
  .start-card:not(.docked) .vlook-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 5.4);
    overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .start-card:not(.docked) .vlook-row::-webkit-scrollbar { display: none; }
  .start-card:not(.docked) .wish { align-content: start; }
  .start-card:not(.docked) .wish-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .start-card:not(.docked) .wish-chips::-webkit-scrollbar { display: none; }
  .start-card:not(.docked) .wish-chips .chip-btn { flex: 0 0 auto; }
  .start-card:not(.docked) .cf-chips:has(.cf-plain) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* a phone, a tablet, while it edits (the first minutes a newcomer sees): the picture with its progress first, the
   library under it — it stood under the library tabs and the media, a scroll away */
@media (max-width: 900px) { #work.app:not(.ready) .monitor { order: 1; } }

/* the export window's «Для профи»: folded — the bitrate, the codec, the file, the frame rate, the colour space */
.ex-pro { display: grid; gap: inherit; }
.ex-pro > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 36px;
  font: 600 var(--fs-s) var(--font-body); color: var(--text); }
.ex-pro > summary::-webkit-details-marker { display: none; }
.ex-pro > summary::before { display: none; }    /* (one arrow — the design system's on the right: two were shown) */
@media (max-width: 560px) { .ex-pro > summary .dim { display: none; } }    /* (a phone: «Для профи» alone, not a wrapped line) */
.ex-pro[open] { gap: 10px; }
/* (the 13.11 check: in an open «Для профи» on a phone the first row came out 23 px tall — under the finger) */
.ex-row .dd, .ex-pro > .ex-row { min-height: 40px; }

/* the graphics library: its eight groups one row sliding sideways (two rows of chips left one row of tiles in sight) */
#work .gfx-pane .gfx-grps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#work .gfx-pane .gfx-grps::-webkit-scrollbar { display: none; }
#work .gfx-pane .gfx-grps .chip-btn { flex: 0 0 auto; }

/* a finger's 44 px (the owner, after the UX review: sliders 31, crosses 32, scissors 34): the small icon buttons keep
   their look and the one-screen phone editor its rows — their touch area grows round them, unseen (an ::after); the
   start card's knob segments sit in a clipping strip — they grow themselves (the card may scroll on a phone) */
@media (pointer: coarse) {
  :where(.btn-icon, #dl, .seg-btn, .dd.sm, .fb-top, .acct-btn) { position: relative; }   /* (no weight: a button placed
     absolutely by its own rule stays where it is) */
  :is(.btn-icon, #dl, .seg-btn, .dd.sm, .fb-top, .acct-btn)::after { content: ""; position: absolute;
    inset: min(0px, calc((100% - 44px) / 2)); }
  .cf-knobs .seg button { min-height: 44px; }
}

/* the summary line's ✕ on any width: a quiet cross at its end (it was the lime «Подтвердить» on a phone) */
#work .confirm-bar #btnConfirm { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; background: transparent; border: 0; color: var(--text-muted); }

/* the start in one action (the owner, 1 Nov): «Что сделать?», the style, «Смонтировать» — the format, the materials,
   the reference, the frame and the length folded under «Настроить самому». One column on every window (the right column
   of the look is gone: the card is short now, nothing to set side by side) */
@media (min-width: 1180px) and (min-height: 700px) {
  .start-card:not([hidden]):not(.docked) { width: min(780px, calc(100vw - 48px)); grid-template-columns: minmax(0, 1fr); }
  .start-card:not(.docked) > * { grid-column: 1; }
}
.start-card:not(.docked) .vlook-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78px;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.start-card:not(.docked) .vlook-row::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .start-card:not(.docked) .vlook-row { grid-auto-columns: 70px; } }
.start-card:not(.docked) .vlook-tile b { font-size: 11px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; }
.start-card:not(.docked) .vlook-hint { white-space: normal; }
/* «Сам» in the looks: the one that suits the video, picked when the upload goes */
.vlook-tile.vlook-auto .vl-pv { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); display: grid; place-items: center; }
.vlook-tile.vlook-auto.active .vl-pv { box-shadow: 0 0 0 2px var(--accent); }
.vl-auto-ic { font-style: normal; font-size: 22px; color: var(--accent); }
/* the start's three questions: a switch, its choices on the same line (they wrap on a phone) */
.start-asks { display: grid; gap: 10px; }
.ask-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-height: 36px; }
.ask-row[hidden] { display: none; }
.ask-row > .toggle { flex: 0 0 132px; margin: 0; }
.ask-row > .toggle b { font-weight: 600; }
.ask-row .ask-l { flex: 0 0 132px; padding-left: 46px; }
.ask-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ask-seg[hidden] { display: none; }
.ask-seg button { padding: 6px 12px; font: inherit; font-size: var(--fs-s, 13px); color: var(--text-muted); background: transparent;
  border: 0; border-right: 1px solid var(--border); cursor: pointer; min-height: 32px; }
.ask-seg button:last-child { border-right: 0; }
.ask-seg button.on { background: var(--accent-soft); color: var(--text); }
.ask-colors { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ask-c { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer;
  background: var(--c, transparent); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.ask-c.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px rgba(255,255,255,.25); }
.ask-c.ask-auto { width: auto; height: 28px; border-radius: 14px; padding: 0 10px; background: var(--surface-2); color: var(--text-muted);
  font: 600 12px/1 var(--font-body); border: 1px solid var(--border); }
.ask-c.ask-auto.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.ask-c.ask-own { background: conic-gradient(#ff4d4d, #ffd60a, #3ddc84, #2f80ff, #a970ff, #ff4d4d); overflow: hidden; }
.ask-c.ask-own.on { background: var(--c); }
.ask-c.ask-own .ui-sw, .ask-c.ask-own input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
/* a phone: the switch on its line, its choices under it as chips that wrap (a joined bar ran past the edge) */
@media (max-width: 640px) {
  .ask-row { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 6px; min-height: 0; }
  .ask-row > .toggle { justify-content: flex-start; }
  .ask-row .ask-l { padding-left: 0; }
  .ask-hint { display: none; }
  .ask-seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; max-width: 100%; }
  .ask-seg button { border: 1px solid var(--border); border-radius: 999px; }
  .ask-seg button:last-child { border-right: 1px solid var(--border); }
  .ask-seg button.on { border-color: var(--accent); }
}
@media (pointer: coarse) { .ask-seg button { min-height: 40px; } .ask-c { width: 34px; height: 34px; } .ask-c.ask-auto { height: 34px; } }
/* «Настроить самому»: everything the start used to ask, in its order; open — the card scrolls inside, the button stays */
.start-more[open] { gap: 14px; }
.start-more > summary { min-height: 32px; align-items: center; }
.start-more .cf-row { margin-bottom: 0; }
/* «бета»: works, not always well yet (the owner, 1 Nov: «где плохо получается — пишем бета») */
.beta-tag { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 2px 6px; border-radius: 6px;
  font: 600 10px/1.3 var(--font-body); letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted);
  background: var(--surface-3); border: 1px solid var(--border); white-space: nowrap; }
.btn .beta-tag, .linkish .beta-tag { margin-left: 6px; }
/* a phone: the quick words one row that slides sideways (four rows of chips pushed the style under the fold) */
@media (max-width: 640px) {
  .start-card:not(.docked) .wish-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px;
    padding: 0 16px 2px; }
  .start-card:not(.docked) .wish-chips::-webkit-scrollbar { display: none; }
  .start-card:not(.docked) .wish-chips .chip-btn { flex: 0 0 auto; }
}
/* a section's hint that is no summary of a choice (always the same words): it wraps, never «…» (1100 px cut 4 px of it) */
.out-sec > summary .dim.small.sum-fixed { white-space: normal; overflow: visible; text-overflow: clip; }
/* «Партнёрка» (15c-partner.js): the terms (the landing's footer) and the account's own link, numbers, where to pay */
.pt-sheet { width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.pt-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; }
.pt-rule { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft);
  border: 1px solid var(--accent-line); color: var(--text); font: 600 var(--fs-m)/1.4 var(--font-body); }
.pt-info, .pt-mine { display: flex; flex-direction: column; gap: 14px; }
.pt-info[hidden], .pt-mine[hidden] { display: none; }
.pt-steps { margin: 0; padding: 0; list-style: none; counter-reset: pt; display: grid; gap: 10px; }
.pt-steps li { counter-increment: pt; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; row-gap: 2px; }
.pt-steps li::before { content: counter(pt); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--surface-3); color: var(--text); font: 600 var(--fs-s)/1 var(--font-body); }
.pt-steps b { font-size: var(--fs-m); font-weight: 600; }
.pt-info > .btn { align-self: flex-start; }
.pt-mine .field { display: flex; flex-direction: column; }
.pt-row { display: flex; gap: 8px; align-items: center; }
.pt-row .input { flex: 1 1 auto; min-width: 0; }
.pt-row .btn { flex: 0 0 auto; }
#ptLink { font-variant-numeric: tabular-nums; color: var(--text); }
.pt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pt-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.pt-stat b { font: 600 var(--fs-xl)/1.2 var(--font-body); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-stat span { font-size: var(--fs-xs); color: var(--text-muted); }
.pt-stat.hot { border-color: var(--accent-line); }
.pt-stat.hot b { color: var(--accent); }
.pt-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-foot .dim { flex: 1 1 200px; min-width: 0; }
.pt-note { margin: 0; }
@media (max-width: 520px) {
  .pt-body { padding: 14px 16px 16px; }
  .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-row { flex-wrap: wrap; }
  .pt-row .btn { flex: 1 1 100%; }
  .pt-foot .btn { flex: 1 1 100%; }
}
/* «Команда» (15d-team.js): Business — the owner and two people by e-mail; «Проекты команды»; the brand kits */
.team-sheet { width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.team-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; }
.team-body > p { margin: 0; }
.team-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); }
.team-card p { margin: 0; }
.team-card b { font-size: var(--fs-m); font-weight: 600; overflow-wrap: anywhere; }
.team-invite, .team-up { border-color: var(--accent-line); background: var(--accent-soft); }
.team-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.team-warn { margin: 0; color: var(--warn); }
.team-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.team-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.team-ava { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text); font: 600 var(--fs-s)/1 var(--font-body); }
.team-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.team-who b { font-size: var(--fs-s); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-list .btn { flex: 0 0 auto; }
.team-add { display: flex; gap: 8px; }
.team-add .input { flex: 1 1 auto; min-width: 0; }
.team-add .btn { flex: 0 0 auto; }
.team-msg { margin: 0; min-height: 1.2em; color: var(--text-muted); }
.team-msg:empty { display: none; }
.team-proj { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.team-proj[hidden] { display: none; }
.pc-badge.team-by { max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-kits { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); }
.bk-kits[hidden] { display: none; }
.bk-kits p { margin: 0; }
.bk-kit-pick { display: flex; flex-direction: column; gap: 4px; }
.bk-kit-acts, .bk-kit-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bk-kit-form[hidden] { display: none; }
.bk-kit-form .input { flex: 1 1 180px; min-width: 0; }
.bk-kit-msg { color: var(--warn); }
.bk-kit-msg:empty, .bk-kits-up:empty { display: none; }
@media (max-width: 520px) {
  .team-body { padding: 14px 16px 16px; }
  .team-add { flex-wrap: wrap; }
  .team-add .btn { flex: 1 1 100%; }
}

/* ═════════ the editor's audit (13.11): one progress, a failed edit says why, one thing picked ═════════ */
/* an edit going on: one card in the middle of the picture (the header's line, the status card and a pill on the video
   said the same three times) */
.local-tag.live { left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: min(420px, 86%); padding: 12px 16px;
  border-radius: 12px; font: 600 14px/1.4 var(--font-body); text-align: center; white-space: normal; color: var(--text);
  background: rgba(12,14,12,.9); border: 1px solid var(--border-strong); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
body.edit-live #phaseLine, body.edit-live #work .status-card { display: none !important; }
#statgrid:empty { display: none; }
.ov-wait { margin: 0; }
body:not(.edit-live) .ov-wait { display: none; }
.monitor-screen video.local-prev { cursor: pointer; }
/* a phone while it edits or failed: one screen like the editor — the picture with its card, the file under it; nothing
   below to scroll to (it was the computer's three panels stacked in a column) */
@media (max-width: 900px) {
  #work.app.waiting:not(.ready):not([hidden]) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; padding-bottom: 0;
    display: flex; flex-direction: column; }
  html:has(#work.app.waiting:not(.ready):not([hidden])), body:has(#work.app.waiting:not(.ready):not([hidden])) { overflow: hidden; padding-bottom: 0; }
  #work.app.waiting:not(.ready) .workspace { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
  #work.app.waiting:not(.ready) .inspector, #work.app.waiting:not(.ready) > .timeline,
  #work.app.waiting:not(.ready) .lib-tabs { display: none !important; }
  #work.app.waiting:not(.ready) .monitor { order: 1; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  #work.app.waiting:not(.ready) .monitor-screen { flex: 1 1 0; min-height: 0; height: auto !important; }
  #work.app.waiting:not(.ready) .transport { display: none; }
  #work.app.waiting:not(.ready) .panel.media.lib { order: 2; flex: 0 1 auto; max-height: 34dvh; overflow-y: auto; overscroll-behavior: contain; }
}

/* ═════════ outside the editor (the 13.11 audit): the plans, the start, the projects, the windows ═════════ */
/* the plans on a laptop: one window, nothing to scroll (1197 px of it in 866) — wider cards (fewer wrapped lines), the
   rows of a short card packed at its top (a grid stretched the free card's seven rows over Business's eleven), the
   title on one line, the promo code's empty line gone; the plan the person is on says so */
@media (min-width: 821px) {
  .pay-sheet { width: min(1180px, 100%); padding: 26px 28px 20px; }
  .pay-head { gap: 10px; }
  .pay-head h2 { max-width: none; font-size: clamp(26px, 3vw, 34px); }
  .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; gap: 12px; }
  .pay-card { padding: 20px 16px 16px; gap: 8px; }
  .pay-price b { font-size: 32px; }
  .pay-extra { margin-top: 12px; padding: 10px 16px; }
  .pay-promo { margin-top: 12px; }
  .pay-trust { margin-top: 12px; }
}
@media (min-width: 1024px) { .pay-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* a tablet: two by two (three and one left alone under them) */
@media (min-width: 681px) and (max-width: 820px) { .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pay-card ul { align-content: start; gap: 6px; }
.pay-card li { line-height: 1.3; }
.pay-promo-msg:empty { display: none; }
.pay-badge.mine { background: var(--text); color: var(--accent-ink, #0B0B0B); }
.pay-card.now:not(.hot) { border-color: var(--text-muted); }
/* a file the plan's wall stopped: «нужен тариф» in the accent (not the red «ошибка»); the main button of the start and of
   the projects page is the plans then, «Выбрать видео» steps back */
.media-card .badge.plan { background: var(--accent); color: var(--accent-ink, #0B0B0B); }
.home-upload.walled .up-pick { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
/* a media tile's «⋯»: one named action under it — «Удалить файл», «Отменить монтаж» while it edits */
.media-card .rm { font: 700 16px/1 var(--font-body); }
.media-card .rm:hover { background: rgba(8,11,8,.92); color: var(--text); }
.media-card .rm-go { display: none; position: absolute; left: 6px; right: 6px; bottom: 30px; min-height: 30px; padding: 0 8px; border: 0;
  border-radius: 8px; background: var(--danger); color: var(--accent-ink, #0B0B0B); font: 600 12px/1 var(--font-body); cursor: pointer; z-index: 2; }
.media-card .rm { top: 28px; bottom: auto; }               /* (under the length: a tile's own button stays reachable) */
.media-card.rm-open .rm-go { display: block; }
.media-card.rm-open .rm { opacity: 1; }
.media-card.rm-open .resume-btn { display: none; }
@media (pointer: coarse) { .media-card .rm-go { min-height: 40px; } .media-card .rm { width: 40px; height: 40px; } }
/* the projects page's wall on a phone: its long button on its own line, «Есть промокод» under it */
@media (max-width: 600px) { .plan-need-acts { flex-wrap: wrap; } .plan-need-acts .btn { flex: 1 1 100%; } }
/* the start card's «×» only folds it: a chevron and the word (the audit: a cross read as «cancel the upload») */
.start-card:not(.docked) .start-dock { width: auto; gap: 6px; padding: 0 10px 0 8px; font: 600 var(--fs-s, 13px)/1 var(--font-body); flex: 0 0 auto; }
.start-card.docked .start-dock span { display: none; }
/* the colour is the captions' and the graphics' — its own line, not indented under «Графика»; own music is the last of
   the music's chips (it was a link apart) */
.ask-row .ask-l.ask-l-wide { flex: 0 0 auto; padding-left: 0; }
.ask-seg .ask-track { color: var(--text); }
.ask-seg .ask-track:hover { background: var(--surface-3); }
/* the looks (14b-looks.js): «Сам» in sight, the rest a row that slides; a tile is the lower middle of its loop's frame —
   the card and the captions big — and its name in two lines */
.start-card:not(.docked) .vlook-row, .vlook-row { display: flex; align-items: flex-start; gap: 10px; overflow: visible; margin: 0; padding: 0; }
.vlook-sec { grid-template-columns: minmax(0, 1fr); }
.start-card:not(.docked) .vlook-row, .vlook-row { min-width: 0; max-width: 100%; }
/* (width 0, grown by flex: its tiles never widen the card — their sum made the whole card slide sideways) */
.vlook-scroll { display: flex; gap: 8px; flex: 1 1 0%; width: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.vlook-scroll::-webkit-scrollbar { display: none; }
.vlook-row .vlook-tile { flex: 0 0 104px; width: 104px; gap: 1px; margin-top: 2px; scroll-snap-align: start; font: 600 12px/1.25 var(--font-body); }
.vlook-row .vlook-tile .vl-pv { aspect-ratio: auto; height: 120px; margin-bottom: 5px; }
.vlook-row .vlook-tile .vl-pv video { inset: auto; left: -6%; top: 50%; width: 112%; height: auto; aspect-ratio: 9 / 16;
  transform: translateY(-60%); object-fit: cover; }
.vlook-row .vlook-tile b { font-size: 12px; color: var(--text); hyphens: none; overflow-wrap: anywhere; }
.vlook-row .vlook-tile small { font: 500 11px/1.2 var(--font-body); color: var(--text-muted); }
.vlook-row .vlook-tile.active small { color: var(--accent); }
@media (max-width: 640px) {
  .vlook-row .vlook-tile { flex-basis: 92px; width: 92px; }
  .vlook-row .vlook-tile .vl-pv { height: 108px; }
}
/* «Мои проекты» on a phone and a tablet: the plan and the account's links right under «Новое видео» — they were under the
   whole grid (14 500 px down); the links are one row that slides, a chip each */
@media (max-width: 900px) {
  .home-layout { gap: 20px; }
  .home-col { display: contents; }
  .home-layout #planNeed { order: 0; } .home-layout #homeUpload { order: 1; } .home-layout .home-side { order: 2; }
  .home-layout .home-projects { order: 3; }
  .home-side { gap: 10px; }
  .home-side .side-card { padding: 12px 14px; gap: 4px; }
  .home-side .side-card b { font-size: 18px; }
  .home-side .side-list { display: flex; gap: 8px; overflow-x: auto; border: 0; border-radius: 0; background: none;
    scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .home-side .side-list::-webkit-scrollbar { display: none; }
  .home-side .side-list .side-item { flex: 0 0 auto; grid-template-columns: auto auto; gap: 8px; padding: 5px 14px 5px 5px;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
  .home-side .side-list .side-item b { font-size: 13px; white-space: nowrap; }
  .home-side .side-list .side-item .dim, .home-side .side-list .side-item > i, .home-side .side-list .side-app { display: none; }
  .home-side .side-list .side-ic { width: 30px; height: 30px; border-radius: 999px; }
}
/* a project's card says what it is doing; a long list shows its newest and «Показать ещё» */
.pc-st { font-size: var(--fs-xs, 12px); }
.pc-st.run { color: var(--accent); }
.pc-st.bad { color: var(--danger); }
.pc-showall { grid-column: 1 / -1; justify-self: center; }
.home-empty .btn { margin-top: 14px; }
/* the account's head: the address whole on its own line, «Выйти» under it (beside it, it took the address's room and
   broke it at its last letter on a phone); the videos — a count and the way to «Мои проекты», not the list again */
.acc-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; column-gap: 14px; row-gap: 4px; }
.acc-head .acc-id b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.acc-head #authLogout { grid-column: 2; justify-self: start; margin-left: -8px; }
.acc-videos #authList { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.acc-videos .acc-count { margin: 0; }
/* «Команда» and «Партнёрка» on a phone: the whole screen like «Аккаунт» (they stopped 32 px short, the page under them) */
@media (max-width: 760px) {
  .reel-sheet.team-sheet, .reel-sheet.pt-sheet { width: 100%; height: 100%; height: 100dvh; max-height: none; border-radius: 0; }
}
/* the landing: the promo's way back in the nav where the corner player would cover the text (landing.js promoRoom) */
.lp-nav-play { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 4px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgb(var(--lime-rgb, 217 255 59) / .55); background: transparent; color: var(--text); font: 600 13px/1 var(--font-body);
  white-space: nowrap; animation: promo-in .4s var(--ease) both; }
.lp-nav-play[hidden] { display: none; }
.lp-nav-play:hover { border-color: var(--lime, #D9FF3B); }
.lp-nav-play i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lime, #D9FF3B); }
.lp-nav-play svg { width: 12px; height: 12px; fill: #0B0B0B; margin-left: 2px; }
@media (max-width: 640px) { .lp-nav-play { display: none !important; } }
/* the reels' titles inside their cards on a phone («НОВИЧКО(В)» ran out of its card) */
.lv-reel span { font-size: clamp(10px, 2.7vw, 15px); overflow-wrap: anywhere; }
@media (max-width: 640px) { .lv-reel { padding: 9px; border-radius: 16px; } }
/* the plans' cards: «/ мес» under the price when the card is narrow (Business's «3 990 ₽ / мес» ran out of it at 1920) */
.lp .price .cost { white-space: normal; }
.lp .price .cost small { white-space: nowrap; }
@media (min-width: 1101px) { .lp .price .cost { font-size: 40px; } }
/* the plans' table on a phone: it is wider than the screen — said so, and the row names stay while it slides */
.lp .price-compare .cmp-hint { display: none; margin: 0 0 8px; font-size: 13px; color: var(--text-muted); }
@media (max-width: 760px) {
  .lp .price-compare .cmp-hint { display: block; }
  .lp .price-compare { overscroll-behavior-x: contain; }
  .lp .cmp { min-width: 620px; }
  .lp .cmp tbody th, .lp .cmp thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg, #0B0E0B);
    min-width: 104px; max-width: 120px; box-shadow: 1px 0 0 var(--border); }
}
/* a touch screen: one «⋯» on the card's line, not two buttons always over the picture's corner; it shows them */
.pc-acts .pc-more { display: none; }
@media (hover: none) {
  .pc-acts { opacity: 1; gap: 4px; }
  .pc-acts .pc-more { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }
  .pc-acts [data-a="ren"], .pc-acts [data-a="del"] { display: none; }
  .proj-card.acts-open .pc-acts [data-a="ren"], .proj-card.acts-open .pc-acts [data-a="del"] { display: inline-flex; }
}
@media (hover: none) and (pointer: coarse) { .pc-acts .pc-more { width: 34px; height: 34px; flex-basis: 34px; min-width: 0; } }
/* a standing video's poster on its own blurred copy: the sharp copy over it inherited the box's #111 and covered the
   blur — the frame read as a thin strip on black */
.pc-thumb.tall::before { filter: blur(14px) brightness(.7) saturate(1.1); }
.pc-thumb.tall::after { background-color: transparent; }
/* one way to export: the «Экспорт» window. A phone's is the strip's pinned «Экспорт» (the lime icon in the header read
   as «загрузить»); the settings tab's own «Скачать MP4», «Поделиться» and their fields are gone (still in the code) */
@media (max-width: 900px) { #work #dl { display: none !important; } }
#work .out-main[hidden], .fp-sec[hidden] { display: none !important; }
.ex-plan { margin: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--graphite); color: var(--text-muted); line-height: 1.4; }
.ex-plan[hidden] { display: none; }
.ex-plan .linkish { color: var(--accent); }
.ex-share:empty { display: none; }
.ex-share .share-box { display: flex; gap: 8px; margin: 6px 0; }
.ex-share .share-box .input { flex: 1 1 auto; min-width: 0; }
#exHeight option:disabled { color: var(--text-dim); }
@media (max-width: 560px) { .ex-foot > svg.ic { display: none; } }   /* (the film icon stood alone on a row) */
/* the cut review: the picture plain — no graphics or captions under the «ВЫРЕЗАНО…» tag (it lay over a title); on a
   computer its card is the right panel's (the player kept its size) */
#work:has(#teachBar:not([hidden])) .monitor-screen :is(.gfx-hx, #gfxAssBox, #gfxBox, #capBox, #gfxBehind, #gfxBehindHit) { visibility: hidden !important; }
@media (min-width: 901px) {
  #work .inspector:has(> #teachBar:not([hidden])) > :not(#teachBar) { display: none !important; }
  #work .inspector > #teachBar { margin: 0; max-height: none; overflow-y: auto; align-content: start; }
  #work .inspector > #teachBar .teach-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #work .inspector > #teachBar .teach-actions > .teach-yes { order: -2; grid-column: 1 / -1; }
  #work .inspector > #teachBar .teach-actions > .teach-no { order: -1; grid-column: 1 / -1; }
}
/* the player's trouble card: alone on the picture (the graphics and captions went on over «Видео не нашлось»); on a
   short player (a phone's sheet open) its title and button, not cut off */
.monitor-screen:has(> #netTag:not([hidden])) :is(.gfx-hx, #gfxAssBox, #gfxBox, #capBox, #gfxBehind, #gfxBehindHit, #teachTag, .broll-view) { visibility: hidden !important; }
.teach-tag.net-tag { max-height: calc(100% - 16px); overflow: auto; }
body:is(.m-lib, .m-insp) .net-tag .nt-p { display: none; }
@media (max-width: 900px) { .net-tag .nt-btns { flex-wrap: wrap; justify-content: center; } }
/* «Обзор»: what the AI did, «Что вырезано», the three switches */
.ov-sum { display: grid; gap: 10px; }
.ov-sum[hidden], .look-pick[hidden], .gfx-moved[hidden] { display: none !important; }
.ov-sum-t { margin: 0; color: var(--text); font-size: var(--fs-s); line-height: 1.45; }
.ov-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-sw { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
/* «Попросить ИИ»: the field and its button on one row (the start card's «.ask-row» rules made it a column on a phone);
   a phone: the hint under «Весь ролик», the ➤ inside the field */
#askPop .ask-row { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; position: relative; min-height: 0; }
#askPop .ask-row .input { flex: 1 1 auto; min-width: 0; }
#askPop #askTarget { white-space: nowrap; }
@media (max-width: 900px) {
  #askPop .ask-head { flex-wrap: wrap; row-gap: 2px; }
  #askPop .ask-head #askTip { order: 5; flex: 1 0 100%; }
  #askPop .ask-row .input { min-height: 44px; padding-right: 52px; }
  #askPop #askGo { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; min-width: 40px; height: 36px;
    padding: 0; font-size: 0; justify-content: center; }
  #askPop #askGo::before { content: "➤"; font-size: 16px; line-height: 1; }
}
/* a phone's timeline: its lanes named by a coloured sign, not words cut to «С», «Г», «Сти» (85 of 390 px went to them);
   the toolbar fits the screen — «вернуть всё» is in the history (↶) and «Исходник» */
@media (max-width: 600px) {
  #work .track-name { flex-basis: 26px !important; font-size: 0 !important; gap: 0; justify-content: center; }
  #work .track-name::before { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 0; background: var(--lane, var(--text-dim));
    -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
  #work .track-name.lane-video::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='M10 9.5l5 2.5-5 2.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='M10 9.5l5 2.5-5 2.5z'/%3E%3C/svg%3E"); }
  #work .track-name.lane-gfx::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M8 16v-3M12 16V9M16 16v-5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M8 16v-3M12 16V9M16 16v-5'/%3E%3C/svg%3E"); }
  #work .track-name.lane-over::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='13' height='12' rx='2'/%3E%3Cpath d='M8 3h11a2 2 0 0 1 2 2v9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='13' height='12' rx='2'/%3E%3Cpath d='M8 3h11a2 2 0 0 1 2 2v9'/%3E%3C/svg%3E"); }
  #work .track-name.lane-music::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V6l11-2v12'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V6l11-2v12'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E"); }
  #work .track-name.lane-snd::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5h3.5L12 5.5v13l-4.5-4H4z'/%3E%3Cpath d='M15.5 9a4 4 0 0 1 0 6M18 6.5a7.5 7.5 0 0 1 0 11'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5h3.5L12 5.5v13l-4.5-4H4z'/%3E%3Cpath d='M15.5 9a4 4 0 0 1 0 6M18 6.5a7.5 7.5 0 0 1 0 11'/%3E%3C/svg%3E"); }
  #work .ruler { margin-left: 26px; }
  #work #btnRestoreAll { display: none; }
}
/* a piece's five sections on one row (at 1440 «Переходы» went alone to a second one; a narrower panel keeps two rows —
   one row there cut «Переходы» to «Перех…») */
@media (min-width: 1300px) {
  #work .clip-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, auto); }
  #work .clip-nav-btn { padding: 0 8px; white-space: nowrap; }
}
/* a switch that is on: the lime of everything else on (it was a green of its own beside lime buttons) */
.toggle input:checked + span { background: var(--accent); }
/* a piece's badges (its effect, its zoom) when it is pointed at or picked — every piece said «✦ Медленный наезд» and «112 %» */
#work .src-keep:not(:hover):not(.picked) :is(.emark, .zmark) { display: none; }
.tr-card.none-tile .fx-group { padding: 0; margin-top: 0; }   /* («просто склейка» under its name, not indented) */
/* «Субтитры»: the video's look and its colour on top */
.cap-look { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.cap-look[hidden] { display: none; }
.cap-look .cl-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cap-look .cl-head b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-look .cl-head .linkish { margin-left: auto; flex: 0 0 auto; }
.cap-look .cl-sw { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cap-look .cl-dot { position: relative; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--c); border: 2px solid var(--surface-2); box-shadow: 0 0 0 1px var(--border-strong); }
.cap-look .cl-dot.on { box-shadow: 0 0 0 2px var(--accent); }
.cap-look .cl-own { background: conic-gradient(#ff4d4d, #ffd60a, #d7ff3f, #3fa9ff, #a796f2, #ff4d4d); }
.cap-look .cl-own.on { background: var(--c); }
.cap-look .cl-own input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
@media (pointer: coarse) { .cap-look .cl-dot { flex-basis: 32px; width: 32px; height: 32px; } }
/* nothing to play while it edits or failed: no player controls under the card (any width) */
#work.app.waiting:not(.ready) .transport { display: none; }
/* a tile's «why»: two lines (the player's card says it whole) — it ran out of the tile */
.media-card .nm-why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

