/* Template-library controls must fit their own grid track. Preserve the
   existing columns, colours, typography, upload limits and portal shell. */
.d53-studio .theme-library,
.d53-studio .theme-editor,
.d53-studio .theme-upload,
.d53-studio .theme-upload > label {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.d53-studio .theme-upload {
  grid-template-columns: minmax(0, 1fr);
}
.d53-studio .theme-upload > *,
.d53-studio .theme-upload input[type="file"] {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.d53-studio .theme-upload > button,
.d53-studio .theme-upload > small,
.d53-studio .theme-upload > label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.d53-studio .theme-upload > button { height: auto; }
