.video-view { padding-bottom: 36px; }
.video-creation-stage { padding-top: clamp(40px, 5.5vw, 68px); }
.video-creation-card { overflow: visible; }
.video-panel { position: relative; }
.prompt-example { margin: -7px 2px 14px; color: var(--subtle); font-size: var(--type-micro); }
.video-composer-toolbar { position: relative; flex-direction: column; align-items: stretch; gap: 12px; }
.video-composer-toolbar .composer-tools { width: 100%; gap: 6px; }
.video-parameter-summary { max-width: min(520px, calc(100vw - 180px)); }
.video-composer-commit { width: 100%; min-width: 0; justify-content: space-between; margin-left: 0; padding-top: 11px; border-top: 1px solid var(--line); }
.video-composer-commit .commit-cost { min-width: 0; max-width: min(560px, calc(100% - 112px)); text-align: left; overflow-wrap: anywhere; }
.material-picker { position: relative; flex: none; }
.material-menu { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 12; width: min(310px, calc(100vw - 32px)); padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-float); }
.material-menu > strong { display: block; padding: 7px 9px 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.material-menu > button { width: 100%; display: grid; gap: 2px; padding: 10px 9px; border-radius: 8px; color: var(--ink-soft); background: transparent; text-align: left; }
.material-menu > button:hover, .material-menu > button.active { color: var(--deep-sea); background: var(--wash); }
.material-menu > button span { font-size: 13px; font-weight: 680; }
.material-menu > button small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.video-reference-panel { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.video-reference-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.video-reference-heading span { color: var(--ink-soft); font-size: var(--type-meta); font-weight: 700; }
.video-reference-heading small { color: var(--muted); font-size: var(--type-micro); }
.selected-video-assets { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.video-asset-chip { position: relative; width: 92px; min-width: 0; }
.video-asset-preview { position: relative; width: 92px; height: 76px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--silver-soft); }
.video-asset-preview img, .video-asset-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-asset-preview span { position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 999px; color: #fff; background: rgba(24,36,47,.76); font-size: 9px; }
.video-asset-name { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.video-asset-chip > button { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border-radius: 50%; color: #fff; background: rgba(24,36,47,.76); }
.video-asset-chip > button svg { width: 12px; height: 12px; }
.asset-flow-arrow { display: grid; width: 26px; height: 26px; place-items: center; color: var(--muted); }
.asset-flow-arrow svg { width: 18px; height: 18px; }
.video-reference-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.inline-upload { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface); cursor: pointer; font-size: var(--type-meta); font-weight: 650; }
.inline-upload:hover { border-color: var(--line-strong); color: var(--deep-sea); background: var(--wash); }
.inline-upload svg { width: 15px; height: 15px; }
.batch-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.batch-panel-heading h2 { margin: 0; font-family: "STSong", "Songti SC", serif; font-size: 20px; font-weight: 540; }
.batch-panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.video-params-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.video-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 680; }
.video-field select, .video-field input, .video-history-tools select { display: block; width: 100%; min-height: 42px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink-soft); background: var(--surface); }
.video-field select:focus, .video-field input:focus, .video-history-tools select:focus { border-color: var(--deep-sea); box-shadow: 0 0 0 3px rgba(23,63,99,.11); }
.video-switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.switch-label { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface); font-size: 11px; font-weight: 650; }
.switch-label input { accent-color: var(--deep-sea); }
.parameter-model-grid { grid-template-columns: 1fr; }
.parameter-duration-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.parameter-duration-grid button { padding-inline: 4px; }
.video-history-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.video-history-tools select { width: auto; min-width: 130px; }
#video-history-list { display: grid; gap: 30px; }
.video-recent-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
.video-recent-list > .empty-state { grid-column: 1 / -1; }
.video-history-group, .video-batch-history { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px 16px; }
.video-history-group > h3, .video-batch-history > summary { grid-column: 1 / -1; margin: 0; color: var(--deep-sea-ink); font-family: "STSong", "Songti SC", serif; font-size: 20px; font-weight: 540; }
.video-batch-history > summary { cursor: pointer; }
.video-history-card { min-width: 0; overflow: hidden; background: transparent; }
.video-card-media { position: relative; overflow: hidden; border-radius: 14px; background: #e5e6e3; }
.video-preview-button { position: relative; display: block; width: 100%; min-height: 0; padding: 0; overflow: hidden; background: #e5e6e3; }
.video-preview-button video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .24s ease; }
.video-history-card:hover .video-preview-button video { transform: scale(1.018); }
.video-play-cue { position: absolute; left: 50%; top: 50%; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255,255,255,.64); border-radius: 50%; color: #fff; background: rgba(24,36,47,.45); transform: translate(-50%, -50%); transition: background .18s ease, transform .18s ease; }
.video-play-cue svg { width: 22px; height: 22px; }
.video-history-card:hover .video-play-cue { background: rgba(24,36,47,.68); transform: translate(-50%, -50%) scale(1.04); }
.video-pending { min-height: 190px; display: grid; place-items: center; color: var(--muted); background: #e5e6e3; font-size: 12px; }
.video-history-body { padding-top: 10px; }
.video-history-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--subtle); font-size: 10px; }
.video-history-body > p { margin: 7px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.video-history-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.video-history-actions button, .video-history-actions a { min-height: 30px; padding: 5px 7px; border: 0; border-radius: 7px; color: var(--ink-soft); background: var(--wash); text-decoration: none; font-size: 10px; }
.video-select { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; }
.video-select input { accent-color: var(--deep-sea); }
.batch-upload-box { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 14px 0; border-block: 1px solid var(--line); }
.batch-actions { display: flex; gap: 8px; align-items: center; }
.batch-upload-copy p { margin: 0 0 6px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.batch-overrides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.batch-overrides .form-label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.batch-overrides select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
@media (max-width: 700px) { .batch-overrides { grid-template-columns: 1fr; } }
.batch-table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.batch-table th, .batch-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: left; }
.batch-errors { color: var(--danger); font-size: 11px; }
.video-recycle-modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 24px; }
.video-recycle-backdrop { position: absolute; inset: 0; background: rgba(24,36,47,.58); }
.video-recycle-panel { position: relative; z-index: 1; width: min(760px,100%); max-height: 82vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-float); }
.video-recycle-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.video-recycle-head h3 { margin: 0; }
.video-recycle-list { display: grid; gap: 10px; padding: 16px 19px 19px; }
.video-recycle-card { padding: 13px; border-bottom: 1px solid var(--line); background: transparent; }
.video-recycle-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.video-recycle-card p { color: var(--ink-soft); font-size: 12px; }
.video-recycle-sub { color: var(--muted); font-size: 10px; }
.video-options-panel { width: min(500px, 100%); border-radius: 14px; }
#modal-video { background: #18242f; }

