/* MASDORA VIDEO STUDIO — dark professional editor UI */
:root {
  --bg: #121316; --bg2: #18191d; --panel: #1c1d22; --panel2: #222329; --line: #2a2c33; --line2: #353741;
  --text: #e6e7ea; --text2: #b9bbc3; --muted: #82858f; --accent: #F37021; --accent2: #ff8a3d; --accent-dim: rgba(243,112,33,.14);
  --gold: #E8C36A; --ok: #3fb68b; --err: #e5534b; --r: 6px;
  --panel-w: 300px; --props-w: 300px; --tl-h: 300px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 12.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { opacity: .38; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); }
.ic { flex: none; display: block; }
.muted { color: var(--muted); } .sm { font-size: 11.5px; } .xs { font-size: 10.5px; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; } .gap { gap: 8px; } .hidden { display: none !important; }
kbd { font: 10.5px var(--font); background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--text2); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #34363e; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }
.loading { height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.spin { width: 18px; height: 18px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.fatal { max-width: 520px; margin: 15vh auto; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line2); color: var(--text); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover:not(:disabled) { background: #2a2c33; border-color: #42454f; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent2); border-color: var(--accent2); }
.btn.danger { color: #ff8f88; border-color: #5a2a28; } .btn.danger:hover { background: #3a1d1c; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 11.5px; } .btn.xs { height: 22px; padding: 0 7px; font-size: 11px; }
.btn.block { width: 100%; margin-bottom: 8px; }
.ibtn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); color: var(--text2); transition: background .12s, color .12s; }
.ibtn:hover:not(:disabled) { background: #2a2c33; color: var(--text); }
.ibtn.on { color: var(--accent); }
.inp { width: 100%; height: 30px; padding: 0 9px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r); outline: none; transition: border-color .12s; }
.inp:focus { border-color: var(--accent); }
.inp.sm { height: 26px; } .inp.xs { height: 22px; width: 66px; padding: 0 4px; font-size: 11px; }
.inp.ta { height: auto; padding: 7px 9px; resize: vertical; min-height: 56px; line-height: 1.4; } .inp.ta.sm { min-height: 40px; font-size: 11.5px; }
.sel { height: 28px; padding: 0 6px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r); outline: none; max-width: 100%; }
.sel.sm { height: 24px; font-size: 11.5px; }
.lbl { display: block; font-size: 11px; color: var(--muted); margin: 10px 0 4px; font-weight: 500; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r); padding: 2px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { padding: 3px 10px; border-radius: 4px; color: var(--text2); font-size: 11.5px; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.seg.sm button { padding: 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
.chip { padding: 3px 9px; border-radius: 20px; background: var(--panel2); border: 1px solid var(--line2); font-size: 11px; color: var(--text2); display: inline-flex; gap: 4px; align-items: center; }
.chip:hover, .chip.on { border-color: var(--accent); color: var(--text); }
.tgl { width: 32px; height: 18px; border-radius: 10px; background: #3a3c45; position: relative; transition: background .15s; flex: none; }
.tgl::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cfd0d4; transition: transform .15s; }
.tgl.on { background: var(--accent); } .tgl.on::after { transform: translateX(14px); background: #fff; }
.clr { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line2); border-radius: 5px; background: none; cursor: pointer; flex: none; }
.clr::-webkit-color-swatch-wrapper { padding: 2px; } .clr::-webkit-color-swatch { border: 0; border-radius: 3px; }
.swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(255,255,255,.15); flex: none; }
.swatch.lg { width: 28px; height: 28px; border-radius: 6px; } .swatch.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.rng { -webkit-appearance: none; appearance: none; flex: 1; min-width: 50px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), #3a3c45 var(--p, 50%)); outline: none; }
.rng::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 3px rgba(243,112,33,.0); transition: box-shadow .12s; cursor: pointer; }
.rng:hover::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(243,112,33,.3); }
.num { width: 52px; height: 22px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 4px; padding: 0 4px; font-size: 11px; text-align: right; outline: none; }
.num:focus { border-color: var(--accent); }
.num::-webkit-inner-spin-button { opacity: .4; }
.unit { color: var(--muted); font-size: 10.5px; width: 12px; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r); background: rgba(90,140,255,.08); border: 1px solid rgba(90,140,255,.22); color: var(--text2); font-size: 11.5px; margin-bottom: 10px; }
.note .ic { margin-top: 1px; color: #7aa2ff; } .note.warn { background: rgba(243,170,33,.08); border-color: rgba(243,170,33,.28); } .note.warn .ic { color: #f3b221; }
.note.ok { background: rgba(63,182,139,.1); border-color: rgba(63,182,139,.3); } .note.ok .ic { color: var(--ok); }
.vsep { width: 1px; height: 18px; background: var(--line2); margin: 0 4px; flex: none; }
.pbar { height: 6px; background: var(--bg2); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .15s; }
.pbar.big { height: 10px; margin: 10px 0; }

/* brand */
.brand { display: flex; align-items: center; gap: 9px; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; letter-spacing: -.5px; }
.logo-t { font-size: 12.5px; letter-spacing: .6px; color: var(--text2); white-space: nowrap; } .logo-t b { color: var(--text); letter-spacing: 1.2px; }
.brand.sm .logo-mark { width: 24px; height: 24px; font-size: 14px; }

/* dashboard */
body[data-view=dash] { overflow: auto; }
.dash-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px; background: rgba(18,19,22,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.dash { max-width: 1280px; margin: 0 auto; padding: 22px 28px 60px; }
.dash h2 { font-size: 14px; font-weight: 600; margin: 18px 0 12px; letter-spacing: .2px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.qcard, .preset { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; transition: border-color .12s, transform .12s; }
.qcard:hover, .preset:hover { border-color: var(--accent); }
.qcard b, .preset b { font-weight: 500; font-size: 12px; text-align: center; }
.qshape { display: block; height: 46px; max-width: 70px; border: 1.5px solid var(--text2); border-radius: 4px; margin-bottom: 6px; }
.dash-bar { display: flex; align-items: center; gap: 10px; margin-top: 18px; } .dash-bar .inp { width: 240px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 4px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: border-color .12s; }
.pcard:hover { border-color: var(--line2); }
.pthumb { width: 100%; display: grid; place-items: center; background: #0d0e10; position: relative; color: var(--muted); overflow: hidden; }
.pthumb img { max-width: 100%; max-height: 100%; height: 100%; object-fit: contain; }
.pbadge { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 1px 7px; border-radius: 10px; background: rgba(0,0,0,.6); color: var(--text2); }
.pbadge.final { background: rgba(63,182,139,.85); color: #fff; }
.pmeta { display: flex; align-items: center; gap: 6px; padding: 9px 8px 9px 12px; } .pmeta b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pmeta small { display: block; }
.empty-big { grid-column: 1/-1; text-align: center; padding: 50px; color: var(--muted); border: 1px dashed var(--line2); border-radius: 10px; } .empty-big span { display: inline-block; opacity: .5; }
.dash-foot { margin-top: 30px; }
.recover { align-items: center; } .recover span { flex: 1; }
.preset-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; } .preset.on { border-color: var(--accent); background: var(--accent-dim); }
.preset .qshape { height: 34px; }

/* editor layout */
.editor { display: grid; grid-template-rows: 46px minmax(0, 1fr) 4px var(--tl-h); height: 100vh; }
.editor.dropping::after { content: 'Lepaskan untuk import media'; position: fixed; inset: 8px; border: 2px dashed var(--accent); border-radius: 12px; background: rgba(243,112,33,.08); display: grid; place-items: center; font-size: 16px; font-weight: 600; color: var(--accent); z-index: 50; pointer-events: none; }
.topbar { display: flex; align-items: center; gap: 4px; padding: 0 10px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.topbar .center { display: flex; align-items: center; justify-content: center; gap: 10px; }
.topbar .btn { margin-left: 4px; }
.pname { background: none; border: 1px solid transparent; border-radius: 5px; padding: 3px 8px; text-align: center; font-weight: 600; font-size: 13px; width: 300px; outline: none; }
.pname:hover { border-color: var(--line2); } .pname:focus { border-color: var(--accent); background: var(--bg); }
.work { display: grid; grid-template-columns: 64px var(--panel-w) 4px minmax(300px, 1fr) 4px var(--props-w); min-height: 0; }
.work:has(.panel.collapsed) { grid-template-columns: 64px 0 0 minmax(300px, 1fr) 4px var(--props-w); }
.split { background: var(--bg); position: relative; z-index: 3; }
.split.v { cursor: col-resize; } .split.h { cursor: row-resize; border-top: 1px solid var(--line); }
.split:hover, .split:active { background: var(--accent); }
.panel-h { height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 12px; font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); color: var(--text); gap: 8px; }

/* left toolbar */
.toolbar { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 6px 4px; gap: 2px; overflow-y: auto; scrollbar-width: none; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 7px; color: var(--muted); transition: color .12s, background .12s; }
.tool:hover { color: var(--text); background: #23252b; } .tool.on { color: var(--accent); background: var(--accent-dim); }
.tool-l { font-size: 10px; line-height: 1.1; text-align: center; }
.panel { background: var(--panel); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.panel.collapsed { display: none; }
.panel-in { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.panel-b { flex: 1; overflow-y: auto; padding: 10px; }
.sec-t { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .6px; margin: 16px 0 8px; }
.dropzone { border: 1.5px dashed var(--line2); border-radius: 8px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text2); margin-bottom: 10px; text-align: center; transition: border-color .12s, background .12s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-dim); }
.media-p .seg { margin: 8px 0 6px; }
.folders { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.mcard { position: relative; aspect-ratio: 16/11; border-radius: 6px; overflow: hidden; background: #0e0f11; border: 1px solid var(--line); cursor: grab; text-align: left; }
.mcard:hover { border-color: var(--accent); }
.mcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard.image img { object-fit: contain; background: repeating-conic-gradient(#202126 0 25%, #18191c 0 50%) 0 0/14px 14px; }
.mcard-ic { height: 100%; display: grid; place-items: center; color: #7fb8e8; background: linear-gradient(135deg, #18324a, #10202e); }
.mcard .dur { position: absolute; right: 5px; top: 5px; font-size: 10px; background: rgba(0,0,0,.65); padding: 0 5px; border-radius: 4px; }
.mcard .used { position: absolute; left: 6px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(0,0,0,.5); }
.mcard .add { position: absolute; right: 5px; bottom: 22px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(.8); transition: .12s; }
.mcard:hover .add { opacity: 1; transform: none; }
.mname { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: 10.5px; background: linear-gradient(transparent, rgba(0,0,0,.85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { grid-column: 1/-1; text-align: center; padding: 20px 4px; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tcard { height: 62px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; padding: 4px; overflow: hidden; }
.tcard:hover { border-color: var(--accent); }
.tpre span { font-size: 17px; white-space: nowrap; }
.list { display: flex; flex-direction: column; gap: 3px; }
.li { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); text-align: left; }
.li:hover { border-color: var(--accent); }
.sgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.stk { aspect-ratio: 1; font-size: 26px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); }
.stk:hover { border-color: var(--accent); transform: scale(1.05); }
.fxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fxcard { display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); text-align: center; font-size: 11px; color: var(--text2); }
.fxcard canvas, .fxcard img, .fxsw { width: 100%; aspect-ratio: 128/84; border-radius: 4px; display: block; object-fit: cover; }
.fxsw { background: linear-gradient(135deg, #5a3b12, #E8C36A 50%, #2a1d0c); }
.fxcard:hover, .fxcard.on { border-color: var(--accent); color: var(--text); }
.egrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ecard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); font-size: 11px; }
.ecard:hover { border-color: var(--accent); }
.eprev { width: 46px; height: 32px; background: var(--accent); border-radius: 2px; }
.eprev.bucu { border-radius: 9px; } .eprev.bulatan { width: 32px; border-radius: 50%; } .eprev.garisan { height: 4px; margin: 14px 0; }
.eprev.bar { height: 12px; margin: 10px 0; border-radius: 6px; background: linear-gradient(100deg, #FBE7A1, #B8862B); }
.eprev.bingkai { background: none; border: 3px solid var(--gold); } .eprev.tag { border-radius: 16px; } .eprev.lencana { width: 32px; border-radius: 50%; background: #B8122B; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; }
.tpl { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); text-align: left; }
.tpl:hover { border-color: var(--accent); }
.tpl-sw { width: 44px; height: 64px; border-radius: 4px; flex: none; display: grid; place-items: center; padding: 3px; overflow: hidden; }
.tpl-sw b { font-size: 7.5px; line-height: 1.1; text-align: center; font-family: Cinzel, serif; letter-spacing: .3px; }
.tpl-t { display: flex; flex-direction: column; min-width: 0; } .tpl-t b { font-weight: 500; }
.caps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cap { padding: 6px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); }
.cap.sel { border-color: var(--accent); }
.cap-t { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; } .cap-t .ibtn { margin-left: auto; width: 22px; height: 22px; }
.asset { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 6px; }
.asset img, .asset-ph { width: 38px; height: 38px; border-radius: 4px; object-fit: contain; background: #0e0f11; display: grid; place-items: center; color: var(--muted); flex: none; }
.asset b { display: block; font-weight: 500; font-size: 11.5px; } .asset small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-card { padding: 10px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 8px; }
.ai-h { display: flex; align-items: center; gap: 7px; } .ai-h b { flex: 1; font-weight: 600; font-size: 12px; }
.ai-card p { margin: 6px 0 8px; }
.badge { font-size: 9.5px; padding: 1px 6px; border-radius: 8px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
.badge.ok { background: rgba(63,182,139,.18); color: #5fd3a7; } .badge.need { background: rgba(243,178,33,.15); color: #f3c04f; }

/* preview */
.center { display: flex; flex-direction: column; background: var(--bg); min-width: 0; min-height: 0; }
.center:fullscreen { background: #000; } .center:fullscreen .panel-h { display: none; }
.pv-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(circle at 50% 40%, #191a1e, #111214); }
.pv-wrap.scroll { overflow: auto; justify-content: flex-start; align-items: flex-start; padding: 12px; }
.pv-stage { position: relative; flex: none; box-shadow: 0 6px 40px rgba(0,0,0,.6); background: #000; }
.pv-canvas { width: 100%; height: 100%; display: block; }
.pv-overlay { position: absolute; inset: 0; cursor: default; touch-action: none; }
.pv-guides, .pv-safe { position: absolute; inset: 0; pointer-events: none; }
.gd-v { position: absolute; top: 0; bottom: 0; width: 1px; background: #ff3ea5; box-shadow: 0 0 0 .5px rgba(255,62,165,.4); }
.gd-h { position: absolute; left: 0; right: 0; height: 1px; background: #ff3ea5; }
.safe-a { position: absolute; inset: 5%; border: 1px dashed rgba(255,255,255,.35); }
.safe-t { position: absolute; inset: 10%; border: 1px dashed rgba(243,112,33,.55); }
.safe-ui-b { position: absolute; left: 0; right: 0; bottom: 0; height: 20%; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 6px, transparent 6px 12px); border-top: 1px dashed rgba(255,255,255,.3); }
.safe-ui-b::after { content: attr(data-l); position: absolute; left: 6px; top: 4px; font-size: 10px; color: rgba(255,255,255,.6); }
.safe-ui-r { position: absolute; right: 0; top: 40%; bottom: 20%; width: 14%; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 6px, transparent 6px 12px); border-left: 1px dashed rgba(255,255,255,.3); }
.sel-box { position: absolute; border: 1.5px solid var(--accent); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.sel-box.locked { border-style: dashed; border-color: #888; } .sel-box.locked .hd, .sel-box.locked .hd-rot { display: none; }
.hd { position: absolute; width: 11px; height: 11px; background: #fff; border: 1.5px solid var(--accent); border-radius: 2px; pointer-events: auto; transform: translate(-50%, -50%); }
.hd-nw { left: 0; top: 0; cursor: nwse-resize; } .hd-ne { left: 100%; top: 0; cursor: nesw-resize; } .hd-sw { left: 0; top: 100%; cursor: nesw-resize; } .hd-se { left: 100%; top: 100%; cursor: nwse-resize; }
.hd-n { left: 50%; top: 0; cursor: ns-resize; border-radius: 6px; width: 16px; height: 7px; } .hd-s { left: 50%; top: 100%; cursor: ns-resize; border-radius: 6px; width: 16px; height: 7px; }
.hd-e { left: 100%; top: 50%; cursor: ew-resize; border-radius: 6px; width: 7px; height: 16px; } .hd-w { left: 0; top: 50%; cursor: ew-resize; border-radius: 6px; width: 7px; height: 16px; }
.hd-rot { position: absolute; left: 50%; top: -30px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; color: #222; display: grid; place-items: center; pointer-events: auto; cursor: grab; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.hd-rot svg { pointer-events: none; }
.pv-bar { height: 40px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 10px; border-top: 1px solid var(--line); background: var(--bg2); }
.pv-left { display: flex; align-items: center; } .pv-mid { display: flex; align-items: center; gap: 4px; } .pv-right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.pv-right .sel { max-width: 150px; }
.tc { font: 500 11.5px ui-monospace, "SF Mono", Consolas, monospace; color: var(--text2); }
.ibtn.play { width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: #111; }
.ibtn.play:hover { background: #fff; color: #000; }

/* properties */
.props { background: var(--panel); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pp-tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pp-tab { padding: 6px 9px; font-size: 11.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pp-tab:hover { color: var(--text); } .pp-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.pp-body { flex: 1; overflow-y: auto; padding: 4px 12px 20px; }
.pp-sec { padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.pp-sec:last-child { border-bottom: 0; }
.pp-sec-h { font-weight: 600; font-size: 11.5px; margin-bottom: 8px; color: var(--text); }
.pp-row { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 8px; min-height: 28px; }
.pp-row label { color: var(--muted); font-size: 11.5px; }
.pp-ctrl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pp-ctrl .sel { flex: 1; min-width: 0; }
.pp-btns { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.kfbtn { width: 20px; height: 20px; display: grid; place-items: center; color: #555863; border-radius: 4px; }
.kfbtn:hover { color: var(--text); } .kfbtn.on { color: var(--accent); } .kfbtn.on svg { fill: var(--accent); } .kfbtn.any { color: #b8883f; }
.hex { width: 74px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.tips p { color: var(--text2); margin: 0 0 8px; line-height: 1.8; }
.kbd-t td { padding: 4px 10px 4px 0; } .kbd-t td:first-child { white-space: nowrap; }

/* timeline */
.timeline { background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.tl-tools { height: 36px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tl-tools .grp { display: flex; align-items: center; gap: 1px; }
.zoom-r { width: 110px; margin: 0 4px; -webkit-appearance: none; appearance: none; height: 3px; background: #3a3c45; border-radius: 3px; }
.zoom-r::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #ddd; }
.tl-body { flex: 1; display: grid; grid-template-columns: 148px 1fr; min-height: 0; }
.tl-heads-wrap { border-right: 1px solid var(--line); overflow: hidden; background: var(--panel); position: relative; z-index: 2; }
.tl-heads-top { height: 24px; border-bottom: 1px solid var(--line); font-size: 10.5px; color: var(--muted); padding: 4px 10px; background: #1b1c20; }
.tl-head { display: flex; align-items: center; gap: 4px; padding: 0 2px 0 8px; border-bottom: 1px solid var(--line); color: var(--text2); }
.th-ic { color: var(--muted); } .th-name { flex: 1; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: text; }
.th-btns { display: flex; } .th-btns .ibtn { width: 22px; height: 22px; } .th-btns .ibtn svg { width: 13px; height: 13px; }
.tl-scroll { overflow: auto; position: relative; }
.tl-ruler-wrap { position: sticky; top: 0; z-index: 4; height: 24px; border-bottom: 1px solid var(--line); }
.tl-ruler { position: sticky; left: 0; display: block; height: 24px; cursor: ew-resize; }
.tl-content { position: relative; min-height: calc(100% - 24px); }
.tl-row { position: relative; border-bottom: 1px solid var(--line); background: #1a1b1f; }
.tl-row.video { background: #1c1d22; } .tl-row.locked { background: repeating-linear-gradient(-45deg, #1a1b1f 0 8px, #1d1e23 8px 16px); }
.tl-row.hidden-trk .clip { opacity: .35; }
.tl-ph { position: absolute; top: 0; bottom: 0; left: 0; width: 1.5px; margin-left: -.75px; background: var(--accent); z-index: 3; pointer-events: none; }
.tl-ph-cap { position: absolute; top: -1px; left: -5px; width: 11px; height: 9px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 50%, 50% 100%, 0 50%); }
.clip { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; overflow: hidden; cursor: grab; border: 1px solid rgba(255,255,255,.1); user-select: none; }
.clip:active { cursor: grabbing; }
.clip.video { background: #1f5f66; } .clip.image { background: #345a7a; } .clip.audio { background: #1d4566; } .clip.text { background: #8a4a1c; }
.clip.shape { background: #7a6223; } .clip.effect { background: #6a2a6e; } .clip.placeholder { background: repeating-linear-gradient(-45deg, #5a3315 0 6px, #4a2a12 6px 12px); }
.clip.sel { border-color: #fff; box-shadow: 0 0 0 1px #fff, inset 0 0 0 1px rgba(0,0,0,.4); z-index: 2; }
.clip.bad { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.clip-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.clip-lbl { position: absolute; left: 6px; top: 2px; right: 6px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.9); pointer-events: none; display: flex; gap: 4px; }
.clip-lbl b { background: rgba(0,0,0,.5); padding: 0 4px; border-radius: 3px; font-weight: 600; }
.clip-tr { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255,255,255,.35), transparent); pointer-events: none; }
.clip-kf { position: absolute; bottom: 3px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--gold); transform: rotate(45deg); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.clip-fade { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.clip-fade.l { left: 0; background: linear-gradient(to top right, rgba(0,0,0,.5) 50%, transparent 50%); }
.clip-fade.r { right: 0; background: linear-gradient(to top left, rgba(0,0,0,.5) 50%, transparent 50%); }
.trim { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.trim.l { left: 0; } .trim.r { right: 0; }
.clip.sel .trim { background: rgba(255,255,255,.85); width: 6px; } .clip.sel .trim.l { border-radius: 4px 0 0 4px; } .clip.sel .trim.r { border-radius: 0 4px 4px 0; }
.clip:hover .trim { background: rgba(255,255,255,.4); }

/* overlays: modal, toast, context, tooltip */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 100; animation: fi .12s; }
@keyframes fi { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .14s; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 18px; font-weight: 600; font-size: 13.5px; }
.modal-b { padding: 6px 18px 14px; overflow-y: auto; } .modal-b p { margin: 6px 0; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.exp .seg { display: flex; } .exp .seg button { flex: 1; padding: 5px 8px; }
.exp-sum { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 10px; background: var(--bg2); border-radius: 6px; border: 1px solid var(--line); }
.exp-run .pct { font-size: 22px; font-weight: 700; }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 200; align-items: center; pointer-events: none; }
.toast { display: flex; gap: 8px; align-items: center; background: #26282e; border: 1px solid var(--line2); padding: 8px 14px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: 560px; animation: pop .15s; transition: opacity .3s, transform .3s; }
.toast.ok .ic { color: var(--ok); } .toast.error { border-color: #6b2e2b; } .toast.error .ic { color: var(--err); } .toast.info .ic { color: #7aa2ff; }
.toast.out { opacity: 0; transform: translateY(6px); }
.ctx { position: fixed; z-index: 150; min-width: 210px; background: #24262c; border: 1px solid var(--line2); border-radius: 8px; padding: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.55); animation: pop .1s; }
.ctx-i { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 9px; border-radius: 5px; text-align: left; color: var(--text); }
.ctx-i:hover:not(:disabled) { background: var(--accent); color: #fff; } .ctx-i.danger { color: #ff8f88; } .ctx-i.danger:hover { background: #a3322c; color: #fff; }
.ctx-i kbd { background: none; border: 0; color: inherit; opacity: .6; }
.ctx-sep { height: 1px; background: var(--line2); margin: 4px 2px; }
#tip { position: fixed; z-index: 300; pointer-events: none; background: #f2f2f3; color: #18191c; font-size: 11px; font-weight: 500; padding: 4px 8px; border-radius: 5px; opacity: 0; transition: opacity .1s; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
#tip:empty { display: none; }

@media (max-width: 1100px) { :root { --panel-w: 250px; --props-w: 260px; } .logo-t { display: none; } .pname { width: 180px; } .tool-l { font-size: 9px; } }
@media (max-width: 820px) { .work { grid-template-columns: 56px 0 0 1fr 0 0; } .panel, .props, .split.v { display: none; } }
