.remix-video-page{
  --rv-bg:#fff;--rv-text:#111827;--rv-muted:#64748b;--rv-line:#d9e0e8;
  --rv-panel:#f8fafc;--rv-panel-2:#f3f6fa;--rv-blue:#2563eb;
  background:var(--rv-bg);color:var(--rv-text)
}
.remix-video-page *{box-sizing:border-box}
.remix-video-page button,.remix-video-page select,.remix-video-page textarea,.remix-video-page input{font:inherit}
.rv-hero{padding:26px 18px 8px;text-align:center}
.rv-hero-inner,.rv-main{max-width:1280px;margin:0 auto}
.rv-hero h1{margin:0;font-size:34px;letter-spacing:-.025em}
.rv-hero p{max-width:800px;margin:8px auto 0;color:var(--rv-muted);font-size:14px;line-height:1.6}
.rv-main{padding:12px 18px 54px}
.rv-workspace{min-width:0}
.rv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.rv-reference-column,.rv-side{min-width:0}
.rv-reference-column,.rv-side{display:flex;flex-direction:column;gap:12px}

/* Primary reference video */
.rv-video-stage{position:relative;height:min(500px,62vh);min-height:340px;max-height:500px;border:1px solid var(--rv-line);border-radius:0;background:#e8ebef;overflow:hidden;display:flex;align-items:center;justify-content:center;cursor:pointer}
.rv-reference-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:28px;text-align:center;color:#526174}
.rv-reference-empty strong{font-size:14px}
.rv-reference-empty>span:last-child{max-width:300px;color:var(--rv-muted);font-size:12px;line-height:1.5}
.rv-video-icon,.rv-image-icon{display:grid;place-items:center;color:#64748b}
.rv-video-icon svg{width:44px;height:44px}.rv-image-icon svg{width:34px;height:34px}
.rv-video-icon svg,.rv-image-icon svg{fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.rv-reference-badge{position:absolute;top:10px;left:10px;z-index:15;display:none;padding:4px 7px;background:rgba(15,23,42,.9);color:#fff;font-size:10px;font-weight:800;line-height:1;pointer-events:none}
.rv-video-stage.has-video .rv-reference-badge{display:block}
.rv-video-list{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;display:block!important;overflow:hidden!important}
.rv-video-list:empty{display:none!important}
.rv-video-list>.t67-vref-video{position:absolute!important;inset:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;display:block!important;overflow:hidden!important}
.rv-video-list>.t67-vref-video:nth-child(n+2){display:none!important}
.rv-video-list .t67-vref-video video{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;background:#0b0f14!important}
.rv-video-list .t67-vref-video>span,.rv-video-list .t67-vref-media-state{display:none!important}
.rv-video-list .t67-vref-video>button{position:absolute!important;top:10px!important;right:10px!important;z-index:20!important;width:30px!important;height:30px!important;border:0!important;border-radius:0!important;background:rgba(15,23,42,.88)!important;color:#fff!important;font-size:18px!important;display:grid!important;place-items:center!important;cursor:pointer!important}
#t67SceneVideoGroup[hidden]{display:flex!important}

/* Reference media toggle */
.rv-reference-toggle-row{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:30px}
.rv-reference-toggle{padding:0;border:0;background:transparent;color:#334155;font-size:12px;font-weight:800;cursor:pointer;text-align:left}
.rv-reference-toggle:hover{text-decoration:underline}
.rv-audio-row{display:flex;align-items:center;justify-content:flex-start;margin-top:-7px;min-height:24px}.rv-audio-toggle{display:inline-flex;align-items:center;gap:6px;color:#334155;font-size:12px;font-weight:800;cursor:pointer}
.rv-audio-toggle input{width:14px;height:14px;margin:0;accent-color:var(--rv-blue)}
.rv-audio-toggle[hidden]{display:none!important}

/* Extra reference blocks */
.rv-extra-media{display:grid;gap:10px}
.rv-extra-media[hidden]{display:none!important}
.rv-extra-block{width:100%;padding:10px;border:1px solid var(--rv-line);border-radius:0;background:var(--rv-panel)}
.rv-extra-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.rv-extra-head strong{font-size:12px}.rv-extra-head span{color:var(--rv-muted);font-size:10px}
.rv-extra-add{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;border:1px dashed #b9c4d0;background:#fff;color:#475569;font-size:11px;font-weight:800;cursor:pointer}
.rv-extra-add input{position:absolute;inset:0;opacity:0;cursor:pointer}
.rv-extra-add-icon{font-size:20px;font-weight:400;line-height:1}
.rv-extra-video-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:8px}
.rv-extra-video-item{position:relative;min-width:0;height:110px;overflow:hidden;background:#111827}
.rv-extra-video-item video{display:block;width:100%;height:100%;object-fit:contain;background:#0b0f14}
.rv-extra-video-item button{position:absolute;right:5px;top:5px;z-index:4;width:24px;height:24px;border:0;border-radius:0;background:rgba(15,23,42,.86);color:#fff;display:grid;place-items:center;cursor:pointer;font-size:16px}
.rv-extra-video-add.is-full{display:none}
.rv-audio-list{display:grid;gap:6px;margin-top:8px}
.rv-audio-list .t67-vref-audio{display:grid;grid-template-columns:22px minmax(0,1fr) auto 26px;align-items:center;gap:7px;min-height:38px;padding:5px 7px;border:1px solid var(--rv-line);background:#fff}
.rv-audio-list .t67-vref-audio>span svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
.rv-audio-list .t67-vref-audio b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.rv-audio-list .t67-vref-audio small{font-size:10px;color:var(--rv-muted)}
.rv-audio-list .t67-vref-audio button{width:24px;height:24px;border:0;border-radius:0;background:#eef2f6;color:#334155;cursor:pointer}
.rv-extra-count{margin-top:5px;color:var(--rv-muted);font-size:10px}

/* Main images: compact when empty, taller after selection. */
.rv-main-image-stage.t67-i2v-image-panel.t67-vscene-drop{height:120px!important;min-height:120px!important;max-height:120px!important;padding:6px!important;transition:height .15s ease,min-height .15s ease,max-height .15s ease}
.rv-main-image-stage.t67-i2v-image-panel.t67-vscene-drop.has-main-images{height:300px!important;min-height:300px!important;max-height:300px!important}
.rv-main-image-stage .rv-main-empty{inset:6px!important}
.rv-main-image-stage .rv-main-image-list{height:100%!important}


.rv-prompt{width:100%;min-height:190px;max-height:380px;padding:14px;border:1px solid var(--rv-line);border-radius:0;outline:none;resize:vertical;line-height:1.6;background:#fff;color:var(--rv-text)}
.rv-prompt:focus{border-color:#94a3b8;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.rv-settings{display:grid;grid-template-columns:minmax(160px,1.4fr) repeat(4,minmax(90px,1fr));gap:8px}
.rv-settings select{width:100%;height:42px;min-width:0;padding:0 9px;border:1px solid var(--rv-line);border-radius:0;background:#fff;color:var(--rv-text);font-size:12px}
.rv-model-info,.rv-hidden-meta{display:none!important}
.rv-start{width:100%;height:48px;border:0;border-radius:0;background:var(--rv-blue);color:#fff;font-weight:850;cursor:pointer}
.rv-start:disabled{opacity:.52;cursor:not-allowed}
.rv-credit{color:var(--rv-muted);font-size:12px;min-height:18px}
.rv-status{min-height:20px;color:var(--rv-muted);font-size:12px;line-height:1.5}.rv-status.error{color:#b42318}.rv-status.success{color:#087443}

/* Processing: no black player until the real result exists. */
.rv-result{margin-top:18px;padding:14px;border:1px solid var(--rv-line);border-radius:0;background:#f6f8fb;max-height:650px;overflow:hidden}
.rv-result[hidden]{display:none}
.rv-result-stage{position:relative;min-height:300px;max-height:620px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:transparent}
.rv-result-stage>video{display:block;width:auto;height:auto;max-width:100%;max-height:620px;background:#000}
.rv-result-stage>video[hidden]{display:none!important}
.rv-busy{position:relative!important;inset:auto!important;width:100%!important;min-height:300px!important;display:grid!important;place-items:center!important;background:transparent!important}
.rv-busy[hidden]{display:none!important}
.rv-busy-card{display:flex;flex-direction:column;align-items:center;gap:9px;color:#334155;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.rv-busy-card #t67SceneBusyTime{display:none!important}
.rv-spinner{width:34px;height:34px;border:3px solid #cbd5e1;border-top-color:#475569;border-radius:50%;animation:rvSpin .75s linear infinite}@keyframes rvSpin{to{transform:rotate(360deg)}}
.rv-download{position:absolute;right:12px;top:12px;width:36px;height:36px;background:rgba(255,255,255,.94);color:#111827;display:grid;place-items:center;text-decoration:none;border-radius:999px;box-shadow:0 7px 20px rgba(0,0,0,.15)}

/* Dark mode */
html[data-theme="dark"] .remix-video-page,.remix-video-page.dark{--rv-bg:#0b1220;--rv-text:#e5e7eb;--rv-muted:#94a3b8;--rv-line:#334155;--rv-panel:#111827;--rv-panel-2:#151d29;background:#0b1220;color:#e5e7eb}
html[data-theme="dark"] .remix-video-page .rv-hero,html[data-theme="dark"] .remix-video-page .rv-main{background:#0b1220;color:#e5e7eb}
html[data-theme="dark"] .remix-video-page .rv-video-stage,html[data-theme="dark"] .remix-video-page .rv-main-image-stage,html[data-theme="dark"] .remix-video-page .rv-extra-block{background:#111827;border-color:#334155}
html[data-theme="dark"] .remix-video-page .rv-reference-empty,html[data-theme="dark"] .remix-video-page .rv-main-empty{color:#cbd5e1}
html[data-theme="dark"] .remix-video-page .rv-reference-toggle,html[data-theme="dark"] .remix-video-page .rv-audio-toggle{color:#cbd5e1}
html[data-theme="dark"] .remix-video-page .rv-extra-add,html[data-theme="dark"] .remix-video-page .rv-audio-list .t67-vref-audio,html[data-theme="dark"] .remix-video-page .rv-prompt,html[data-theme="dark"] .remix-video-page .rv-settings select{background:#0f172a;color:#e5e7eb;border-color:#334155}
html[data-theme="dark"] .remix-video-page .rv-prompt::placeholder{color:#718096}
html[data-theme="dark"] .remix-video-page .rv-result{background:#111827;border-color:#334155}
html[data-theme="dark"] .remix-video-page .rv-busy-card{color:#cbd5e1}
html[data-theme="dark"] .remix-video-page .rv-spinner{border-color:#475569;border-top-color:#e5e7eb}

@media(max-width:980px){.rv-grid{grid-template-columns:1fr}.rv-video-stage{height:min(440px,56vh);max-height:440px}.rv-settings{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.rv-main{padding-left:13px;padding-right:13px}.rv-hero h1{font-size:30px}.rv-video-stage{height:min(340px,48vh);min-height:250px}.rv-main-image-stage.t67-i2v-image-panel.t67-vscene-drop{height:110px!important;min-height:110px!important;max-height:110px!important}.rv-main-image-stage.t67-i2v-image-panel.t67-vscene-drop.has-main-images{height:260px!important;min-height:260px!important;max-height:260px!important}.rv-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.rv-settings select:first-child{grid-column:1/-1}.rv-result{max-height:none;overflow:visible}.rv-result-stage{min-height:240px;max-height:none}.rv-result-stage>video{max-height:70vh}.rv-extra-video-item{height:96px}}


/* 20260926d — Remix Video page-specific reference image polish. */
.remix-video-page .rv-reference-column .rv-audio-row{
  display:flex!important;
  width:100%!important;
  align-items:center!important;
  justify-content:flex-start!important;
  margin:-7px 0 0!important;
}
.remix-video-page #t67SceneAudioWrap{
  position:static!important;
  display:inline-flex;
  margin:0!important;
  width:auto!important;
  justify-self:start!important;
}
.remix-video-page #t67SceneAudioWrap.t67-audio-inline-right{margin:0!important}

/* Match /video/image-to-video.html preview/tool behavior. */
.remix-video-page .rv-main-image-stage #t67ScenePreviews>.t67-vref-image>.t67-vref-tools{
  position:absolute!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  opacity:0!important;
  pointer-events:none!important;
  transform:translateX(3px)!important;
  z-index:30!important;
}
.remix-video-page .rv-main-image-stage #t67ScenePreviews>.t67-vref-image:hover>.t67-vref-tools,
.remix-video-page .rv-main-image-stage #t67ScenePreviews>.t67-vref-image:focus-within>.t67-vref-tools{
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
}
.remix-video-page .rv-main-image-stage .t67-vref-tools button{
  display:grid!important;
  place-items:center!important;
  width:27px!important;
  height:27px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:0!important;
  background:rgba(15,23,42,.84)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.remix-video-page .rv-main-image-stage .t67-vref-tools svg{
  display:block!important;
  width:14px!important;
  height:14px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.7!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  opacity:1!important;
  visibility:visible!important;
}
.remix-video-page .rv-main-image-stage .t67-vref-role{
  position:absolute!important;
  left:6px!important;
  right:auto!important;
  bottom:6px!important;
  top:auto!important;
  z-index:22!important;
  display:inline-flex!important;
  width:auto!important;
  max-width:calc(100% - 12px)!important;
  padding:3px 6px!important;
  margin:0!important;
  background:rgba(15,23,42,.76)!important;
  color:#fff!important;
  border:0!important;
  border-radius:0!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  pointer-events:none!important;
}
