/* «Монтаж по тексту» showcases on the Halo landing (landing_showcases_montage
   partial). A replica of the transcript editor: text on the left, video on the
   right, the edited timeline below. Uses the --a-* tokens of halo-stage.css. */
.tm { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; background: #fff; }
.tm .pi { width: 0.85rem; height: 0.85rem; }

.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 1rem; border-bottom: 1px solid var(--a-line); }
.tm-title small { display: flex; align-items: center; gap: 0.2rem; color: var(--a-quiet); font-size: 0.6875rem; }
.tm-title small .pi { width: 0.6rem; height: 0.6rem; }
.tm-title b { display: block; font-size: 0.875rem; font-weight: 600; }
.tm-tools { display: flex; align-items: center; gap: 0.7rem; color: var(--a-slate); font-size: 0.75rem; white-space: nowrap; }
.tm-saved { color: var(--a-quiet); transition: color 200ms ease; }
.tm-saved.is-saving { color: var(--a-indigo); }
.tm-export { color: var(--a-ink); }
.tm-next { padding: 0.3rem 0.65rem; font-size: 0.75rem; }

.tm-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 0; }
.tm-doc { display: flex; min-width: 0; min-height: 0; flex-direction: column; border-right: 1px solid var(--a-line); }
.tm-tabs { display: flex; gap: 0.25rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--a-line-soft); color: var(--a-slate); font-size: 0.75rem; }
.tm-tabs span { padding: 0.2rem 0.55rem; border-radius: 0.375rem; }
.tm-tabs .is-on { background: var(--a-hover); color: var(--a-ink); font-weight: 600; }
.tm-search { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.8rem 0; font-size: 0.6875rem; }
.tm-find { display: flex; flex: 1; align-items: center; gap: 0.35rem; padding: 0.25rem 0.5rem; border: 1px solid var(--a-line); border-radius: 0.4rem; color: var(--a-quiet); }
.tm-cuts { display: flex; align-items: center; gap: 0.35rem; color: var(--a-slate); }
.tm-check { width: 0.75rem; height: 0.75rem; border: 1px solid #c5c9d2; border-radius: 0.2rem; }
.tm-check.is-on { border-color: var(--a-ink); background: var(--a-ink); box-shadow: inset 0 0 0 2px #fff; }

.tm-text { position: relative; flex: 1; min-height: 0; padding: 0.6rem 1rem 0; overflow: hidden; font-size: 0.8125rem; line-height: 1.75; }
.tm-para { margin-bottom: 0.65rem; }
.tm-para small { display: block; color: var(--a-quiet); font-size: 0.625rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.tw { border-radius: 2px; transition: background-color 160ms ease, color 240ms ease, opacity 300ms ease; }
.tw.is-sel { background: #e0e3ff; }
.tw.is-cut { color: #9ca1ad; text-decoration: line-through; }
.tw.is-gone { opacity: 0; }
.tw.is-hidden { display: none; }
.tw.is-current { box-shadow: inset 0 -2px var(--a-indigo); }
.tm-toolbar { position: absolute; z-index: 3; display: flex; align-items: center; gap: 0.2rem; padding: 0.25rem 0.3rem 0.25rem 0.55rem; border: 1px solid var(--a-line); border-radius: 0.5rem; background: #fff; box-shadow: 0 6px 20px rgba(26, 26, 46, 0.14); color: var(--a-slate); font-size: 0.6875rem; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 160ms ease, transform 200ms var(--ps-ease), visibility 0s linear 200ms; }
.tm-toolbar.is-in { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms ease, transform 200ms var(--ps-ease), visibility 0s; }
.tm-tb-btn { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 0.375rem; transition: background-color 140ms ease; }
.tm-tb-btn .pi { color: var(--a-ink); }
.tm-tb-btn.is-pressed { background: var(--a-hover); }

.tm-stage { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; padding: 0.5rem 0.9rem 0; background: var(--a-canvas); }
.tm-stage-head { display: flex; justify-content: space-between; font-size: 0.75rem; }
.tm-stage-btn { display: flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.45rem; border-radius: 0.375rem; color: var(--a-ink); transition: background-color 140ms ease; }
.tm-stage-btn.is-pressed, .tm-stage-btn.is-open { background: #e9ebf0; }
.tm-video { position: relative; flex: 1; min-height: 0; max-height: 12.5rem; margin-top: 0.45rem; border-radius: 0.4rem; overflow: hidden; background: #243b6b; }
.tm-shot { position: absolute; inset: 0; background: var(--tm-wide) center / cover no-repeat; transition: opacity 260ms ease; }
.tm-shot--close { background-image: var(--tm-close); opacity: 0; }
.tm-video.is-close .tm-shot--close { opacity: 1; }

.tm-menu { position: absolute; top: 2.3rem; left: 0.9rem; z-index: 4; width: 16rem; padding: 0.35rem; border: 1px solid var(--a-line); border-radius: 0.6rem; background: #fff; box-shadow: 0 12px 28px rgba(26, 26, 46, 0.16); font-size: 0.75rem; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 160ms ease, transform 220ms var(--ps-ease), visibility 0s linear 220ms; }
.tm-menu.is-in { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms ease, transform 220ms var(--ps-ease), visibility 0s; }
.tm-act { padding: 0.35rem 0.5rem; border-radius: 0.375rem; transition: background-color 140ms ease; }
.tm-act b { display: block; font-weight: 600; }
.tm-act small { display: block; color: var(--a-indigo); font-size: 0.6875rem; }
.tm-act.is-done small { color: var(--a-quiet); }
.tm-act.is-pressed { background: var(--a-hover); }
.tm-note { padding: 0 0.5rem 0.35rem; color: var(--a-quiet); font-size: 0.625rem; line-height: 1.4; border-bottom: 1px solid var(--a-line-soft); }
.tm-note:last-child { border-bottom: 0; }

.tm-cams { display: flex; align-items: center; gap: 0.5rem; padding-top: 0.45rem; }
.tm-cam { display: grid; gap: 0.15rem; padding: 0.15rem; border: 1px solid transparent; border-radius: 0.4rem; font-size: 0.625rem; transition: border-color 200ms ease, background-color 200ms ease; }
.tm-cam .tm-shot { position: relative; display: block; width: 3.6rem; height: 2rem; border-radius: 0.25rem; opacity: 1; }
.tm-cam span { display: flex; align-items: center; gap: 0.25rem; color: var(--a-slate); white-space: nowrap; }
.tm-cam kbd { padding: 0 0.25rem; border: 1px solid var(--a-line); border-radius: 0.2rem; background: #fff; font: inherit; font-size: 0.5625rem; }
.tm-cam.is-on { border-color: var(--a-indigo); background: var(--a-indigo-soft); }
.tm-cams small { min-width: 0; color: var(--a-quiet); font-size: 0.5625rem; line-height: 1.4; }

.tm-transport { padding: 0.45rem 1rem 0.6rem; border-top: 1px solid var(--a-line); }
.tm-tr-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.tm-play { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; }
.tm-play .pi { width: 0.75rem; height: 0.75rem; color: var(--a-ink); }
.tm-total { color: var(--a-quiet); }
.tm-mont { margin-left: auto; color: var(--a-slate); }
.tm-mont b { color: var(--a-ink); font-weight: 600; transition: color 300ms ease; }
.tm-mont b.is-bump { color: var(--a-indigo); }
.tm-tl { position: relative; margin-top: 0.3rem; padding-top: 0.9rem; border: 1px solid var(--a-line); border-radius: 0.4rem; overflow: hidden; }
.tm-ticks { position: absolute; top: 0.1rem; right: 0.4rem; left: 0.4rem; display: flex; justify-content: space-between; color: var(--a-quiet); font-size: 0.5625rem; font-variant-numeric: tabular-nums; }
.tm-film { height: 1.6rem; background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 1px, transparent 1px) 0 0 / 3.2rem 100%, var(--tm-wide) 0 0 / 3.2rem 100% repeat-x; }
.tm-wave { display: flex; align-items: center; gap: 1px; height: 1.6rem; padding: 0 0.15rem; }
.tm-wave i { flex: 1; height: var(--h); min-height: 2px; border-radius: 1px; background: #c9cbe8; }
.tm-cutmark { position: absolute; top: 0.9rem; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--a-indigo); }
.tm-cutmark::before { content: ""; position: absolute; top: 0; left: -3px; width: 8px; height: 8px; border: 1px solid #fff; border-radius: 2px; background: var(--a-indigo); }
.tm-cutmark[data-reveal]:not(.is-in), .tm-cutmark.is-out { opacity: 0; transform: scaleY(0.4); }
.tm-cutmark { transition: opacity 260ms ease, transform 320ms var(--ps-ease); transform-origin: top; }
.tm-playhead { position: absolute; top: 0.9rem; bottom: 0; left: var(--p, 8%); width: 1px; background: var(--a-ink); transition: left 500ms var(--ps-ease); }
.tm-camtrack { position: relative; height: 0.3rem; }
.tm-camtrack i { position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); background: #d5d9e0; }
.tm-camtrack i.is-2 { background: var(--a-indigo); transition: opacity 300ms ease; }
.tm-camtrack i.is-2.is-out { opacity: 0; }

.tm-modal { width: 20rem; }
.tm-reqs { margin-top: 0.5rem; padding-left: 1rem; color: var(--a-slate); font-size: 0.6875rem; line-height: 1.45; list-style: disc; }
.tm-reqs b { color: var(--a-ink); font-weight: 600; }
.tm-drop { display: grid; place-items: center; gap: 0.4rem; margin-top: 0.7rem; padding: 0.9rem; border: 1px dashed #c5c9d2; border-radius: 0.6rem; color: var(--a-slate); font-size: 0.75rem; transition: border-color 200ms ease, background-color 200ms ease; }
.tm-drop.is-over { border-color: var(--a-indigo); background: var(--a-indigo-soft); }
.tm-file { display: none; align-items: center; gap: 0.45rem; width: 100%; color: var(--a-ink); font-weight: 500; }
.tm-drop.has-file [data-tm-drop-text] { display: none; }
.tm-drop.has-file .tm-file { display: flex; }
.tm-filebar { flex: 1; height: 0.25rem; border-radius: 9999px; background: var(--a-line-soft); overflow: hidden; }
.tm-filebar i { display: block; height: 100%; background: var(--a-indigo); transform-origin: left center; transform: scaleX(var(--v, 1)); transition: transform 1200ms linear; }

/* Drawn frames: a wide studio shot and the second camera's close-up. */
.tm {
  --tm-wide: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23233a69'/%3E%3Cstop offset='1' stop-color='%233d5c9c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='320' height='180' fill='url(%23g)'/%3E%3Cg fill='%23fff' fill-opacity='.07'%3E%3Crect x='196' width='3' height='128'/%3E%3Crect x='206' width='3' height='128'/%3E%3Crect x='216' width='3' height='128'/%3E%3Crect x='226' width='3' height='128'/%3E%3Crect x='236' width='3' height='128'/%3E%3C/g%3E%3Crect y='128' width='320' height='52' fill='%2338445c'/%3E%3Cellipse cx='150' cy='152' rx='46' ry='6' fill='%23000' fill-opacity='.25'/%3E%3Crect x='124' y='110' width='52' height='9' rx='4' fill='%231f6f74'/%3E%3Cpath d='M131 116c0-24 9-36 19-36s19 12 19 36z' fill='%2312161d'/%3E%3Cpath d='M139 116l-7 34h9l9-26 9 26h9l-7-34z' fill='%23d8c9b2'/%3E%3Ccircle cx='150' cy='70' r='11' fill='%23e6c2a2'/%3E%3Cpath d='M139 69c0-9 6-13 11-13s11 4 11 13c-2-4-6-6-11-6s-9 2-11 6z' fill='%23302016'/%3E%3Crect x='262' y='64' width='5' height='64' fill='%23c7cfdf'/%3E%3Ccircle cx='264.5' cy='60' r='12' fill='%23f6d58e' fill-opacity='.85'/%3E%3C/svg%3E");
  --tm-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%232d4a84'/%3E%3Cstop offset='1' stop-color='%23233a69'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='320' height='180' fill='url(%23g)'/%3E%3Cg fill='%23fff' fill-opacity='.06'%3E%3Crect x='30' width='5' height='180'/%3E%3Crect x='46' width='5' height='180'/%3E%3Crect x='62' width='5' height='180'/%3E%3C/g%3E%3Cpath d='M92 180c4-44 30-62 68-62s64 18 68 62z' fill='%2312161d'/%3E%3Cpath d='M146 118l14 22 14-22z' fill='%23f2efe9'/%3E%3Crect x='150' y='98' width='20' height='22' rx='6' fill='%23ddb796'/%3E%3Ccircle cx='160' cy='72' r='30' fill='%23e6c2a2'/%3E%3Cpath d='M130 70c0-24 15-34 30-34s30 10 30 34c-5-10-16-16-30-16s-25 6-30 16z' fill='%23302016'/%3E%3C/svg%3E");
}
@media (max-width: 760px) {
  .tm-work { grid-template-columns: minmax(0, 1fr); }
  .tm-doc { display: none; }
  .tm-tools .pi, .tm-export, .tm-saved { display: none; }
}
