/* MV-only component styles; shared music pages retain their existing CSS. */
:where(body.mv-feature-page) .mv-history{
  margin-top: 34px;
}
:where(body.mv-feature-page) .mv-mode-strip{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
:where(body.mv-feature-page) .mv-mode{
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface);
  text-align: left;
}
:where(body.mv-feature-page) .mv-mode.active{
  border-color: var(--signal-strong);
  background: var(--signal-soft);
}
:where(body.mv-feature-page) .mv-mode:disabled{
  opacity: 0.52;
}
:where(body.mv-feature-page) .mv-mode-icon{
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--signal);
  background: #1d2421;
}
:where(body.mv-feature-page) .mv-mode strong,
:where(body.mv-feature-page) .mv-mode small{
  display: block;
}
:where(body.mv-feature-page) .mv-mode small{
  margin-top: 4px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}
:where(body.mv-feature-page) .mv-mode b{
  color: var(--signal);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
:where(body.mv-feature-page) .mv-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
:where(body.mv-feature-page) .mv-builder{
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
:where(body.mv-feature-page) .mv-step{
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
:where(body.mv-feature-page) .mv-step-head{
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}
:where(body.mv-feature-page) .mv-step-head > span{
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0b1210;
  background: var(--signal);
  font-weight: 700;
}
:where(body.mv-feature-page) .mv-step-head h3,
:where(body.mv-feature-page) .mv-step-head p{
  margin: 0;
}
:where(body.mv-feature-page) .mv-step-head h3{
  font-size: 15px;
}
:where(body.mv-feature-page) .mv-step-head p{
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 12px;
}
:where(body.mv-feature-page) #mv-library-sources{
  margin: 6px 0 18px;
}
:where(body.mv-feature-page) .mv-work-picker{
  max-height: 252px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px;
  overflow-y: auto;
}
:where(body.mv-feature-page) .mv-work-option{
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  text-align: left;
  cursor: pointer;
}
:where(body.mv-feature-page) .mv-work-option .cover{
  width: 42px;
  height: 42px;
}
:where(body.mv-feature-page) .mv-work-option strong,
:where(body.mv-feature-page) .mv-work-option small{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:where(body.mv-feature-page) .mv-work-option small{
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-work-option .mv-work-preferred{
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--danger);
  border: 1px solid color-mix(in oklch, var(--danger), var(--line) 45%);
  background: var(--danger-soft);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}
:where(body.mv-feature-page) .mv-work-option > .icon{
  opacity: 0;
  color: var(--signal);
}
:where(body.mv-feature-page) .mv-work-option.selected{
  border-color: var(--signal-strong);
  background: var(--signal-soft);
}
:where(body.mv-feature-page) .mv-work-option.selected > .icon{
  opacity: 1;
}
:where(body.mv-feature-page) .mv-audio-repair{
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px dashed #343941;
  border-radius: var(--radius-md);
  background: #0c0e11;
}
:where(body.mv-feature-page) .mv-audio-repair > span{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--signal);
  background: var(--signal-soft);
}
:where(body.mv-feature-page) .mv-audio-repair > div{
  min-width: 0;
}
:where(body.mv-feature-page) .mv-audio-repair strong,
:where(body.mv-feature-page) .mv-audio-repair small{
  display: block;
}
:where(body.mv-feature-page) .mv-audio-repair strong{
  color: var(--ink-secondary);
  font-size: 12px;
}
:where(body.mv-feature-page) .mv-audio-repair strong i{
  margin-left: 5px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}
:where(body.mv-feature-page) .mv-audio-repair small{
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:where(body.mv-feature-page) .mv-custom-lyrics{
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
:where(body.mv-feature-page) .mv-custom-lyrics[hidden]{
  display: none;
}
:where(body.mv-feature-page) .mv-custom-lyrics .field{
  margin: 0;
}
:where(body.mv-feature-page) .mv-custom-lyrics .section-row{
  flex-wrap: wrap;
  gap: var(--space-3);
}
:where(body.mv-feature-page) .mv-lyrics-actions{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
:where(body.mv-feature-page) .mv-lyrics-unlocated{
  display: block;
  margin-top: var(--space-2);
  color: var(--warning);
}
:where(body.mv-feature-page) .mv-direction-picker{
  display: grid;
  gap: var(--space-4);
}
:where(body.mv-feature-page) .mv-direction-picker section{
  display: grid;
  gap: var(--space-2);
}
:where(body.mv-feature-page) .mv-direction-picker section strong{
  display: flex;
  align-items: baseline;
  gap: 6px;
}
:where(body.mv-feature-page) .mv-direction-picker section strong small{
  color: var(--ink-tertiary);
  font-size: 11px;
  font-weight: 400;
}
:where(body.mv-feature-page) .mv-direction-options{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
:where(body.mv-feature-page) .mv-direction-options button{
  min-height: 44px;
}
:where(body.mv-feature-page) .mv-direction-options button.selected{
  color: var(--ink);
  border-color: var(--signal);
  background: var(--signal-soft);
  box-shadow: inset 0 0 0 1px var(--signal);
}
:where(body.mv-feature-page) .mv-direction-options button.selected::after{
  content: "✓";
  margin-left: 5px;
  font-weight: 700;
}
:where(body.mv-feature-page) .mv-text-styles{
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-text-style-group{
  display: grid;
  gap: var(--space-2);
}
:where(body.mv-feature-page) .mv-text-style-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
:where(body.mv-feature-page) .mv-text-color-field{
  margin: 0;
}
:where(body.mv-feature-page) .mv-text-style-row .field{
  margin: 0;
}
:where(body.mv-feature-page) .mv-text-style-group .section-row{
  align-items: center;
}
:where(body.mv-feature-page) .mv-color-picker{
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
:where(body.mv-feature-page) .mv-color-picker button{
  width: 44px;
  height: 44px;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
:where(body.mv-feature-page) .mv-color-picker button::after{
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--swatch-color, #fff);
}
:where(body.mv-feature-page) .mv-color-picker button.selected::after{
  border-color: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-soft);
}
:where(body.mv-feature-page) .mv-shot-hint{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-shot-lines{
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
:where(body.mv-feature-page) .mv-shot-line{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-shot-line-text{
  flex: 1 1 160px;
  min-width: 0;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.5;
}
:where(body.mv-feature-page) .mv-shot-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
:where(body.mv-feature-page) .mv-shot-tag{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid var(--signal-strong);
  border-radius: 999px;
  color: var(--signal);
  background: var(--signal-soft);
  font-size: 11px;
  cursor: pointer;
}
:where(body.mv-feature-page) .mv-shot-scene{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  font-size: 11px;
  line-height: 1.5;
}
:where(body.mv-feature-page) .mv-shot-add{
  margin-left: auto;
}
:where(body.mv-feature-page) .mv-audio-repair .btn,
:where(body.mv-feature-page) .mv-custom-lyrics .btn{
  min-height: 44px;
  min-width: 44px;
}
:where(body.mv-feature-page) .mv-character-field{
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-character-thumb{
  width: 56px;
  height: 56px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--signal);
  background: #171b1f;
  padding: 0;
  cursor: zoom-in;
}
:where(body.mv-feature-page) .mv-character-thumb:disabled{
  cursor: default;
}
:where(body.mv-feature-page) .mv-character-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:where(body.mv-feature-page) .mv-character-copy{
  min-width: 0;
}
:where(body.mv-feature-page) .mv-character-copy strong,
:where(body.mv-feature-page) .mv-character-copy small{
  display: block;
}
:where(body.mv-feature-page) .mv-character-copy strong{
  color: var(--ink-secondary);
  font-size: 13px;
}
:where(body.mv-feature-page) .mv-character-copy strong span{
  margin-left: 5px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-weight: 500;
}
:where(body.mv-feature-page) .mv-character-copy small{
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:where(body.mv-feature-page) .mv-character-actions{
  display: flex;
  gap: 6px;
}
:where(body.mv-feature-page) .mv-character-actions input{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
:where(body.mv-feature-page) .mv-character-consent{
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 10px;
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}
:where(body.mv-feature-page) .mv-character-consent input{
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--signal);
}
:where(body.mv-feature-page) .mv-character-library{
  margin-top: 12px;
}
:where(body.mv-feature-page) .mv-character-generation{
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-character-generation > div:first-child{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
:where(body.mv-feature-page) .mv-character-generation > div:first-child > span{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--signal);
  background: var(--signal-soft);
}
:where(body.mv-feature-page) .mv-character-generation strong,
:where(body.mv-feature-page) .mv-character-generation small{
  display: block;
}
:where(body.mv-feature-page) .mv-character-generation small{
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 10px;
}
:where(body.mv-feature-page) .mv-character-generation b{
  color: var(--signal);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
:where(body.mv-feature-page) .mv-character-library:empty{
  display: none;
}
:where(body.mv-feature-page) .mv-character-library-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink-secondary);
  font-size: 12px;
}
:where(body.mv-feature-page) .mv-character-library-head small{
  color: var(--ink-tertiary);
}
:where(body.mv-feature-page) .mv-character-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
:where(body.mv-feature-page) .mv-character-item{
  position: relative;
  min-width: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-character-item.selected{
  border-color: var(--signal);
  box-shadow: 0 0 0 2px var(--signal-soft);
}
:where(body.mv-feature-page) .mv-character-item > [data-character-id]{
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
:where(body.mv-feature-page) .mv-character-item img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
:where(body.mv-feature-page) .mv-character-item [data-character-id] span{
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  overflow: hidden;
  padding: 4px 5px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgb(0 0 0 / 66%);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:where(body.mv-feature-page) .mv-character-delete{
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-sm);
  opacity: 0;
  color: #fff;
  background: rgb(0 0 0 / 64%);
  cursor: pointer;
}
:where(body.mv-feature-page) .mv-character-preview{
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-sm);
  opacity: 0;
  color: #fff;
  background: rgb(0 0 0 / 64%);
  cursor: zoom-in;
}
:where(body.mv-feature-page) .mv-character-item:hover .mv-character-delete,
:where(body.mv-feature-page) .mv-character-delete:focus-visible,
:where(body.mv-feature-page) .mv-character-item:hover .mv-character-preview,
:where(body.mv-feature-page) .mv-character-preview:focus-visible{
  opacity: 1;
}
:where(body.mv-feature-page) .mv-character-delete .icon{
  width: 14px;
  height: 14px;
}
:where(body.mv-feature-page) .mv-character-preview .icon{
  width: 14px;
  height: 14px;
}
:where(body.mv-feature-page) .mv-highlight-selector{
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
:where(body.mv-feature-page) .mv-highlight-modes{
  width: fit-content;
}
:where(body.mv-feature-page) .mv-manual-highlight{
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-highlight-preview-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
:where(body.mv-feature-page) .mv-highlight-preview-row audio,
:where(body.mv-feature-page) .mv-clip-preview audio{
  display: block;
  width: 100%;
  min-width: 0;
}
:where(body.mv-feature-page) .mv-clip-preview,
:where(body.mv-feature-page) .mv-selected-lyrics{
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}
:where(body.mv-feature-page) .mv-clip-preview .section-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
:where(body.mv-feature-page) .mv-clip-preview small{
  color: var(--ink-tertiary);
  font-size: var(--text-1);
}
:where(body.mv-feature-page) #mv-preview-highlight{
  min-height: var(--touch-target);
}
:where(body.mv-feature-page) #mv-selected-lyrics{
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
:where(body.mv-feature-page) .mv-manual-highlight[hidden]{
  display: none;
}
:where(body.mv-feature-page) .mv-waveform{
  height: 82px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
:where(body.mv-feature-page) .mv-waveform:focus-visible{
  border-color: var(--signal);
  outline: 2px solid color-mix(in srgb, var(--signal), transparent 65%);
  outline-offset: 2px;
}
:where(body.mv-feature-page) .mv-waveform canvas{
  width: 100%;
  height: 100%;
  display: block;
}
:where(body.mv-feature-page) .mv-waveform > span{
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
  border-right: 1px solid var(--signal);
  border-left: 1px solid var(--signal);
  background: color-mix(in srgb, var(--signal), transparent 82%);
  cursor: grab;
}
:where(body.mv-feature-page) #mv-zoom-modes{
  display: none;
}
:where(body.mv-feature-page) .mv-highlight-sliders{
  display: none;
}
:where(body.mv-feature-page) .mv-highlight-sliders label{
  display: grid;
  gap: 6px;
  color: var(--ink-tertiary);
  font-size: 12px;
}
:where(body.mv-feature-page) .mv-highlight-sliders input[type="range"]{
  width: 100%;
  accent-color: var(--signal);
  touch-action: pan-y;
}
:where(body.mv-feature-page) .mv-waveform > span > button{
  width: 24px;
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
:where(body.mv-feature-page) .mv-waveform > span > button::after{
  width: 6px;
  position: absolute;
  top: 18%;
  bottom: 18%;
  border-radius: 4px;
  background: var(--signal);
  box-shadow: 0 0 0 2px rgb(11 13 16 / 70%);
  content: '';
}
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="start"]{ left: -12px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="end"]{ right: -12px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="start"]::after{ left: 9px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="end"]::after{ right: 9px; }
:where(body.mv-feature-page) .mv-waveform-hint{
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-manual-highlight audio{
  width: 100%;
  height: 36px;
  color-scheme: dark;
}
@media (max-width: 639px) {
:where(body.mv-feature-page) .mv-highlight-preview-row{ grid-template-columns: 1fr; }
:where(body.mv-feature-page) .mv-highlight-preview-row .btn{ width: 100%; }
:where(body.mv-feature-page) .mv-waveform{ height: 96px; }
:where(body.mv-feature-page) .mv-waveform > span > button{ width: 44px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="start"]{ left: -22px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="end"]{ right: -22px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="start"]::after{ left: 19px; }
:where(body.mv-feature-page) .mv-waveform [data-highlight-handle="end"]::after{ right: 19px; }
}
:where(body.mv-feature-page) .mv-trim-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-trim-summary strong{
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
:where(body.mv-feature-page) .mv-style-label{
  display: block;
  margin: 16px 0 8px;
}
:where(body.mv-feature-page) .mv-settings-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: end;
}
:where(body.mv-feature-page) .mv-settings-row .field-label{
  display: block;
  margin-bottom: 7px;
}
:where(body.mv-feature-page) .mv-custom-prompt{
  margin-top: 16px;
}
:where(body.mv-feature-page) .mv-subtitle-setting{
  width: fit-content;
  margin-top: 14px;
}
:where(body.mv-feature-page) .mv-custom-prompt > span i{
  margin-left: 5px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}
:where(body.mv-feature-page) .mv-custom-prompt textarea{
  min-height: 88px;
  resize: vertical;
}
:where(body.mv-feature-page) .mv-submit{
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface-subtle);
}
:where(body.mv-feature-page) .mv-submit span,
:where(body.mv-feature-page) .mv-submit strong,
:where(body.mv-feature-page) .mv-submit small{
  display: block;
}
:where(body.mv-feature-page) .mv-submit span,
:where(body.mv-feature-page) .mv-submit small{
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-submit strong{
  margin: 2px 0;
  color: var(--signal);
  font-size: 18px;
}
:where(body.mv-feature-page) .mv-preview{
  position: sticky;
  top: 84px;
}
:where(body.mv-feature-page) .mv-preview-frame{
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
:where(body.mv-feature-page) .mv-preview-frame.portrait{
  width: min(230px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}
:where(body.mv-feature-page) .mv-preview-frame img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.9);
}
:where(body.mv-feature-page) .mv-preview-frame[data-style="film"] img{ filter: brightness(0.72) saturate(0.72) sepia(0.2); }
:where(body.mv-feature-page) .mv-preview-frame[data-style="neon"] img{ filter: brightness(0.67) saturate(1.35) hue-rotate(12deg); }
:where(body.mv-feature-page) .mv-preview-frame[data-style="ink"] img{ filter: grayscale(1) contrast(1.15); }
:where(body.mv-feature-page) .mv-preview-frame[data-style="warm"] img{ filter: brightness(0.73) saturate(1.12) sepia(0.28); }
:where(body.mv-feature-page) .mv-title-layout-field{
  margin: 0;
}
:where(body.mv-feature-page) .mv-preview-note{
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-left: 2px solid var(--signal);
  color: var(--ink-tertiary);
  background: #0e1512;
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-preview-note .icon{
  color: var(--signal);
}
:where(body.mv-feature-page) .mv-preview-note strong{
  display: block;
  margin-bottom: 2px;
  color: var(--ink-secondary);
}
:where(body.mv-feature-page) .mv-task-list{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
:where(body.mv-feature-page) .mv-live-status{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--signal);
  font-size: 11px;
  font-weight: 650;
}
:where(body.mv-feature-page) .mv-live-status[hidden]{
  display: none;
}
:where(body.mv-feature-page) .mv-live-status > i{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgb(86 222 155 / 35%);
  animation: mv-live-pulse 1.8s ease-out infinite;
}
:where(body.mv-feature-page) .mv-live-status.is-reconnecting{
  color: var(--stage);
}
:where(body.mv-feature-page) .mv-task-card{
  min-width: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
:where(body.mv-feature-page) .mv-task-media{
  min-height: 126px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-tertiary);
  background: var(--canvas);
}
:where(body.mv-feature-page) .mv-task-media img,
:where(body.mv-feature-page) .mv-task-media video{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:where(body.mv-feature-page) .mv-task-media.portrait img,
:where(body.mv-feature-page) .mv-task-media.portrait video{
  object-fit: contain;
}
:where(body.mv-feature-page) .mv-media-state{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(8 9 12 / 55%);
}
:where(body.mv-feature-page) .mv-media-state .icon[data-lucide="loader-circle"],
:where(body.mv-feature-page) .work-row .icon[data-lucide="loader-circle"]{
  animation: spin 1.1s linear infinite;
}
:where(body.mv-feature-page) .mv-task-copy{
  min-width: 0;
  padding: 14px;
}
:where(body.mv-feature-page) .mv-task-title{
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
:where(body.mv-feature-page) .mv-task-title > div{
  min-width: 0;
}
:where(body.mv-feature-page) .mv-task-title strong,
:where(body.mv-feature-page) .mv-task-title span{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:where(body.mv-feature-page) .mv-task-title span,
:where(body.mv-feature-page) .mv-task-copy > p{
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-task-copy > .mv-task-prompt{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}
:where(body.mv-feature-page) .mv-task-prompt b{
  margin-right: 4px;
  color: var(--ink-secondary);
  font-weight: 650;
}
:where(body.mv-feature-page) .mv-task-copy > .mv-task-note{
  display: flex;
  gap: 5px;
  align-items: flex-start;
  margin: 9px 0 0;
  color: var(--success, #4ade80);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}
:where(body.mv-feature-page) .mv-task-copy > .mv-task-note svg{
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
:where(body.mv-feature-page) .mv-progress{
  height: 4px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-strong);
}
:where(body.mv-feature-page) .mv-progress span{
  height: 100%;
  display: block;
  background: var(--signal);
  transition: width 320ms ease;
}
:where(body.mv-feature-page) .mv-error{
  color: var(--danger) !important;
}
:where(body.mv-feature-page) .mv-failed-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink-tertiary);
  font-size: 11px;
}
:where(body.mv-feature-page) .mv-failed-actions .btn{
  color: var(--ink-tertiary);
}
:where(body.mv-feature-page) .mv-task-actions{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}
@media (max-width: 1060px) {
:where(body.mv-feature-page) .mv-layout{
    grid-template-columns: minmax(0, 1fr) 290px;
  }
:where(body.mv-feature-page) .mv-task-card{
    grid-template-columns: 145px minmax(0, 1fr);
  }
}
@media (max-width: 820px), (max-width: 1024px) and (max-height: 500px) {
:where(body.mv-feature-page) .work-detail,
:where(body.mv-feature-page) .mv-layout{
    grid-template-columns: 1fr;
  }
:where(body.mv-feature-page) .mv-mode-strip{
    grid-template-columns: 1fr;
  }
:where(body.mv-feature-page) .mv-preview{
    position: static;
    grid-row: 1;
  }
:where(body.mv-feature-page) .mv-preview-frame{
    width: min(480px, 100%);
    margin: 0 auto;
  }
:where(body.mv-feature-page) .mv-task-list{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
:where(body.mv-feature-page) .mv-trim-summary{
    align-items: flex-start;
    flex-direction: column;
  }
:where(body.mv-feature-page) .mv-character-preview,
:where(body.mv-feature-page) .mv-character-delete{
    opacity: 1;
  }
:where(body.mv-feature-page) .mv-work-picker{
    grid-template-columns: 1fr;
  }
:where(body.mv-feature-page) .mv-audio-repair{
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }
:where(body.mv-feature-page) .mv-audio-repair > .btn-icon{
    grid-column: 3;
  }
:where(body.mv-feature-page) .mv-audio-repair > #mv-source-audio-choose{
    grid-column: 1 / 3;
  }
:where(body.mv-feature-page) .mv-character-field{
    grid-template-columns: 52px minmax(0, 1fr);
  }
:where(body.mv-feature-page) .mv-character-thumb{
    width: 52px;
    height: 52px;
  }
:where(body.mv-feature-page) .mv-character-actions{
    grid-column: 1 / -1;
  }
:where(body.mv-feature-page) .mv-character-actions .btn:not(.btn-icon){
    flex: 1;
  }
:where(body.mv-feature-page) .mv-character-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
:where(body.mv-feature-page) .mv-character-delete{
    opacity: 1;
  }
:where(body.mv-feature-page) .mv-text-style-row{
    grid-template-columns: 1fr;
  }
:where(body.mv-feature-page) .mv-text-styles{
    padding: var(--space-3);
  }
:where(body.mv-feature-page) .mv-settings-row{
    grid-template-columns: 1fr;
  }
:where(body.mv-feature-page) .mv-submit{
    align-items: stretch;
    flex-direction: column;
  }
:where(body.mv-feature-page) .mv-submit .btn{
    width: 100%;
  }
:where(body.mv-feature-page) .mv-task-card{
    grid-template-columns: 1fr;
  }
:where(body.mv-feature-page) .mv-task-media{
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 820px), (max-width: 1024px) and (max-height: 500px) {
:where(body.mv-feature-page).creator-workspace .mv-layout,
:where(body.mv-feature-page).creator-workspace .work-detail{
    gap: 16px;
  }
}
@media (max-width: 639px) {
:where(body.mv-feature-page).creator-workspace .mv-submit{
    position: sticky;
    z-index: 12;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 8px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: rgb(17 19 24 / 97%);
    box-shadow: 0 12px 32px rgb(0 0 0 / 34%);
    backdrop-filter: blur(14px);
  }
}
:where(body.mv-feature-page) .mv-video-preview-modal{
  width: min(1100px, 96vw);
  max-width: 96vw;
}
:where(body.mv-feature-page) .mv-video-preview-stage{
  display: grid;
  place-items: center;
  padding: 12px;
  background: #000;
}
:where(body.mv-feature-page) .mv-video-preview-stage video{
  width: 100%;
  max-height: 76dvh;
  object-fit: contain;
}
:where(body.mv-feature-page) .mv-preview-description{ padding: var(--space-3) var(--space-4); color: var(--ink-secondary); font-size: var(--text-2); }
:where(body.mv-feature-page) .mv-preview-description summary{ min-height: var(--touch-target); align-content: center; cursor: pointer; }
:where(body.mv-feature-page) .mv-preview-description p{ margin: var(--space-2) 0 0; overflow-wrap: anywhere; }
:where(body.mv-feature-page) .mv-video-preview-modal .modal-head h2{ min-width: 0; overflow-wrap: anywhere; }
:where(body.mv-feature-page) #mv-duration{ margin-bottom: 16px; }
/* Shared PC/H5 presentation: the original form controls stay in one live form. */
.mv-workflow {
  --flow-gap: var(--space-4);
  --flow-chrome-title: 40px;
  --flow-chrome-steps: 52px;
  --flow-chrome-footer: 88px;
}

body.desktop-workspace.mv-flow-active {
  --sidebar-width: 188px;
  --desktop-header-height: 52px;
}

body.mv-flow-active { overflow: hidden; }
body.mv-flow-active .workspace-topbar .page-context p { display: none; }
body.mv-flow-active .workspace-topbar .page-context h1 { font-size: var(--text-3); }
body.mv-flow-active .workspace-topbar { height: var(--desktop-header-height); padding-block: var(--space-1); }

.creator-workspace #app-content.mv-workflow {
  display: grid;
  grid-template-rows: var(--flow-chrome-title) var(--flow-chrome-steps) auto minmax(0, 1fr) var(--flow-chrome-footer);
  gap: var(--space-2);
  height: calc(100dvh - var(--desktop-header-height, 68px));
  width: 100%;
  max-width: none;
  padding: var(--space-3) var(--space-6);
  min-height: 0;
}

.mv-workflow [hidden], .mv-library-page [hidden] { display: none !important; }
.mv-workflow .mv-step-head, .mv-workflow .page-heading-icon, .mv-workflow .page-heading-copy p { display: none; }
.mv-workflow .page-heading { margin: 0; min-height: 0; align-items: center; }
.mv-workflow .page-heading h2 { font-size: var(--text-5); margin: 0; }
.mv-workflow .page-actions { margin: 0; }

.mv-flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.mv-flow-steps button {
  display: flex; justify-content: center; align-items: center; gap: var(--space-2);
  min-width: 0; min-height: var(--touch-target); border: 0; border-bottom: 2px solid var(--line);
  padding: var(--space-1); color: var(--ink-secondary); background: transparent; font-size: var(--text-1);
}
.mv-flow-steps b { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; font-weight: var(--weight-medium); }
.mv-flow-steps [aria-current="step"] { color: var(--ink); border-color: var(--signal); }
.mv-flow-steps [aria-current="step"] b { color: var(--ink-inverse); background: var(--signal); border-color: var(--signal); }
.mv-flow-steps button:disabled { opacity: .5; cursor: default; }
.mv-flow-steps button:focus-visible, .mv-flow-tabs button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.mv-workflow .mv-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--flow-gap); align-items: stretch; min-height: 0; margin: 0; overflow-y: auto; }
.mv-workflow .mv-layout[data-flow-step="4"] { grid-template-columns: minmax(0, 1fr) minmax(210px, 32%); }
.mv-workflow .mv-builder { display: block; min-width: 0; min-height: 0; overflow: visible; }
.mv-workflow .mv-step { min-height: 0; padding: 0; border: 0; background: transparent; }
.mv-workflow .field { margin: var(--space-3) 0 0; gap: var(--space-1); }
.mv-workflow .field > span, .mv-workflow .field-label { font-size: var(--text-1); }
.mv-workflow .field-hint { font-size: var(--text-1); line-height: var(--leading-2); }
.mv-workflow .field-hint, .mv-workflow .mv-character-consent { color: var(--ink-secondary); }
.mv-workflow .input, .mv-workflow .select { min-height: 38px; padding-block: var(--space-2); }
.mv-flow-pane { min-width: 0; min-height: 0; }
.mv-flow-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }
.mv-flow-upload .mv-audio-repair { margin: 0; padding: var(--space-3); }
.mv-flow-choose-song { margin-top: var(--space-2); }
.mv-flow-upload .mv-character-consent { margin-top: var(--space-3); }
.mv-flow-upload #mv-custom-lyrics { margin: 0; padding: 0; border: 0; }
.mv-flow-upload textarea { height: clamp(110px, 23dvh, 230px); min-height: 0; resize: none; }
.mv-flow-upload .section-row { align-items: start; }
.mv-flow-upload #mv-song-title-hint { display: none; }
.mv-flow-lyrics-empty { padding: var(--space-6) 0; }
.mv-song-picker #mv-library-sources { display: block !important; padding: var(--space-4); }
.mv-song-picker .mv-work-picker { grid-template-columns: 1fr; }

.mv-flow-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.mv-flow-tabs button { flex: 1; min-width: 0; min-height: 38px; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-secondary); font-size: var(--text-1); }
.mv-flow-tabs [aria-pressed="true"] { color: var(--signal); background: var(--signal-soft); border-color: var(--signal); }
.mv-flow-phone-tabs, [data-flow-tab="settings:preview"] { display: none; }
.mv-flow-visual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4) var(--space-6); align-content: start; }
.mv-flow-visual [data-flow-pane="person"] { grid-column: 2; grid-row: 1 / 3; }
.mv-flow-visual [data-flow-pane="prompt"] { grid-column: 1; }
.mv-workflow .mv-mode-strip { margin: 0 0 var(--space-3); gap: var(--space-2); }
.mv-workflow .mv-mode { padding: var(--space-2); min-width: 0; min-height: 48px; gap: var(--space-1); }
.mv-workflow .mv-mode small, .mv-workflow .mv-mode b { display: none; }
.mv-workflow .mv-mode strong { font-size: var(--text-1); }
.mv-workflow .mv-mode-icon { width: 24px; height: 24px; }
.mv-workflow .style-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.mv-workflow .style-swatches button { min-width: 0; padding: var(--space-1); font-size: var(--text-1); }
.mv-workflow .style-swatches .swatch { height: 40px; min-height: 0; aspect-ratio: auto; }
.mv-workflow .mv-mode > span:not(.mv-mode-icon) { min-width: 0; }
.mv-workflow .mv-mode strong { white-space: nowrap; }
.mv-workflow .mv-custom-prompt { margin-top: 0; }
.mv-workflow .mv-custom-prompt textarea { min-height: 0; height: 76px; resize: none; }
.mv-workflow .generation-policy-hint { font-size: var(--text-1); }
.mv-workflow .mv-character-field { padding: var(--space-3); gap: var(--space-2); grid-template-columns: 56px minmax(0, 1fr); }
.mv-workflow .mv-character-thumb { width: 56px; height: 68px; }
.mv-workflow .mv-character-actions { grid-column: 1 / -1; flex-wrap: wrap; }
.mv-workflow .mv-character-library { max-height: 28dvh; overflow: auto; }
.mv-workflow .mv-character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mv-workflow .mv-highlight-selector { gap: var(--space-2); margin: 0; padding: var(--space-3); border: 0; }
.mv-flow-highlight-controls { display: flex; align-items: center; gap: var(--space-3); }
.mv-workflow #mv-duration { flex: 1; margin: 0; }
.mv-workflow .mv-auto-preview .section-row { flex-direction: row; }
.mv-workflow .mv-duration-hint { margin: 0; }
.mv-workflow .mv-auto-preview { padding: var(--space-2) 0; }
.mv-workflow .mv-auto-preview .section-row { margin: 0; }
.mv-workflow .mv-auto-preview p { margin: var(--space-1) 0 0; }
.mv-workflow .mv-auto-preview strong { font-size: var(--text-2); }
.mv-workflow .mv-manual-highlight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: 0; padding: 0; border: 0; background: transparent; }
.mv-workflow [data-flow-group="clip"][data-flow-pane="audio"] { grid-column: 1; grid-row: 1; }
.mv-workflow [data-flow-group="clip"][data-flow-pane="trim"] { grid-column: 1; grid-row: 2; }
.mv-workflow [data-flow-group="clip"][data-flow-pane="lyrics"] { grid-column: 2; grid-row: 1 / 3; }
.mv-workflow .mv-clip-preview, .mv-workflow .mv-selected-lyrics { border: 0; background: transparent; padding: 0; margin: 0; gap: var(--space-2); }
.mv-workflow #mv-selected-lyrics { padding: 0; white-space: normal; }
.mv-workflow .mv-selected-lyrics > .section-row { margin: 0; }
.mv-workflow .mv-highlight-preview-row { display: none; }
.mv-workflow #mv-highlight-audio, .mv-workflow #mv-clip-audio { display: none; }
.mv-workflow .mv-clip-preview .section-row { margin: var(--space-1) 0; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; }
.mv-workflow .mv-clip-preview strong { font-size: var(--text-1); }
.mv-flow-clip-seek { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-2) 0; }
.mv-flow-clip-seek input { flex: 1; min-width: 0; accent-color: var(--signal); }
.mv-flow-clip-seek small { white-space: nowrap; color: var(--ink-secondary); font-size: var(--text-1); }
.mv-workflow .mv-waveform { height: 62px; margin-top: var(--space-2); touch-action: none; }
.mv-workflow .mv-waveform-hint { font-size: var(--text-1); margin-top: var(--space-1); }
.mv-workflow .mv-zoom-modes { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-1) 0; }
.mv-workflow .mv-zoom-modes button { min-height: 34px; padding: var(--space-1) var(--space-2); }
.mv-workflow .mv-trim-summary { margin-top: var(--space-1); font-size: var(--text-1); }
.mv-workflow .mv-shot-hint { display: none; }
.mv-workflow .mv-shot-lines { gap: var(--space-2); }
.mv-workflow .mv-shot-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-1); gap: var(--space-1); }
.mv-workflow .mv-shot-line-text { grid-column: 1; grid-row: 1; }
.mv-workflow .mv-shot-add { grid-column: 2; grid-row: 1; margin: 0; }
.mv-workflow .mv-shot-tags { grid-column: 1 / -1; min-width: 0; }
.mv-workflow .mv-shot-scene { flex-basis: 100%; display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-workflow .mv-shot-line-text { font-size: var(--text-2); }
.mv-workflow .mv-shot-add { min-height: 34px; }
.mv-workflow .mv-shot-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); font-size: var(--text-1); }

.mv-flow-settings > .mv-flow-pane[data-flow-active="false"] { display: none; }
.mv-flow-settings .mv-settings-row { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.mv-flow-settings .mv-text-style-group { padding: 0; border: 0; }
.mv-flow-settings .mv-text-style-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.mv-flow-settings .field { margin: 0; }
.mv-flow-settings .mv-text-style-group > .section-row { flex-direction: row; justify-content: space-between; }
.mv-flow-settings .mv-text-style-group .section-row { margin-bottom: var(--space-2); }
.mv-flow-settings .mv-title-layout-field { margin-top: var(--space-2); }
.mv-flow-settings .mv-text-color-field { margin-top: var(--space-2); }
.mv-flow-settings .mv-subtitle-setting { margin: 0 0 var(--space-3); }
.mv-workflow .mv-preview { position: static; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.mv-workflow .mv-preview-frame { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
.mv-workflow .mv-preview-frame.portrait { width: min(170px, 100%); aspect-ratio: 9 / 16; }
.mv-workflow .mv-preview-note { padding: 0; font-size: var(--text-1); }
.mv-workflow .mv-preview-note strong { font-size: var(--text-1); }

.mv-flow-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); border-top: 1px solid var(--line); padding-top: var(--space-3); min-width: 0; }
.mv-flow-action-copy { flex: 1; min-width: 0; }
.mv-flow-action-copy strong, .mv-flow-action-copy small { display: block; }
.mv-flow-action-copy strong { font-size: var(--text-2); }
.mv-flow-action-copy small { font-size: var(--text-1); color: var(--ink-secondary); }
.mv-flow-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.mv-flow-footer .mv-submit { position: static; flex-direction: row; align-items: center; margin: 0; padding: 0; border: 0; background: transparent; display: flex; justify-content: space-between; flex: 1; min-width: 0; gap: var(--space-3); }
.mv-flow-footer .mv-submit > div { min-width: 0; }
.mv-flow-footer .mv-submit strong { font-size: var(--text-4); }
.mv-flow-footer #mv-submit { flex-shrink: 0; }
.mv-workflow #mv-history { margin: 0; min-height: 0; }
.mv-workflow #mv-history > .section-row { margin-bottom: var(--space-2); }

.mv-library-filters { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); flex-wrap: wrap; }
.mv-library-filters label { margin-left: auto; }
.mv-library-page .mv-history { margin-top: 0; }
.mv-library-page .mv-task-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: start; }
.mv-library-detail .mv-task-list { grid-template-columns: minmax(0, 1fr); }
.mv-workflow .mv-task-list { grid-template-columns: minmax(0, 1fr); }
.mv-library-page .mv-task-card, .mv-workflow .mv-task-card { display: flex; flex-direction: column; padding: 0; }
.mv-library-page .mv-task-media, .mv-workflow .mv-task-media { width: 100%; aspect-ratio: 16 / 9; min-height: 0; background: var(--canvas); }
.mv-library-page .mv-task-media video, .mv-workflow .mv-task-media video { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.mv-library-detail .mv-task-media { aspect-ratio: auto; }
.mv-library-detail .mv-task-media video { height: min(62dvh, 680px); min-height: 240px; }
.mv-library-page .mv-task-copy, .mv-workflow .mv-task-copy { padding: var(--space-4); }
.mv-library-page .mv-task-title, .mv-workflow .mv-task-title { gap: var(--space-3); align-items: flex-start; }
.mv-task-title h3 { min-width: 0; margin: 0; font-size: var(--text-4); line-height: var(--leading-2); overflow-wrap: anywhere; }
.mv-task-title h3 a { color: var(--ink); text-decoration: none; }
.mv-task-title h3 a:hover { color: var(--signal); }
.mv-task-meta { display: flex; gap: var(--space-2) var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); color: var(--ink-secondary); font-size: var(--text-1); }
.mv-task-details { margin-top: var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-2); }
.mv-task-details summary { display: list-item; min-height: var(--touch-target); align-content: center; cursor: pointer; color: var(--ink-secondary); font-size: var(--text-2); }
.mv-task-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-2) 0; font-size: var(--text-1); }
.mv-task-facts dt { color: var(--ink-tertiary); }
.mv-task-facts dd { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.mv-task-details .mv-task-prompt { margin: var(--space-3) 0 0; color: var(--ink-secondary); font-size: var(--text-2); line-height: var(--leading-3); overflow-wrap: anywhere; }
.mv-task-details .mv-task-prompt b { display: block; margin-bottom: var(--space-1); }
.mv-task-secondary-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.mv-library-page .mv-media-state, .mv-workflow .mv-media-state { display: flex; flex-direction: column; gap: var(--space-2); justify-content: center; align-items: center; padding: var(--space-4); text-align: center; }
.mv-media-state strong { color: var(--ink); font-size: var(--text-3); }
.mv-media-state > span { color: var(--ink-secondary); font-size: var(--text-1); }
.mv-library-page .mv-task-title > .badge, .mv-workflow .mv-task-title > .badge { flex-shrink: 0; align-self: flex-start; }
.mv-library-page .mv-task-actions, .mv-workflow .mv-task-actions { gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-3); margin-top: var(--space-3); border-top: 1px solid var(--line); }

html[data-client="mobile"] body.mv-flow-active .mobile-primary-nav { display: none; }
html[data-client="mobile"] body.mv-flow-active { padding-bottom: 0; }
html[data-client="mobile"] body.mv-flow-active .mobile-app-shell { padding-bottom: 0; }
html[data-client="mobile"] .creator-workspace #app-content.mv-workflow {
  --flow-chrome-title: 36px;
  --flow-chrome-steps: 52px;
  --flow-chrome-footer: 84px;
  grid-template-rows: var(--flow-chrome-title) var(--flow-chrome-steps) auto minmax(0, 1fr) var(--flow-chrome-footer);
  height: calc(100dvh - var(--m-header-height) - var(--m-status-height) - 1px);
  max-width: var(--m-content-max); padding: var(--space-2) var(--space-3) calc(var(--space-2) + var(--safe-bottom));
  margin: 0 auto; gap: var(--space-1);
}
html[data-client="mobile"] .mv-workflow .page-heading h2 { font-size: var(--text-4); }
html[data-client="mobile"] .mv-workflow .page-heading { display: flex; align-items: center; }
html[data-client="mobile"] .mv-workflow .page-heading h2 { display: block; }
html[data-client="mobile"] .mv-workflow .page-actions { width: auto; }
html[data-client="mobile"] .mv-workflow .mv-highlight-selector { padding: var(--space-2); gap: var(--space-1); }
html[data-client="mobile"] .mv-workflow .mv-auto-preview .section-row { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; }
html[data-client="mobile"] .mv-workflow .mv-highlight-preview-row .btn { width: auto; }
html[data-client="mobile"] .mv-workflow .mv-highlight-preview-row { align-items: center; }
html[data-client="mobile"] .mv-flow-highlight-controls { display: grid; grid-template-columns: 1fr; gap: var(--space-1); }
html[data-client="mobile"] .mv-flow-highlight-controls > .field-label { display: none; }
html[data-client="mobile"] .mv-workflow .mv-highlight-selector:has(.mv-manual-highlight:not([hidden])) > .mv-duration-hint { display: none; }
html[data-client="mobile"] .mv-workflow .mv-auto-preview { padding: 0; }
html[data-client="mobile"] .mv-workflow .mv-auto-preview p { font-size: var(--text-1); line-height: var(--leading-1); }
html[data-client="mobile"] .mv-workflow .mv-selected-lyrics { gap: var(--space-1); }
html[data-client="mobile"] .mv-workflow .mv-selected-lyrics > .section-row { display: none; }
html[data-client="mobile"] .mv-workflow .mv-shot-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-1); }
html[data-client="mobile"] .mv-workflow .mv-shot-line-text { grid-column: 1; grid-row: 1; }
html[data-client="mobile"] .mv-workflow .mv-shot-add { grid-column: 2; grid-row: 1; margin: 0; }
html[data-client="mobile"] .mv-workflow .mv-shot-tags { grid-column: 1 / -1; gap: var(--space-1); }
html[data-client="mobile"] .mv-workflow #mv-selected-lyrics .mv-shot-tag { min-height: var(--touch-target); font-size: var(--text-1); }
html[data-client="mobile"] .mv-workflow .mv-shot-scene { flex-basis: 100%; min-height: 0; padding-block: 0; font-size: var(--text-1); }
html[data-client="mobile"] .mv-workflow .mv-shot-pagination { margin-top: var(--space-1); }
html[data-client="mobile"] .mv-workflow .mv-flow-clip { margin-top: var(--space-1); }
html[data-client="mobile"] .mv-flow-footer .mv-flow-action-copy small { display: none; }
html[data-client="mobile"] .mv-flow-steps { gap: var(--space-1); }
html[data-client="mobile"] .mv-flow-steps button { flex-direction: column; gap: var(--space-1); padding: 0; min-height: var(--touch-target); }
html[data-client="mobile"] .mv-flow-steps b { width: 20px; height: 20px; }
html[data-client="mobile"] .mv-workflow .mv-layout, html[data-client="mobile"] .mv-workflow .mv-layout[data-flow-step="4"] { display: block; }
html[data-client="mobile"] .mv-flow-upload, html[data-client="mobile"] .mv-flow-visual, html[data-client="mobile"] .mv-workflow .mv-manual-highlight { display: block; }
html[data-client="mobile"] .mv-flow-phone-tabs, html[data-client="mobile"] [data-flow-tab="settings:preview"] { display: flex; }
html[data-client="mobile"] .mv-workflow .mv-flow-tabs button { min-height: var(--touch-target); padding: var(--space-1); }
html[data-client="mobile"] .mv-flow-pane[data-flow-active="false"] { display: none; }
html[data-client="mobile"] .mv-workflow .input, html[data-client="mobile"] .mv-workflow .select, html[data-client="mobile"] .mv-workflow .textarea { font-size: var(--text-3); }
html[data-client="mobile"] .mv-workflow .mv-audio-repair { grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-2); gap: var(--space-2); }
html[data-client="mobile"] .mv-workflow .mv-audio-repair > span { display: none; }
html[data-client="mobile"] .mv-workflow .mv-audio-repair .btn { grid-column: auto; width: auto; }
html[data-client="mobile"] .mv-flow-upload textarea { height: clamp(110px, 24dvh, 220px); }
html[data-client="mobile"] .mv-workflow .mv-character-consent { margin-top: var(--space-2); padding: 0; font-size: var(--text-1); }
html[data-client="mobile"] .mv-workflow .mv-custom-prompt textarea { height: 140px; }
html[data-client="mobile"] .mv-workflow .mv-mode-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-client="mobile"] .mv-workflow .mv-mode { min-height: 48px; padding: var(--space-1); }
html[data-client="mobile"] .mv-workflow .mv-mode-icon { display: none; }
html[data-client="mobile"] .mv-workflow .style-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-client="mobile"] .mv-workflow .mv-clip-preview .btn { width: auto; min-height: var(--touch-target); }
html[data-client="mobile"] .mv-workflow .mv-waveform-hint { display: none; }
html[data-client="mobile"] .mv-workflow .mv-highlight-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: 0; }
html[data-client="mobile"] .mv-workflow .mv-highlight-sliders label { gap: 0; }
html[data-client="mobile"] .mv-workflow .mv-highlight-sliders input { width: 100%; margin: 0; touch-action: none; }
html[data-client="mobile"] .mv-workflow .mv-highlight-sliders input, html[data-client="mobile"] .mv-flow-clip-seek input { min-height: var(--touch-target); }
html[data-client="mobile"] .mv-workflow .mv-waveform { height: 52px; }
html[data-client="mobile"] .mv-workflow .mv-zoom-modes > span { display: none; }
html[data-client="mobile"] .mv-workflow .mv-highlight-sliders span { font-size: var(--text-1); }
html[data-client="mobile"] .mv-workflow #mv-zoom-modes { margin: var(--space-1) 0; gap: var(--space-1); }
html[data-client="mobile"] .mv-workflow #mv-zoom-modes button { min-height: var(--touch-target); }
html[data-client="mobile"] .mv-flow-clip > .mv-flow-tabs { margin-bottom: var(--space-1); }
html[data-client="mobile"] .mv-workflow .mv-duration-hint { font-size: var(--text-1); line-height: var(--leading-1); }
html[data-client="mobile"] .mv-workflow .mv-preview { height: min(290px, 40dvh); margin: 0; }
html[data-client="mobile"] .mv-workflow .mv-preview-frame { max-width: 360px; }
html[data-client="mobile"] .mv-workflow .mv-preview-frame.portrait { width: min(140px, 100%); }
html[data-client="mobile"] .mv-flow-footer { flex-wrap: wrap; gap: var(--space-1); padding-top: var(--space-2); }
html[data-client="mobile"] .mv-flow-action-copy { flex-basis: 100%; display: flex; justify-content: space-between; gap: var(--space-2); align-items: center; }
html[data-client="mobile"] .mv-flow-action-copy strong, html[data-client="mobile"] .mv-flow-action-copy small { font-size: var(--text-1); }
html[data-client="mobile"] .mv-flow-actions { width: 100%; }
html[data-client="mobile"] .mv-flow-actions .btn-primary { flex: 1; }
html[data-client="mobile"] .mv-flow-footer .mv-submit { gap: var(--space-2); }
html[data-client="mobile"] .mv-flow-footer .mv-submit small { font-size: var(--text-1); line-height: var(--leading-1); }
html[data-client="mobile"] .mv-flow-footer #mv-cost-detail { display: none; }
html[data-client="mobile"] .mv-flow-footer .mv-submit .btn { width: auto; }
html[data-client="mobile"] .mv-workflow[data-flow-step="4"] .mv-flow-footer { flex-wrap: nowrap; }
html[data-client="mobile"] .mv-workflow[data-flow-step="4"] .mv-flow-actions { width: auto; }
html[data-client="mobile"] .mv-workflow[data-flow-step="4"] .mv-submit strong { font-size: var(--text-3); }
html[data-client="mobile"] .mv-flow-settings .mv-text-style-row:has(#mv-title-angle-field:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-client="mobile"] .mv-workflow .mv-flow-settings { padding: var(--space-2); }
html[data-client="mobile"] .mv-workflow .mv-mode { display: flex; justify-content: center; }
html[data-client="mobile"] .mv-library-page .mv-task-list { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
html[data-client="mobile"] .mv-library-page .mv-task-title, html[data-client="mobile"] .mv-workflow .mv-task-title { flex-direction: row; }
html[data-client="mobile"] .mv-task-title h3 { font-size: var(--text-3); }
html[data-client="mobile"] .mv-library-page .mv-task-copy, html[data-client="mobile"] .mv-workflow .mv-task-copy { padding: var(--space-3); }
html[data-client="mobile"] .mv-library-detail .mv-task-media video { height: min(52dvh, 480px); min-height: 200px; }
html[data-client="mobile"] .mv-task-actions > .btn { min-height: var(--touch-target); }
html[data-client="mobile"] .mv-task-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-client="mobile"] .mv-task-actions > .btn-primary { grid-column: 1 / -1; }
html[data-client="mobile"] .mv-library-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
html[data-client="mobile"] .mv-library-filters .segmented { grid-column: 1 / -1; }
html[data-client="mobile"] .mv-library-filters label { margin: 0; min-width: 0; }

/* Very short/zoomed viewports retain every field and action instead of clipping them. */
@media (max-height: 640px) {
  body.mv-flow-active { overflow-y: auto; }
  .creator-workspace #app-content.mv-workflow, html[data-client="mobile"] .creator-workspace #app-content.mv-workflow { display: flex; flex-direction: column; min-height: 0; height: auto; }
  .mv-workflow .page-heading { min-height: 40px; }
  .mv-flow-steps { min-height: 52px; }
  .mv-workflow .mv-layout { overflow: visible; }
  .mv-flow-footer { min-height: 100px; }
}

/* Retain the music creation preference outside the MV module. */
body.mv-feature-page .experience-control, body.mv-feature-page .mobile-experience-bar { display: none; }
html[data-host="miniprogram"] .mv-workflow .page-heading h2 { display: none; }
html[data-host="miniprogram"] .mv-workflow .page-heading { justify-content: flex-end; }

.discovery-types { margin-bottom: 20px; width: fit-content; }
.discovery-types a[aria-current="page"] { background: var(--surface-raised); color: var(--ink-primary); }
.mv-gallery video { display: block; width: 100%; height: 240px; object-fit: contain; background: #000; }

/* Draggable MV text preview, isolated from original music cover previews. */
:where(body.mv-feature-page) .preview-caption {
  position: absolute;
  inset: auto;
  left: 50%;
  /* 与成片默认歌名位置一致：水平居中、距顶部 1/4 画面高（JS 会用内联样式覆盖） */
  top: 25%;
  max-width: min(86%, 320px);
  min-width: 0;
  /* 歌名折行完全按成片算好的断行来，所以容器要按内容撑开：
     left:50% 会把「可用宽度」砍掉一半，默认的收缩宽度会让预览比成片多折一行。 */
  width: max-content;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

:where(body.mv-feature-page) .preview-caption.is-dragging {
  cursor: grabbing;
}

/* 竖排：每字一行、多列从右往左，与成片的多列 ASS 事件一一对应。 */
:where(body.mv-feature-page) .preview-caption[data-layout="vertical"] {
  max-width: none;
  max-height: 88%;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

:where(body.mv-feature-page) .preview-caption[data-layout="vertical"] strong {
  margin: 0 3px 0 9px;
}

/* 斜排：整块绕中心旋转，角度就是成片的 \frz。 */
:where(body.mv-feature-page) .preview-caption[data-layout="diagonal"] {
  max-width: 120%;
}

:where(body.mv-feature-page) .mv-title-layout-field {
  margin: 0;
}

:where(body.mv-feature-page) .preview-caption span, :where(body.mv-feature-page) .preview-caption strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(body.mv-feature-page) .preview-caption span {
  color: var(--signal);
  font-size: 9px;
  font-weight: 700;
}

:where(body.mv-feature-page) .preview-caption strong {
  margin: 3px 0 9px;
  color: white;
  /* 长歌名按成片规则折行（最多 3 行），所以不能 nowrap */
  white-space: normal;
  line-height: 1.2;
}

/* 自定义文字（作者自由摆放的元素）：整块可拖，位置与成片一一对应。 */
:where(body.mv-feature-page) .preview-overlay-layer {
  position: absolute;
  left: 50%;
  top: 94%;
  max-width: 90%;
  padding: 2px 5px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgb(0 0 0 / 60%);
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

:where(body.mv-feature-page) .preview-overlay-layer.is-dragging {
  cursor: grabbing;
}

/* 歌词字幕预览：水平始终居中，用户只能上下拖（与成片一致）。 */
:where(body.mv-feature-page) .preview-lyric-layer {
  position: absolute;
  left: 50%;
  top: 87%;
  max-width: 88%;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: white;
  background: rgb(0 0 0 / 42%);
  font-size: calc(12px * var(--preview-lyric-scale, 1));
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgb(0 0 0 / 65%);
  transform: translate(-50%, -50%);
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}

:where(body.mv-feature-page) .preview-lyric-layer.is-dragging {
  cursor: ns-resize;
}

