Text to vertical video in 100+ styles: AI codes each scene (HTML/SVG/WebGL), renders a 9:16 MP4 with music and English/Vietnamese voice. MCP, CLI and REST for AI agents.
/* Studio — trình edit toàn màn hình (mẫu _final/18-ui-edit-mau/1-studio.png). Token chung ở style.css + create.css. */
body.studio-on { overflow: hidden; }
body.studio-on > :not(.studio):not(script):not(dialog) { display: none !important; }
.studio { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; --tl-h: 290px; }
.studio[hidden] { display: none; }
.studio button { font: inherit; color: inherit; }
.studio .ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.studio .ic .fill { fill: currentColor; stroke: none; }
.studio :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ib { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; border: 0; background: none; color: var(--ink-2); cursor: pointer; transition: background .12s, color .12s; }
.ib:hover:not(:disabled) { background: var(--panel-2); color: var(--ink); }
.ib:disabled { opacity: .35; cursor: default; }
.ib.mini { width: 30px; height: 30px; border-radius: 7px; background: var(--panel-3); }
.ib.mini .ic { width: 15px; height: 15px; }
.ib.mini.danger:hover:not(:disabled) { color: #FF8B8B; }
/* ---- thanh trên ---- */
.st-top { height: 56px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.st-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: 300px; }
.st-title b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-title span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-vers { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-left: 10px; overflow-x: auto; max-width: 340px; scrollbar-width: none; }
.st-vers[hidden] { display: none; }
.st-vers button { min-width: 34px; height: 28px; padding: 0 11px; border-radius: 7px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.st-vers button:hover { color: var(--ink); }
.st-vers button.on { background: var(--panel-3); color: var(--ink); }
.st-mid { margin: 0 auto; display: flex; gap: 4px; }
.st-top .btn { min-height: 38px; }
.st-top .btn[hidden] { display: none; }
.st-revb .num { font-variant-numeric: tabular-nums; }
.st-revb[aria-pressed="true"] { background: rgba(242,201,76,.24); }
.st-dl.pri { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px rgba(255,107,44,.55); }
.st-pub { min-width: 0; }
.st-prog { height: 2px; flex: none; background: transparent; position: relative; margin-top: -2px; z-index: 3; }
.st-prog[hidden] { display: block; visibility: hidden; }
.st-prog i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .5s ease-out; box-shadow: 0 0 10px rgba(255,107,44,.7); }
/* ---- giữa: cột icon · player · bảng ---- */
.st-main { flex: 1; min-height: 0; display: flex; }
.st-rail { width: 76px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding-top: 12px; gap: 4px; background: var(--bg-2); }
.st-rail button { width: 60px; height: 62px; border-radius: 12px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); position: relative; cursor: pointer; transition: background .12s, color .12s; }
.st-rail button .ic { width: 22px; height: 22px; }
.st-rail button:hover { color: var(--ink); background: var(--panel); }
.st-rail button.on { background: var(--accent-soft); color: var(--accent); }
.st-rail .l { line-height: 1.1; text-align: center; }
.st-rail .sep { width: 32px; height: 1px; background: var(--line); margin: 6px 0; }
.st-rail .dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; border-radius: 9px; background: var(--warn); color: #1b1503; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.st-rail .dot[hidden] { display: none; }
.st-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; background: radial-gradient(ellipse at 50% 40%, #1a1815 0%, var(--bg) 70%); }
.st-vid { position: relative; height: min(100%, calc(100% - 54px)); aspect-ratio: 9 / 16; max-width: 100%; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06); cursor: pointer; flex: 1 1 auto; min-height: 0; }
.st-zw { position: absolute; inset: 0; transform-origin: 50% 40%; will-change: transform; }
.st-zw video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-cap, .st-gfx { position: absolute; inset: 0; pointer-events: none; }
.st-capt { position: absolute; left: calc(120 / 1080 * 100%); width: calc(840 / 1080 * 100%); margin-top: -0.6em; text-align: center; line-height: 1.18; paint-order: stroke fill; transform-origin: 50% 50%; will-change: transform, opacity; }
.st-capt[hidden] { display: none; }
.st-capt .w { display: inline-block; }
.st-capt .ch { font-style: normal; }
.st-capt.ticker { left: 0; width: 100%; height: 1.5em; margin-top: -0.75em; line-height: 1.5em; text-align: left; white-space: nowrap; overflow: hidden; padding-right: 1em; box-shadow: 0 .2em .6em rgba(0,0,0,.35); }
.st-capt .tag { display: inline-block; padding: 0 .35em; margin: 0 .5em 0 calc(60 / 1080 * 100vw * 0); color: #fff; font-size: .62em; vertical-align: middle; height: 100%; }
.st-glass { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.st-glass .gl { position: absolute; left: 0; top: 0; background: rgba(0,0,0,.001); }
.st-gframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; color-scheme: dark; }
.st-gframe[hidden] { display: none; }
.st-capsel { position: absolute; left: 0; top: 0; border: 1.5px solid var(--accent); border-radius: 6px; pointer-events: none; }
.st-capsel::before, .st-capsel::after { content: ""; position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--accent); border-radius: 2px; top: -5px; left: -5px; }
.st-capsel::after { left: auto; right: -5px; top: auto; bottom: -5px; }
.st-capsel[hidden] { display: none; }
.st-vbadge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.7); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.st-vbadge[hidden] { display: none; }
/* thẻ đồ hoạ xem trước (gần đúng thẻ HyperFrames) */
.st-gcard { position: absolute; left: 0; top: 0; border-radius: .7em; padding: .7em .9em; background: rgba(22,24,32,.86); color: #fff; box-shadow: 0 .4em 1.2em rgba(0,0,0,.4); font-family: 'Be Vietnam Pro', sans-serif; line-height: 1.25; }
.st-gcard .h { font-weight: 700; margin-bottom: .45em; }
.st-gcard .h .u, .st-gcard .kick { color: var(--violet); font-weight: 600; }
.st-gcard .row { display: flex; justify-content: space-between; gap: .6em; padding: .3em 0 .3em .5em; border-left: 2px solid rgba(255,255,255,.25); margin-top: .25em; font-size: .9em; }
.st-gcard .row b { font-variant-numeric: tabular-nums; }
.st-gcard .big { font: 800 2.2em/1.05 'Barlow Condensed', sans-serif; text-transform: uppercase; color: var(--accent); }
.st-gcard .lbl { font-size: .85em; color: rgba(255,255,255,.7); }
.st-ctrl { display: flex; align-items: center; gap: 16px; color: var(--ink-2); flex: none; }
.st-time { font-size: 13px; color: var(--ink-2); min-width: 122px; text-align: right; }
.st-time b { color: var(--ink); font-weight: 600; }
.st-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; transition: transform .1s; }
.st-play:active { transform: scale(.94); }
.st-play .ic { width: 18px; height: 18px; }
.st-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--panel-2); color: var(--ink-2); border: 0; white-space: nowrap; }
.st-pill.warn { color: var(--warn); background: var(--warn-soft); }
button.st-pill { cursor: pointer; min-height: 30px; }
button.st-pill:hover { color: var(--ink); }
.st-outsw[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.st-outsw[hidden] { display: none; }
/* ---- bảng thuộc tính ---- */
.st-insp { width: 364px; flex: none; border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.st-grab { display: none; }
.st-ih { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; padding: 16px 18px 12px; margin: 0; flex: none; }
.st-ih > .btn { margin-left: auto; }
.st-ib { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.st-ib > .st-seg { position: sticky; top: 0; z-index: 2; box-shadow: 0 -10px 0 var(--bg-2), 0 8px 10px -4px var(--bg-2); }
.st-seg { display: flex; margin: 0 8px; background: var(--panel); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.st-seg button { flex: 1; min-height: 30px; border-radius: 7px; border: 0; background: none; font-size: 13px; font-weight: 500; color: var(--ink-3); cursor: pointer; }
.st-seg button.on { background: var(--panel-3); color: var(--ink); }
.st-seg.sm { margin: 0; }
.st-lines { list-style: none; margin: 0; padding: 2px 0 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.st-ln .row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); text-align: left; cursor: pointer; }
.st-ln .row:hover { background: var(--panel); }
.st-ln.now .row { color: var(--ink); background: rgba(255,255,255,.035); }
.st-ln .tm { font-size: 11.5px; color: var(--ink-4); width: 44px; flex: none; }
.st-ln .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-ln em { font-style: normal; color: var(--accent); }
.st-ln .flag { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
.st-ln.bad .row { box-shadow: inset 2px 0 0 var(--bad); }
.st-ln.sel { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin: 2px 0; }
.st-ledit { width: 100%; min-height: 40px; background: var(--bg); border: 1px solid var(--accent); border-radius: 8px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--ink); outline: none; }
.st-ledit:focus { box-shadow: 0 0 0 3px rgba(255,107,44,.18); }
.st-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-row .arrow { color: var(--ink-4); }
.st-acts { margin-left: auto; display: flex; gap: 6px; }
.st-tbox { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 9px; border-radius: 7px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-2); }
.st-tbox .ic { width: 13px; height: 13px; }
.st-tbox input { width: 58px; border: 0; background: none; font-size: 12px; color: var(--ink-2); outline: none; -moz-appearance: textfield; }
.st-tbox input::-webkit-inner-spin-button { opacity: .4; }
.st-ainote { margin: 0; font-size: 12px; color: var(--warn); display: flex; gap: 6px; align-items: center; }
.st-ainote .ic { width: 14px; height: 14px; }
.st-err { margin: 0; font-size: 12px; color: var(--bad); }
.st-note { margin: 0 8px; font-size: 12.5px; color: var(--ink-3); background: var(--panel); border-radius: 8px; padding: 8px 10px; }
.st-note.warn { color: var(--warn); background: var(--warn-soft); }
.st-note:empty { display: none; }
.st-hint { margin: 0 8px; font-size: 12.5px; color: var(--ink-3); }
.st-empty { color: var(--ink-3); text-align: center; padding: 24px 8px; margin: 0; }
.st-lines .none, .st-blist .none { color: var(--ink-3); padding: 12px 10px; font-size: 13px; }
/* kiểu chữ */
.st-looks { padding: 4px 8px; display: flex; flex-direction: column; gap: 12px; }
.st-lookgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-look { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; text-align: center; }
.st-look:hover:not(:disabled) { border-color: var(--ink-4); }
.st-look.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,107,44,.25); }
.st-look .smp { height: 46px; display: grid; place-items: center; border-radius: 7px; background: #0b0b0a; font-size: 24px; color: #fff; grid-auto-flow: column; justify-content: center; gap: 1px; }
.st-look .nm { font-size: 11.5px; color: var(--ink-2); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-switch { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.st-switch input { width: 34px; height: 20px; appearance: none; -webkit-appearance: none; border-radius: 20px; background: var(--panel-3); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.st-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-2); transition: transform .15s; }
.st-switch input:checked { background: var(--accent); }
.st-switch input:checked::after { transform: translateX(14px); background: #fff; }
.st-switch input:disabled { opacity: .4; }
.st-switch small { flex-basis: 100%; color: var(--ink-4); font-size: 12px; margin-top: -6px; padding-left: 44px; }
.st-switch.sm { min-height: 30px; }
/* ô chung */
.st-field { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; font-size: 12.5px; color: var(--ink-3); }
.st-field > span, .st-field > label { font-weight: 600; }
.st-field input[type=text], .st-field input[type=number], .st-sel, .st-ai textarea { width: 100%; min-height: 36px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font-size: 14px; color: var(--ink); }
.st-field input:focus, .st-sel:focus, .st-ai textarea:focus { border-color: var(--accent); outline: none; }
.st-slide { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.st-slide label { grid-column: 1 / -1; }
.st-slide input { accent-color: var(--accent); width: 100%; height: 24px; }
.st-slide output { font-size: 12.5px; color: var(--ink); min-width: 56px; text-align: right; }
.st-ib > .st-row, .st-ib > .st-switch { padding: 0 8px; }
.st-ib hr { border: 0; border-top: 1px solid var(--line); margin: 4px 8px; width: auto; }
.st-card { margin: 0 8px; padding: 12px 4px; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.st-card > .st-row, .st-card > .st-seg, .st-card > .btn, .st-card > .st-hint { margin: 0 8px; }
.st-card > .btn { align-self: flex-start; }
.st-gtype { font-size: 14px; }
.st-grow { margin: 0 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.st-grow legend { font-size: 11.5px; color: var(--ink-4); padding: 0 6px; margin-left: 6px; }
.st-blist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.st-blist button { width: 100%; display: flex; gap: 12px; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); text-align: left; cursor: pointer; }
.st-blist button:hover { background: var(--panel); }
.st-blist button.on { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.st-blist .tm { font-size: 11.5px; color: var(--ink-4); width: 44px; flex: none; }
.st-blist .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* xem lại */
.st-review { display: flex; flex-direction: column; gap: 12px; }
.st-rcard { margin: 0 8px; padding: 12px; border-radius: 12px; background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(242,201,76,.35); display: flex; flex-direction: column; gap: 8px; }
.st-rtop { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.st-rnav { margin-left: auto; display: flex; gap: 6px; }
.st-rwhat { margin: 0; font-size: 15px; }
.st-rwhat .k { font-size: 11.5px; color: var(--warn); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.st-rwhat s { color: var(--ink-3); }
.st-rwhy { margin: 0; font-size: 12px; color: var(--ink-3); }
.st-rdone { margin: 0; font-size: 12px; color: var(--ok); }
.st-racts { display: flex; gap: 6px; flex-wrap: wrap; }
.st-racts .btn { flex: 1; min-height: 34px; font-size: 13px; padding: 0 10px; }
.st-rlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.st-ritem { width: 100%; display: flex; gap: 10px; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); text-align: left; cursor: pointer; font-size: 13px; }
.st-ritem:hover { background: var(--panel); }
.st-ritem.on { background: var(--panel-2); color: var(--ink); }
.st-ritem.done { color: var(--ink-4); }
.st-ritem .tm { font-size: 11.5px; color: var(--ink-4); width: 44px; flex: none; }
.st-ritem .rx { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-ritem s { color: var(--ink-4); }
.st-ritem .ic { color: var(--ok); width: 15px; height: 15px; }
/* AI */
.st-ai { margin: 0 8px; display: flex; flex-direction: column; gap: 10px; }
.st-ai textarea { padding: 10px; min-height: 84px; resize: vertical; font-size: 14px; line-height: 1.45; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chips .chip { min-height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-size: 12.5px; color: var(--ink-2); }
.st-chips .chip:hover { color: var(--ink); }
.st-ai .btn { align-self: flex-start; }
.st-h4 { margin: 8px 8px 0; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.st-hist { margin: 0 8px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.st-hist li { padding: 8px 10px; background: var(--panel); border-radius: 8px; overflow-wrap: anywhere; }
.st-hist small { display: block; color: var(--ink-4); margin-top: 3px; }
.st-insp.ro .st-ln .row { cursor: pointer; }
/* ---- timeline ---- */
.st-tl { height: var(--tl-h); flex: none; border-top: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; }
.tl-bar { height: 42px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.tl-bar .ib.mini { background: transparent; }
.tl-bar .ib.mini:hover:not(:disabled) { background: var(--panel-2); }
.tl-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.tl-hint { font-size: 12px; color: var(--ink-4); margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-zoomer { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--ink-3); }
.tl-zoomer > .ic { width: 15px; height: 15px; }
.tl-zoomer input { width: 120px; accent-color: var(--ink-2); }
.tl-main { flex: 1; min-height: 0; display: flex; }
.tl-labs { width: 96px; flex: none; display: flex; flex-direction: column; }
.tl-labs .lab { display: flex; align-items: center; gap: 7px; padding-left: 16px; font-size: 12px; color: var(--ink-3); border: 0; background: none; text-align: left; cursor: pointer; transition: color .12s, opacity .12s; }
.tl-labs .lab .ic { width: 15px; height: 15px; }
.tl-labs .lab:hover { color: var(--ink); }
.tl-labs .lab.on { color: var(--accent); }
.tl-labs .lab.ruler { cursor: default; }
.tl-sc { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent; }
.tl-in { position: relative; height: 100%; min-width: 100%; }
/* chiều cao hàng: thước 26 · video 66 · phụ đề 34 · zoom 30 · đồ hoạ 32 · nhạc 50 */
.tl-labs .lab.ruler, .tl-ruler { height: 26px; flex: none; }
.tl-labs .lab[data-k="video"], .r-video { height: 66px; }
.tl-labs .lab[data-k="cap"], .r-cap { height: 34px; }
.tl-labs .lab[data-k="zoom"], .r-zoom { height: 30px; }
.tl-labs .lab[data-k="gfx"], .r-gfx { height: 32px; }
.tl-labs .lab[data-k="music"], .r-music { height: 50px; }
.tl-ruler { position: relative; cursor: pointer; touch-action: none; }
.tl-ruler i { position: absolute; left: 0; bottom: 0; width: 1px; height: 5px; background: var(--line-2); }
.tl-ruler i.mj { height: 9px; background: var(--ink-4); }
.tl-ruler span { position: absolute; left: 0; top: 4px; font-size: 10.5px; color: var(--ink-4); pointer-events: none; }
.tl-row { position: relative; transition: opacity .15s; }
.st-tl[data-focus] .tl-row:not(.r-video) { opacity: .55; }
.st-tl[data-focus="cap"] .r-cap, .st-tl[data-focus="zoom"] .r-zoom, .st-tl[data-focus="gfx"] .r-gfx, .st-tl[data-focus="music"] .r-music { opacity: 1; }
.st-tl[data-focus="cap"] .lab[data-k="cap"], .st-tl[data-focus="zoom"] .lab[data-k="zoom"], .st-tl[data-focus="gfx"] .lab[data-k="gfx"], .st-tl[data-focus="music"] .lab[data-k="music"] { color: var(--accent); }
.st-tl[data-focus="cap"] .r-cap, .st-tl[data-focus="zoom"] .r-zoom, .st-tl[data-focus="gfx"] .r-gfx, .st-tl[data-focus="music"] .r-music { background: linear-gradient(90deg, rgba(255,107,44,.05), rgba(255,107,44,.02)); }
.tl-cv { position: sticky; left: 0; display: block; pointer-events: none; margin-top: 4px; z-index: 2; }
.blk { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 7px; overflow: hidden; display: flex; align-items: center; padding: 0 7px; font-size: 11px; font-weight: 500; white-space: nowrap; cursor: grab; will-change: transform; touch-action: none; }
.blk .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; pointer-events: none; }
.blk::before, .blk::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.blk::before { left: 0; } .blk::after { right: 0; }
.blk.on::before, .blk.on::after { background: rgba(255,255,255,.35); }
.blk.armed { box-shadow: 0 0 0 2px #fff; }
.blk.drag { cursor: grabbing; z-index: 3; box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.blk.narrow { padding: 0 3px; }
.blk.narrow .t { text-overflow: clip; }
.blk.ro { cursor: pointer; }
.blk.ro::before, .blk.ro::after { cursor: pointer; }
.blk.cap { background: #3B2A1F; border: 1px solid #5a3a25; color: #F5C9A8; }
.blk.cap.w { background: #3a3218; border-color: #6b5a1c; color: var(--warn); }
.blk.cap.bad { border-color: var(--bad); }
.blk.cap.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.blk.zoom { top: 4px; bottom: 4px; background: var(--sky-soft); border: 1px solid rgba(108,196,240,.45); color: var(--sky); font-weight: 600; }
.blk.zoom.on { background: rgba(108,196,240,.32); border-color: var(--sky); color: #fff; }
.blk.gfx { background: var(--violet-soft); border: 1px solid rgba(167,139,250,.45); color: #C9B8FF; font-weight: 600; }
.blk.gfx.on { background: rgba(167,139,250,.34); border-color: var(--violet); color: #fff; }
.blk.mu { top: 4px; bottom: 4px; background: rgba(93,211,158,.08); border: 1px solid rgba(93,211,158,.35); cursor: pointer; align-items: flex-start; padding-top: 3px; z-index: 1; }
.blk.mu.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.blk.mu::before, .blk.mu::after { display: none; }
.blk[hidden] { display: none; }
.tl-mlab { font-size: 11px; font-weight: 600; color: var(--ok); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.r-music.empty::after { content: attr(data-empty); position: sticky; left: 14px; top: 0; display: inline-block; padding: 16px 0 0 14px; font-size: 12px; color: var(--ink-4); }
.tl-vl { position: absolute; inset: 4px 0; pointer-events: none; }
.tl-vl .vcut { position: absolute; left: 0; top: 0; bottom: 0; pointer-events: auto; cursor: pointer; border-radius: 4px; z-index: 3;
background: repeating-linear-gradient(135deg, rgba(14,13,11,.86) 0 6px, rgba(255,100,100,.32) 6px 9px); box-shadow: inset 0 0 0 1px rgba(255,100,100,.55); }
.tl-vl .vcut.on { box-shadow: inset 0 0 0 2px #fff; }
.tl-vl .vsplit { position: absolute; left: 0; top: -2px; bottom: -2px; width: 2px; background: #fff; border-radius: 1px; z-index: 3; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.tl-vl .vsel { position: absolute; left: 0; top: 0; bottom: 0; border: 2px solid var(--accent); border-radius: 6px; background: rgba(255,107,44,.16); z-index: 2; }
.r-video { cursor: crosshair; }
.st-reel { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 0 9px; min-height: 24px; border-radius: 99px; background: var(--violet-soft); color: #C9B8FF; font-size: 11.5px; font-weight: 600; text-decoration: none; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.st-reel:hover { color: #fff; }
.tl-head { position: absolute; top: 6px; bottom: 6px; left: 0; width: 2px; background: var(--accent); z-index: 6; cursor: ew-resize; touch-action: none; }
.tl-head .knob { position: absolute; top: -4px; left: -6px; width: 14px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
.tl-head::after { content: ""; position: absolute; inset: 0 -6px; }
.tl-guide { position: absolute; top: 26px; bottom: 0; left: 0; width: 1px; background: #fff; opacity: .8; z-index: 5; pointer-events: none; }
.tl-guide[hidden] { display: none; }
.tl-tip { position: absolute; left: 0; top: 0; padding: 2px 6px; border-radius: 5px; background: #000; color: #fff; font: 600 11px/1.4 var(--mono); z-index: 7; pointer-events: none; white-space: nowrap; }
.tl-tip[hidden] { display: none; }
.tl-edit { position: absolute; left: 0; top: 0; height: 30px; z-index: 8; background: var(--bg); border: 1.5px solid var(--accent); border-radius: 7px; padding: 0 8px; font-size: 13px; color: var(--ink); outline: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
/* ---- lớp chờ, thông báo ---- */
.st-wait { position: absolute; inset: 56px 0 0 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(14,13,11,.92); text-align: center; padding: 24px; }
.st-wait[hidden] { display: none; }
.st-wait p { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 520px; }
.st-wbar { width: 280px; height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.st-wbar[hidden] { display: none; }
.st-wbar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .5s; }
.st-toast { position: absolute; left: 50%; bottom: calc(var(--tl-h) + 16px); transform: translateX(-50%); z-index: 30; max-width: min(640px, calc(100% - 32px)); padding: 10px 16px; border-radius: 10px; background: #26241f; color: var(--ink); box-shadow: 0 12px 30px rgba(0,0,0,.5); font-size: 13.5px; border: 1px solid var(--line-2); }
.st-toast[hidden] { display: none; }
.st-toast.ok { border-color: rgba(93,211,158,.5); color: var(--ok); }
.st-toast.bad { border-color: rgba(255,100,100,.5); color: #FFB0B0; }
.st-scrim { display: none; }
@media (max-width: 1180px) { .st-insp { width: 320px; } .st-title { max-width: 200px; } .st-reset { display: none; } }
/* ---- điện thoại < 768: player trên, công cụ ngang, timeline cuộn ngang, bảng thành sheet dưới ---- */
@media (max-width: 767px) {
.studio { --tl-h: 262px; }
.st-top { height: 52px; gap: 6px; padding: 0 8px 0 4px; }
.st-title { max-width: none; flex: 1; }
.st-title span { display: none; }
.st-vers { display: none; }
.st-mid { margin: 0; }
.st-mid .ib { width: 34px; }
.st-revb > span:not(.num), .st-dl span, .st-pub span { display: none; }
.st-top .btn { min-height: 36px; padding: 0 10px; }
.st-main { flex-direction: column; }
.st-rail { width: auto; height: 52px; flex-direction: row; justify-content: space-around; padding: 4px 6px; border-right: 0; border-top: 1px solid var(--line); order: 2; }
.st-rail button { width: auto; flex: 1; height: 46px; gap: 2px; font-size: 10.5px; border-radius: 10px; }
.st-rail .l { white-space: nowrap; }
.st-rail button .ic { width: 18px; height: 18px; }
.st-rail .sep { width: 1px; height: 24px; margin: 0 2px; }
.st-rail .dot { top: 1px; right: calc(50% - 20px); }
.st-stage { order: 1; flex: 1; min-height: 0; padding: 8px; gap: 8px; }
.st-ctrl { gap: 10px; }
.st-time { min-width: 0; font-size: 12px; }
.st-ratio, .st-ctrl .mono.st-pill { display: none; }
.st-insp { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 62vh; border-left: 0; border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0; z-index: 40; transform: translateY(105%); transition: transform .22s ease-out; box-shadow: 0 -16px 40px rgba(0,0,0,.5); padding-bottom: env(safe-area-inset-bottom); }
.st-insp.open { transform: none; }
.st-grab { display: block; width: 100%; height: 22px; border: 0; background: none; cursor: pointer; flex: none; position: relative; }
.st-grab::after { content: ""; position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--ink-4); }
.st-ih { padding-top: 4px; }
.st-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.st-scrim.on { opacity: 1; pointer-events: auto; }
.tl-bar { padding: 0 8px; gap: 2px; overflow-x: auto; }
.tl-hint { display: none; }
.tl-zoomer input { width: 70px; }
.tl-labs { width: 40px; }
.tl-labs .lab { padding-left: 12px; }
.tl-labs .lab span { display: none; }
.r-video, .tl-labs .lab[data-k="video"] { height: 50px; }
.r-music, .tl-labs .lab[data-k="music"] { height: 40px; }
.st-toast { bottom: calc(var(--tl-h) + 60px); }
}
@media (prefers-reduced-motion: reduce) {
.st-prog i, .st-wbar i, .st-insp, .tl-row, .st-rail button { transition: none; }
}
.st-ratiosel { cursor: pointer; color: var(--ink); padding: 0 8px; min-height: 30px; font: 600 12.5px var(--mono); }
.st-ratiosel:disabled { opacity: .55; cursor: default; }