/* One image-format entry, using the existing form values and choices. */
html body.reference-ui-shell[data-studio-ui] #referenceComposerControls .reference-format-icon,
html body.reference-ui-shell[data-studio-ui] #referenceComposerControls .reference-duration-icon {
  width: 17px; height: 17px; flex: 0 0 17px; color: var(--studio-muted);
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerControls #referenceRatioSummary {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsSubtitle { display: none !important; }
html body.reference-ui-shell[data-studio-ui] .studio-side-heading small { display: none !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerControls .refine-chip-label { display: none !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #referenceComposerParametersPanel {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 20px !important;
  min-width: 0; width: 100%;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerParametersPanel[data-active-subsection="format"] > :not(#videoParamGrid):not(#imageRatioField):not(#imageResolutionField),
html body.reference-ui-shell[data-studio-ui] #referenceComposerParametersPanel[data-active-subsection="format"] #videoParamGrid > :not(#ratioControl):not(#resolutionControl) { display: none !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] :is(#videoParamGrid,#imageRatioField,#imageResolutionField) {
  grid-column: 1 / -1 !important; width: 100% !important; min-width: 0 !important; margin: 0 !important;
  padding: 0 !important; border: 0 !important; background: transparent !important; gap: 20px !important;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] :is(#ratioControl,#resolutionControl,#imageRatioField,#imageResolutionField) > label {
  display: block !important; margin: 0 0 10px !important; color: var(--studio-sub) !important;
  font-size: 12px !important; font-weight: 600 !important;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choices-options,
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 7px !important;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choice {
  min-height: 46px !important; padding: 9px !important; gap: 7px !important;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choices-ratio .direct-choice { display: flex !important; justify-content: center !important; min-height: 56px !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choices-ratio .direct-choice-copy { flex: 0 1 auto; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choices-quality .direct-choice-copy strong { font-size: 14px !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choice-copy small,
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices strong { display: none !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choice-check { width: 12px; flex-basis: 12px; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices button {
  display: flex !important; align-items: center; justify-content: center; gap: 10px !important; min-height: 56px !important; padding: 9px !important;
  border-radius: 8px !important;
}
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices span { font-size: 13px; font-weight: 600; color: inherit; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices i { max-width: 25px; max-height: 25px; }
html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices button:disabled { opacity: .5; cursor: not-allowed; }
/* This named layer also owns the sidebar's important layout declarations. */
@layer studio-sidebar {
  @media (min-width: 1180px) {
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceComposerModelButton { order: 1 !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceComposerReferenceButton { order: 2 !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceComposerRatioButton { order: 3 !important; grid-column: auto !important; justify-content: flex-start !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceComposerProjectButton { order: 4 !important; grid-column: auto !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceDurationControl { order: 5 !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceComposerProviderSettingsButton { order: 6 !important; grid-column: 1 / -1 !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #generationFooter { order: 7 !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls[data-creation-type=audio] #referenceComposerProjectButton { grid-column: 1 / -1 !important; }
    html body.reference-ui-shell[data-studio-ui][data-studio-layout-active=left] #workspace #creationComposer #referenceComposerControls #referenceComposerRatioButton > span:last-child { margin-left: auto; }
  }
}
@media (max-width: 430px) {
  html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] .direct-choices-options,
  html body.reference-ui-shell[data-studio-ui] #referenceComposerSettingsPanel[data-active-section="format"] #imageRatioChoices { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
