/* TOOL67 VIDEO SCENE — shared scene workbench base */
.t67-vscene-studio{max-width:var(--t67-page-max,1440px);margin:54px auto;padding:26px;border:1px solid rgba(120,120,120,.18);border-radius:24px;background:var(--t67-vs-panel,#fff);box-shadow:0 18px 55px rgba(15,23,42,.07)}
.t67-vscene-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}.t67-vscene-head small{display:block;margin-bottom:6px;font-size:11px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;opacity:.58}.t67-vscene-head h2{margin:0;font-size:clamp(24px,3vw,38px);line-height:1.05}.t67-vscene-head p{max-width:580px;margin:8px 0 0;opacity:.68;line-height:1.55}.t67-vscene-badge{flex:0 0 auto;padding:7px 10px;border:1px solid rgba(120,120,120,.2);border-radius:999px;font-size:11px;font-weight:800;opacity:.7}
.t67-vscene-grid{display:grid;grid-template-columns:minmax(280px,.82fr) minmax(0,1.38fr);gap:16px;align-items:stretch}.t67-vscene-upload,.t67-vscene-controls{min-width:0;border:1px solid rgba(120,120,120,.17);border-radius:18px;background:rgba(255,255,255,.45)}
.t67-vscene-upload{display:flex;min-height:370px;flex-direction:column;padding:14px}.t67-vscene-upload-label{display:block;margin-bottom:8px;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;opacity:.58}.t67-vscene-drop{position:relative;display:flex;min-height:280px;flex:1;align-items:center;justify-content:center;border:1px dashed rgba(95,95,95,.38);border-radius:14px;overflow:hidden;cursor:pointer;transition:.16s}.t67-vscene-drop:hover,.t67-vscene-drop.drag{border-color:rgba(70,70,70,.72);background:rgba(127,127,127,.04)}.t67-vscene-drop input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.t67-vscene-empty{text-align:center;padding:18px}
/* Workbench empty-state must disappear after references are selected. */
.t67-vscene-empty[hidden]{display:none!important}
.t67-vscene-empty b{display:block;margin:7px 0 4px;font-size:16px}.t67-vscene-empty span{display:block;font-size:12px;opacity:.62;line-height:1.45}.t67-vscene-plus{display:grid;width:52px;height:52px;margin:auto;place-items:center;border:1px solid rgba(110,110,110,.24);border-radius:14px;font-size:28px;font-weight:300}.t67-vscene-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;padding:7px}.t67-vscene-previews:empty{display:none}.t67-vscene-ref{position:relative;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:#ececec}.t67-vscene-ref img{width:100%;height:100%;object-fit:cover}.t67-vscene-ref i{position:absolute;left:6px;top:6px;display:grid;width:22px;height:22px;place-items:center;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font-size:10px;font-style:normal}.t67-vscene-upload-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;font-size:11px;opacity:.7}.t67-vscene-clear{padding:4px 7px;border:0;background:transparent;font:inherit;font-weight:800;cursor:pointer;opacity:.75}
.t67-vscene-controls{padding:14px}.t67-vscene-prompt-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}.t67-vscene-prompt-head label{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;opacity:.62}.t67-vscene-sample{min-height:28px;padding:3px 10px;border:1px solid rgba(110,110,110,.26);border-radius:999px;background:transparent;font-size:10px;font-weight:900;cursor:pointer}.t67-vscene-prompt{display:block;width:100%;min-height:128px;padding:12px 13px;border:1px solid rgba(110,110,110,.25);border-radius:12px;background:rgba(255,255,255,.78);color:inherit;font:inherit;line-height:1.55;resize:vertical;outline:none}.t67-vscene-prompt:focus{border-color:rgba(80,80,80,.55);box-shadow:0 0 0 3px rgba(100,100,100,.07)}
.t67-vscene-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:8px}.t67-vscene-field{min-width:0}.t67-vscene-field span{display:block;margin:0 0 3px 2px;font-size:9px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;opacity:.55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-vscene-field select{width:100%;height:34px;min-height:34px;padding:0 23px 0 8px;border:1px solid rgba(110,110,110,.22);border-radius:8px;background:rgba(255,255,255,.82);color:inherit;font-size:11px;outline:none}.t67-vscene-model-info{min-height:17px;margin:7px 2px 0;font-size:10px;line-height:1.4;opacity:.55}.t67-vscene-generate{width:100%;min-height:46px;margin-top:10px;padding:10px 14px;border:0;border-radius:11px;background:#111;color:#fff;font-size:14px;font-weight:900;cursor:pointer}.t67-vscene-generate:disabled{opacity:.48;cursor:not-allowed}.t67-vscene-credit,.t67-vscene-status{margin-top:7px;text-align:center;font-size:11px;line-height:1.45;opacity:.7}.t67-vscene-credit a{color:inherit;font-weight:900}.t67-vscene-status.error{color:#bd2f45;opacity:1}.t67-vscene-status.success{color:#16804b;opacity:1}
.t67-vscene-result{margin-top:16px}.t67-vscene-result[hidden]{display:none!important}.t67-vscene-result-stage{position:relative;display:flex;min-height:250px;max-height:450px;align-items:center;justify-content:center;overflow:hidden;border-radius:16px;background:#090b0f}.t67-vscene-result-stage video{display:block;width:auto;height:auto;max-width:100%;max-height:450px;background:#000}.t67-vscene-result-stage video[hidden]{display:none!important}.t67-vscene-busy{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;background:rgba(5,7,10,.78);color:#fff}.t67-vscene-busy[hidden]{display:none!important}.t67-vscene-busy-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 24px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:rgba(18,22,28,.82);text-align:center}.t67-vscene-spinner{width:38px;height:38px;border:3px solid rgba(255,255,255,.22);border-top-color:#fff;border-radius:50%;animation:t67-vs-spin .85s linear infinite}.t67-vscene-busy-card strong{font-size:13px}.t67-vscene-busy-card span{font-size:11px;opacity:.7}.t67-vscene-download{position:absolute;z-index:4;right:12px;bottom:12px;display:grid;width:38px;height:38px;place-items:center;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(0,0,0,.68);color:#fff;text-decoration:none;font-size:20px;font-weight:900;backdrop-filter:blur(5px)}.t67-vscene-download[hidden]{display:none!important}@keyframes t67-vs-spin{to{transform:rotate(360deg)}}
html[data-theme=dark] .t67-vscene-studio,.dark .t67-vscene-studio{--t67-vs-panel:#11151c;color:#f3f4f6;background:#11151c;border-color:#2d3440}.dark .t67-vscene-upload,.dark .t67-vscene-controls{background:#0d1219;border-color:#303844}.dark .t67-vscene-prompt,.dark .t67-vscene-field select{background:#0b1017;border-color:#343d49;color:#f7f7f8}
@media(max-width:900px){.t67-vscene-studio{margin:32px 14px;padding:16px}.t67-vscene-grid{grid-template-columns:1fr}.t67-vscene-upload{min-height:260px}.t67-vscene-drop{min-height:200px}}
@media(max-width:640px){.t67-vscene-studio{margin:22px 8px;padding:10px;border-radius:16px}.t67-vscene-head{align-items:flex-start;flex-direction:column}.t67-vscene-head h2{font-size:24px}.t67-vscene-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.t67-vscene-field select{height:32px;min-height:32px;font-size:10px}.t67-vscene-prompt{min-height:112px}.t67-vscene-result-stage{min-height:220px;max-height:450px}}

<div class="t67-vscene-upload md-panel">
        <span class="t67-vscene-upload-label">Reference images</span>
        <label class="t67-vscene-drop" id="t67SceneDrop">
          <input id="t67SceneRefs" type="file" accept="image/jpeg,image/png,image/webp,image/avif" multiple>
          <div class="t67-vscene-empty" id="t67SceneEmpty"><div class="t67-vscene-plus">＋</div><b>Upload images</b></div>
          <div class="t67-vscene-previews" id="t67ScenePreviews"></div>
        </label>
        <div class="t67-vscene-upload-foot"><span id="t67SceneCount">0/3 images</span><button class="t67-vscene-clear" id="t67SceneClear" type="button" hidden>Clear</button></div>
      </div>
<div class="t67-vscene-upload md-panel">
        <span class="t67-vscene-upload-label">Reference images</span>
        <label class="t67-vscene-drop" id="t67SceneDrop">
          <input id="t67SceneRefs" type="file" accept="image/jpeg,image/png,image/webp,image/avif" multiple>
          <div class="t67-vscene-empty" id="t67SceneEmpty"><div class="t67-vscene-plus">＋</div><b>Upload images</b></div>
          <div class="t67-vscene-previews" id="t67ScenePreviews"></div>
        </label>
        <div class="t67-vscene-upload-foot"><span id="t67SceneCount">0/3 images</span><button class="t67-vscene-clear" id="t67SceneClear" type="button" hidden>Clear</button></div>
      </div>

/* Shared multimodal video reference workbench · rollout 2026-09-20 */
.t67-vref-workbench{min-height:0!important;align-self:stretch;overflow:visible}
.t67-vref-drop{min-height:300px;align-items:stretch!important;padding:0}
.t67-vref-drop>.t67-vscene-empty{margin:auto}
.t67-vref-drop>.t67-vscene-empty span{max-width:270px;margin:4px auto 0;font-size:10px;line-height:1.4;color:inherit;opacity:.62}
.t67-vref-images{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-flow:row;gap:6px!important;width:100%;padding:6px!important;align-content:start;max-height:620px;overflow:auto}
.t67-vref-images:empty{display:none!important}
.t67-vref-image{position:relative;min-width:0;aspect-ratio:1/1;overflow:hidden;border:1px solid rgba(120,120,120,.25);background:#eee;cursor:grab}
.t67-vref-image:active{cursor:grabbing}.t67-vref-image img{width:100%;height:100%;object-fit:cover;display:block}
.t67-vref-images[data-count="1"] .t67-vref-image{grid-column:span 6;aspect-ratio:4/3}
.t67-vref-images[data-count="2"] .t67-vref-image{grid-column:span 3}
.t67-vref-images[data-count="3"] .t67-vref-image{grid-column:span 2}
.t67-vref-images[data-count="4"] .t67-vref-image{grid-column:span 3}
.t67-vref-images[data-count="5"] .t67-vref-image{grid-column:span 2}
.t67-vref-images[data-count="5"] .t67-vref-image:nth-child(4),.t67-vref-images[data-count="5"] .t67-vref-image:nth-child(5){grid-column:span 3}
.t67-vref-images[data-count="6"] .t67-vref-image,.t67-vref-images[data-count="7"] .t67-vref-image,.t67-vref-images[data-count="8"] .t67-vref-image,.t67-vref-images[data-count="9"] .t67-vref-image{grid-column:span 2}
.t67-vref-role{position:absolute;left:6px;bottom:6px;max-width:calc(100% - 12px);padding:3px 6px;background:rgba(0,0,0,.72);color:#fff;font-size:9px;font-weight:800;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t67-vref-tools{position:absolute;right:6px;top:6px;display:flex;flex-direction:column;gap:4px;opacity:0;transform:translateX(5px);transition:.14s}
.t67-vref-image:hover .t67-vref-tools,.t67-vref-image:focus-within .t67-vref-tools{opacity:1;transform:none}
.t67-vref-tools button,.t67-vref-tools span{display:grid;width:26px;height:26px;place-items:center;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.68);color:#fff;padding:0;cursor:pointer}
.t67-vref-tools span{cursor:grab}.t67-vref-tools svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.t67-vref-foot{margin-top:7px!important}
.t67-vref-add-media{display:flex;width:100%;align-items:center;gap:7px;margin-top:9px;padding:7px 2px;border:0;border-top:1px solid rgba(120,120,120,.24);background:transparent;color:inherit;font:inherit;font-size:11px;font-weight:800;text-align:left;cursor:pointer}
.t67-vref-add-media[hidden]{display:none!important}.t67-vref-add-media svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.t67-vref-add-media b{margin-left:auto;font-size:15px;font-weight:500;transition:.15s}.t67-vref-add-media.is-open b{transform:rotate(45deg)}
.t67-vref-extras{display:grid;gap:10px;padding-top:9px}.t67-vref-extras[hidden]{display:none!important}
.t67-vref-extra-group{display:grid;gap:6px;padding:9px;border:1px solid rgba(120,120,120,.24);background:rgba(127,127,127,.035)}
.t67-vref-extra-group[hidden]{display:none!important}
.t67-vref-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.t67-vref-head>span{font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.t67-vref-head small{font-size:9px;opacity:.62}
.t67-vref-add{position:relative;display:flex;min-height:34px;align-items:center;justify-content:center;gap:6px;border:1px dashed rgba(120,120,120,.48);background:rgba(255,255,255,.55);font-size:10px;font-weight:800;cursor:pointer}.t67-vref-add input{position:absolute;width:1px;height:1px;opacity:0}.t67-vref-add svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.t67-vref-videos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.t67-vref-video{position:relative;min-width:0;background:#111;color:#fff}.t67-vref-video video{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#000}.t67-vref-video>span{display:block;padding:4px 20px 4px 5px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-vref-video button{position:absolute;right:3px;top:3px;width:20px;height:20px;border:0;background:rgba(0,0,0,.7);color:#fff;cursor:pointer}
.t67-vref-audios{display:grid;gap:4px}.t67-vref-audio{display:grid;grid-template-columns:18px minmax(0,1fr) auto 20px;gap:5px;align-items:center;min-height:30px;padding:4px 5px;border:1px solid rgba(120,120,120,.24);background:rgba(255,255,255,.6)}.t67-vref-audio>span svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6}.t67-vref-audio b{min-width:0;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-vref-audio small{font-size:8px;opacity:.62}.t67-vref-audio button{border:0;background:transparent;font-size:15px;color:inherit;cursor:pointer;opacity:.65}
.t67-vref-total{text-align:right;font-size:9px;opacity:.62}
.t67-vref-modal[hidden]{display:none!important}.t67-vref-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px}.t67-vref-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72)}.t67-vref-modal-card{position:relative;z-index:1;width:min(900px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;background:#111;color:#fff;border:1px solid #444;padding:14px}.t67-vref-modal-close{position:absolute;z-index:3;right:8px;top:8px;width:30px;height:30px;border:1px solid #555;background:#111;color:#fff;font-size:20px;cursor:pointer}.t67-vref-modal-media{display:grid;place-items:center;min-height:300px;max-height:70vh;background:#050505;overflow:hidden}.t67-vref-modal-media img{display:block;max-width:100%;max-height:68vh;object-fit:contain}.t67-vref-modal-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding-top:10px}.t67-vref-modal-controls>span{margin-right:4px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.t67-vref-modal-controls button{min-height:30px;padding:4px 9px;border:1px solid #555;background:#1c1c1c;color:#fff;font-size:10px;cursor:pointer}.t67-vref-modal-controls button.active{background:#fff;color:#111}.t67-vref-modal-controls .t67-vref-apply{margin-left:auto;background:#fff;color:#111;font-weight:900}
.t67-vref-upload-state{position:absolute;left:6px;top:6px;z-index:3;max-width:calc(100% - 48px);padding:3px 6px;background:rgba(0,0,0,.72);color:#fff;font-size:8.5px;font-weight:750;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t67-vref-upload-state.is-error{background:rgba(165,25,25,.88)}
.t67-vref-media-state{position:absolute;left:5px;top:5px;padding:3px 5px;background:rgba(0,0,0,.72);color:#fff;font-size:8px;line-height:1.1}.t67-vref-media-state.is-error{background:rgba(165,25,25,.88)}
.t67-vref-image.is-unsupported,.t67-vref-video.is-unsupported,.t67-vref-audio.is-unsupported{outline:1px dashed #b25b51;outline-offset:-1px;opacity:.72}
.t67-vref-unsupported{position:absolute;left:6px;top:6px;z-index:4;padding:3px 6px;background:#7d2f28;color:#fff;font-size:8px;font-weight:800;line-height:1.15}
#t67SceneReferenceTotal.is-error{color:#9d3028;font-weight:750}
.t67-video-reference-workbench.is-disabled,.t67-vref-workbench.is-disabled{opacity:.86}
.t67-video-reference-workbench.is-disabled .t67-vref-image,.t67-video-reference-workbench.is-disabled .t67-vref-video,.t67-video-reference-workbench.is-disabled .t67-vref-audio,.t67-vref-workbench.is-disabled .t67-vref-image,.t67-vref-workbench.is-disabled .t67-vref-video,.t67-vref-workbench.is-disabled .t67-vref-audio{cursor:default}
html[data-theme=dark] .t67-vref-extra-group,.dark .t67-vref-extra-group{background:#151515;border-color:#333}html[data-theme=dark] .t67-vref-add,.dark .t67-vref-add,html[data-theme=dark] .t67-vref-audio,.dark .t67-vref-audio{background:#111;border-color:#444;color:#eee}
@media(max-width:600px){.t67-vref-images{grid-template-columns:repeat(6,minmax(0,1fr))!important;max-height:520px}.t67-vref-videos{grid-template-columns:repeat(3,minmax(0,1fr))}.t67-vref-role{font-size:8px}.t67-vref-tools{opacity:1;transform:none}.t67-vref-tools button,.t67-vref-tools span{width:23px;height:23px}}

/* Compact video generation controls · merged from /video/video-controls-compact.css (2026-09-23).
   Keep options on one row, size selects to content, and keep Audio at far right. */
html body .t67-video-basic-settings .t67-vscene-row,
html body .t67-vscene-studio .t67-vscene-row,
html body .pav-controls-row,
html body .pfx-controls-row,
html body .ptv-control-row {
  display:flex !important;
  grid-template-columns:none !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  gap:10px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  width:100% !important;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}

html body .t67-video-basic-settings .t67-vscene-row > label,
html body .t67-vscene-studio .t67-vscene-row > label,
html body .pav-controls-row > label,
html body .pfx-controls-row > label,
html body .ptv-control-row > label,
html body .t67-video-basic-settings .t67-vscene-row #t67SceneSpecific > label,
html body .t67-vscene-studio .t67-vscene-row #t67SceneSpecific > label {
  display:block !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  width:auto !important;
  margin:0 !important;
}

.t67-video-basic-settings .t67-vscene-field,
.t67-vscene-studio .t67-vscene-field {
  flex-direction:row !important;
  gap:0 !important;
}

html body .t67-video-basic-settings .t67-vscene-row > label > span,
html body .t67-vscene-studio .t67-vscene-row > label > span,
html body .pav-controls-row > label > span,
html body .pfx-controls-row > label > span,
html body .ptv-control-row > label > span,
html body .t67-video-basic-settings .t67-vscene-row #t67SceneSpecific > label > span,
html body .t67-vscene-studio .t67-vscene-row #t67SceneSpecific > label > span {
  display:none !important;
}

html body .t67-video-basic-settings .t67-vscene-row select,
html body .t67-vscene-studio .t67-vscene-row select,
html body .pav-controls-row select,
html body .pfx-controls-row select,
html body .ptv-control-row select {
  field-sizing:content;
  box-sizing:border-box !important;
  flex:0 0 auto !important;
  width:auto;
  min-width:74px !important;
  max-width:240px !important;
  white-space:nowrap;
}

html body .t67-video-basic-settings .t67-vscene-row #t67SceneSpecific:not([hidden]),
html body .t67-vscene-studio .t67-vscene-row #t67SceneSpecific:not([hidden]),
html body .pav-controls-row #t67SceneSpecific:not([hidden]),
html body .pfx-controls-row #t67SceneSpecific:not([hidden]),
html body .ptv-control-row #t67SceneSpecific:not([hidden]) {
  display:flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  gap:10px !important;
}

/* Audio is the final item and consumes remaining horizontal space before itself. */
html body .t67-video-basic-settings .t67-vscene-row > #t67SceneAudioWrap,
html body .t67-vscene-studio .t67-vscene-row > #t67SceneAudioWrap,
html body .t67-vscene-row > .t67-audio-inline-right,
html body .pav-controls-row > #t67SceneAudioWrap,
html body .pfx-controls-row > #t67SceneAudioWrap,
html body .ptv-control-row > #t67SceneAudioWrap,
html body .pv-control-row > #t67SceneAudioWrap,
html body .vfx-control-row > #t67SceneAudioWrap,
html body .md-control-row > #t67SceneAudioWrap {
  display:inline-flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  width:auto !important;
  margin:0 2px 0 auto !important;
  padding:0 2px 0 14px !important;
  min-height:36px !important;
  white-space:nowrap !important;
  position:sticky !important;
  right:0 !important;
  z-index:4 !important;
  background:var(--page-bg,#f5f7fa) !important;
}
html body .t67-video-basic-settings .t67-vscene-row > #t67SceneAudioWrap > span,
html body .t67-vscene-studio .t67-vscene-row > #t67SceneAudioWrap > span,
html body .t67-vscene-row > .t67-audio-inline-right > span {
  display:inline !important;
}

@media (max-width:640px){
  html body .t67-video-basic-settings .t67-vscene-row,
  html body .t67-vscene-studio .t67-vscene-row,
  html body .pav-controls-row,
  html body .pfx-controls-row,
  html body .ptv-control-row {
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
  }
}
