:root {
  --bg: #f4f6f1;
  --card: #ffffff;
  --ink: #16241f;
  --muted: #5f6f68;
  --line: #d9e0d6;
  --brand: #102c24;
  --accent: #d4df9c;
  --action: #1f5a48;
  --danger: #a4322a;
  --warn-bg: #fbf4d9;
  --warn-ink: #6b5410;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
header.top { background: var(--brand); color: #fff; }
header.top .inner {
  max-width: 980px; margin: 0 auto; padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
}
header.top .logo { color: var(--accent); font-weight: 600; font-size: 17px; margin-right: auto; }
header.top a { color: #dfe7dc; text-decoration: none; padding: 4px 2px; border-bottom: 2px solid transparent; }
header.top a.on { color: #fff; border-bottom-color: var(--accent); }
main { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { font-size: 22px; margin: 6px 0 6px; }
h2 { font-size: 17px; margin: 0 0 10px; }
p.lead { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
label.f { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
label.f:first-child { margin-top: 0; }
label.f small { font-weight: 400; color: var(--muted); }
textarea, input[type=text], select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; color: inherit; background: #fff;
}
textarea, input[type=text], select { font-weight: 400; }
textarea { resize: vertical; min-height: 70px; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--action); outline-offset: -1px; }
button, a.btn {
  display: inline-block; padding: 8px 16px; border-radius: 7px; border: 1px solid var(--action);
  background: var(--action); color: #fff; font: inherit; cursor: pointer; text-decoration: none;
}
button.ghost, a.btn.ghost { background: #fff; color: var(--action); }
button.small, a.btn.small { padding: 3px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.drop {
  border: 2px dashed #a9b7ac; border-radius: 10px; padding: 26px 14px; text-align: center;
  color: var(--muted); cursor: pointer; background: #fafbf8;
}
.drop.over { border-color: var(--action); background: #eef3e6; }
.files { list-style: none; margin: 10px 0 0; padding: 0; }
.files li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.files .nm { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.files .st { color: var(--muted); }
.files .st.err { color: var(--danger); }
.bar { height: 8px; background: #e7ece2; border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--action); width: 0; transition: width .3s; }
.files .bar { flex: 0 0 110px; }
.err { color: var(--danger); }
.msg { margin-top: 10px; }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 7px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.warn ul { margin: 4px 0 0; padding-left: 20px; }
video { width: 100%; max-height: 520px; background: #000; border-radius: 8px; display: block; }
.scene { display: grid; grid-template-columns: 200px 1fr; gap: 14px; }
.scene .pic img, .scene .pic .blank {
  width: 100%; aspect-ratio: 990 / 940; object-fit: cover; border-radius: 7px; display: block; background: #1b4437;
}
.scene .pic select { margin-top: 6px; font-size: 13px; padding: 5px; }
.scene h3 { font-size: 14px; margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.scene .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.changed { border-color: #c9a227 !important; background: #fffbea; }
.tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hist { display: grid; grid-template-columns: 54px 1fr auto; gap: 4px 12px; align-items: start; }
.hist .no { font-weight: 700; font-size: 18px; color: var(--action); }
.hist .tt { font-weight: 600; overflow-wrap: anywhere; }
.hist .meta { color: var(--muted); font-size: 13px; }
.hist .pmt { font-size: 13px; color: #3d4b45; overflow-wrap: anywhere; }
.hist .acts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hist .vbox { grid-column: 1 / -1; margin-top: 8px; }
.tag { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 20px; background: #e7ece2; color: #2f4a3f; white-space: nowrap; }
.tag.done { background: #dcebd3; color: #255c32; }
.tag.running, .tag.queued { background: #fbf0cd; color: #6b5410; }
.tag.failed { background: #f7dcd9; color: var(--danger); }
.stick { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .scene { grid-template-columns: 1fr; }
  .scene .pic img, .scene .pic .blank { max-width: 240px; }
  .scene .two { grid-template-columns: 1fr; }
  .hist { grid-template-columns: 40px 1fr; }
  .hist > .tag { grid-column: 2; justify-self: start; }
}
