@font-face { font-family: "Anton"; src: url(/assets/fonts/Anton-Regular.ttf); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url(/assets/fonts/BebasNeue-Regular.ttf); font-display: swap; }
@font-face { font-family: "Archivo Black"; src: url(/assets/fonts/ArchivoBlack-Regular.ttf); font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url(/assets/fonts/PermanentMarker-Regular.ttf); font-display: swap; }
@font-face { font-family: "DejaVu Sans"; src: url(/assets/fonts/DejaVuSans-Bold.ttf); font-display: swap; }
@font-face { font-family: "Montserrat ExtraBold"; src: url(/assets/fonts/Montserrat-ExtraBold.ttf); font-display: swap; }
@font-face { font-family: "Luckiest Guy"; src: url(/assets/fonts/LuckiestGuy-Regular.ttf); font-display: swap; }
@font-face { font-family: "Bangers"; src: url(/assets/fonts/Bangers-Regular.ttf); font-display: swap; }
@font-face { font-family: "Noto Sans Ethiopic"; src: url(/assets/fonts/NotoSansEthiopic-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Ethiopic"; src: url(/assets/fonts/NotoSansEthiopic-Bold.ttf); font-weight: 700; font-display: swap; }

:root {
  --bg: #121212; --panel: #1a1a1a; --panel2: #222; --line: #2e2e2e; --line2: #3a3a3a;
  --tx: #ececec; --tx2: #a8a8a8; --tx3: #7a7a7a;
  --acc: #e85d04; --acc2: #ff7a26; --ok: #46b06d; --warn: #e0a100; --err: #e5484d;
  --k-video: #2f6f8f; --k-image: #3d7a5a; --k-text: #9a6b12; --k-audio: #3b6d3b; --k-effect: #7a3d3d; --k-main: #355a7a;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--tx); font: 13px/1.4 "IBM Plex Sans", system-ui, sans-serif;
  display: grid; grid-template-rows: 46px minmax(0, 1fr) var(--tlh, max(300px, 40vh)); grid-template-columns: minmax(0, 1fr); overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.grow { flex: 1; }
kbd { font: 11px var(--mono); background: var(--panel2); border: 1px solid var(--line2); border-radius: 3px; padding: 0 4px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px;
  background: var(--panel2); border: 1px solid var(--line2); cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: #555; background: #2a2a2a; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--acc2); border-color: var(--acc2); }
.btn.ghost { background: transparent; }
.btn.danger:hover:not(:disabled) { border-color: var(--err); color: #ff8a8d; }
.btn.toggle.on { border-color: var(--acc); color: var(--acc2); }
.btn:focus-visible, .ib:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.ib { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--tx2); }
.ib:hover:not(:disabled) { background: var(--panel2); color: var(--tx); }
.ib:disabled { opacity: .35; cursor: default; }

/* header */
.top { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { color: var(--tx); text-decoration: none; font-size: 15px; letter-spacing: -.01em; margin-right: 6px; }
.brand b { color: var(--acc); font-weight: 600; }
.ptitle { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.save { font-size: 12px; color: var(--tx3); white-space: nowrap; min-width: 150px; }
.save.ok { color: var(--ok); } .save.dirty { color: var(--tx2); } .save.err { color: var(--err); }

/* workspace */
.work { display: grid; grid-template-columns: 380px minmax(0, 1fr) 310px; min-height: 0; }
.left, .right { background: var(--panel); min-height: 0; display: flex; flex-direction: column; }
.left { border-right: 1px solid var(--line); }
.right { border-left: 1px solid var(--line); }

.tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-radius: 5px; padding: 6px 2px; cursor: pointer; color: var(--tx2); font-size: 12px; }
.tab:hover { background: var(--panel2); color: var(--tx); }
.tab.on { background: var(--panel2); color: var(--tx); box-shadow: inset 0 -2px 0 var(--acc); }
.panels { flex: 1; overflow-y: auto; padding: 10px; }
.panels h3 { margin: 14px 0 6px; font-size: 12px; color: var(--tx2); font-weight: 600; }
.hint { color: var(--tx2); font-size: 12px; margin: 4px 0 10px; }
.hint.err { color: #ff8a8d; } .hint.warn { color: var(--warn); }
.meta { color: var(--tx3); font-size: 11.5px; margin: 2px 0; }

.sbar { display: flex; gap: 6px; margin-bottom: 8px; }
.sbar input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; min-height: 20px; }
.chip { font: 11px var(--mono); padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line2); color: var(--tx3); }
.chip.wait { animation: blink 1s infinite alternate; }
.chip.ok { color: var(--ok); border-color: #2f5f3f; }
@keyframes blink { to { opacity: .4; } }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.results.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.results.list { display: flex; flex-direction: column; gap: 4px; }
.vcard { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: grab; }
.vcard:hover { border-color: var(--line2); }
.thumb { position: relative; aspect-ratio: 16/10; background: #000; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; height: 100%; color: var(--tx3); }
.vfoot { display: flex; align-items: center; gap: 6px; padding: 5px 6px; }
.vfoot .meta { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }

.arow {
  --p: 0%; position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); cursor: grab;
}
.arow::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p); background: var(--acc); display: none; }
.arow.playing { border-color: var(--acc); }
.arow.playing::after { display: block; }
.arow.broken { opacity: .5; }
.play {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; position: relative;
}
.play::before { content: ""; position: absolute; left: 11px; top: 8px; border-left: 10px solid var(--tx); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.arow.playing .play { background: var(--acc); border-color: var(--acc); }
.arow.playing .play::before { left: 9px; top: 9px; width: 4px; height: 12px; border: 0; background: #fff; box-shadow: 7px 0 0 #fff; }
.info { flex: 1; min-width: 0; }
.ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yrow, .srow { display: flex; gap: 8px; padding: 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); align-items: center; }
.yrow img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; flex: none; }
.srow img { width: 44px; aspect-ratio: 9/16; object-fit: cover; border-radius: 4px; flex: none; background: #000; }
.srow { cursor: grab; }
.yrow .ttl { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acts { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.acts.col { flex-direction: column; margin: 0; }
.acts.wrap { margin: 8px 0 4px; }

.presets { display: grid; gap: 6px; }
.preset { height: 56px; border-radius: 6px; border: 1px solid var(--line); background: #2b2b2b; cursor: pointer; }
.preset:hover { border-color: var(--acc); }
.quick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.quick textarea, .inspector textarea { background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 8px; resize: vertical; width: 100%; }
.motions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mtile { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); }
.mstage { height: 96px; display: grid; place-items: center; background: #3a4048; overflow: hidden; }
.ms { line-height: 1.05; text-align: center; white-space: nowrap; animation-duration: 2.2s; animation-iteration-count: infinite; }
.ms.a-pop { animation-name: m-pop; } .ms.a-slide_up { animation-name: m-up; } .ms.a-slide_left { animation-name: m-left; }
.ms.a-fade { animation-name: m-fade; } .ms.a-zoom { animation-name: m-zoom; }
@keyframes m-pop { 0% { transform: scale(.5); opacity: 0; } 10% { transform: scale(1.08); opacity: 1; } 16%, 85% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }
@keyframes m-up { 0% { transform: translateY(60%); opacity: 0; } 16%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes m-left { 0% { transform: translateX(-60%); opacity: 0; } 16%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes m-fade { 0% { opacity: 0; } 16%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes m-zoom { 0% { transform: scale(1); } 90% { transform: scale(1.15); opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ms { animation: none; } }

.fxgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.fxb { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; text-align: left; }
.fxb:hover { border-color: var(--acc); }
.fxb b { font-weight: 500; } .fxb small { color: var(--tx3); font: 11px var(--mono); }
.stylebox .card { background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; padding: 10px; margin-bottom: 10px; }
.stylebox .card p { margin: 6px 0 10px; color: var(--tx2); }

/* stage */
.center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0c0c0c; }
.stagewrap { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; }
.stage { position: relative; background: #000; overflow: hidden; outline: 1px solid var(--line); user-select: none; touch-action: none; }
.layer { position: absolute; inset: 0; }
.layer.media { transform-origin: 50% 50%; }
.vis { position: absolute; overflow: hidden; pointer-events: none; }
.vis video, .vis img { width: 100%; height: 100%; display: block; }
.vis.pending { background: repeating-linear-gradient(45deg, #1d1d1d 0 10px, #252525 10px 20px); }
.vis.pending::after { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; color: var(--tx2); font-size: 12px; }
.layer.text { pointer-events: none; }
.txt { position: absolute; white-space: pre; text-align: center; line-height: 1.12; pointer-events: none; transform-origin: 50% 50%; border-radius: 4px; paint-order: stroke fill; }
.txt.editing { pointer-events: auto; outline: 2px dashed var(--acc); cursor: text; user-select: text; }
.fx { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.fx.flash { background: #fff; z-index: 900; }
.fx.vignette { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.7) 100%); z-index: 901; }
.fx.grain { z-index: 902; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; }
.fx.letterbox {
  z-index: 903; pointer-events: none; opacity: 1; background:
    linear-gradient(#000, #000) top / 100% var(--lb, 12%) no-repeat,
    linear-gradient(#000, #000) bottom / 100% var(--lb, 12%) no-repeat;
}
.layer.sel { z-index: 2000; pointer-events: none; }
.frame { position: absolute; border: 1.5px solid var(--acc); pointer-events: none; }
.frame .h { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--acc); border-radius: 2px; pointer-events: auto; }
.frame .h[data-h=tl] { left: -6px; top: -6px; cursor: nwse-resize; } .frame .h[data-h=br] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.frame .h[data-h=tr] { right: -6px; top: -6px; cursor: nesw-resize; } .frame .h[data-h=bl] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.gv { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #3ad0ff; }
.gh { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #3ad0ff; }
.buffering { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 2100; background: rgba(0,0,0,.75); padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--tx3); z-index: 2050; pointer-events: none; }

.transport { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.play-big { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--acc); color: #fff; display: grid; place-items: center; cursor: pointer; }
.play-big svg { fill: currentColor; stroke: none; }
.play-big .i-pause, .play-big.on .i-play { display: none; }
.play-big.on .i-pause { display: block; }
.tc { font: 13px var(--mono); color: var(--tx2); margin: 0 8px; white-space: nowrap; }
.tc b { color: var(--tx); font-weight: 500; }
#btnSolo.on { background: var(--acc); border-color: var(--acc); color: #fff; }

/* inspector */
.inspector { flex: 1; overflow-y: auto; padding: 12px; }
.inspector h2 { font-size: 14px; margin: 0 0 8px; }
.ihead { display: flex; gap: 8px; align-items: center; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 4px; color: #fff; flex: none; }
.badge.k-video { background: var(--k-video); } .badge.k-image { background: var(--k-image); } .badge.k-text { background: var(--k-text); }
.badge.k-audio { background: var(--k-audio); } .badge.k-effect { background: var(--k-effect); }
.inspector input.name { flex: 1; min-width: 0; height: 30px; font-weight: 600; background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 0 6px; }
.inspector input.name:hover, .inspector input.name:focus { border-color: var(--line2); background: var(--bg); }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 12px 0 0; padding: 10px 0 0; }
legend { font-size: 11px; font-weight: 600; color: var(--tx2); text-transform: uppercase; letter-spacing: .04em; padding: 0 6px 0 0; }
.f { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; position: relative; }
.f > span { font-size: 11.5px; color: var(--tx2); }
.f em { position: absolute; right: 6px; top: 22px; font-style: normal; color: var(--tx3); font-size: 11px; pointer-events: none; }
.f input[type=number], .f input[type=text], .f select { height: 28px; padding: 0 6px; background: var(--bg); border: 1px solid var(--line2); border-radius: 5px; width: 100%; min-width: 0; }
.f input[type=range] { width: 100%; accent-color: var(--acc); }
.f input[type=range] + em { top: 0; }
.f input[type=color] { width: 100%; height: 28px; padding: 1px; background: var(--bg); border: 1px solid var(--line2); border-radius: 5px; }
.f.chk { flex-direction: row; align-items: center; gap: 8px; }
.f.chk input { accent-color: var(--acc); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.layouts { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.keys { margin: 0; padding-left: 16px; color: var(--tx2); font-size: 12px; }
.keys li { margin-bottom: 4px; }
.exportbox { padding: 10px 12px; border-top: 1px solid var(--line); }
.prog { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--acc); transition: width .3s; }

/* timeline */
.tl { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-top: 1px solid var(--line); }
.tlbar { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-bottom: 1px solid var(--line); }
.tlbar .lbl { font-size: 11px; color: var(--tx3); }
.tlbar input[type=range] { width: 140px; accent-color: var(--acc); }
.tlscroll { flex: 1; overflow: auto; min-height: 0; position: relative; }
.tlcanvas { position: relative; min-width: 100%; min-height: 100%; }
.ruler { position: sticky; top: 0; height: 26px; background: var(--panel2); border-bottom: 1px solid var(--line); z-index: 15; cursor: ew-resize; }
.rhead { position: sticky; left: 0; width: 150px; height: 100%; background: var(--panel2); border-right: 1px solid var(--line); z-index: 2; font: 11px var(--mono); color: var(--tx3); display: flex; align-items: center; padding-left: 10px; }
.tk { position: absolute; bottom: 0; height: 6px; border-left: 1px solid #444; }
.tk.mj { height: 12px; border-color: #666; }
.tk.mj { font: 10px var(--mono); color: var(--tx3); padding-left: 3px; line-height: 1; }
.tk.mj { top: 3px; height: auto; bottom: 0; }
.row { position: relative; border-bottom: 1px solid var(--line); }
.row.drop .lane { background: rgba(232, 93, 4, .12); }
.row.is-hidden .lane .it { opacity: .35; }
.row.is-muted.t-audio .lane .it { opacity: .4; }
.head {
  position: sticky; left: 0; z-index: 10; width: 150px; height: 100%; background: var(--panel);
  border-right: 1px solid var(--line); display: flex; align-items: center; gap: 4px; padding: 0 4px 0 8px;
}
.tname { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx2); }
.row.t-main .tname { color: var(--tx); font-weight: 600; }
.tbtns { display: flex; }
.tbtns .ib { width: 22px; height: 22px; }
.tbtns svg { width: 13px; height: 13px; }
.lane { position: absolute; inset: 0; }
.it {
  position: absolute; top: 3px; bottom: 3px; border-radius: 4px; overflow: hidden; cursor: grab;
  background: var(--k-video) center/auto 100% repeat-x; border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; gap: 6px; padding: 0 9px; font-size: 11px; color: #fff; user-select: none;
}
.row.t-main .it { background-color: var(--k-main); }
.it.k-image { background-color: var(--k-image); }
.it.k-text { background-color: var(--k-text); }
.it.k-audio { background-color: var(--k-audio); }
.it.k-effect { background-color: var(--k-effect); }
.it.grouped.k-text { background-color: #7a5a1c; }
.it.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 6px, transparent 6px 12px); }
.it.sel { border: 2px solid #fff; z-index: 3; }
.it .lb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.it .du { font: 10px var(--mono); opacity: .75; text-shadow: 0 1px 2px #000; }
.it .hl, .it .hr { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; }
.it .hl { left: 0; } .it .hr { right: 0; }
.it.sel .hl, .it.sel .hr, .it:hover .hl, .it:hover .hr { background: rgba(255,255,255,.35); }
.it::before, .it::after { content: ""; position: absolute; top: 0; bottom: 0; pointer-events: none; }
.it::before { left: 0; width: var(--fi, 0); background: linear-gradient(to bottom right, rgba(0,0,0,.45) 50%, transparent 50%); }
.it::after { right: 0; width: var(--fo, 0); background: linear-gradient(to bottom left, rgba(0,0,0,.45) 50%, transparent 50%); }
.playhead { position: absolute; top: 0; bottom: 0; width: 15px; margin-left: -7px; z-index: 20; cursor: ew-resize; touch-action: none; }
.playhead i { position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--acc); pointer-events: none; }
.playhead::before { content: ""; position: sticky; top: 0; display: block; margin-left: 1px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid var(--acc); }
.snapline { position: absolute; top: 26px; bottom: 0; width: 1px; background: #3ad0ff; z-index: 19; pointer-events: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #2a2a2a; border: 1px solid var(--line2); padding: 8px 14px; border-radius: 6px; z-index: 9999; max-width: 70vw;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--err); }

@media (max-width: 1200px) {
  .work { grid-template-columns: 320px minmax(0, 1fr) 270px; }
}

/* filters, drag feedback, progress */
.filters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.filters select { height: 26px; padding: 0 4px; font-size: 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: 5px; max-width: 118px; }
.filters select.set { border-color: var(--acc); color: var(--acc2); }
.vcard { cursor: pointer; }
.vcard.added, .arow.added { animation: added .7s; }
@keyframes added { 0% { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok); } 100% { box-shadow: none; } }
.arow .info { cursor: pointer; }
.arow.loading .play::before { border: 2px solid var(--line2); border-top-color: #fff; border-radius: 50%; width: 12px; height: 12px; left: 7px; top: 7px; background: none; box-shadow: none; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body.dragging-asset .stage { outline: 2px dashed var(--line2); }
.stage.dropping { outline: 2px dashed var(--acc) !important; }
.row.drop { box-shadow: inset 0 0 0 2px var(--acc); }
.row.drop .head { color: var(--acc2); }
.it.flash { animation: itflash 1.2s; }
@keyframes itflash { 0%, 40% { box-shadow: 0 0 0 3px var(--acc2); } 100% { box-shadow: none; } }
.tlsplit { height: 6px; margin-top: -3px; cursor: ns-resize; position: relative; z-index: 30; }
.tlsplit:hover, .tlsplit.on { background: var(--acc); }

.mtile { cursor: pointer; }
.mtile:hover { border-color: var(--acc); }
.mtile.added { animation: added .7s; }
.txt .w { display: inline-block; }
.txt .w.future { visibility: hidden; }
.txt .w.act { animation: wpop .2s ease-out; }
@keyframes wpop { 0% { transform: scale(.75); } 60% { transform: scale(1.12); } 100% { transform: scale(1.04); } }
.stage .safe { position: absolute; inset: 0; pointer-events: none; z-index: 1990; }
.stage .safe i { position: absolute; background: rgba(229, 72, 77, .18); outline: 1px dashed rgba(229, 72, 77, .7); }
.stage .safe b { position: absolute; font: 600 9px var(--mono); color: #ffb3b5; padding: 2px 4px; }
.txt.rich { white-space: pre-wrap; width: max-content; max-width: 90%; }

/* captions tab */
.capgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.capcard { display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; color: var(--tx); }
.capcard:hover { border-color: var(--tx2); }
.capcard.on { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.capcard b { font-size: 12px; }
.capcard small { color: var(--tx2); font-size: 11px; line-height: 1.3; }
.capstage { position: relative; height: 84px; border-radius: 5px; overflow: hidden; background: linear-gradient(180deg, #3b4148, #1d2024); }
.capsample { position: absolute; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; font-size: 17px; line-height: 1.05; paint-order: stroke fill; text-shadow: 0 2px 3px rgba(0,0,0,.5); }
.caprow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.caprow label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--tx2); }
.capstat { margin-top: 6px; }
.refcard { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; }
.refcard img { width: 90px; border-radius: 5px; }
.refcard ul { margin: 0 0 8px; padding-left: 16px; font-size: 12px; line-height: 1.45; }
.chks { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 8px; }
.chk { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.wchips { display: flex; flex-wrap: wrap; gap: 4px; }
.wchip { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 3px 7px; font-size: 12px; cursor: pointer; color: var(--tx); }
.wchip.on { background: #ffd60a; color: #111; border-color: #ffd60a; }

/* long video → shorts, AI keys */
.lfbox { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0 12px; background: var(--panel2); }
.lfbox > summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.lfbox[open] > summary { margin-bottom: 6px; }
.lfform { display: flex; flex-direction: column; gap: 6px; }
.lfor { font-size: 12px; color: var(--tx2); }
.lfor input { font-size: 12px; max-width: 85%; }
.caprow.three { grid-template-columns: 1fr 1fr 1fr; }
.lfout .srow { margin-top: 6px; }
.keyrow { border-top: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 5px; }
.keyhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.keyhead a { color: var(--acc); font-size: 12px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px; }
.keychip { font: 11px/1.6 ui-monospace, monospace; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px 0 6px; display: inline-flex; gap: 4px; align-items: center; }
.keychip.cool { border-color: #b98900; }
.keychip.bad { border-color: #c0392b; }
.keychip .x { background: none; border: 0; color: var(--tx2); cursor: pointer; padding: 0 2px; }
