/* Divide the usable column space 60:40, excluding the existing gutter. */
.mc-workspace { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:24px; align-items:start; }
.mc-workspace[hidden],.mc-root [hidden],.mc-resources [hidden] { display:none!important; }
.mc-root,.mc-resources { min-width:0; color:var(--ui-text,#1d1d1f); }
.mc-root { padding:24px; background:var(--ui-surface,#fff); border:1px solid var(--ui-line,#dedee3); border-radius:12px; }
.mc-root h3 { margin:0 0 8px; font-size:22px; letter-spacing:-.02em; }
.mc-muted { color:var(--ui-muted,#626269); font-size:13px; line-height:1.65; margin:8px 0; }
.mc-form { display:flex; flex-direction:column; gap:12px; margin-top:16px; }
.mc-output { display:flex; gap:10px; border:0; padding:0; margin:0; }
.mc-output legend { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.mc-output label { display:flex; align-items:center; gap:8px; padding:10px 18px; border:1px solid var(--ui-line,#dedee3); border-radius:8px; cursor:pointer; font-weight:600; }
.mc-output label:has(:checked) { background:var(--ui-selected,#e6f0fc); border-color:var(--ui-accent,#0066cc); color:var(--ui-accent,#0066cc); }
.mc-output input { width:16px; height:16px; accent-color:var(--ui-accent,#0066cc); margin:0; }
.mc-drop { display:grid; grid-template-columns:1fr auto; border:1px dashed var(--ui-muted,#626269); border-radius:8px; padding:14px; background:var(--ui-inset,#f5f5f7); min-width:0; gap:8px 14px; }
.mc-drop.dragging { border-color:var(--ui-accent,#0066cc); background:var(--ui-selected,#e6f0fc); }
.mc-drop-actions { grid-column:2; grid-row:1; display:flex; flex-direction:column; gap:8px; align-self:center; }
.mc-empty { grid-column:1; grid-row:1; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:10px; min-height:82px; }
.mc-empty b { font-weight:500; }
.mc-empty span { flex-basis:100%; font-size:13px; color:var(--ui-muted,#626269); }
#mc-preview { grid-column:1; grid-row:1; display:block; max-width:100%; width:auto; height:84px; object-fit:contain; }
#mc-file-note { grid-column:1/-1; margin:0; overflow-wrap:anywhere; }
.mc-not-used { opacity:.65; }
.mc-workspace :focus-visible,.mc-root :focus-visible { outline:2px solid var(--ui-accent,#0066cc); outline-offset:3px; }
.mc-workspace ::selection,.mc-root ::selection { background:var(--ui-selected,#e6f0fc); color:var(--ui-text,#1d1d1f); }
.mc-editor>label { display:block; font-size:15px; font-weight:600; margin-bottom:8px; }
.mc-editor textarea { display:block; box-sizing:border-box; min-height:96px; width:100%; resize:vertical; font:inherit; line-height:1.65; padding:12px; border:1px solid var(--ui-line,#dedee3); border-radius:8px; background:var(--ui-surface,#fff); color:inherit; caret-color:var(--ui-accent,#0066cc); }
.mc-editor textarea::placeholder { color:var(--ui-muted,#626269); }
.mc-settings { margin-top:12px; font-size:13px; }
#mc-video-settings { display:block; }
#mc-video-settings label { display:grid; gap:6px; min-width:0; }
#mc-video-settings select { box-sizing:border-box; width:100%; min-width:0; }
.mc-source-step { display:grid; gap:8px; }
.mc-source-step>label,.mc-step-title { font-size:15px; font-weight:600; }
.mc-source-step select { width:100%; min-width:0; }
#mc-video-source,#mc-duration,#mc-ratio { min-height:44px; }
.mc-step-title { margin:20px 0 12px; }
.mc-scene { border:0; padding:0; margin:0 0 12px; display:flex; flex-wrap:wrap; gap:8px 18px; }
.mc-scene legend { font-size:13px; margin-bottom:4px; }
#mc-video-settings .mc-scene label { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; }
.mc-scene input { width:16px; height:16px; margin:0; accent-color:var(--ui-accent); }
.mc-recommendation { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; margin-bottom:14px; background:var(--ui-accent-bg); color:var(--ui-ink); border-radius:var(--ui-control-radius); }
.mc-recommendation>div { min-width:0; }
.mc-recommendation .mc-muted { color:var(--ui-ink); margin:4px 0 0; }
.mc-recommendation button { flex-shrink:0; min-height:44px; white-space:normal; }
#mc-model { min-height:44px; }
.mc-more-settings { margin-top:12px; }
.mc-more-settings summary { cursor:pointer; min-height:44px; align-content:center; }
.mc-extra-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:8px 0; }
.mc-catalog { margin:8px 0; }
.mc-catalog summary { cursor:pointer; color:var(--ui-accent,#0066cc); }
.mc-catalog ul { padding-left:20px; color:var(--ui-muted,#626269); line-height:1.7; }
.mc-submit { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; }
.mc-submit button { min-width:120px; min-height:42px; white-space:nowrap; }
.mc-root button:disabled { cursor:not-allowed; opacity:.55; }
.mc-status { font-size:13px; line-height:1.65; overflow-wrap:anywhere; margin:12px 0 0; }
.mc-status:empty { display:none; }
.mc-history { margin-top:24px; padding-top:20px; border-top:1px solid var(--ui-line,#dedee3); }
.mc-history header,.mc-history h5 { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.mc-history h4 { margin:0; font-size:16px; }
.mc-history h5 { margin:20px 0 8px; font-size:14px; }
.mc-result { display:flex; gap:16px; align-items:center; padding:16px 0; border-top:1px solid var(--ui-line,#dedee3); font-size:13px; }
.mc-result>div { flex:1; min-width:0; overflow-wrap:anywhere; }
.mc-result p { white-space:pre-wrap; margin:8px 0; }
.mc-result small { color:var(--ui-muted,#626269); }
.mc-result img { width:96px; height:96px; object-fit:contain; }
.mc-result video { max-width:45%; width:200px; max-height:190px; }
.mc-result [data-mc-video] { display:block; margin-top:10px; }
.mc-download { white-space:nowrap; color:var(--ui-accent,#0066cc); }
.mc-resources { padding:4px 0; }
.mc-resources h3,.mc-usage h3 { margin:0 0 8px; font-size:17px; }
.mc-resource-fields { display:grid; gap:18px; margin-top:20px; }
.mc-resource-fields>label { display:grid; gap:8px; font-size:13px; min-width:0; }
.mc-resource-fields input,.mc-resource-fields select { max-width:100%; min-width:0; box-sizing:border-box; }
.mc-resource-fields .video-input-action { display:flex; flex-wrap:wrap; gap:8px; }
.mc-resource-fields .video-input-action input { flex:1 1 170px; }
.mc-resource-fields .video-upload { display:grid; gap:8px; }
.mc-resource-fields .video-upload img { max-width:100%; max-height:140px; object-fit:contain; }
.mc-resource-fields .video-reference-field { border:0; border-top:1px solid var(--ui-line,#dedee3); padding:16px 0 0; min-width:0; }
.mc-resource-fields .video-reference-field legend { font-size:14px; font-weight:600; padding-right:8px; }
.mc-resource-fields .video-reference-list { display:grid; grid-template-columns:1fr; max-height:230px; overflow:auto; margin-bottom:12px; }
.mc-resource-fields .video-reference-upload { display:grid; grid-template-columns:1fr; gap:8px; }
.mc-resource-fields .video-reference-item { min-width:0; }
.mc-usage { grid-column:1/-1; padding-top:20px; border-top:1px solid var(--ui-line,#dedee3); }
.mc-usage .video-cost-summary { margin-top:16px; }
@media(max-width:1200px) { .mc-recommendation{align-items:flex-start;flex-direction:column;} }
@media(max-width:1200px) { .mc-workspace{gap:18px;} .mc-root{padding:20px;} .mc-submit{align-items:flex-start;} .mc-output label{padding:10px 12px;} }
@media(max-width:900px) { .mc-workspace{grid-template-columns:1fr;} .mc-resources{border-top:1px solid var(--ui-line,#dedee3);padding-top:20px;} }
@media(prefers-reduced-motion:no-preference) { .mc-output label,.mc-drop{transition:background-color 150ms ease-out,border-color 150ms ease-out;} }
