:root {
  --ink: #171713;
  --muted: #73736c;
  --line: #deded5;
  --paper: #f5f4ed;
  --panel: #fbfaf5;
  --lime: #dfff3f;
  --violet: #6c50ff;
  --shadow: 0 24px 70px rgba(41, 39, 27, 0.12);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 14%, rgba(223, 255, 63, .22), transparent 18rem),
    radial-gradient(circle at 94% 9%, rgba(108, 80, 255, .12), transparent 24rem),
    var(--paper);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}
button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.topbar {
  height: 68px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 23, 19, .12);
  background: rgba(245, 244, 237, .78);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { width: 25px; height: 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; transform: rotate(-12deg); }
.brand-mark i { display: block; background: var(--ink); border-radius: 7px; }
.brand-mark i:nth-child(2) { background: var(--violet); transform: translateY(4px); }
.brand-mark i:nth-child(3) { background: var(--lime); transform: translateY(-3px); }
.topbar-meta { display: flex; align-items: center; gap: 10px; }
.privacy-pill { font-size: 12px; font-weight: 700; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.55); }
.privacy-pill span { width: 7px; height: 7px; border-radius: 50%; background: #3db45a; box-shadow: 0 0 0 4px rgba(61,180,90,.12); }
.lan-pill { font-size: 12px; font-weight: 700; display: flex; gap: 8px; align-items: center; padding: 7px 8px 7px 12px; border: 1px solid #d5cef9; border-radius: 999px; background: #f1eeff; color: var(--ink); cursor: pointer; transition: .18s ease; max-width: 46vw; min-width: 0; }
.lan-pill:hover { border-color: var(--violet); background: #e9e4ff; }
.lan-pill > span { color: var(--violet); flex: none; }
.lan-pill code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 600; color: #4a3fb3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lan-pill b { font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 999px; background: white; border: 1px solid #ded6ff; flex: none; white-space: nowrap; }
.lan-pill.copied b { background: var(--lime); border-color: var(--lime); }
.shared-pill { display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; border: 1px solid #cfe8d3; background: #f3fbf4; font-size: 11px; font-weight: 800; color: #2c6b3b; }
.shared-pill span { width: 7px; height: 7px; border-radius: 50%; background: #3db45a; box-shadow: 0 0 0 4px rgba(61,180,90,.14); }
.shared-pill small { font: 700 9px/1 monospace; color: #4e8a5e; background: #fff; border: 1px solid #cfe8d3; border-radius: 999px; padding: 3px 6px; }
.qr-name { width: 100%; display: grid; gap: 4px; }
.qr-name span { font-size: 9px; color: var(--muted); }
.qr-name input { width: 100%; min-height: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 11px; outline: none; }
.qr-name input:focus { border-color: var(--violet); }
.lan-wrap { position: relative; }
.qr-pop { position: absolute; top: calc(100% + 10px); right: 0; width: 232px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 22px 50px rgba(23,23,19,.16); display: grid; justify-items: center; gap: 9px; z-index: 40; }
.qr-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qr-head strong { font-size: 11px; }
.qr-close { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: #8d8d85; padding: 2px 4px; border-radius: 6px; }
.qr-close:hover { background: #f1f0e9; color: var(--ink); }
.qr-frame { padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qr-frame img { display: block; width: 152px; height: 152px; }
.qr-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 700; color: #4a3fb3; word-break: break-all; text-align: center; }
.qr-copy { border: 1px solid #ded6ff; background: #f1eeff; color: #4a3fb3; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.qr-copy:hover { background: #e9e4ff; }
.qr-copy.copied { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.qr-pop small { font-size: 10px; color: var(--muted); line-height: 1.5; text-align: center; }
.qr-pop small .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; font-weight: 700; color: #4a3fb3; }
.qr-pop small:empty { display: none; }

.app-shell { width: min(1480px, calc(100% - 36px)); margin: 0 auto; }
.intro { padding: clamp(44px, 6vw, 90px) 0 34px; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.eyebrow, .stage-kicker { margin: 0 0 12px; font-size: 11px; letter-spacing: .18em; font-weight: 800; color: var(--violet); }
h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(42px, 6vw, 82px); line-height: .98; font-weight: 500; letter-spacing: -.055em; }
h1 em { color: var(--violet); font-style: italic; }
.intro-copy { width: min(390px, 36vw); margin: 0 0 8px; color: var(--muted); font-size: 15px; line-height: 1.7; }

.workspace { display: grid; grid-template-columns: 370px minmax(0, 1fr); min-height: 740px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.sidebar { padding: 26px; border-right: 1px solid var(--line); max-height: 840px; overflow-y: auto; scrollbar-width: thin; }
.stage-panel { min-width: 0; padding: 26px; background: #efeee6; display: flex; flex-direction: column; }
.step-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-heading span { color: var(--violet); font: 800 10px/1 monospace; }
.step-heading h2 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }

.drop-zone { min-height: 112px; border: 1.5px dashed #b9b9af; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: #fff; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus { border-color: var(--violet); background: #f1eeff; outline: none; transform: translateY(-1px); }
.drop-icon { font-size: 23px; color: var(--violet); margin-bottom: 3px; transform: rotate(-20deg); }
.drop-zone strong { font-size: 13px; }
.drop-zone small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.file-list { display: grid; gap: 7px; margin-top: 10px; }
.file-item { display: grid; grid-template-columns: 32px minmax(0,1fr) 24px; gap: 9px; align-items: center; padding: 8px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; }
.file-item:hover, .file-item.active { background: #eeecff; border-color: #d5cef9; }
.file-thumb { aspect-ratio: 1; border-radius: 7px; display: grid; place-items: center; background: var(--ink); color: var(--lime); font-size: 9px; }
.file-meta { min-width: 0; }
.file-meta strong, .file-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta strong { font-size: 11px; }
.file-meta small { font-size: 9px; color: var(--muted); margin-top: 2px; }
.file-remove { border: 0; background: none; cursor: pointer; color: #8d8d85; border-radius: 50%; }
.file-remove:hover { color: #d14343; background: #ffe8e8; }

.preset-block { display: grid; gap: 8px; margin-bottom: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #f7f6ef; }
.preset-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.preset-actions button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 700; color: #6f6f67; cursor: pointer; }
.preset-actions button:hover:not(:disabled) { border-color: var(--violet); color: var(--violet); }
.preset-actions button:disabled { opacity: .38; cursor: not-allowed; }
.preset-new { display: flex; gap: 6px; }
.preset-new input { flex: 1; min-width: 0; min-height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 11px; outline: none; }
.preset-new input:focus { border-color: var(--violet); }
.preset-new input#presetNewId { flex: 0 0 62px; }
.product-match { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 9px; border: 1px solid #d5cef9; background: #f1eeff; }
.product-match b { font: 800 10px/1 monospace; color: #4a3fb3; background: #fff; border: 1px solid #ded6ff; border-radius: 999px; padding: 3px 7px; }
.product-match span { font-size: 11px; font-weight: 800; color: var(--ink); }
.product-match small { flex: 1 0 100%; font-size: 9px; color: #6f6f67; }
.product-match small:empty { display: none; }
.product-match.miss { border-color: #f0d9b8; background: #fff8ec; }
.product-match.miss b { color: #a35b00; border-color: #f0d9b8; }
.product-match.miss span { color: #a35b00; }
.product-swap { border: 1px solid #ded6ff; background: #fff; color: #4a3fb3; font-size: 9px; font-weight: 800; border-radius: 999px; padding: 3px 8px; cursor: pointer; }
.product-swap:hover { background: #e9e4ff; }
.preset-new button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 0 10px; font-size: 10px; font-weight: 700; cursor: pointer; }
.preset-new button:hover { border-color: var(--violet); color: var(--violet); }

.segmented { display: grid; grid-template-columns: 1fr 1.45fr; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #efeee8; }
.segmented button { border: 0; background: none; padding: 8px 6px; font-size: 11px; font-weight: 700; cursor: pointer; border-radius: 7px; }
.segmented button.active { background: white; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.control-stack { display: grid; gap: 11px; margin-top: 12px; }
.control-stack.compact { margin-top: 16px; }
.field, .range-field { display: grid; gap: 6px; position: relative; }
.field > span, .range-field > span { font-size: 10px; font-weight: 750; color: #5e5e58; display: flex; justify-content: space-between; }
.field input:not([type="color"]), .field select, .export-options select { width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 0 10px; color: var(--ink); font-size: 11px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108,80,255,.1); }
.field b { position: absolute; right: 9px; bottom: 9px; font-size: 10px; color: var(--muted); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range-field output { color: var(--violet); font-family: monospace; font-weight: 800; }
input[type="range"] { width: 100%; accent-color: var(--violet); cursor: pointer; }
.color-field input { width: 100%; height: 36px; padding: 3px; border: 1px solid var(--line); background: white; border-radius: 8px; cursor: pointer; }
.check-field { font-size: 10px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.check-field input { accent-color: var(--violet); }
.image-picker { display: grid; place-items: center; min-height: 72px; border: 1px dashed #b9b9af; border-radius: 10px; background: white; cursor: pointer; font-size: 11px; font-weight: 700; text-align: center; padding: 8px; }
.image-picker:hover { border-color: var(--violet); color: var(--violet); }
.subtle-button { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 8px; font-size: 10px; cursor: pointer; }
.subtle-button:disabled { opacity: .4; cursor: not-allowed; }
.hidden { display: none !important; }

.stage-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.stage-toolbar > div { display: grid; gap: 2px; min-width: 0; }
.stage-kicker { margin: 0; color: var(--muted); font-size: 9px; }
.stage-toolbar strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48vw; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: white; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.icon-button:hover { border-color: var(--violet); color: var(--violet); }
.stage { position: relative; min-height: 0; flex: 1; display: grid; place-items: center; border-radius: 14px; overflow: hidden; background-color: #171713; background-image: linear-gradient(45deg,#22221f 25%,transparent 25%),linear-gradient(-45deg,#22221f 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#22221f 75%),linear-gradient(-45deg,transparent 75%,#22221f 75%); background-size: 22px 22px; background-position: 0 0,0 11px,11px -11px,-11px 0; }
.stage.dragging { box-shadow: inset 0 0 0 3px var(--lime); }
#previewCanvas { display: block; max-width: 100%; max-height: 590px; width: auto; height: auto; object-fit: contain; background: #080808; }
.stage.empty #previewCanvas { opacity: 0; }
#rzCanvas { display: block; max-width: 100%; max-height: 590px; width: auto; height: auto; object-fit: contain; background: #080808; }
.stage.empty #rzCanvas { opacity: 0; }
#rzVideo { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }

.rc-palette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rc-hint { font-size: 10px; color: var(--muted); }
.rc-swatch { display: grid; gap: 3px; justify-items: center; }
.rc-swatch i { width: 34px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); display: block; }
.rc-swatch small { font: 600 8px/1 ui-monospace, monospace; color: var(--muted); }
.rc-palette.loading { opacity: .6; }
#rcCanvas { display: block; max-width: 100%; max-height: 590px; width: auto; height: auto; object-fit: contain; background: #080808; }
.stage.empty #rcCanvas { opacity: 0; }
#rcVideo { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }

.rz-stage-actions { display: flex; align-items: center; gap: 8px; }
.tool-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tool-tabs button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.72); border-radius: 999px; padding: 10px 18px; font-size: 12px; font-weight: 750; cursor: pointer; color: #55554e; transition: .16s ease; }
.tool-tabs button b { font: 800 9px/1 monospace; color: var(--violet); background: #f1eeff; border-radius: 999px; padding: 3px 6px; }
.tool-tabs button:hover:not(:disabled) { border-color: var(--violet); color: var(--ink); }
.tool-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.14); }
.tool-tabs button.active b { background: var(--lime); color: var(--ink); }
.tool-tabs button:disabled { opacity: .42; cursor: not-allowed; }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.spec-chip { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; transition: .15s ease; }
.spec-chip b { display: block; font-size: 11px; }
.spec-chip small { font-size: 9px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.spec-chip:hover { border-color: var(--violet); }
.spec-chip.active { border-color: var(--violet); background: #f1eeff; }
.spec-chip.active b { color: #4a3fb3; }

.queue { display: grid; gap: 6px; margin-top: 12px; }
.queue-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 10px; }
.queue-item .q-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.queue-item .q-state { color: var(--muted); white-space: nowrap; }
.queue-item.running { border-color: var(--violet); background: #f7f5ff; }
.queue-item.done .q-state { color: #2c6b3b; font-weight: 800; }
.queue-item.fail .q-state { color: #d14343; font-weight: 800; }
.empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; gap: 6px; }
.empty-state strong { font: 500 24px/1.2 Georgia, serif; }
.empty-state span { color: #98988f; font-size: 11px; }
.empty-orbit { width: 88px; height: 88px; border: 1px solid #3c3c36; border-radius: 50%; position: relative; margin-bottom: 14px; animation: spin 8s linear infinite; }
.empty-orbit:before, .empty-orbit:after { content:""; position:absolute; border:1px solid #34342f; border-radius:50%; inset:13px; }
.empty-orbit:after { inset:29px; background: var(--lime); border: 0; }
.empty-orbit i { width: 7px; height: 7px; border-radius: 50%; position: absolute; background: var(--violet); left: 9px; top: 12px; }
.empty-orbit i:nth-child(2) { left: auto; top: 37px; right: -3px; background: white; }
.empty-orbit i:nth-child(3) { left: 22px; top: auto; bottom: 1px; background: var(--lime); }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline { display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; align-items: center; gap: 8px; margin-top: 12px; font: 10px/1 monospace; color: var(--muted); }
.timeline span:last-child { text-align: right; }
.timeline input { margin: 0; }
.export-bar { display: flex; justify-content: space-between; align-items: end; gap: 18px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 18px; }
.export-options { display: flex; align-items: end; gap: 12px; color: var(--muted); font-size: 10px; }
.export-options label { display: grid; gap: 4px; }
.export-options select { min-width: 106px; }
.export-button { border: 0; border-radius: 12px; background: var(--ink); color: white; min-height: 48px; padding: 0 8px 0 20px; display: flex; gap: 16px; align-items: center; font-weight: 750; font-size: 12px; cursor: pointer; box-shadow: 0 9px 20px rgba(0,0,0,.15); }
.export-button b { width: 34px; height: 34px; display: grid; place-items: center; background: var(--lime); color: var(--ink); border-radius: 8px; font-size: 16px; }
.export-button:hover:not(:disabled) { transform: translateY(-2px); }
.export-button:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.progress-wrap { margin-top: 14px; background: white; padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.progress-wrap > div { display: flex; justify-content: space-between; font-size: 10px; }
.progress-wrap progress { width: 100%; height: 8px; accent-color: var(--violet); }
.progress-wrap button { border: 0; background: none; color: #d14343; cursor: pointer; padding: 5px 0 0; font-size: 10px; }
.progress-wrap progress:not([value]) { accent-color: var(--violet); }
.format-hint { font-weight: 800; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; white-space: nowrap; }
.format-hint[data-mode="webm"] { color: #a35b00; border-color: #f0d9b8; background: #fff8ec; }
.result-row { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #cfe8d3; background: #f3fbf4; font-size: 11px; color: #2c6b3b; }
.result-row .result-check { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: #3db45a; color: white; font-size: 10px; font-weight: 900; }
.result-row span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-row a { margin-left: auto; flex: none; color: #2c6b3b; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(44,107,59,.35); }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 48px; color: var(--muted); font-size: 10px; }
#sourceVideo { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }

@media (max-width: 900px) {
  .intro { align-items: start; flex-direction: column; }
  .intro-copy { width: min(520px, 100%); }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .stage-panel { min-height: 680px; }
}
@media (max-width: 560px) {
  .app-shell { width: min(100% - 20px, 1480px); }
  .topbar { padding: 0 14px; }
  .topbar-meta { gap: 6px; }
  .privacy-pill { font-size: 0; padding: 8px; }
  .lan-pill { max-width: 62vw; padding: 6px 6px 6px 9px; }
  .lan-pill > span { display: none; }
  .lan-pill code { font-size: 10px; }
  .intro { padding-top: 34px; }
  .workspace { border-radius: 15px; }
  .sidebar, .stage-panel { padding: 17px; }
  .stage-panel { min-height: 540px; }
  .export-bar { align-items: stretch; flex-direction: column; }
  .export-button { justify-content: space-between; }
  footer { flex-direction: column; }
}

@media (max-width: 430px) {
  /* 极窄屏：只留品牌图形，把空间让给局域网地址 */
  .brand span:last-child { display: none; }
  .topbar-meta { gap: 5px; }
  .lan-pill { max-width: none; }
}

/* AI 换元素 */
.rs-prompt { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 11px; line-height: 1.55; resize: vertical; outline: none; font-family: inherit; color: var(--ink); }
.rs-prompt:focus { border-color: var(--violet); }
.rs-actions { display: flex; gap: 6px; margin-top: 7px; }
.rs-actions button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 10px; font-weight: 800; cursor: pointer; color: #55554e; }
.rs-actions button:hover { border-color: var(--violet); color: var(--violet); }
.rs-go { width: 100%; margin-top: 8px; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 10px; padding: 11px; font-size: 11px; font-weight: 800; cursor: pointer; }
.rs-go:hover { background: var(--violet); border-color: var(--violet); }
.rs-note { display: block; margin-top: 8px; font-size: 9px; line-height: 1.65; color: var(--muted); }
.rs-check { font-size: 10px; line-height: 1.5; padding: 7px 9px; border-radius: 8px; background: #f7f6ef; border: 1px solid var(--line); color: var(--muted); margin-top: 7px; }
.rs-check:empty { display: none; }
.rs-check.ok { color: #2c6b3b; background: #f3fbf4; border-color: #cfe8d3; }
.rs-check.bad { color: #a35b00; background: #fff8ec; border-color: #f0d9b8; }
.rs-warn { color: #d14343; }
.rs-post { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rs-post-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.rs-post-row .field { min-width: 120px; }
#rsCanvas { display: block; max-width: 100%; max-height: 460px; width: auto; height: auto; object-fit: contain; background: #080808; }
.stage.empty #rsCanvas { opacity: 0; }
#rsVideo { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }
.rs-pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 10px; font-weight: 800; color: #55554e; cursor: pointer; }
.rs-pick:hover { border-color: var(--violet); color: var(--violet); }

.rs-results { margin-top: 10px; }
.rs-results .file-item { cursor: pointer; }
.rs-results .file-item.active { border-color: var(--violet); background: #faf8ff; }

/* 换元素后处理区：规格条改成紧凑横排 */
.rs-post .spec-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-post .spec-grid .spec-chip { flex: 0 0 auto; min-width: 104px; padding: 6px 10px; }
.rs-post .spec-grid .spec-chip b { font-size: 10px; }
.rs-post .spec-grid .spec-chip small { font-size: 9px; }
.rs-post .rs-post-row .field { flex: 0 0 auto; }
.rs-post .color-field input[type="color"] { width: 46px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.rs-post #rsCoverSize { width: 150px; }

/* 导出结果卡（手机取片用） */
.mm-result { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; display: grid; gap: 10px; }
.mm-result-head { display: flex; gap: 9px; align-items: center; }
.mm-result-check { width: 22px; height: 22px; border-radius: 50%; background: #eaf7ec; color: #2c8c47; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex: 0 0 auto; }
.mm-result-head b { display: block; font-size: 12px; word-break: break-all; }
.mm-result-head small { font-size: 10px; color: var(--muted); }
.mm-result-video { width: 100%; max-height: 320px; border-radius: 10px; background: #000; }
.mm-result-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-result-actions button, .mm-result-actions a { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 11px; font-weight: 800; color: #45453f; text-decoration: none; cursor: pointer; }
.mm-result-actions button[data-act="share"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mm-result-hint { font-size: 10px; line-height: 1.65; color: var(--muted); margin: 0; }
@media (max-width: 720px) { .mm-result-video { max-height: 220px; } .mm-result-actions button, .mm-result-actions a { flex: 1 1 auto; text-align: center; } }

/* 批量压缩 */
.cz-list { min-height: 90px; }
.cz-row { align-items: center; }
.cz-state { font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.cz-state.running { color: var(--violet); }
.cz-state.done { color: #2c8c47; }
.cz-state.warn { color: #b1680a; }
.cz-state.fail { color: #d14343; }
.cz-action { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 10px; font-weight: 800; color: #45453f; cursor: pointer; white-space: nowrap; }
.cz-action:hover { border-color: var(--violet); color: var(--violet); }
.cz-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.cz-presets .spec-chip { flex: 1 1 0; min-width: 78px; }
.cz-save-all { border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 11px; font-weight: 800; cursor: pointer; }
#czEdge { width: 100%; }

/* 批量压缩：行布局修正（状态与按钮不能挤到框外） */
.cz-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 8px 12px; }
.cz-row .file-meta { min-width: 0; }
.cz-row .file-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-row .cz-state { justify-self: end; text-align: right; }
.cz-row .cz-action { justify-self: end; }
@media (max-width: 720px) {
  .cz-row { grid-template-columns: 34px minmax(0, 1fr); }
  .cz-row .cz-state, .cz-row .cz-action { grid-column: 2; justify-self: start; }
}

.mm-result-actions a.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.mm-result-actions a { display: inline-flex; align-items: center; }

.qr-public { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: #f7f6ef; }
.qr-public.hidden { display: none; }
.qr-public span { font-size: 9px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 7px; white-space: nowrap; flex: 0 0 auto; }
.qr-public code { font-size: 10px; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-public button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 9px; font-weight: 800; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }

/* 02：多素材 + 加速 */
.rs-assets { display: grid; gap: 6px; margin-top: 7px; }
.rs-asset-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 74px 22px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; cursor: pointer; }
.rs-asset-row.active { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(91, 75, 255, .08); }
.rs-asset-row img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 10px 10px; }
.rs-asset-meta { min-width: 0; }
.rs-asset-meta strong { display: block; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-asset-meta small { font-size: 9px; }
.rs-asset-meta small.ok { color: #2c8c47; }
.rs-asset-meta small.bad { color: #b1680a; }
.rs-asset-name { border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; font-size: 10px; width: 100%; }
.rs-src-row { align-items: start; }
.rs-src-row .file-meta strong, .rs-src-row .file-meta small { white-space: normal; }
.rs-src-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.rs-src-actions .cz-action { max-width: 100%; }
.rs-src-actions .rs-sped { margin: 0; }
.rs-sped { display: inline-block; font-size: 9px; color: #2c8c47; }

.file-meta .rs-src-actions .cz-action { padding: 5px 10px; font-size: 10px; }
