:root {
  --bg: #0e0f13; --panel: #171920; --panel2: #1f222b; --line: #2a2e39;
  --text: #eceef3; --muted: #8b91a1; --accent: #ffd400; --accent-ink: #1a1600;
  --ok: #3ddc84; --err: #ff6b6b; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
header { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.brand small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); margin-right: 6px; }
.layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; padding: 20px; max-width: 1500px; margin: 0 auto; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; padding: 16px; } }
aside { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
input, select { width: 100%; margin-top: 4px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 13px; }
.check input { width: auto; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
details { margin: 4px 0 12px; } summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
button { font: inherit; border-radius: 8px; padding: 9px 14px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); cursor: pointer; }
button:hover { border-color: #444a58; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; width: 100%; }
button.primary:disabled { opacity: .4; cursor: not-allowed; }
button.ghost { background: transparent; }
button.small { padding: 5px 10px; font-size: 12px; }
.drop { display: flex; gap: 12px; align-items: center; border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; margin-bottom: 14px; color: var(--text); font-size: 13px; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop.has { border-style: solid; border-color: var(--accent); }
.drop-icon { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; background: var(--panel2);
  display: grid; place-items: center; flex: none; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.hidden { display: none !important; }
.upbar { margin-top: 10px; height: 8px; background: var(--panel2); border-radius: 4px; position: relative; overflow: hidden; }
.upbar div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upbar span { position: absolute; right: 0; top: 10px; font-size: 11px; color: var(--muted); }
.history h3 { margin: 0 0 8px; font-size: 13px; }
.pitem { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pitem:hover, .pitem.active { background: var(--panel2); }
.pitem .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.badge.done { color: var(--ok); } .badge.error { color: var(--err); } .badge.processing, .badge.queued { color: var(--accent); }
.empty { max-width: 620px; margin: 60px auto; }
.empty h1 { font-size: 30px; letter-spacing: -.6px; line-height: 1.2; }
.empty li { margin-bottom: 8px; }
.phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.phead h2 { margin: 0; font-size: 20px; } .phead .row { display: flex; gap: 8px; }
.progress { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.bar { height: 10px; background: var(--panel2); border-radius: 5px; overflow: hidden; margin: 8px 0; }
.bar div { height: 100%; background: var(--accent); transition: width .4s; }
.err { color: var(--err); }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.clip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.clip .vid { background: #000; aspect-ratio: 9/16; display: grid; place-items: center; position: relative; }
.clip .vid.r11 { aspect-ratio: 1; } .clip .vid.r45 { aspect-ratio: 4/5; } .clip .vid.r169 { aspect-ratio: 16/9; }
.clip video { width: 100%; height: 100%; object-fit: contain; display: block; }
.clip .score { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.clip .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.clip h4 { margin: 0; font-size: 14px; line-height: 1.3; }
.clip .meta { font-size: 11px; color: var(--muted); }
.clip .reason { font-size: 12px; color: var(--muted); }
.clip .caption { font-size: 12px; background: var(--panel2); padding: 8px; border-radius: 8px; white-space: pre-wrap; }
.clip .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.clip .actions a { text-decoration: none; }
.spin { width: 28px; height: 28px; border: 3px solid #333; border-top-color: var(--accent); border-radius: 50%; animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
.edit { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.edit label { margin: 0; }
.edit .full { grid-column: 1 / -1; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); width: min(440px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.row.end { display: flex; gap: 8px; justify-content: flex-end; } .row.end button.primary { width: auto; }
a { color: var(--accent); }
