/* Page titles stay centred in the usable screen, independently of side controls. */
body .board-heading,
body #boardDialog .board-dialog-heading,
body #testPage .test-heading,
body #quickSettings .quick-settings-heading {
 display:grid!important;
 grid-template-columns:minmax(88px,1fr) minmax(0,4fr) minmax(88px,1fr)!important;
 align-items:center;
 column-gap:8px;
}
body .board-heading>h2,
body #boardDialog .board-dialog-heading>h2,
body #testPage .test-heading>h2,
body #quickSettings .quick-settings-heading>h2 {
 grid-column:2!important;
 grid-row:1!important;
 width:100%!important;
 min-width:0;
 margin-inline:0!important;
 text-align:center!important;
 justify-self:stretch;
 overflow-wrap:anywhere;
}
#returnToAppMenu,#backBoardDialog,#testBack {grid-column:1;grid-row:1;justify-self:start}
#clearMessageSearch,#quickSettings .quick-settings-heading>button {grid-column:3;grid-row:1;justify-self:end}
body .board-heading>button,body .board-dialog-heading>button,body .test-heading>button,body .quick-settings-heading>button {max-width:100%;min-width:44px;white-space:normal;overflow-wrap:anywhere}
body #testPage .test-heading>#layout {grid-column:3;grid-row:1;justify-self:end}
body .settings-heading,body .full-message-heading {display:block!important;text-align:center}
body #settingsTitle,body #fullMessageTitle {width:100%;min-width:0;margin-inline:0!important;grid-column:auto!important;grid-row:auto!important;text-align:center!important;overflow-wrap:anywhere}
body #appMenuTitle,body #initialSetupTitle,body dialog>h2:first-of-type,body dialog>header>h2 {text-align:center!important;overflow-wrap:anywhere}
/* The title wraps rather than overlapping controls at large text sizes. */
@media(max-width:360px){body .board-heading,body #boardDialog .board-dialog-heading,body #testPage .test-heading,body #quickSettings .quick-settings-heading{grid-template-columns:76px minmax(0,1fr) 76px!important;column-gap:6px}}

/* The balanced grid replaces the old colour-key padding/absolute positioning. */
body .board-heading.has-aac-colour-key #currentBoard{padding-inline:0!important}
body .board-heading #openBoardAACColourKey{position:static;grid-column:3;grid-row:1;justify-self:end;max-width:100%}
body .board-heading #clearMessageSearch:not([hidden])~#openBoardAACColourKey{grid-row:2}

