/* Shared, scoped surface for MiniMax and Motion. Other workspaces keep their theme. */
html .minimax-workspace {
  --vw-bg:#f5f5f7;--vw-card:#ffffff;--vw-text:#25262a;--vw-muted:#707279;
  --vw-line:#00000012;--vw-fill:#f5f5f7;--vw-hover:#ededf0;--vw-blue:#007aff;
  --vw-blue-hover:#0067dd;--vw-preview:#f1f1f4;--vw-shadow:0 2px 9px #00000004,0 1px 2px #00000003;
  color:var(--vw-text);background:var(--vw-bg);padding:26px 30px 40px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
  container-type:inline-size;container-name:video-workbench;
}
html.lg-dark .minimax-workspace {
  --vw-bg:#202124;--vw-card:#2a2b2f;--vw-text:#f0f0f2;--vw-muted:#a5a6ad;
  --vw-line:#ffffff16;--vw-fill:#333439;--vw-hover:#3b3c42;--vw-blue:#409cff;
  --vw-blue-hover:#238bff;--vw-preview:#232428;--vw-shadow:0 2px 12px #00000012;
}
/* The desktop shell applies generic section/header and form chrome. */
html.lg-shell #app-view>.workspace>.minimax-workspace{background:var(--vw-bg)!important;}
html.lg-shell #app-view>.workspace>.minimax-workspace>.mm-header{padding:0!important;min-height:30px;border:0;}
html.lg-shell #app-view .minimax-workspace :is(h2,h3){color:var(--vw-text);}
html.lg-shell #app-view .minimax-workspace :is(input,textarea,select){background:var(--vw-fill);color:var(--vw-text);border-color:var(--vw-line);box-shadow:none;border-radius:8px;}
html.lg-shell #app-view .minimax-workspace .mm-options :is(input,select){background:var(--vw-card);}
html.lg-shell #app-view .minimax-workspace button:hover{translate:0 0;box-shadow:none;}
html .minimax-workspace :is(button,input,select,textarea,summary){-webkit-tap-highlight-color:transparent;}
html .minimax-workspace :focus-visible{outline:2px solid var(--vw-blue);outline-offset:3px;}
html .minimax-workspace svg{width:18px;height:18px;flex-shrink:0;display:block;}
html .minimax-workspace .mm-header{max-width:1400px;margin:0 auto 22px;gap:16px;min-height:30px;}
html .minimax-workspace .mm-header h2{font-size:22px;line-height:1.3;letter-spacing:-.6px;font-weight:650;margin:0;color:var(--vw-text);}
html .minimax-workspace .mm-model{display:inline-flex;align-items:center;border:1px solid var(--vw-line);border-radius:7px;padding:5px 9px;background:var(--vw-card);color:var(--vw-muted);font-size:11px;font-weight:500;letter-spacing:.1px;white-space:nowrap;}
html .minimax-workspace :is(.mm-window-bar,.motion-window-bar){max-width:1400px;margin:0 auto 22px;display:flex;align-items:center;gap:8px;flex-wrap:nowrap;}
html .minimax-workspace .video-task-tabs{display:flex;align-items:center;gap:3px;max-width:100%;min-width:0;overflow-x:auto;scrollbar-width:thin;background:var(--vw-hover);border:1px solid var(--vw-line);border-radius:10px;padding:3px;box-shadow:none;}
html .minimax-workspace .video-task-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;flex:none;min-width:91px;padding:7px 12px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--vw-muted);font-size:12px;box-shadow:none;white-space:nowrap;transition:background .15s,color .15s;cursor:pointer;}
html .minimax-workspace .video-task-tabs button:hover{color:var(--vw-text);background:var(--vw-fill);}
html .minimax-workspace .video-task-tabs button.is-active{background:var(--vw-card);color:var(--vw-text);border-color:var(--vw-line);box-shadow:0 1px 3px #0000000b;}
html .minimax-workspace .video-task-tabs button small{font-size:10px;color:var(--vw-muted);}
html .minimax-workspace .video-task-tabs button[data-status="idle"] small{display:none;}
html .minimax-workspace .video-task-tabs button i{width:5px;height:5px;border-radius:50%;background:var(--vw-muted);opacity:.5;box-shadow:none;}
html .minimax-workspace .video-task-tabs button[data-status="running"] i{background:var(--vw-blue);opacity:1;}
html .minimax-workspace .video-task-tabs button[data-status="completed"] i{background:#30a46c;opacity:1;}
html .minimax-workspace .video-task-tabs button[data-status="failed"] i{background:#e06b5f;opacity:1;}
html .minimax-workspace .mm-add-window{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--vw-muted);cursor:pointer;}
html .minimax-workspace .mm-add-window:hover:not(:disabled){background:var(--vw-hover);color:var(--vw-text);}
html .minimax-workspace .mm-window-panel>.mm-header{display:none!important;}
html .minimax-workspace .motion-window-panel>.mm-header{min-height:0;margin:0 auto 10px;}
html .minimax-workspace .motion-window-panel>.mm-header:has([data-motion="batch-toggle"][hidden]){display:none;}
html .minimax-workspace .mm-layout{max-width:1400px;margin:0 auto;display:grid;grid-template-columns:minmax(340px,.9fr) minmax(380px,1.2fr);gap:22px;align-items:start;}
html .minimax-workspace .mm-card{padding:23px;border:1px solid var(--vw-line);border-radius:18px;background:var(--vw-card);color:var(--vw-text);box-shadow:var(--vw-shadow);min-width:0;}
html .minimax-workspace .mm-card h3{font-size:13px;font-weight:600;letter-spacing:.1px;color:var(--vw-text);}
html .minimax-workspace .mm-section-head{margin-bottom:17px;min-height:20px;}
html .minimax-workspace .mm-section-head small{color:var(--vw-muted);font-size:11px;}
html .minimax-workspace .mm-media-count{display:flex;align-items:center;gap:5px;font-variant-numeric:tabular-nums;}
html .minimax-workspace .mm-media-count svg{width:13px;height:13px;}
html .minimax-workspace .mm-media-count>span{margin:0 4px;opacity:.5;}
html .minimax-workspace :is(.mm-card,.mm-header) button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:33px;font-size:12px;line-height:1.4;font-weight:500;padding:7px 12px;color:var(--vw-text);background:var(--vw-card);border:1px solid var(--vw-line);border-radius:8px;box-shadow:0 1px 2px #00000005;transition:background .15s,border-color .15s,box-shadow .15s;}
html .minimax-workspace :is(.mm-card,.mm-header) button:hover:not(:disabled){background:var(--vw-hover);border-color:var(--vw-line);color:var(--vw-text);}
html .minimax-workspace .mm-card button:disabled{opacity:.43;cursor:not-allowed;}
html .minimax-workspace .mm-card .mm-primary{background:var(--vw-blue);border-color:transparent;color:#fff;}
html .minimax-workspace .mm-card .mm-primary:hover:not(:disabled){background:var(--vw-blue-hover);border-color:transparent;color:#fff;}
html .minimax-workspace .mm-card .mm-icon-button{width:29px;min-height:29px;padding:5px;border:0;background:transparent;box-shadow:none;color:var(--vw-muted);}
html .minimax-workspace .mm-icon-button svg{width:16px;height:16px;}
html .minimax-workspace .mm-upload{padding:0;border:0;background:transparent;margin-bottom:14px;}
html .minimax-workspace .mm-upload-actions{display:flex;gap:10px;}
html .minimax-workspace [data-mm="drop"] .mm-upload-actions button{flex:1;min-height:88px;flex-direction:column;gap:8px;background:var(--vw-fill);border:1px dashed var(--vw-line);box-shadow:none;color:var(--vw-muted);border-radius:11px;}
html .minimax-workspace [data-mm="drop"] .mm-upload-actions button svg{width:23px;height:23px;}
html .minimax-workspace [data-mm="drop"] .mm-upload-actions button:hover:not(:disabled),html .minimax-workspace [data-mm="drop"].is-dragging button{background:var(--vw-hover);color:var(--vw-blue);border-color:var(--vw-blue);}
html .minimax-workspace .mm-assets{gap:9px;margin-bottom:18px;}
html .minimax-workspace .mm-assets:empty{display:none;}
html .minimax-workspace .mm-asset{border-color:var(--vw-line);background:var(--vw-fill);border-radius:9px;}
html .minimax-workspace .mm-asset :is(img,video){background:var(--vw-preview);height:100px;}
html .minimax-workspace .mm-asset .mm-remove{width:23px;height:23px;min-height:23px;padding:0;border-radius:50%;background:var(--vw-card);color:var(--vw-text);}
html .minimax-workspace .mm-asset-info small{color:var(--vw-muted);font-size:10px;}
html .minimax-workspace .mm-asset input{background:transparent;color:var(--vw-text);border-color:var(--vw-line);}
html .minimax-workspace .mm-asset-info button{padding:3px 7px;min-height:24px;font-size:11px;}
html .minimax-workspace .mm-field{margin:22px 0 10px;font-size:12px;color:var(--vw-text);font-weight:600;}
html .minimax-workspace .mm-card textarea{background:var(--vw-fill);border:1px solid transparent;border-radius:10px;color:var(--vw-text);padding:13px 14px;min-height:145px;line-height:1.8;font-size:13px;outline-color:var(--vw-blue);}
html .minimax-workspace .mm-card textarea::placeholder{color:var(--vw-muted);opacity:.75;}
html .minimax-workspace .mm-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0;align-items:end;}
html .minimax-workspace .mm-options :is(label,.mm-fixed-option){display:flex;flex-direction:column;gap:8px;min-width:0;font-size:11px;color:var(--vw-muted);margin:0;font-weight:500;}
html .minimax-workspace .mm-options :is(input,select),html .minimax-workspace .mm-fixed-value{height:35px;box-sizing:border-box;min-width:0;width:100%;border:1px solid var(--vw-line);border-radius:8px;background:var(--vw-card);color:var(--vw-text);font-size:12px;font-family:inherit;padding:0 9px;}
html .minimax-workspace .mm-fixed-value{display:flex;align-items:center;justify-content:space-between;gap:4px;background:var(--vw-fill);border-color:transparent;}
html .minimax-workspace .mm-cost-row{display:flex;align-items:center;gap:6px;margin:19px 0 0;color:var(--vw-muted);}
html .minimax-workspace .mm-point-cost{font-size:11px;color:var(--vw-muted);margin:0;font-variant-numeric:tabular-nums;}
html .minimax-workspace .mm-help{position:relative;display:inline-block;vertical-align:middle;font-weight:400;line-height:1;}
html .minimax-workspace .mm-help>summary{display:flex;align-items:center;justify-content:center;list-style:none;width:24px;height:24px;border-radius:6px;color:var(--vw-muted);cursor:pointer;}
html .minimax-workspace .mm-help>summary::-webkit-details-marker{display:none;}
html .minimax-workspace .mm-help>summary:hover{background:var(--vw-hover);}
html .minimax-workspace .mm-help svg{width:14px;height:14px;}
html .minimax-workspace .mm-help>p{position:absolute;z-index:5;bottom:28px;left:-10px;width:210px;max-width:65vw;margin:0;padding:12px 14px;border:1px solid var(--vw-line);border-radius:10px;background:var(--vw-card);color:var(--vw-text);box-shadow:0 5px 24px #0000001a;font-size:12px;line-height:1.7;}
html .minimax-workspace .mm-fixed-value .mm-help>p{left:auto;right:-9px;}
html .minimax-workspace .mm-actions{gap:10px;margin-top:14px;}
html .minimax-workspace .mm-actions:empty{display:none;}
html .minimax-workspace .mm-actions>button{min-height:37px;}
html .minimax-workspace .mm-preview{min-height:360px;aspect-ratio:4/3;background:var(--vw-preview);color:var(--vw-muted);border:1px solid var(--vw-line);border-radius:12px;padding:14px;}
html .minimax-workspace .mm-preview:has(video){padding:0;background:#151518;}
html .minimax-workspace .mm-preview video{width:100%;height:100%;max-height:600px;object-fit:contain;border-radius:0;}
html .minimax-workspace .mm-preview-symbol{width:60px;height:60px;background:transparent;border:0;border-radius:0;color:var(--vw-muted);opacity:.4;margin-bottom:12px;}
html .minimax-workspace .mm-preview-symbol svg{width:46px;height:46px;stroke-width:1;}
html .minimax-workspace .mm-preview-symbol.is-working svg{animation:vw-turn 3s linear infinite;}
html .minimax-workspace .mm-preview strong{font-size:12px;font-weight:400;color:var(--vw-muted);}
html .minimax-workspace .mm-preview p{color:var(--vw-muted);font-size:12px;}
html .minimax-workspace :is(.mm-progress,.mm-inline-status,.mm-timing){font-size:12px;line-height:1.7;color:var(--vw-muted);overflow-wrap:anywhere;}
html .minimax-workspace :is(.mm-progress,.mm-timing):empty{display:none;}
html .minimax-workspace .mm-inline-status.is-error{color:#c64b41;}
html.lg-dark .minimax-workspace .mm-inline-status.is-error{color:#ff9288;}
html .minimax-workspace .mm-dot{background:var(--vw-blue);width:6px;height:6px;}
html .minimax-workspace .mm-summary{border-color:var(--vw-line);}
html .minimax-workspace .mm-summary p{font-size:12px;color:var(--vw-muted);}
html .minimax-workspace .mm-summary :is(pre,.mm-prompt-copy){background:var(--vw-fill);color:var(--vw-text);}
html .minimax-workspace .mm-summary summary{color:var(--vw-muted);}
html .minimax-workspace .mm-prompt-dialog{background:var(--vw-card);border-color:var(--vw-line);color:var(--vw-text);}
html .minimax-workspace .mm-prompt-copy{background:var(--vw-fill);border-color:var(--vw-line);color:var(--vw-text);}
html .minimax-workspace .mm-prompt-copy:hover{background:var(--vw-hover);}
html .minimax-workspace .mm-prompt-copy small{color:var(--vw-muted);}
html .minimax-workspace .motion-batch-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;}
html .minimax-workspace .motion-batch-toolbar .mm-upload-actions{gap:7px;}
html .minimax-workspace .motion-pair{gap:10px;margin:0 0 15px;}
html .minimax-workspace .motion-pair-cell{position:relative;gap:8px;min-width:0;border:1px solid var(--vw-line);border-radius:11px;padding:10px;background:var(--vw-fill);}
html .minimax-workspace .motion-pair-cell.is-empty{padding:0;min-height:154px;border-style:dashed;}
html .minimax-workspace .motion-pair-index{position:absolute;top:8px;left:10px;font-size:10px;line-height:1.5;font-variant-numeric:tabular-nums;color:var(--vw-muted);z-index:1;pointer-events:none;}
html .minimax-workspace .motion-pair-cell:not(.is-empty) .motion-pair-index{position:static;}
html .minimax-workspace .motion-pair-cell.is-empty>button{flex:1;flex-direction:column;gap:9px;background:transparent;border:0;box-shadow:none;color:var(--vw-muted);border-radius:10px;min-height:152px;}
html .minimax-workspace .motion-pair-cell.is-empty>button svg{width:27px;height:27px;stroke-width:1.3;}
html .minimax-workspace .motion-pair-cell :is(img,video){height:150px;background:var(--vw-preview);border-radius:6px;}
html .minimax-workspace .motion-pair-cell>span{font-size:10px;color:var(--vw-muted);}
html .minimax-workspace .motion-pair-cell>button{font-size:11px;background:var(--vw-card);}
html .minimax-workspace .motion-pair-status{display:flex;align-items:center;flex-wrap:wrap;gap:7px;color:var(--vw-muted);font-size:11px;}
html .minimax-workspace .motion-pair-status:empty{display:none;}
html .minimax-workspace .motion-order{display:flex;gap:3px;margin:0 0 0 auto;}
html .minimax-workspace .motion-order button{flex:none;width:26px;min-height:26px;padding:5px;background:transparent;border:0;box-shadow:none;color:var(--vw-muted);}
html .minimax-workspace .motion-order svg{width:14px;height:14px;}
html .minimax-workspace .motion-targets{margin:23px 0 18px;}
html .minimax-workspace .motion-targets legend{font-size:12px;margin-bottom:11px;font-weight:600;}
html .minimax-workspace .motion-targets legend .mm-help{margin-left:3px;}
html .minimax-workspace .motion-target-options{display:flex;gap:8px;}
html .minimax-workspace .motion-target-options button{flex:1;min-width:0;background:var(--vw-fill);border-color:transparent;box-shadow:none;}
html .minimax-workspace .motion-target-options button[aria-pressed="true"]{color:var(--vw-blue);border-color:color-mix(in srgb,var(--vw-blue) 25%,transparent);background:color-mix(in srgb,var(--vw-blue) 9%,var(--vw-card));}
html .minimax-workspace .motion-target-options button[aria-pressed="true"]:before{content:'✓';font-size:12px;}
html .minimax-workspace .motion-input .mm-upload{background:var(--vw-fill);height:190px;border:1px dashed var(--vw-line);padding:8px;}
html .minimax-workspace .motion-input>label{font-size:12px;color:var(--vw-muted);}
@keyframes vw-turn{to{transform:rotate(360deg)}}
@container video-workbench (max-width:800px){
  html .minimax-workspace .mm-layout{grid-template-columns:minmax(0,1fr);max-width:680px;}
  html .minimax-workspace .mm-preview{min-height:280px;aspect-ratio:16/10;}
}
@media(max-width:600px){
  html .minimax-workspace{padding:20px 14px 28px;}
  html .minimax-workspace .mm-card{padding:18px;}
  html .minimax-workspace .mm-header h2{font-size:19px;}
  html .minimax-workspace .mm-model{font-size:10px;padding:4px 6px;}
  html .minimax-workspace .mm-options{gap:8px;}
  html .minimax-workspace .mm-preview{min-height:220px;}
  html .minimax-workspace .video-task-tabs button{min-width:80px!important;padding:7px 9px;}
}
@media(prefers-reduced-motion:reduce){
  html .minimax-workspace *,html .minimax-workspace *:before{animation:none!important;transition:none!important;scroll-behavior:auto!important;}
}

/* Three separately priced MiniMax modes. Scoped away from motion controls. */
html .minimax-workspace .mm-mode-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
html .minimax-workspace .mm-mode-actions>button{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:58px;padding:10px 5px;white-space:nowrap;}
html .minimax-workspace .mm-mode-actions>button>small{font-size:11px;font-weight:400;opacity:.78;font-variant-numeric:tabular-nums;}
html .minimax-workspace .mm-composer>.mm-cost-row{justify-content:flex-end;margin-top:12px;}
