.minimax-workspace { overflow-y:auto; min-height:0; padding:30px 28px 40px; background:#f2f6f4; }
.mm-header {display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:23px;}
.mm-header h2 {margin:5px 0 8px; font-size:25px; letter-spacing:-.6px;}
.mm-window-bar {display:flex;align-items:stretch;gap:8px;max-width:100%;margin-bottom:22px;}
.mm-window-bar .mm-window-tabs {overflow-x:auto;min-width:0;max-width:100%;order:0;}
.mm-window-tabs button {flex:none;min-width:84px;cursor:pointer;}
.mm-add-window {flex:none;width:42px;border:1px solid #dce7e1;border-radius:12px;background:#f5f9f7;color:#287858;font-size:24px;cursor:pointer;}
.mm-add-window:hover:not(:disabled) {background:#eaf3ee;}
.mm-add-window:disabled {opacity:.4;cursor:default;}
.mm-window-tabs button:focus-visible,.mm-add-window:focus-visible {outline:2px solid #287858;outline-offset:2px;}
.mm-window-panel[hidden],.mm-window-panel>.mm-header {display:none!important;}
.mm-window-menu {position:fixed;z-index:10020;min-width:140px;max-width:min(270px,calc(100vw - 16px));padding:5px;border:1px solid #00000018;border-radius:10px;background:#fffffff5;color:#25262a;box-shadow:0 8px 28px #00000020;backdrop-filter:blur(18px);font:12px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;}
.mm-window-menu button {display:flex;align-items:center;gap:9px;width:100%;border:0;border-radius:6px;padding:7px 10px;background:transparent;color:#d63c36;font:inherit;text-align:left;cursor:pointer;}
.mm-window-menu button:hover:not(:disabled),.mm-window-menu button:focus-visible {outline:none;background:#007aff;color:#fff;}
.mm-window-menu button:disabled {opacity:.45;cursor:default;}
.mm-window-menu svg {width:16px;height:16px;flex:none;}
.mm-window-menu small {display:block;padding:5px 10px 3px;color:#707279;font-size:11px;}
.mm-window-menu small[hidden] {display:none;}
html.lg-dark .mm-window-menu {background:#2a2b2ff5;color:#f0f0f2;border-color:#ffffff24;box-shadow:0 8px 28px #00000050;}
html.lg-dark .mm-window-menu button {color:#ff7069;}
html.lg-dark .mm-window-menu button:hover:not(:disabled),html.lg-dark .mm-window-menu button:focus-visible {color:#fff;}
html.lg-dark .mm-window-menu small {color:#a5a6ad;}
@media(max-width:760px){.mm-window-panel .mm-layout{grid-template-columns:minmax(0,1fr);}.mm-window-tabs button{flex:none!important;min-width:84px!important;}}
.mm-header p,.mm-muted {color:#75827b; font-size:13px; line-height:1.7; margin:0;}
.mm-model {display:flex; flex-direction:column; gap:4px; border:1px solid #cddfd5; border-radius:12px; padding:11px 17px; background:#fafffc; color:#287858; font-size:12px;}
.mm-model strong {font-size:15px;}
.mm-layout {display:grid; grid-template-columns:minmax(370px,1fr) minmax(330px,1.08fr); gap:22px; align-items:start;}
.mm-card {background:#fff; border:1px solid #d8e4de; border-radius:18px; padding:22px; min-width:0; box-shadow:0 5px 20px #12392704;}
.mm-card h3 {margin:0; font-size:16px;}
.mm-section-head {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px;}
.mm-section-head small {font-size:12px; color:#76857c;}
.mm-card button,.mm-header button {border:1px solid #c8dcd1; color:#176c4c; background:white; border-radius:8px; padding:8px 13px; font:inherit; font-size:13px; cursor:pointer;}
.mm-card button:hover:not(:disabled),.mm-header button:hover:not(:disabled) {background:#edf7f1; border-color:#37936b;}
.mm-card button:disabled {opacity:.43; cursor:not-allowed;}
.mm-card .mm-primary {background:#197653; border-color:#197653; color:white;}
.mm-card .mm-primary:hover:not(:disabled) {background:#125f42; color:white;}
.mm-upload {border:1px dashed #afd0bd; border-radius:12px; padding:15px; background:#f8fbf9; margin-bottom:14px; text-align:center;}
.mm-upload.is-dragging {background:#e6f5ec; border-color:#197653;}
.mm-upload p {margin:7px 0 0; font-size:12px; color:#76847d; line-height:1.7;}
.mm-upload-actions {display:flex; justify-content:center; gap:8px;}
.mm-assets {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-bottom:18px;}
.mm-asset {position:relative; border:1px solid #d9e5dd; border-radius:9px; background:#fbfdfc; overflow:hidden;}
.mm-asset img,.mm-asset video {width:100%; height:94px; object-fit:contain; background:#edf1ee; display:block;}
.mm-asset .mm-asset-label {position:absolute; top:5px; left:5px; background:#174e3acc; color:white; border-radius:5px; font-size:11px; padding:3px 6px;}
.mm-asset .mm-remove {position:absolute; top:4px; right:4px; border:0; border-radius:50%; width:23px; height:23px; padding:0; background:#ffffffed; color:#4b6255;}
.mm-asset-info {padding:7px;}
.mm-asset-info small {display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:11px; color:#64766a;}
.mm-asset input {width:100%; font:inherit; font-size:11px; border:0; border-top:1px solid #e3ebe6; background:transparent; padding:7px 3px 1px; outline-color:#197653;}
.mm-field {display:block; margin:17px 0 9px; font-size:13px; font-weight:600;}
.mm-card textarea {width:100%; resize:vertical; border:1px solid #cdded3; border-radius:10px; padding:12px; font:inherit; font-size:13px; line-height:1.7; min-height:130px; background:#fcfefc; color:#173d2c; outline-color:#197653; box-sizing:border-box;}
.mm-card textarea::placeholder {color:#96a39b;}
.mm-options {display:flex; align-items:end; gap:18px; margin:16px 0;}
.mm-options label {display:flex; flex-direction:column; gap:8px; font-size:12px; color:#62746a; flex:1;}
.mm-options input,.mm-options select {height:36px; width:100%; border:1px solid #cdded3; border-radius:8px; background:white; color:#224c36; padding:0 10px; font:inherit; font-size:13px;}
.mm-actions {display:flex; gap:10px; margin-top:18px; flex-wrap:wrap;}
.mm-actions .mm-primary {flex:1;}
.mm-note {font-size:12px; color:#6d8172; line-height:1.7; margin-top:11px;}
.mm-inline-status {font-size:12px; color:#247957; margin:9px 0; min-height:18px; white-space:pre-wrap;}
.mm-inline-status.is-error {color:#b03e34;}
.mm-preview {min-height:285px; background:#14241b; color:#fff; border-radius:13px; display:flex; align-items:center; justify-content:center; flex-direction:column; overflow:hidden; text-align:center; padding:24px; box-sizing:border-box;}
.mm-preview video {display:block; max-height:480px; width:100%; border-radius:8px;}
.mm-preview-symbol {width:58px; height:58px; border:1px solid #45634f; border-radius:50%; display:grid; place-items:center; color:#8bc6a1; font-size:22px; margin-bottom:17px;}
.mm-preview strong {font-size:16px; color:#dcebe2;}
.mm-preview p {color:#8fa899; font-size:12px; line-height:1.8; max-width:300px;}
.mm-progress {display:flex; align-items:center; gap:9px; color:#196d4d; font-size:13px; margin-top:16px;}
.mm-dot {width:8px; height:8px; border-radius:50%; background:#1e9467; flex-shrink:0;}
.mm-dot.busy {animation:mm-pulse 1.5s ease-in-out infinite;}
@keyframes mm-pulse {50%{opacity:.28;}}
.mm-timing {color:#748278; font-size:12px; margin:9px 0 0;}
.mm-summary {border-top:1px solid #e1eae4; margin-top:19px; padding-top:16px;}
.mm-summary p {white-space:pre-wrap; line-height:1.8; color:#486151; font-size:13px;}
.mm-warning {border-radius:9px; background:#fff4e8; color:#99632a; padding:10px 12px; margin:9px 0; font-size:12px; line-height:1.7;}
.mm-summary details {margin-top:12px;}
.mm-summary summary {font-size:12px; color:#1b7651; cursor:pointer;}
.mm-summary pre {font-size:12px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; max-height:340px; overflow:auto; background:#f5f8f6; padding:12px; border-radius:8px; color:#526359;}
.mm-history {margin-top:22px;}
.mm-history-list {display:flex; flex-direction:column; gap:8px; max-height:300px; overflow:auto;}
.mm-history-item {display:flex; justify-content:space-between; gap:12px; align-items:center; width:100%; text-align:left;}
.mm-history-item span {overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
.mm-history-item small {color:#718476; font-size:11px; white-space:nowrap;}
.mm-history-item.is-current {background:#edf8f1; border-color:#429a6c;}
.mm-prompt-modal {position:fixed; inset:0; z-index:30; display:flex; align-items:flex-start; justify-content:center; padding:12vh 24px 24px; background:rgba(20,34,28,.28); backdrop-filter:blur(3px);}
.mm-prompt-modal[hidden] {display:none;}
.mm-prompt-dialog {width:min(720px,100%); max-height:min(70vh,620px); overflow:auto; padding:20px; border:1px solid #d6e5dc; border-radius:18px; background:#fff; box-shadow:0 18px 60px rgba(28,61,44,.2);}
.mm-prompt-dialog .mm-section-head button {width:30px; height:30px; border:0; border-radius:50%; color:#587266; background:#f0f6f2; font-size:20px; line-height:1; cursor:pointer;}
.mm-prompt-copy {display:block; width:100%; padding:18px; border:1px solid #cfe3d6; border-radius:13px; background:#f8fcf9; color:#254d3a; text-align:left; cursor:pointer; white-space:pre-wrap; word-break:break-word; font:inherit; line-height:1.7;}
.mm-prompt-copy:hover {border-color:#2d9566; background:#f1faf4;}
.mm-prompt-copy span {display:block; max-height:45vh; overflow:auto;}
.mm-prompt-copy small {display:block; margin-top:14px; color:#6d897a; font-size:12px;}
.minimax-workspace :focus-visible {outline:2px solid #38996c; outline-offset:3px;}
@media (max-width:1080px) {.mm-layout {grid-template-columns:minmax(0,1fr);} .minimax-workspace {padding:24px 18px;} .mm-preview {min-height:260px;} }

.mm-actions > [data-mm="optimize"],.mm-actions > [data-mm="generate"] {flex:1;}
.mm-inline-status:empty {display:none;}

.motion-upload-columns,.motion-pair-head,.motion-pair {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start;}
.motion-input {min-width:0;display:flex;flex-direction:column;gap:10px;}
.motion-input>label {font-weight:600;min-height:24px;}
.motion-input .mm-upload {width:100%;height:220px;margin:0;box-sizing:border-box;overflow:hidden;}
.motion-input>button {width:100%;}
.motion-pair-head {margin:20px 0 12px;}
.motion-pair {margin-bottom:16px;}
.motion-pair-cell {border:1px solid #d5e5dc;border-radius:12px;padding:12px;min-width:0;display:flex;flex-direction:column;gap:8px;background:#f8fcfa;}
.motion-pair-cell img,.motion-pair-cell video {width:100%;height:130px;object-fit:contain;border-radius:8px;background:#eaf2ed;}
.motion-pair-cell>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;}
.motion-pair-cell.is-empty {border-style:dashed;color:#71847a;min-height:200px;justify-content:center;text-align:center;}
.motion-order {display:flex;gap:6px;}.motion-order button {flex:1;min-width:0;padding:6px;}
.motion-pair-status {grid-column:1/-1;font-size:12px;color:#527662;}
.mm-point-cost {margin:18px 0 8px;color:#186c4b;font-size:13px;}
.motion-pair {align-items:stretch;}.motion-order {margin-top:auto;}
.motion-windows-header {margin-bottom:14px;}
.motion-windows-header>div {display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.motion-model-label {color:#71867e;font-size:12px;}
.motion-window-bar {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:22px;}
.motion-window-hint {font-size:12px;color:#71867e;}
.motion-window-panel[hidden] {display:none!important;}
.motion-window-panel>.mm-header {justify-content:flex-end;margin-bottom:14px;}
.motion-window-title {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
.motion-window-bar .video-task-tabs button[data-status="running"] i {background:#1f9b75;box-shadow:0 0 0 3px #1f9b751b;}
.motion-window-bar .video-task-tabs button[data-status="queued"] i {background:#dba344;}
.motion-window-bar .video-task-tabs button[data-status="failed"] i {background:#d97a6c;}
[data-motion="single"],[data-motion="batch"] {margin-top:16px;}
