Be sure that Title Bar is unchecked in the Customize Toolbar... menu. Tested on macOS only, but presumably should work elsewhere.

Add the following to userChrome.css:

#main-window #titlebar {
    display: none !important;
}
#nav-bar{
    margin-top: -20px;
}
#TabsToolbar{
    height: 0;
}

Will have to restart Firefox to see changes.