/* Media surfaces stay in normal page flow; old tool rules are deliberately scoped out. */
body.workspace-next #mode5Panel { max-width: 1360px; padding: 28px 32px 64px; }
body.workspace-next #mode5Panel [hidden] { display: none !important; }
body.workspace-next #mode5Panel > .back-btn { border: 0; border-radius: 6px; background: transparent; box-shadow: none; margin: 0; padding: 8px 0; min-height: 44px; }
body.workspace-next #mode5Panel .video-agent-top { margin: 12px 0 20px; padding: 0 !important; }
body.workspace-next #mode5Panel .video-agent-top h3 { font-size: 26px; line-height: 1.3; margin: 0 0 8px; }
body.workspace-next #mode5Panel .video-agent-top p { margin: 0; color: #66716c; font-size: 14px; }
body.workspace-next #mode5Panel .media-navigation { display: flex; gap: 24px; border-bottom: 1px solid #dce3df; margin-bottom: 12px; }
body.workspace-next #mode5Panel .media-navigation button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #646e69; padding: 0 2px; font-size: 15px; font-weight: 600; box-shadow: none; }
body.workspace-next #mode5Panel .media-navigation button.is-active { color: #216853; border-bottom-color: #216853; }
body.workspace-next #mode5Panel .media-navigation i { font-size: 20px; }
body.workspace-next #mode5Panel .video-toolbox-shell { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(340px, 1.18fr); align-items: start; gap: 36px; padding: 14px 0 0; }
body.workspace-next #mode5Panel .video-toolbox-form,
body.workspace-next #mode5Panel .video-toolbox-preview { min-width: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
body.workspace-next #mode5Panel .video-toolbox-form > .agent-header,
body.workspace-next #mode5Panel .video-agent-meta,
body.workspace-next #mode5Panel .video-tool-stats { display: none; }
body.workspace-next #mode5Panel .video-tool-pane { display: none; }
body.workspace-next #mode5Panel .video-tool-pane.is-active { display: block; }
body.workspace-next #mode5Panel .media-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 24px 0 12px; }
body.workspace-next #mode5Panel .media-section-head:first-child { margin-top: 0; }
body.workspace-next #mode5Panel h4 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 650; color: #26342d; }
body.workspace-next #mode5Panel .media-section-head > span { font-size: 12px; color: #78847d; overflow-wrap: anywhere; }
body.workspace-next #mode5Panel .media-field-pair,
body.workspace-next #mode5Panel .video-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 14px 0; }
body.workspace-next #mode5Panel .video-form-grid .span-2 { grid-column: 1 / -1; }
body.workspace-next #mode5Panel label { display: grid; gap: 7px; margin: 0; min-width: 0; color: #4a554f; font-size: 13px; font-weight: 500; }
body.workspace-next #mode5Panel input:not([type=checkbox]):not([type=range]),
body.workspace-next #mode5Panel select,
body.workspace-next #mode5Panel textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; border: 1px solid #dce3df; border-radius: 6px; background: #fff; color: #26342d; padding: 10px 12px; margin: 0; font-size: 14px; line-height: 1.5; box-shadow: none; }
body.workspace-next #mode5Panel input[type=file] { padding: 8px; font-size: 12px; overflow: hidden; }
body.workspace-next #mode5Panel input::file-selector-button { border: 0; background: #edf3ef; color: #345646; padding: 8px; border-radius: 4px; margin-right: 8px; cursor: pointer; }
body.workspace-next #mode5Panel textarea { resize: vertical; min-height: 160px; }
body.workspace-next #mode5Panel input[type=range] { width: 100%; padding: 0; min-width: 0; min-height: 32px; accent-color: #216853; }
body.workspace-next #mode5Panel :is(input,select,textarea,button):focus-visible { outline: 2px solid #468a73; outline-offset: 3px; }
body.workspace-next #mode5Panel .media-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.workspace-next #mode5Panel button:not(.back-btn):not([role=tab]),
body.workspace-next #mode5Panel a.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dce3df; background: #fff; border-radius: 6px; padding: 9px 12px; min-height: 42px; font-size: 13px; line-height: 1.5; color: #36463d; box-shadow: none; white-space: normal; }
body.workspace-next #mode5Panel button.primary-btn,
body.workspace-next #mode5Panel a.primary-btn { background: #245f4c; color: #fff; border-color: #245f4c; }
body.workspace-next #mode5Panel button:disabled { opacity: .48; cursor: not-allowed; }
body.workspace-next #mode5Panel .media-text-button { border: 0 !important; padding-left: 0 !important; }
body.workspace-next #mode5Panel .media-file-meta,
body.workspace-next #mode5Panel .media-field-hint { color: #768079; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; margin: 8px 0; }
body.workspace-next #mode5Panel .media-service-status { font-size: 12px; color: #69766f; line-height: 1.6; overflow-wrap: anywhere; min-height: 20px; }
body.workspace-next #mode5Panel .media-service-status:empty { min-height: 0; }
body.workspace-next #mode5Panel .media-monitor { position: relative; aspect-ratio: 16 / 10; background: #f1f4f2; border: 1px solid #dce3df; border-radius: 6px; overflow: hidden; }
body.workspace-next #mode5Panel .media-monitor video { display: block; width: 100%; height: 100%; object-fit: contain; background: #171d1a; }
body.workspace-next #mode5Panel #mediaEmpty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #87958c; }
body.workspace-next #mode5Panel #mediaEmpty i { font-size: 40px; }
body.workspace-next #mode5Panel #mediaEmpty strong { font-size: 14px; font-weight: 500; }
body.workspace-next #mode5Panel #mediaCaption { position: absolute; bottom: 54px; left: 8%; width: 84%; text-align: center; color: #fff; background: #141a16ce; padding: 4px 8px; font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; box-sizing: border-box; pointer-events: none; }
body.workspace-next #mode5Panel .media-preview-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0 24px; font-size: 12px; color: #65726a; }
body.workspace-next #mode5Panel .media-import-label { color: #216853; font-size: 12px; position: relative; cursor: pointer; }
body.workspace-next #mode5Panel .media-import-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
body.workspace-next #mode5Panel .media-import-label:focus-within { outline: 2px solid #468a73; }
body.workspace-next #mode5Panel .media-captions-section { border-top: 1px solid #e4e9e6; }
body.workspace-next #mode5Panel #mediaCaptionText { font-size: 13px; min-height: 132px; }
body.workspace-next #mode5Panel .media-export-actions .primary-btn { flex: 1; }
body.workspace-next #mode5Panel #mediaStatus { font-size: 13px; line-height: 1.6; margin-top: 12px; color: #416553; overflow-wrap: anywhere; }
body.workspace-next #mode5Panel #mediaStatus.is-error { color: #a3473b; }
body.workspace-next #mode5Panel progress { display: block; width: 100%; height: 6px; margin-top: 16px; accent-color: #216853; }
body.workspace-next #mode5Panel #mediaExportResult { margin-top: 24px; border-top: 1px solid #dce3df; padding-top: 20px; }
body.workspace-next #mode5Panel #mediaExportResult video { width: 100%; max-height: 380px; margin: 12px 0; background: #171d1a; }
body.workspace-next #mode5Panel audio { width: 100%; max-width: 100%; margin: 14px 0; }
body.workspace-next #mode5Panel .video-tool-preview-card,
body.workspace-next #mode5Panel .video-tool-result-panel { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0; margin-bottom: 24px; }
body.workspace-next #mode5Panel .voice-link-box { display: none; }
body.workspace-next #mode5Panel .video-empty { background: #f4f7f5; border: 0; padding: 10px 12px; font-size: 12px; line-height: 1.7; border-radius: 4px; }
body.workspace-next #mode5Panel .video-tool-actions { display: flex; gap: 8px; flex-wrap: wrap; }
body.workspace-next #mode5Panel .video-tool-result-panel p { overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
body.workspace-next #mode5Panel .subtitle-source-panel { border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; }
body.workspace-next #mode5Panel .subtitle-source-panel > input { margin-top: 8px; }
body.workspace-next #mode5Panel .video-check-grid { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0; }
body.workspace-next #mode5Panel .video-check-grid label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.workspace-next #mode5Panel .video-check-grid input[type=checkbox] { width: 18px !important; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: #216853; }
@media(max-width: 1000px) {
    body.workspace-next #mode5Panel .video-toolbox-shell { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    body.workspace-next #mode5Panel .media-monitor { max-height: 400px; }
}
@media(max-width: 600px) {
    body.workspace-next #mode5Panel { padding: 20px 16px 48px; }
    body.workspace-next #mode5Panel .video-agent-top h3 { font-size: 23px !important; }
    body.workspace-next #mode5Panel .media-navigation { gap: 0; justify-content: space-between; }
    body.workspace-next #mode5Panel .media-navigation button { font-size: 14px; gap: 6px; padding: 0 8px; }
    body.workspace-next #mode5Panel input:not([type=checkbox]):not([type=range]),
    body.workspace-next #mode5Panel select,
    body.workspace-next #mode5Panel textarea { font-size: 16px; min-height: 44px; }
    body.workspace-next #mode5Panel input[type=file] { font-size: 12px !important; }
    body.workspace-next #mode5Panel button:not(.back-btn):not([role=tab]) { min-height: 44px; }
    body.workspace-next #mode5Panel .video-form-grid { grid-template-columns: minmax(0, 1fr); }
    body.workspace-next #mode5Panel .media-field-pair { gap: 12px; }
    body.workspace-next #mode5Panel .video-tool-actions > button { flex: 1 1 120px; }
    body.workspace-next #mode5Panel .media-monitor { aspect-ratio: 16 / 11; }
}
