:root {
  --bg: #0f1115; --panel: #181b22; --line: #2a2f3a; --text: #e8eaf0; --muted: #9098a8;
  --accent: #ff5a36; --accent-ink: #fff; --ok: #3ccf8e; --warn: #f5b942;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
h1 span { color: var(--accent); }
p.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=url] { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; }
button { font: inherit; border: 1px solid var(--line); background: #222733; color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.jobs a { color: var(--text); text-decoration: none; }
.jobs li { padding: 8px 0; border-top: 1px solid var(--line); list-style: none; }
.jobs ul { padding: 0; margin: 0; }
.err { color: var(--accent); white-space: pre-wrap; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }

/* player */
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .12s linear; }
.stage video.active { opacity: 1; }
.stage .gap { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); }
.stage .gap.show { display: grid; }
.stage .tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); padding: 2px 8px;
  border-radius: 6px; font-size: 13px; }
.controls { display: grid; gap: 12px; margin-top: 12px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 110px; }
.seg { display: inline-flex; }
.seg button { border-radius: 0; }
.seg button:first-child { border-radius: 8px 0 0 8px; }
.seg button:last-child { border-radius: 0 8px 8px 0; }
.spacer { flex: 1; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; }
.conf-good { color: var(--ok); } .conf-weak { color: var(--warn); }

input[type=text], input[type=file] { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; }
.pending { list-style: none; padding: 0; margin: 10px 0 0; }
.pending li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.seg.wrap { flex-wrap: wrap; }
