*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,"Helvetica Neue",Helvetica,"PingFang SC","Microsoft YaHei",sans-serif;background:#111;color:#eee}
#container{max-width:720px;margin:0 auto;padding:12px}
.stepbar{display:flex;align-items:center;gap:8px;margin:6px 2px;font-size:14px;color:#ddd}
.stepbar .right{margin-left:auto;color:#fff}
.preview-area{position:relative;background:#000;border-radius:8px;overflow:hidden}
video,canvas,#img{display:block;width:100%;height:auto}
video[hidden],canvas[hidden],#img[hidden]{display:none!important}
.task-hint{position:absolute;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);color:#fff;padding:10px 12px;font-size:14px;text-align:center;z-index:2;backdrop-filter:saturate(120%) blur(1px)}
.thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:8px 2px}
.thumb{position:relative;background:#222;border:1px solid #333;border-radius:6px;overflow:hidden}
.thumb img{display:block;width:100%;height:64px;object-fit:cover}
.thumb .cap{position:absolute;left:4px;bottom:4px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;padding:1px 3px;border-radius:3px;max-width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thumb .redo{position:absolute;right:4px;top:4px;background:#1f6feb;border:none;color:#fff;font-size:11px;padding:2px 6px;border-radius:4px}
.thumb.selected{outline:3px solid #2ecc71;outline-offset:-3px;box-shadow:0 0 0 2px rgba(46,204,113,.4) inset}
.status{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#ccc;margin:8px 2px}
.status .right{margin-left:auto}
.actions{display:flex;gap:8px;margin-top:8px}
.actions button{flex:1;padding:10px 12px;background:#1f6feb;color:#fff;border:none;border-radius:6px;font-size:16px}
.actions button[hidden]{display:none}
.actions.secondary button{background:#444}
.actions button:disabled{background:#666;cursor:not-allowed;opacity:.7}
.simple #container{max-width:420px}
.simple .stepbar{display:none}
.simple .status{display:none}
.simple .actions{margin-top:10px}
.simple .actions button{font-size:15px;padding:10px}
.simple .preview-area{border-radius:6px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:rgba(0,0,0,.8);color:#fff;padding:8px 12px;border-radius:6px;max-width:90%;font-size:14px}

.upload-panel{margin-top:10px;background:#181818;border:1px solid #2a2a2a;border-radius:6px;padding:8px}
.upload-hint{font-size:20px;color:#ddd;margin-bottom:8px;font-weight:600}
.upload-status{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.uitem{background:#222;border:1px solid #333;border-radius:6px;padding:8px;display:flex;flex-direction:column;gap:6px;min-height:60px}
.uitem .ulabel{display:block;font-size:12px;color:#aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px;min-height:18px}
.ubar{height:8px;background:#333;border-radius:4px;overflow:hidden;width:100%}
.ubar > span{display:block;height:100%;width:0;background:#2ecc71;transition:width .2s ease}
.uok .ulabel{color:#8ae234}
.uerr .ulabel{color:#ff6b6b}

.log-panel{margin-top:10px;background:#161616;border:1px solid #2a2a2a;border-radius:6px;overflow:hidden}
.log-header{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#1c1c1c;color:#ddd;font-weight:600}
.log-header .log-export{margin-left:auto;background:#444;color:#fff;border:none;border-radius:4px;padding:6px 10px;font-size:12px}
.log-list{max-height:220px;overflow:auto;padding:8px}
.log-item{display:flex;gap:8px;padding:6px 8px;border-bottom:1px solid #222;font-size:12px;color:#bbb}
.log-item .tm{color:#888;min-width:92px}
.log-item.info{color:#ccc}
.log-item.ok{color:#8ae234}
.log-item.warn{color:#f0c674}
.log-item.err{color:#ff6b6b}
.log-item .msg{flex:1;word-break:break-all}
.log-item .extra{color:#999;max-width:50%}