/* Compact workbench typography; homepage is intentionally unchanged. */
.studio-page { font-size: 14px; line-height: 1.55; height: auto; min-height: 100vh; overflow: auto; }
.studio-page .studio-shell { height: auto; min-height: 100vh; grid-template-columns: 200px minmax(0,1fr); }
.studio-page .studio-main { overflow: visible; padding: 26px 24px 48px; }
.studio-sidebar { position: sticky; top: 70px; max-height: calc(100vh - 70px); align-self: start; min-height: calc(100vh - 70px); }
.studio-page .studio-sidebar nav a { font-size: 14px; min-height: 44px; padding-inline: 10px; gap: 6px; grid-template-columns: 22px minmax(0,1fr); }
.studio-sidebar nav em { display: none; }
.studio-sidebar nav i { font-size: 18px; }
.studio-page .studio-header { grid-template-columns: auto minmax(0,1fr) auto; gap: 20px; }
.studio-header-center { font-size: 13px; flex-wrap: wrap; gap: 4px 16px; }
.studio-page .brand strong { font-size: 14px; }
.studio-page .brand small { font-size: 12px; letter-spacing: .05em; }
.studio-page .prototype-banner { font-size: 13px; line-height: 1.65; flex-wrap: wrap; gap: 4px 12px; color: #515963; }
.studio-page .studio-titlebar { flex-wrap: wrap; gap: 16px; }
.studio-page .studio-titlebar h1 { font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }
.studio-page .studio-titlebar > div:first-child > p:last-child { font-size: 14px; line-height: 1.6; color: #5e6670; }
.studio-page .breadcrumb { font-size: 13px; color: #656c76; }
.studio-page :is(.plain-action, .task-button, .balance-button, .voice-select, .generate-button, .director-submit, .select-like) { min-height: 44px; }
.studio-page :is(.sidebar-help p, .back-site, .balance-button span, .current-skill-card small, .current-skill-card span, .section-mini-heading p, .method-card small, .method-card em, .composer-heading p, .material-upload-grid small, .cost-hint, .director-panel-top > span, .director-empty > p, .director-flow span, .storyboard-timeline p, .task-panel-heading button, .queue-list small, .supplier-note p) { color: #626a75; }
.studio-page :is(.ls-panel-heading p, .upload-area p, .upload-area small, .ls-tips ul, .material-note span, .voice-select small, .advanced-row, .estimate-box small, .consent, .submit-note, .ls-preview-caption, .ls-preview-footer, .ls-preview-note, .canvas-empty p, .ls-file-info, .recent-heading span, .task-list p) { color: #626a75; font-size: 13px; line-height: 1.65; }
.studio-page :is(input, textarea)::placeholder { color: #6c727b; opacity: 1; }
.studio-page :is(.ls-panel-heading h2, .section-mini-heading h2, .scene-toggle h2, .composer-heading h2, .task-panel-heading h2, .recent-heading h2) { font-size: 16px; line-height: 1.4; }
.studio-page :is(.truth-field, .composer-options label, .setting-block > label, .label-row label) { font-size: 14px; color: #414952; }
.studio-page :is(.truth-field input, .truth-field textarea, .settings-panel textarea) { font-size: 14px; line-height: 1.65; padding: 10px 12px; }
.studio-page :is(.generate-button, .director-submit, .upload-area button, .segmented button, .duration-switch button, .select-like) { font-size: 14px; min-height: 44px; }
.studio-page .truth-field textarea { min-height: 120px; }
.studio-page .settings-panel textarea { min-height: 190px; }
.studio-page :is(.voice-select b, .upload-area h3, .canvas-empty strong, .current-skill-card strong, .method-card strong, .material-upload-grid strong, .director-flow strong, .queue-list b, .supplier-note strong, .task-list h3) { font-size: 14px; line-height: 1.5; }
.studio-page .voice-select b small { display: block; }
.studio-page .voice-select { grid-template-columns: 34px minmax(0,1fr) auto; }
.studio-page .voice-select em { display: none; }
.studio-page .label-row { gap: 8px; flex-wrap: wrap; }
.studio-page .ls-panel-heading { align-items: start; }
.studio-page .ls-step { margin-top: 1px; }
.studio-page .advanced-row { flex-wrap: wrap; gap: 6px; }
.studio-page .estimate-box div { gap: 8px; flex-wrap: wrap; font-size: 13px; }
.studio-page .consent { align-items: start; }
.studio-page .consent input { width: 17px; height: 17px; margin: 4px 0 0; flex: 0 0 17px; }
.studio-page .ls-submit-area { align-self: end; }
.studio-page .ls-audio-tabs { margin-top: 22px; }
.studio-page .creation-panel { padding: 18px; }
.studio-page .settings-panel { grid-template-rows: 42px 40px minmax(260px, auto) auto; gap: 10px; }
.studio-page .ls-preview-caption, .studio-page .ls-preview-footer { flex-wrap: wrap; gap: 8px; }
.studio-page .recent-heading { flex-wrap: wrap; gap: 12px; }
.studio-page .recent-heading > div { flex-wrap: wrap; }
.studio-page .task-list article { grid-template-columns: 48px minmax(0,1fr) auto auto auto; }
.studio-page .task-list h3 { overflow-wrap: anywhere; }
.video-workspace-grid { grid-template-columns: minmax(380px,1fr) minmax(420px,1.1fr); gap: 20px; }
.video-task-panel { grid-column: 1 / -1; min-height: auto; }
.queue-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.queue-list > button { grid-template-columns: 40px minmax(0,1fr); padding: 12px; }
.queue-list em { grid-column: 2; }
.scene-picker-card, .material-composer, .video-task-panel { padding: 18px; }
.scene-toggle { min-height: 48px; }
.scene-toggle p, .scene-toggle-label { font-size: 13px; }
.scene-tabs { flex-wrap: wrap; gap: 4px 10px; overflow: visible; }
.scene-tabs button { font-size: 14px; padding: 10px 4px; min-width: 0; }
.method-grid { gap: 10px; }
.method-card { padding: 14px 12px; grid-template-columns: 30px minmax(0,1fr); gap: 8px; }
.method-card > div { min-width: 0; }
.method-card em { grid-column: 2; }
.method-card small { font-size: 13px; line-height: 1.6; }
.current-skill-card { padding: 16px; gap: 14px; }
.current-skill-card > div:nth-child(2) { min-width: 0; }
.composer-heading { gap: 10px; align-items: start; flex-wrap: wrap; }
.composer-heading > div:first-child { align-items: start; }
.composer-heading > div:first-child > span { flex: 0 0 30px; }
.material-upload-grid { gap: 10px; }
.material-upload-grid button { min-height: 130px; padding: 14px 8px; gap: 8px; }
.material-upload-grid small { font-size: 13px; line-height: 1.6; }
.truth-field { margin-top: 18px; gap: 8px; }
.composer-options { margin-top: 18px; gap: 14px; }
.director-submit { margin-top: 22px; padding: 12px; }
.cost-hint { font-size: 13px; line-height: 1.6; }
.director-panel-top { padding: 12px 18px; flex-wrap: wrap; gap: 10px; }
.director-panel-top button { font-size: 14px; min-height: 44px; }
.director-empty { padding: 40px 24px 30px; }
.director-empty h2 { font-size: 18px; }
.director-empty > p { font-size: 14px; }
.director-flow article { padding: 14px; gap: 12px; align-items: start; }
.director-flow span { font-size: 13px; line-height: 1.65; }
.storyboard-heading { flex-wrap: wrap; gap: 12px; }
.storyboard-heading h3 { font-size: 16px; }
.storyboard-timeline article { grid-template-columns: 64px minmax(0,1fr); padding: 14px; }
.storyboard-timeline p { grid-column: 2; font-size: 14px; line-height: 1.6; }
.storyboard-timeline span, .storyboard-timeline b { font-size: 14px; }
.task-panel-heading { flex-wrap: wrap; gap: 10px; }
.supplier-note { line-height: 1.6; }
.studio-page .demo-toast { font-size: 14px; padding: 14px 18px; }
/* Separate hierarchy from weight: typed content must not inherit bold labels. */
.studio-page :is(.truth-field, .composer-options label, .setting-block > label, .label-row label) { font-weight: 500; }
.studio-page :is(input, textarea) { font-weight: 400; }
.studio-page :is(h2, h3, strong, b) { font-weight: 600; }
.studio-page :is(.sidebar-help p, .back-site, .balance-button span, .current-skill-card small, .current-skill-card span, .section-mini-heading p, .method-card small, .method-card em, .composer-heading p, .material-upload-grid small, .cost-hint, .director-panel-top > span, .director-flow span, .task-panel-heading button, .queue-list small, .queue-list em, .supplier-note p, .label-row > span, .task-state, .storyboard-heading small, .scene-toggle p, .scene-toggle-label, .generate-button span:not([data-ui-icon])) { font-size: 13px; }
.studio-page :is(.plain-action, .task-button, .balance-button, .voice-select, .section-mini-heading button, .recent-heading button, .storyboard-heading button, .task-list article > button) { font-size: 13px; }
.studio-page :is(.estimate-box b, .material-note strong, .ls-tips h3, .ls-file-info strong, .ls-file-info button) { font-size: 13px; }
.studio-page :is(.composer-heading > b, .current-skill-card > em, .task-panel-heading > div > span) { font-size: 13px; font-weight: 500; }
.studio-page .studio-sidebar nav .ui-icon { width: 19px; height: 19px; }
.studio-page :is(.director-panel-top button.is-active, .scene-tabs button, .storyboard-timeline span) { font-weight: 600; }
@media (min-width: 1550px) {
  .video-workspace-grid { grid-template-columns: minmax(420px,1fr) minmax(430px,1.1fr); }
  .video-task-panel { grid-column: 1 / -1; }
  .queue-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (min-width: 761px) and (max-width: 1199px) {
  .studio-page .studio-shell { grid-template-columns: 178px minmax(0,1fr); }
  .studio-page .studio-main { padding: 22px 18px 40px; }
  .studio-page .creation-panel { padding: 18px; }
  .studio-page .studio-sidebar nav a { font-size: 14px; padding-inline: 8px; }
  .studio-header-center { display: none; }
  .studio-page .studio-header { grid-template-columns: 1fr auto; }
  .video-workspace-grid { grid-template-columns: minmax(0,1fr); }
  .video-task-panel { grid-column: auto; }
  .queue-list { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  /* Keep mobile inputs readable without browser auto-zoom. */
  .studio-page :is(.truth-field input, .truth-field textarea, .settings-panel textarea) { font-size: 16px; }
  .studio-page .studio-shell { grid-template-columns: minmax(0,1fr); }
  .studio-page .studio-main { padding: 22px 14px 36px; }
  .studio-page .studio-titlebar h1 { font-size: 18px; }
  .studio-page .studio-sidebar { position: static; min-height: auto; max-height: none; }
  .studio-page .studio-sidebar nav a { width: auto; }
  .studio-page .studio-account .task-button { display: none; }
  .studio-page .studio-header { grid-template-columns: 1fr auto; padding: 12px 14px; }
  .studio-page .creation-panel { padding: 20px; }
  .studio-page .settings-panel { display: flex; }
  .video-workspace-grid { grid-template-columns: minmax(0,1fr); }
  .video-task-panel { grid-column: auto; }
  .queue-list, .method-grid { grid-template-columns: minmax(0,1fr); }
  .studio-page .task-list article { grid-template-columns: 42px minmax(0,1fr); }
  .studio-page .task-list .task-state { grid-column: 2; justify-self: start; }
  .material-upload-grid { grid-template-columns: minmax(0,1fr); }
  .material-upload-grid button { min-height: 90px; }
  .director-empty { padding: 30px 18px; }
  .scene-picker-card, .material-composer, .video-task-panel { padding: 18px; }
}

/* Refined structure: material-first layouts, distinct states, no global text shrink. */
.studio-page .studio-main { padding: 16px 24px 32px; }
.studio-page .studio-header { display: flex; justify-content: space-between; }
.studio-page .brand small { color: #65707c; }
.studio-page .prototype-banner { margin-bottom: 12px; padding: 8px 12px; line-height: 1.5; }
.studio-page .studio-titlebar { align-items: center; gap: 10px; }
.studio-page .studio-titlebar > div:first-child > p:last-child { margin-top: 4px; }
.studio-page .title-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-page .title-actions .plain-action { min-height: 36px; padding-inline: 12px; }
.studio-page .creation-grid, .studio-page .video-workspace-grid { margin-top: 16px; }
.studio-page .creation-panel { padding: 16px; min-height: 0; }
.studio-page .ls-panel-heading { min-height: 42px; }
.studio-page .ls-panel-heading p { margin-top: 3px; }
.studio-page .ls-audio-tabs { margin-top: 0; }
.studio-page .ls-audio-tabs button { min-height: 34px; color: #56616e; }
.studio-page .ls-audio-tabs button.is-active { color: #232429; }
.studio-page .settings-panel .setting-block { margin-top: 0; }
.studio-page .settings-panel .setting-block + .setting-block { margin-top: 12px; }
.studio-page .settings-panel textarea { min-height: 104px; height: 104px; line-height: 1.6; }
.studio-page .voice-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.studio-page .voice-select { min-height: 62px; grid-template-columns: 28px minmax(0,1fr) 18px; gap: 8px; padding: 8px; }
.studio-page .voice-select .ui-icon { width: 16px; height: 16px; }
.studio-page .voice-avatar { width: 28px; height: 28px; }
.voice-listen { padding: 0 10px; border: 1px solid #e3e7ed; border-radius: 10px; background: #fff; color: #384556; font-size: 13px; }
.studio-page .ls-submit-area { padding-top: 0; margin-top: 0; }
.studio-page .estimate-box { padding: 8px 10px; }
.studio-page .estimate-box div > span { color: #59616d; }
.studio-page .consent { margin: 8px 0; line-height: 1.5; }
.studio-page .generate-button, .studio-page .director-submit { min-height: 44px; padding-block: 9px; }
.studio-page.lipsync-page .submit-note { margin: 6px 0 0; line-height: 20px; min-height: 40px; }
.studio-page .upload-area { margin-top: 14px; min-height: 210px; padding: 18px 12px; }
.studio-page .upload-area button { margin-top: 12px; }
.studio-page .upload-area h3 { margin-top: 12px; }
.studio-page .upload-area small { margin-top: 9px; }
.studio-page .ls-audio-drop { margin-top: 0; min-height: 210px; }
.studio-page .ls-tips { padding: 12px 0; }
.studio-page .ls-tips summary { cursor: pointer; color: #485260; font-size: 13px; min-height: 28px; }
.studio-page .ls-tips ul { margin-top: 8px; gap: 5px; }
.studio-page .material-note { padding: 10px; }
.studio-page .ls-preview-caption { margin-top: 14px; }
.studio-page .preview-panel .video-canvas { min-height: 280px; }
.studio-page .ls-preview-footer { margin-top: 10px; }
.studio-page .ls-preview-note { margin-top: 6px; }
.studio-page .video-config-column { gap: 10px; }
.studio-page .scene-picker-card { padding: 10px 16px; }
.studio-page .scene-toggle { min-height: 38px; }
.studio-page .scene-toggle h2 { font-size: 14px; }
.studio-page .scene-toggle p { margin-top: 2px; }
.studio-page .scene-browser-note { color: #59616d; font-size: 13px; margin: 12px 0; line-height: 1.5; }
.studio-page .scene-tabs button { min-height: 36px; }
.studio-page .method-card { padding: 10px; }
.studio-page .method-card em { font-size: 13px; }
.studio-page .material-composer { padding: 16px; }
.studio-page .composer-heading { margin-bottom: 12px; }
.studio-page .composer-heading > b { color: #59616d; background: #f2f4f7; }
.studio-page .material-upload-grid button { min-height: 88px; padding: 10px 6px; gap: 5px; }
.studio-page .material-upload-grid { margin-top: 0; }
.studio-page.video-generation-page .material-upload-grid i { width: 28px; height: 28px; border-radius: 8px; }
.studio-page .material-upload-grid i .ui-icon { width: 18px; height: 18px; }
.studio-page .truth-field { margin-top: 10px; gap: 4px; }
.studio-page .truth-field input { padding-block: 8px; }
.studio-page .truth-field textarea { min-height: 66px; height: 66px; padding-block: 8px; }
.studio-page .composer-options { margin-top: 10px; gap: 12px; }
.studio-page .duration-switch button, .studio-page .select-like { min-height: 36px; color: #56616e; }
.studio-page .duration-switch button.is-active { color: #232429; }
.studio-page .director-submit { margin-top: 10px; }
.studio-page .cost-hint { margin-top: 6px; line-height: 1.5; }
.studio-page .director-center-panel { min-height: 0; align-self: start; }
.studio-page .director-panel-top { padding: 10px 14px; }
.studio-page .director-panel-top button { min-height: 36px; color: #59616d; }
.studio-page .director-panel-top button.is-active { color: #232429; }
.studio-page .director-empty { min-height: 0; padding: 52px 24px; }
.studio-page .director-empty h2 { font-size: 18px; }
.compact-flow { list-style: none; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; counter-reset: flow; }
.compact-flow li { display: flex; align-items: center; gap: 6px; color: #59616d; font-size: 13px; }
.compact-flow li::before { counter-increment: flow; content: counter(flow); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #edf1f7; color: #52647d; }
.studio-page .storyboard-example { padding: 14px 18px; }
.studio-page .storyboard-heading { cursor: pointer; min-height: 44px; }
.studio-page .storyboard-heading h3 { font-size: 14px; }
.studio-page .storyboard-heading small { font-weight: 400; }
.studio-page .storyboard-timeline { margin-top: 14px; }
.studio-page .storyboard-timeline article { padding: 12px; }
.studio-page .storyboard-timeline p { font-size: 13px; }
.studio-page .video-task-panel, .studio-page .recent-tasks { padding: 14px 18px; min-height: 0; }
.studio-page .video-task-panel { grid-column: 1 / -1; }
.studio-page .task-panel-heading, .studio-page .recent-heading { cursor: pointer; min-height: 36px; margin: 0; }
.studio-page .queue-list, .studio-page .task-list { margin-top: 14px; }
.studio-page details:not([open]) > :not(summary) { display: none !important; }
.disclosure-hint { color: #59616d; font-size: 13px; font-weight: 400; }
.studio-page .result-preview-empty { min-height: 320px; padding: 40px 24px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; }
.result-preview-empty h2 { font-size: 18px; margin: 0; }
.result-preview-empty p, .result-preview-empty small { font-size: 13px; color: #59616d; margin: 0; }
.studio-page .mobile-more { display: none; }
.workbench-dialog { width: min(480px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 22px; border: 1px solid #dce2eb; border-radius: 18px; background: #fff; color: #232429; box-shadow: 0 24px 80px #18233326; }
.workbench-dialog::backdrop { background: #202a3c55; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin: 0; font-size: 18px; }
.dialog-close, .dialog-body button { min-height: 40px; padding: 8px 12px; border: 1px solid #e3e7ed; border-radius: 9px; background: #f7f8fa; color: #384556; font-size: 14px; }
.dialog-body { margin-top: 16px; font-size: 14px; line-height: 1.7; }
.dialog-body button { display: block; width: 100%; margin-bottom: 8px; text-align: left; }
.studio-page :is(button,a,input,textarea,summary) { scroll-margin-top: 90px; }
@media (min-width: 761px) {
  .studio-page .scene-toggle { min-height: 26px; }
  .studio-page .scene-toggle > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
  .studio-page .scene-toggle p { margin: 0; }
  .studio-page .video-workspace-grid { margin-top: 12px; }
}
@media (max-width: 1199px) and (min-width: 980px) {
  .studio-page .studio-shell { grid-template-columns: 150px minmax(0,1fr); }
  .studio-page .studio-main { padding-inline: 16px; }
  .studio-page .creation-panel { padding: 12px; }
}
@media (max-width: 760px) {
  .studio-page .studio-main { padding: 12px 14px 28px; }
  .studio-page .studio-sidebar { display: flex; flex-direction: row; align-items: center; padding: 8px; overflow: visible; }
  .studio-page .studio-sidebar nav { display: flex; flex: 1; min-width: 0; gap: 2px; }
  .studio-page .studio-sidebar nav a { display: flex; justify-content: center; padding: 7px 5px; min-height: 40px; gap: 4px; font-size: 14px; white-space: nowrap; }
  .studio-page .studio-sidebar nav a:nth-child(n+4) { display: none; }
  .studio-page .studio-sidebar nav a:first-child { display: none; }
  .studio-page .mobile-more { display: block; margin-left: auto; padding: 8px; min-height: 40px; border-radius: 8px; background: #f1f3f6; color: #455366; font-size: 13px; }
  .studio-page .studio-titlebar { align-items: start; }
  .studio-page .title-actions { width: 100%; }
  .studio-page .prototype-banner { padding: 8px 10px; gap: 3px 8px; }
  .studio-page .settings-panel { display: flex; gap: 12px; }
  .studio-page .ls-submit-area { align-self: stretch; width: 100%; }
  .studio-page .settings-panel #text-panel, .studio-page .settings-panel #audio-panel { min-height: 240px; }
  .studio-page .creation-panel { padding: 16px; }
  .studio-page .preview-panel { min-height: 420px; }
  .studio-page .material-upload-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-page .material-upload-grid button:last-child { grid-column: 1 / -1; display: flex; justify-content: center; flex-direction: row; flex-wrap: wrap; min-height: 44px; }
  .studio-page .material-upload-grid button:last-child i { width: 24px; height: 24px; }
  .studio-page .director-empty { padding: 28px 18px; }
  .studio-page .video-task-panel { grid-column: auto; }
  .studio-page .storyboard-example { padding: 12px; }
}

/* Lip-sync clarity: shared navigation stays intact; desktop creation owns its spacing. */
.lipsync-page .lipsync-intro { margin: 0 0 14px; }
/* Lip-sync shares the video workbench's narrow, collapsible draft rail. */
.lipsync-page .ls-records-panel { display: flex; flex-direction: column; min-width: 0; min-height: 560px; padding: 14px 8px; background: #fff; border: 1px solid #e6e9ef; border-radius: 16px; }
.lipsync-page .ls-records-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 0 0 12px; border: 0; background: transparent; color: #30353c; cursor: pointer; }
.ls-records-heading > span { display: flex; align-items: center; gap: 8px; min-width: 0; }.ls-records-heading strong { font-size: 16px; font-weight: 600; }.ls-records-count { font-size: 12px; color: #68707b; }
.lipsync-page .ls-records-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.lipsync-page .ls-records-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.lipsync-page .ls-records-header :is(.ls-new-draft,.ls-records-heading) { flex: none; min-height: 28px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 400; color: #515761; cursor: pointer; }
.lipsync-page .ls-records-header .ls-records-heading { width: 24px; justify-content: center; }.lipsync-page .ls-new-draft:disabled { cursor: not-allowed; opacity: .5; }.lipsync-page .ls-records-header .ls-retry { flex: 1 0 100%; font-size: 12px; }
.lipsync-page .ls-records-panel [hidden] { display: none !important; }
.lipsync-page .ls-drafts-list { display: grid; gap: 8px; min-width: 0; }.lipsync-page .ls-draft-empty { font-size: 13px; line-height: 1.65; color: #626a75; padding: 12px 0; margin: 0; }
.lipsync-page .ls-draft-card { display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 8px; width: 100%; min-height: 82px; padding: 8px 6px; border: 1px solid #e6e9ef; border-radius: 10px; background: #fff; color: #30353c; text-align: left; cursor: pointer; }
.lipsync-page .ls-draft-card:hover:not(:disabled) { background: #f7f8fa; }.lipsync-page .ls-draft-card.is-current { border-color: #868d98; background: #f5f6f8; }.lipsync-page .ls-draft-card:disabled { opacity: .5; cursor: not-allowed; }
.ls-draft-icon { display: grid; place-items: center; overflow: hidden; width: 52px; height: 52px; border-radius: 6px; background: #eceef2; color: #626a75; }.ls-draft-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }.ls-draft-copy { display: grid; gap: 3px; min-width: 0; }.ls-draft-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.4; font-weight: 600; }.ls-draft-copy small { font-size: 10px; line-height: 1.45; color: #626a75; white-space: pre-line; }.lipsync-page .ls-draft-copy .ls-task-state { font-size: 11px; line-height: 1.4; white-space: normal; }
.lipsync-page[data-input-mode="keyboard"] :is(.ls-records-heading,.ls-draft-card):focus-visible { outline: 1px solid #757575; outline-offset: 2px; }
@media (min-width: 980px) {
  .studio-page.lipsync-page .creation-grid:has(.ls-records-panel) { grid-template-columns: minmax(0,.92fr) minmax(0,1.12fr) minmax(0,1.35fr) 152px; }
  .lipsync-page .ls-records-panel { max-height: max(560px,calc(100dvh - 126px)); position: sticky; top: 64px; }
  .studio-page.lipsync-page[data-lipsync-records-collapsed="true"] .creation-grid { grid-template-columns: minmax(0,.92fr) minmax(0,1.12fr) minmax(0,1.35fr) 64px; }
  .lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-panel { padding-inline: 8px; }
  .lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-heading { justify-content: center; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-heading > span { display: none; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-heading svg { transform: rotate(180deg); }
  .lipsync-page[data-lipsync-records-collapsed="true"] :is(.ls-new-draft,.ls-retry,.ls-draft-copy,.ls-history-more,.ls-history-message) { display: none; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-header { justify-content: center; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-draft-card { grid-template-columns: 1fr; padding: 3px; min-height: 50px; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-draft-icon { width: 38px; height: 38px; }
}
@media (min-width: 761px) and (max-width: 979px) { .studio-page.lipsync-page .creation-grid:has(.ls-records-panel) { grid-template-columns: repeat(2,minmax(0,1fr)); }.lipsync-page .ls-records-panel { min-height: 420px; max-height: 560px; } }
@media (max-width: 979px) { .lipsync-page .ls-records-heading svg { transform: rotate(90deg); }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-panel { min-height: 0; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-body { display: none; }.lipsync-page[data-lipsync-records-collapsed="true"] .ls-records-heading svg { transform: rotate(-90deg); } }
@media (max-width: 760px) { .lipsync-page .ls-records-panel { min-height: 220px; max-height: 520px; }.lipsync-page .ls-drafts-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.lipsync-page .lipsync-intro h1 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.4; }
.lipsync-page .lipsync-intro p { margin: 3px 0 0; color: #626a75; font-size: 13px; line-height: 1.6; }
.lipsync-page .lipsync-intro > span { color: #59616d; font-size: 13px; }
.lipsync-page .voice-create-row small,
.lipsync-page #lipsync-clone-note { margin: 4px 0 0; color: #626a75; font-size: 13px; line-height: 1.5; }
.lipsync-page .lipsync-service-note { margin: 0 0 8px; color: #59616d; font-size: 13px; line-height: 1.5; }
.lipsync-page :is(.voice-select, .voice-listen, .generate-button):disabled { cursor: not-allowed; opacity: 1; color: #68707b; background: #f3f4f6; border-color: #e5e7eb; box-shadow: none; }
.lipsync-page .voice-select:disabled b { color: #59616d; }
.lipsync-page .voice-select:disabled small { color: #68707b; }
.lipsync-page .voice-select:disabled > [data-ui-icon] { display: none; }
.lipsync-page .generate-button:disabled:hover { color: #68707b; background: #f3f4f6; border-color: #e5e7eb; box-shadow: none; }
.lipsync-page[data-input-mode="keyboard"] #speech-text:focus-visible { outline: 1px solid #757575; outline-offset: 2px; box-shadow: none; }
.lipsync-page .ls-video-file-icon { display: none; }
.lipsync-page #video-info { width: 100%; }
.lipsync-page #video-drop #remove-video { color: #59616d; background: transparent; font-weight: 400; }

@media (min-width: 980px) {
  .studio-page.lipsync-page .studio-main { padding: 18px 20px 24px; }
  .lipsync-page .lipsync-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .lipsync-page .lipsync-intro > span { flex: none; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa; }
  .studio-page.lipsync-page .creation-grid { grid-template-columns: minmax(0,.92fr) minmax(0,1.12fr) minmax(0,1.16fr); gap: 14px; margin-top: 0; align-items: stretch; }
  .studio-page.lipsync-page .creation-panel { padding: 18px; min-height: 560px; border-radius: 16px; }
  .studio-page.lipsync-page .ls-panel-heading { min-height: 32px; align-items: center; gap: 10px; }
  .lipsync-page .ls-step { font-weight: 500; background: #f2f3f5; border: 0; }
  .studio-page.lipsync-page .ls-panel-heading h2 { font-size: 16px; font-weight: 600; }
  .studio-page.lipsync-page .ls-panel-heading p { margin-top: 3px; color: #626a75; }
  .studio-page.lipsync-page .input-panel { display: flex; flex-direction: column; }
  .studio-page.lipsync-page .upload-area { min-height: 206px; margin-top: 16px; padding: 20px 12px; border-color: #d8dce2; background: #fafbfc; }
  .studio-page.lipsync-page .upload-area:hover { background: #f6f7f9; border-color: #a8afb9; }
  .studio-page.lipsync-page .upload-area.is-dragging { background: #f0f2f4; border-color: #707986; box-shadow: none; }
  .lipsync-page .upload-icon { color: #68707b; background: #eff1f4; }
  .studio-page.lipsync-page .upload-area h3 { margin-top: 12px; font-weight: 500; }
  .studio-page.lipsync-page .upload-area p { margin: 5px 0 0; font-size: 13px; }
  .studio-page.lipsync-page .upload-area button { min-height: 40px; margin-top: 14px; padding-inline: 22px; }
  .studio-page.lipsync-page .upload-area small { display: block; margin-top: 9px; font-size: 13px; }
  .studio-page.lipsync-page .upload-area.has-file { min-height: 108px; padding: 14px 12px; }
  .lipsync-page .upload-area.has-file :is(.upload-icon,h3,p) { display: none; }
  .studio-page.lipsync-page .upload-area.has-file button { margin-top: 0; }
  .studio-page.lipsync-page #video-drop { flex: 1; margin-top: 0; min-height: 360px; padding: 28px 18px; }
  .studio-page.lipsync-page #video-drop.has-file { min-height: 360px; border-style: solid; }
  .lipsync-page #video-drop.has-file .ls-video-file-icon { display: grid; place-items: center; width: 52px; height: 60px; border: 1px solid #e5e7eb; border-radius: 12px; color: #68707b; background: #eff1f4; }
  .lipsync-page .ls-video-file-icon .ui-icon { width: 28px; height: 28px; }
  .studio-page.lipsync-page #video-info { margin: 16px 0 0; padding: 0; border: 0; background: transparent; }
  .lipsync-page #video-info strong { font-size: 14px; line-height: 1.6; }
  .lipsync-page .ls-video-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
  .studio-page.lipsync-page #video-drop .ls-video-actions button { margin-top: 0; }
  .studio-page.lipsync-page #video-drop.has-file #choose-video { padding-inline: 10px; font-weight: 500; }
  .studio-page.lipsync-page #video-drop #remove-video { min-height: 40px; padding-inline: 6px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
  .lipsync-page #video-drop.has-file > small { display: none; }
  .lipsync-page .ls-file-info { margin-top: 10px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fafbfc; gap: 5px; }
  .lipsync-page .ls-file-info strong { color: #30353c; font-weight: 500; overflow-wrap: anywhere; }
  .lipsync-page .ls-file-info button { min-height: 28px; color: #59616d; text-decoration: underline; text-underline-offset: 3px; }
  .studio-page.lipsync-page .ls-tips { margin-top: 12px; padding: 0; }
  .studio-page.lipsync-page .ls-tips summary { min-height: 30px; }
  .studio-page.lipsync-page .material-note { margin-top: 14px; padding: 10px 12px; background: #f5f6f8; }
  .studio-page.lipsync-page .material-note strong { color: #4b535e; font-size: 13px; font-weight: 500; }
  .studio-page.lipsync-page .material-note span { font-size: 13px; }
  .studio-page.lipsync-page .settings-panel { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 10px; align-content: start; }
  .studio-page.lipsync-page .ls-audio-tabs { margin: 0; padding: 3px; background: #f0f1f3; }
  .studio-page.lipsync-page .ls-audio-tabs button { min-height: 34px; font-size: 14px; font-weight: 500; }
  .lipsync-page .settings-panel :is(#text-panel,#audio-panel) { grid-row: 3; min-width: 0; }
  .studio-page.lipsync-page .settings-panel .setting-block { margin-top: 0; }
  .studio-page.lipsync-page .settings-panel .setting-block + .setting-block { margin-top: 12px; }
  .studio-page.lipsync-page .label-row { margin-bottom: 6px; }
  .studio-page.lipsync-page .label-row label { margin-bottom: 0; font-weight: 500; }
  .studio-page.lipsync-page .settings-panel textarea { display: block; min-height: 160px; height: 160px; padding: 10px 12px; background: #fafbfc; font-weight: 400; line-height: 1.7; }
  .studio-page.lipsync-page .setting-block > label { display: block; margin-bottom: 6px; font-weight: 500; }
  .studio-page.lipsync-page .voice-control { display: block; }
  .studio-page.lipsync-page .voice-select { min-height: 44px; border-radius: 10px; grid-template-columns: minmax(0,1fr); }
  .studio-page.lipsync-page .voice-select b { font-weight: 500; }
  .studio-page.lipsync-page .voice-select small { font-size: 13px; line-height: 1.4; }
  .studio-page.lipsync-page .voice-listen { max-width: none; padding-inline: 10px; font-size: 13px; line-height: 1.5; white-space: nowrap; }
  .lipsync-page .voice-create-link { margin-top: 9px; font-size: 13px; color: #424a55; text-decoration: underline; text-underline-offset: 3px; }
  .lipsync-page .voice-create-row { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
  .lipsync-page .voice-create-row .voice-create-link { margin-top: 0; }
  .lipsync-page .voice-create-row small { display: inline; margin-left: 0; }
  .lipsync-page #lipsync-clone-note { font-size: 13px; }
  .studio-page.lipsync-page .ls-audio-drop { margin-top: 0; min-height: 200px; }
  .studio-page.lipsync-page .ls-submit-area { grid-row: 4; width: 100%; padding-top: 12px; margin-top: 0; border-top: 1px solid #eceef1; }
  .studio-page.lipsync-page .estimate-box { padding: 4px 0; background: transparent; }
  .studio-page.lipsync-page .estimate-box div { font-size: 13px; }
  .studio-page.lipsync-page .estimate-box b { font-size: 13px; font-weight: 500; }
  .studio-page.lipsync-page .consent { margin: 6px 0 10px; align-items: flex-start; font-size: 13px; }
  .studio-page.lipsync-page .consent input { margin-top: 2px; }
  .studio-page.lipsync-page .generate-button { min-height: 40px; margin-top: 0; font-weight: 500; }
  .studio-page.lipsync-page .submit-note { margin-top: 7px; min-height: 0; text-align: left; font-size: 13px; }
  .studio-page.lipsync-page .preview-panel { display: flex; flex-direction: column; }
  .studio-page.lipsync-page .ls-preview-caption { margin-top: 16px; margin-bottom: 8px; }
  .lipsync-page .preview-panel:not(.has-video) :is(.ls-preview-caption,.ls-preview-footer) { display: none; }
  .lipsync-page .ls-preview-caption { justify-content: flex-end; }
  .studio-page.lipsync-page .video-canvas { min-height: 340px; background: #f7f8fa; border-color: #eceef1; border-radius: 12px; }
  .studio-page.lipsync-page .canvas-empty { padding: 24px 18px; }
  .studio-page.lipsync-page .canvas-empty strong { color: #505862; font-weight: 500; }
  .studio-page.lipsync-page .canvas-empty p { max-width: 240px; margin: 8px auto 0; }
  .studio-page.lipsync-page .ls-preview-footer { margin-top: 12px; font-size: 13px; }
  .studio-page.lipsync-page .ls-preview-note { margin-top: 7px; font-size: 13px; }
  .studio-page.lipsync-page .recent-tasks { margin-top: 14px; padding: 12px 18px; border-radius: 14px; }
  .studio-page.lipsync-page .recent-heading { min-height: 28px; }
  .studio-page.lipsync-page .recent-heading h2 { font-size: 14px; font-weight: 500; }
  .studio-page.lipsync-page .recent-heading span { font-size: 13px; }
  .studio-page.lipsync-page .task-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 8px; }
  .studio-page.lipsync-page .task-list article { grid-template-columns: 36px minmax(0,1fr) auto; column-gap: 10px; padding: 10px 0; border-bottom: 0; }
  .lipsync-page .task-list .task-thumb { width: 36px; height: 44px; }
  .studio-page.lipsync-page .task-list h3 { font-size: 13px; font-weight: 500; }
  .studio-page.lipsync-page .task-list p,
  .studio-page.lipsync-page .task-state { font-size: 13px; }
  .studio-page.lipsync-page .task-list article > button { display: none; }
}

/* Clear only drafts; submitted tasks remain in the queue. */
.lipsync-page .ls-clear-drafts { display: block; width: 100%; min-height: 32px; margin-top: 10px; padding: 5px 8px; border: 1px solid #dce1e8; border-radius: 8px; background: #fff; color: #626d7e; font: inherit; font-size: 13px; line-height: 1.5; cursor: pointer; }
.lipsync-page .ls-clear-drafts:hover:not(:disabled) { border-color: #b7bec8; background: #f3f4f6; color: #30343a; }
.lipsync-page .ls-clear-drafts:disabled { color: #8a919b; background: transparent; cursor: not-allowed; }
.lipsync-page .ls-clear-drafts:focus-visible { outline: 1px solid #818995; outline-offset: 2px; }
@media(min-width:761px) { .lipsync-page[data-lipsync-records-collapsed="true"] .ls-clear-drafts { display: none; } }
