## Description Long gallery titles without spaces can overflow their buttons in the **Add to gallery** dialog. On the gallery detail page, the rename button is vertically centered next to the title, so it appears halfway down when a long title wraps across several lines on mobile. <img width="355" height="216" alt="Image" src="https://git.ntnu.no/user-attachments/assets/3080eac8-73be-4939-9916-6ceb5452fcb0" /> ## Done when - [x] Long gallery titles wrap within their buttons in the **Add to gallery** dialog, including titles without spaces. - [x] The dialog fits the viewport without horizontal scrolling on mobile and desktop. - [x] Short titles still display on one line when there is room, and galleries can be selected with a mouse or keyboard. - [x] On mobile, the rename button follows the end of the gallery title in edit mode and wraps to the next line if needed. - [x] The rename button keeps its existing alignment on desktop.