@media (max-width: 900px) {
  .video-recent-list, .video-history-group, .video-batch-history { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .video-params-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .video-recent-list, .video-history-group, .video-batch-history { grid-template-columns: 1fr; }
  .video-creation-stage { overflow-x: clip; }
  .video-params-grid, .video-switch-grid { grid-template-columns: 1fr; }
  .video-history-tools { width: 100%; justify-content: flex-start; }
  .video-history-tools select { width: 100%; }
  .batch-upload-box { grid-template-columns: 1fr; }
  .video-reference-actions { align-items: flex-start; flex-wrap: wrap; }
  .video-composer-commit { align-items: center; }
  .video-composer-commit .commit-cost { max-width: calc(100% - 112px); }
  .video-parameter-summary { max-width: calc(100vw - 128px); }
  .parameter-duration-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .video-reference-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .selected-video-assets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .video-recycle-modal { align-items: end; padding: 0; }
  .video-recycle-panel { width: 100%; max-height: 88vh; border-radius: 14px 14px 0 0; }
  .media-card-actions { opacity: 1; pointer-events: auto; transform: none; }
  .video-asset-chip > button { width: 44px; height: 44px; right: 0; top: 0; }
  .inline-upload, .video-field select, .video-field input, .video-history-tools select, .switch-label, .video-history-actions button, .video-history-actions a { min-height: 44px; }
  .video-history-actions button, .video-history-actions a { padding: 10px 9px; }
}


@media (prefers-reduced-motion: reduce) {
  .video-preview-button video, .video-play-cue { transition: none; }
  .video-history-card:hover .video-preview-button video { transform: none; }
  .video-history-card:hover .video-play-cue { transform: translate(-50%, -50%); }
}
.parameter-duration-shell { display: block; }
.parameter-duration-shell .parameter-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
