:root {
  color-scheme: light;
  --canvas: #f2f7fc; --surface: #fff; --ink: #12344c;
  --muted: #485f71; --line: #cbdde9; --primary: #0369a1;
  --primary-hover: #075985; --error: #a6222d; --success: #166534;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.55; color: var(--ink); background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.shell { width: min(1100px, calc(100% - 36px)); margin-inline: auto; }
.bar { min-height: 66px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: white; }
main.shell { padding-block: clamp(32px, 6vw, 72px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.22; letter-spacing: -.02em; }
.intro { color: var(--muted); margin: 10px 0 30px; }
.layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 28px); min-width: 0; }
h2 { font-size: 21px; margin-bottom: 20px; }
label { display: block; font-weight: 650; margin-bottom: 7px; }
input, select, button { font: inherit; }
select { width: 100%; height: 45px; border: 1px solid #8aa8bd; border-radius: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; margin-bottom: 17px; }
input[type=file] { max-width: 100%; min-height: 46px; }
input::file-selector-button { padding: 8px 12px; min-height: 44px; color: var(--primary-hover); border: 1px solid #8aa8bd; border-radius: 7px; background: var(--surface); margin-right: 8px; cursor: pointer; }
.file { padding: 12px; margin-bottom: 18px; background: var(--canvas); border: 1px dashed #7eabc6; border-radius: 9px; }
.file span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
button, .action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; border: 1px solid transparent; padding: 8px 14px; background: var(--primary); color: white; font-weight: 650; cursor: pointer; text-decoration: none; }
button:hover, .action:hover { background: var(--primary-hover); }
button.secondary, .action.secondary { border-color: var(--line); background: var(--surface); color: var(--primary-hover); }
button.secondary:hover, .action.secondary:hover { background: var(--canvas); }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
progress { width: 100%; margin-top: 13px; accent-color: var(--primary); }
.feedback { margin-top: 9px; color: var(--muted); overflow-wrap: anywhere; }
.feedback:empty { margin: 0; }
#jobs-list { list-style: none; margin: 0; padding: 0; }
.job { border-top: 1px solid var(--line); padding: 14px 0; }
.job:last-child { padding-bottom: 0; }
.job-top { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.job-name { font-weight: 650; overflow-wrap: anywhere; }
.job-meta { color: var(--muted); font-size: 14px; margin-top: 3px; }
.job-state { background: var(--canvas); color: var(--primary-hover); border-radius: 999px; padding: 3px 9px; white-space: nowrap; font-size: 14px; }
.job-state.done { color: var(--success); background: #edf7eb; }
.job-state.failed { color: var(--error); background: #fff0f0; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#preview { margin-top: 24px; }
video { display: block; width: 100%; max-height: 420px; margin-top: 10px; background: #12202c; border-radius: 8px; }
@media (max-width: 740px) { .layout { grid-template-columns: 1fr; } }
