
*, *::before, *::after { box-sizing: border-box; }
:root {
  --app: #131313;
  --bg: #1b1b1b;
  --panel: #232323;
  --panel-2: #2b2b2b;
  --panel-3: #343434;
  --line: #3a3a3a;
  --line-soft: #2e2e2e;
  --text: #e8e8e8;
  --text-dim: #c7c7c7;
  --muted: #9b9b9b;
  --muted-2: #767676;
  --blue: #2680eb;
  --blue-hi: #3d93f5;
  --violet: #9d7bff;
  --green: #33b17f;
  --amber: #e8a33d;
  --red: #e35a61;
  --radius: 6px;
  --radius-lg: 10px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html, body { margin: 0; padding: 0; }
body {
  background: var(--app);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: 24px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
p { margin: 0; }
kbd {
  font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: #3a3a3a; border: 1px solid #4a4a4a; border-bottom-width: 2px; color: #ddd;
}
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.grow { flex: 1; }
.between { justify-content: space-between; }
.wrapf { flex-wrap: wrap; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: #1e1e1e;
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 46px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13.5px; letter-spacing: -0.01em; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2680eb, #7c5cff);
}
.brand-mark svg { width: 15px; height: 15px; }
.brand-tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; color: #a9a9a9; border: 1px solid #454545;
}
.nav { display: flex; gap: 2px; }
.nav a {
  padding: 5px 10px; border-radius: 4px; color: var(--text-dim);
  font-size: 12.5px; font-weight: 600; transition: background .12s, color .12s;
}
.nav a:hover { color: #fff; background: #2c2c2c; }
.nav a.active { color: #fff; background: #373737; box-shadow: inset 0 -1px 0 var(--blue); }
.who { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #3a3a3a; color: #cfcfcf; font-size: 10px; font-weight: 700; text-transform: uppercase;
  border: 1px solid #4a4a4a;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border-radius: 4px; border: 1px solid #545454;
  background: transparent; color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s; white-space: nowrap;
}
.btn:hover { background: #2f2f2f; border-color: #6e6e6e; }
.btn:active { background: #262626; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.btn-primary:hover { background: var(--blue-hi); border-color: var(--blue-hi); }
.btn-ghost { border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: #2c2c2c; border-color: transparent; color: #fff; }
.btn-sm { padding: 4px 9px; font-size: 11.5px; }
.btn-icon { padding: 5px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- panels */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pad { padding: 14px; }
.pad-lg { padding: 22px; }
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; color: var(--muted-2);
}
details.panel { background: var(--panel); border-bottom: 1px solid #303030; }
details.panel > summary {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #bcbcbc;
  list-style: none; user-select: none; background: var(--panel-2);
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before {
  content: ""; width: 0; height: 0; border: 4px solid transparent;
  border-left-color: #8a8a8a; margin-left: 1px; transition: transform .12s;
}
details.panel[open] > summary::before { transform: rotate(90deg); }
details.panel > summary:hover { color: #fff; }
.panel-body { padding: 10px; }

/* ---------------------------------------------------------------- pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: 3px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent;
}
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.ready, .pill.done { color: #6ed3aa; background: rgba(51,177,127,.14); border-color: rgba(51,177,127,.3); }
.pill.processing, .pill.running { color: #8ab4ff; background: rgba(38,128,235,.16); border-color: rgba(38,128,235,.36); }
.pill.queued { color: #f0c078; background: rgba(232,163,61,.14); border-color: rgba(232,163,61,.3); }
.pill.failed { color: #f09297; background: rgba(227,90,97,.14); border-color: rgba(227,90,97,.32); }
.pill.neutral { color: var(--muted); background: var(--panel-2); border-color: #414141; }

/* ---------------------------------------------------------------- landing */
.topbar .btn-ghost { color: var(--text-dim); }
.hero { padding: 68px 0 50px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.1; letter-spacing: -0.025em; }
.gradient-text { background: linear-gradient(96deg, #6aa9ff, #b49bff 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 13.5px; margin-top: 14px; max-width: 50ch; line-height: 1.65; }
.hero-actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.hero-actions .btn { padding: 8px 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 70px; }
.feature { padding: 14px; background: #1f1f1f; }
.feature h3 { font-size: 12.5px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.feature-icon {
  width: 28px; height: 28px; border-radius: 5px; display: grid; place-items: center;
  background: #2e2e2e; color: #8ab4ff; margin-bottom: 10px; border: 1px solid #3c3c3c;
}
.feature-icon svg { width: 15px; height: 15px; }
.preview {
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: #111; box-shadow: 0 24px 60px -30px #000;
}
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-bottom: 1px solid #2d2d2d; background: #222; }
.preview-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3d3d3d; display: block; }
.preview-body { aspect-ratio: 16/9; position: relative; background: linear-gradient(135deg,#1c1c1c,#0e0e0e); display: grid; place-items: center; }
.preview-body .play {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff;
  backdrop-filter: blur(4px);
}
.preview-body .play svg { width: 20px; height: 20px; margin-left: 2px; }
.preview-tags { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.preview-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.09); }
.preview-progress span { display: block; height: 100%; width: 62%; background: var(--blue); }

/* ---------------------------------------------------------------- auth */
.auth-shell { min-height: calc(100vh - 46px); display: grid; place-items: center; padding: 44px 20px; }
.auth-card { width: 100%; max-width: 380px; padding: 26px; background: #222; }
.auth-card h1 { font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.field label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; padding: 7px 9px; border-radius: 4px;
  border: 1px solid #4a4a4a; background: #1a1a1a; color: var(--text);
  font: inherit; font-size: 12.5px; outline: none; transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover { border-color: #5d5d5d; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.form-error {
  margin-top: 12px; padding: 7px 10px; border-radius: 4px; font-size: 11.5px;
  color: #f5b4b7; background: rgba(227,90,97,.12); border: 1px solid rgba(227,90,97,.32);
}
.form-note { margin-top: 14px; color: var(--muted); font-size: 11.5px; text-align: center; }
.form-note a { color: #7cb2f5; }

/* ---------------------------------------------------------------- library */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 28px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; font-size: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding-bottom: 60px; }
.video-card { overflow: hidden; transition: border-color .14s, background .14s; display: flex; flex-direction: column; background: #202020; }
.video-card:hover { border-color: #565656; background: #252525; }
.thumb { aspect-ratio: 16/9; background: #131313; position: relative; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .placeholder { color: #4a4a4a; }
.thumb .placeholder svg { width: 30px; height: 30px; }
.thumb .dur {
  position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); padding: 0 5px;
  border-radius: 3px; font-size: 10px; font-family: var(--mono); color: #e2e2e2;
}
.thumb .status { position: absolute; left: 6px; top: 6px; }
.thumb .status .pill { background: rgba(15,15,15,.86); border-color: #4a4a4a; color: #dcdcdc; backdrop-filter: blur(6px); }
.thumb .status .pill.ready { color: #6ed3aa; border-color: rgba(51,177,127,.4); }
.thumb .status .pill.processing, .thumb .status .pill.queued { color: #9fc4ff; border-color: rgba(38,128,235,.45); }
.thumb .status .pill.failed { color: #f09297; border-color: rgba(227,90,97,.4); }
.video-card .body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.video-card .title { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-card .meta { color: var(--muted-2); font-size: 10.5px; display: flex; gap: 8px; flex-wrap: wrap; }
.mini-progress { height: 3px; border-radius: 99px; background: #333; overflow: hidden; margin-top: 6px; }
.mini-progress span { display: block; height: 100%; background: var(--blue); transition: width .4s; }

.empty-state { padding: 54px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-state .icon { width: 42px; height: 42px; border-radius: 6px; background: #2b2b2b; display: grid; place-items: center; color: #5c5c5c; margin-bottom: 4px; }
.empty-state .icon svg { width: 20px; height: 20px; }
.empty-state h2 { font-size: 15px; }

/* ---------------------------------------------------------------- upload */
.dropzone {
  border: 1px dashed #4d4d4d; border-radius: var(--radius); padding: 40px 22px; text-align: center;
  background: #1d1d1d; transition: border-color .14s, background .14s; cursor: pointer; display: block;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: rgba(38,128,235,.07); }
.dropzone .big-icon {
  width: 44px; height: 44px; border-radius: 6px; background: #2c2c2c; color: #8ab4ff;
  display: grid; place-items: center; margin: 0 auto 10px; border: 1px solid #3c3c3c;
}
.dropzone .big-icon svg { width: 20px; height: 20px; }
.dropzone strong { display: block; font-size: 12.5px; margin-bottom: 2px; }
.upload-file { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: #1d1d1d; margin-top: 12px; }
.bar { height: 4px; border-radius: 99px; background: #353535; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); transition: width .3s; }

/* ---------------------------------------------------------------- editor workspace */
.editor {
  display: grid; grid-template-columns: 44px minmax(0, 1fr);
  max-width: 1760px; margin: 0 auto; align-items: stretch;
  min-height: calc(100vh - 46px);
}
.rail {
  background: #1e1e1e; border-right: 1px solid #000; padding: 8px 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.rail a, .rail button {
  width: 30px; height: 30px; border-radius: 4px; border: 0; background: transparent;
  color: #9a9a9a; display: grid; place-items: center; cursor: pointer; transition: background .12s, color .12s;
}
.rail a:hover, .rail button:hover { background: #313131; color: #fff; }
.rail a.active, .rail button.active { background: #373737; color: #fff; box-shadow: inset 2px 0 0 var(--blue); }
.rail .rail-sep { width: 20px; height: 1px; background: #373737; margin: 4px 0; }

.stage { background: #161616; min-width: 0; width: 100%; padding: 12px 16px 26px; display: flex; flex-direction: column; gap: 12px; }
.stage-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 30px; }
.stage-head h1 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.stage-head .meta-line { color: var(--muted-2); font-size: 11px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stage-head .meta-line span { white-space: nowrap; }

.monitor { background: #0a0a0a; border: 1px solid #000; border-radius: 6px; overflow: hidden; }
.screen { position: relative; display: grid; place-items: center; background: #080808; }
.screen video {
  width: 100%; display: block; aspect-ratio: 16/9; max-height: 62vh;
  object-fit: contain; background: #080808; cursor: pointer;
}
.monitor:fullscreen { display: flex; flex-direction: column; background: #000; border: 0; border-radius: 0; }
.monitor:fullscreen .screen { flex: 1; min-height: 0; }
.monitor:fullscreen .screen video { max-height: none; height: 100%; }
.big-play {
  position: absolute; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  padding: 0 0 0 3px; background: rgba(18,18,18,.6); border: 1px solid rgba(255,255,255,.3);
  color: #fff; cursor: pointer; backdrop-filter: blur(6px);
  transition: opacity .16s, transform .16s, background .12s, border-color .12s;
}
.big-play:hover { background: rgba(38,128,235,.88); border-color: rgba(38,128,235,.9); transform: scale(1.05); }
.monitor.playing .big-play { opacity: 0; pointer-events: none; transform: scale(.9); }
.player-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.66); padding: 1px 7px;
  border-radius: 3px; font-size: 10px; font-family: var(--mono); color: #d2d2d2;
  border: 1px solid rgba(255,255,255,.14); pointer-events: none;
}
.ico-pause, .ico-mute { display: none; }
.monitor.playing .ico-play { display: none; }
.monitor.playing .ico-pause { display: inline-flex; }
.monitor.is-muted .ico-vol { display: none; }
.monitor.is-muted .ico-mute { display: inline-flex; }

.pbar { padding: 5px 10px 7px; background: #232323; border-top: 1px solid #000; }
.scrub { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub-rail { position: relative; width: 100%; height: 5px; border-radius: 3px; background: #3b3b3b; overflow: hidden; transition: height .1s; }
.scrub:hover .scrub-rail { height: 7px; }
.scrub-buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #585858; }
.scrub-band {
  position: absolute; left: 0; width: 100%; bottom: 0; height: 2px;
  background: var(--violet); opacity: .9;
}
.scrub-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--blue); }
.scrub-knob {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin-left: -6px;
  transform: translateY(-50%); border-radius: 50%; background: #fff; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 1px 4px rgba(0,0,0,.7); transition: transform .1s;
}
.scrub:hover .scrub-knob { transform: translateY(-50%) scale(1.15); }
.scrub-tip {
  position: absolute; bottom: 17px; left: 0; transform: translateX(-50%);
  background: rgba(12,12,12,.94); border: 1px solid #464646; color: #eee;
  font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 3px;
  opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity .1s;
}
.scrub-tip.on { opacity: 1; }
.prow { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; row-gap: 4px; }
.pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 24px; min-width: 24px; padding: 0 5px; border-radius: 4px;
  border: 1px solid transparent; background: transparent; color: #d4d4d4;
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.pbtn:hover { background: #363636; color: #fff; }
.pbtn.play { width: 28px; background: #343434; border-color: #474747; color: #fff; }
.pbtn.play:hover { background: var(--blue); border-color: var(--blue); }
.pbtn svg { display: block; }
.tcl { font-family: var(--mono); font-size: 11px; color: #e6e6e6; padding: 0 8px; white-space: nowrap; }
.tcl i { color: #6f6f6f; font-style: normal; padding: 0 3px; }
.vol { display: flex; align-items: center; gap: 1px; }
.vol-slider { width: 64px; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 99px; background: #3b3b3b; outline: none; cursor: pointer; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #eaeaea; }
.vol-slider::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #eaeaea; }
.psel { display: inline-flex; }
.psel select {
  width: auto; height: 22px; padding: 0 3px; border-radius: 3px; border: 1px solid #3d3d3d;
  background: #1c1c1c; color: #d8d8d8; font-family: var(--mono); font-size: 10.5px; cursor: pointer;
}
.tbtn {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; background: transparent;
  color: #cfcfcf; border-radius: 4px; padding: 4px 7px; font: inherit; font-size: 11.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s;
}
.tbtn:hover { background: #363636; color: #fff; }
.tbtn.on { background: rgba(38,128,235,.2); border-color: rgba(38,128,235,.5); color: #fff; }
.tbtn[disabled] { opacity: .4; cursor: not-allowed; }
.tbtn svg { width: 13px; height: 13px; }
.tbtn.play { width: 28px; height: 26px; justify-content: center; padding: 0; }

/* timeline */
.tl-panel { background: var(--panel); border: 1px solid #000; border-radius: 4px; overflow: hidden; }
.tl-head {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  background: #2a2a2a; border-bottom: 1px solid #000; flex-wrap: wrap; row-gap: 4px;
}
.tl-head .tl-title { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b6b6b6; }
.tl-body { padding: 8px 10px 10px; background: #1d1d1d; }
.tl-ruler { position: relative; height: 14px; margin: 0 0 3px; }
.tl-ruler b {
  position: absolute; top: 0; transform: translateX(-50%); font-family: var(--mono);
  font-size: 9px; font-weight: 400; color: #7d7d7d; white-space: nowrap;
}
.tl-ruler b::after { content: ""; position: absolute; left: 50%; top: 11px; width: 1px; height: 4px; background: #4a4a4a; }
.tl-track {
  position: relative; height: 62px; border-radius: 3px; background: #141414;
  border: 1px solid #3a3a3a; overflow: hidden; cursor: text; touch-action: none;
}
.tl-track[data-tool="cut"] { cursor: crosshair; }
.tl-strip {
  position: absolute; inset: 0; opacity: .85;
  background-repeat: repeat-x; background-position: left center; background-size: auto 62px;
  background-color: #232323;
}
.tl-strip.empty { background-image: repeating-linear-gradient(90deg, #262626 0 6px, #2c2c2c 6px 12px); }
.tl-shade { position: absolute; top: 0; bottom: 0; background: rgba(10,10,10,.68); pointer-events: none; }
.tl-sel {
  position: absolute; top: 0; bottom: 0; background: rgba(157,123,255,.14);
  border-top: 2px solid var(--violet); border-bottom: 2px solid var(--violet);
  cursor: move; box-shadow: inset 0 0 0 1px rgba(157,123,255,.35);
}
.tl-handle {
  position: absolute; top: 0; bottom: 0; width: 9px; background: var(--violet);
  cursor: ew-resize; display: grid; place-items: center;
}
.tl-handle::after { content: ""; width: 1px; height: 14px; background: rgba(0,0,0,.45); box-shadow: 2px 0 0 rgba(0,0,0,.45); }
.tl-handle[data-handle="in"] { left: 0; transform: translateX(-1px); border-radius: 2px 0 0 2px; }
.tl-handle[data-handle="out"] { right: 0; transform: translateX(1px); border-radius: 0 2px 2px 0; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: #fff; pointer-events: none; z-index: 4; }
.tl-playhead::before {
  content: ""; position: absolute; top: 0; left: -4px; border: 4px solid transparent; border-top-color: #fff;
}
.tl-marker {
  position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px;
  background: #ffb84d; z-index: 9; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,.55);
}
.tl-marker::after {
  content: ""; position: absolute; top: 0; left: -4px;
  border: 5px solid transparent; border-top-color: #ffb84d;
}
.tl-marker:hover { background: #ffcf7a; }

.tl-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; row-gap: 6px; margin-top: 8px; }
.tl-tools .spacer { flex: 1; }
.tl-div { width: 1px; height: 18px; background: #3a3a3a; margin: 0 2px; }
.tc-field { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.tc-field input {
  width: 96px; padding: 3px 6px; border-radius: 3px; border: 1px solid #3d3d3d; background: #141414;
  color: #eaeaea; font-family: var(--mono); font-size: 11px; text-align: center;
}
.tc-field input:focus { border-color: var(--blue); box-shadow: none; }
.readout { font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.readout b { font-family: var(--mono); font-size: 11px; color: #e0e0e0; font-weight: 500; }
.chip-count {
  display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 3px; background: #3a3a3a; color: #dedede; font-family: var(--mono); font-size: 9.5px;
}

.tl-export {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; flex-wrap: wrap;
  background: #2a2a2a; border-top: 1px solid #000;
}
.tl-export form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #4a4a4a; border-radius: 4px; overflow: hidden; }
.seg-btn {
  border: 0; background: transparent; color: #b9b9b9; font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.seg-btn + .seg-btn { border-left: 1px solid #4a4a4a; }
.seg-btn:hover { background: #383838; color: #fff; }
.seg-btn.active { background: var(--blue); color: #fff; }
.seg label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; cursor: pointer; font-size: 11.5px; font-weight: 600; color: #b9b9b9; }
.seg label + label { border-left: 1px solid #4a4a4a; }
.seg label:hover { background: #383838; color: #fff; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--blue); color: #fff; }

/* assets dock (under the timeline) */
.assets { background: var(--panel); border: 1px solid #000; border-radius: 4px; overflow: hidden; }
.assets-head { display: flex; align-items: center; gap: 6px; padding: 0 8px; background: #2a2a2a; border-bottom: 1px solid #000; flex-wrap: wrap; row-gap: 2px; }
.tabs { display: flex; align-items: stretch; }
.tabbtn {
  border: 0; background: transparent; color: #b3b3b3; font: inherit; font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px 7px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; box-shadow: inset 0 -2px 0 transparent;
  transition: color .12s, box-shadow .12s;
}
.tabbtn:hover { color: #fff; }
.tabbtn.active { color: #fff; box-shadow: inset 0 -2px 0 var(--blue); }
.tabcount {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; background: #3a3a3a; color: #ddd;
  padding: 0 4px; border-radius: 3px; letter-spacing: 0;
}
.assets-body { padding: 10px; min-height: 62px; }
.asset-panel { display: none; }
.asset-panel.active { display: block; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.asset-card { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid #333; border-radius: 4px; background: #202020; }
.asset-card .ico { width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; background: #2d2d2d; color: #9fc4ff; flex: none; }
.asset-card .label { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card .sub { color: var(--muted-2); font-size: 10px; font-family: var(--mono); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 26px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 11.5px; }
.kv .k { color: var(--muted-2); }
.kv .v { font-family: var(--mono); font-size: 10.5px; text-align: right; word-break: break-all; max-width: 62%; }
.list-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #303030; }
.list-row:last-child { border-bottom: 0; }
.list-row .label { font-size: 11.5px; }
.list-row .sub { color: var(--muted-2); font-size: 10px; }
.thumb-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.thumb-strip a { border: 1px solid #333; border-radius: 3px; overflow: hidden; background: #1a1a1a; }
.thumb-strip img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.thumb-strip .cap { font-size: 9.5px; color: var(--muted-2); padding: 2px 4px; }

/* progress card */
.progress-card { background: var(--panel); border: 1px solid #000; border-radius: 4px; padding: 18px; }

/* ---------------------------------------------------------------- jobs */
.jobs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.jobs-table th {
  text-align: left; padding: 8px 12px; color: var(--muted-2); font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; border-bottom: 1px solid var(--line); font-weight: 700; background: var(--panel-2);
}
.jobs-table td { padding: 9px 12px; border-bottom: 1px solid #2c2c2c; vertical-align: middle; }
.jobs-table tr:last-child td { border-bottom: 0; }
.jobs-table .job-progress { width: 130px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 6px 0 14px; }
.stat { padding: 11px 13px; }
.stat .n { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-family: var(--mono); }
.stat .l { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

.notice { padding: 9px 12px; border-radius: 4px; font-size: 11.5px; border: 1px solid; }
.notice.err { color: #f5b4b7; background: rgba(227,90,97,.1); border-color: rgba(227,90,97,.32); }
.notice.info { color: #a9c8f5; background: rgba(38,128,235,.1); border-color: rgba(38,128,235,.32); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .editor { grid-template-columns: 40px minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .editor { grid-template-columns: 40px minmax(0, 1fr); }
  .hero { grid-template-columns: 1fr; padding-top: 42px; gap: 28px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .nav a { padding: 5px 8px; font-size: 12px; }
}
@media (max-width: 700px) {
  body { overflow-x: hidden; }
  .wrap { padding: 0 14px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .editor { grid-template-columns: 1fr; min-height: 0; }
  .rail {
    flex-direction: row; border-right: 0; border-bottom: 1px solid #000;
    padding: 4px 8px; gap: 2px; justify-content: center;
  }
  .rail .rail-sep { width: 1px; height: 20px; margin: 0 4px; }
  .stage { padding: 10px 10px 20px; }
  .stage-head h1 { font-size: 13.5px; }
  .tl-track { height: 52px; }
  .tl-strip { background-size: auto 52px; }
  .tc-field input { width: 92px; font-size: 10px; }
  .vol-slider { display: none; }
  .tcl { font-size: 10px; padding: 0 4px; }
  .screen video { max-height: 42vh; }
  .big-play { width: 48px; height: 48px; }
  .topbar-inner { gap: 10px; height: 44px; }
  .brand-tag { display: none; }
  .brand-name { display: none; }
  .nav { gap: 0; }
}
