/* Shared heading alignment, including page titles beside a back control. */
body :is(h1,h2,h3,h4,h5,h6,.title-text,.game-current) { text-align:center !important; }
body :is(h1,h2,h3,h4,h5,h6) { overflow-wrap:break-word; }
body .header-container:has(> .left-section) { display:block; box-sizing:border-box; }
body .header-container > .left-section,
body.exam-page.exam-legacy .header-container,
body .topbar:has(> .back),
body .admin-page-header:has(> .admin-back),
body .diary-topbar,
body .game-nav {
  display:grid !important; grid-template-columns:44px minmax(0,1fr) 44px !important;
  align-items:center; gap:12px; box-sizing:border-box;
  width:100%; height:auto; min-width:0;
}
body .header-container > .left-section > :first-child,
body.exam-page.exam-legacy .header-container > .site-back,
body .topbar > .back,
body .admin-page-header > .admin-back,
body .diary-topbar > .site-back,
body .game-nav > a:first-child {
  grid-column:1 !important; grid-row:1 !important; justify-self:start; margin:0;
}
body .header-container :is(#sedew_title_s,#sedew_title,.title-wrap),
body .topbar > .title,
body .admin-page-header > .admin-heading,
body .diary-topbar > div,
body .game-nav > .game-current {
  grid-column:2 !important; grid-row:1 !important; justify-self:stretch;
  min-width:0; width:auto; max-width:100%; margin:0; padding:0;
  text-align:center !important; overflow-wrap:break-word;
}
body .header-container .title-text { margin:0; text-align:center !important; }
body .header-container #timer-box {
  grid-column:1 / -1 !important; grid-row:2 !important; justify-self:end;
  margin:0; max-width:100%;
}
body .diary-topbar > button { grid-column:1 / -1; grid-row:2; justify-self:end; }
body .admin-heading > p, body .diary-topbar > div > p { text-align:center; }
body .game-nav > .game-current { padding:9px 0; }
/* Headings rendered as flex rows, such as the 100/200/300 cards. */
body .div3 .grid-container :is(#top100,#top200,#top300) { justify-content:center; }
body .journey-heading { flex-direction:column; align-items:center; text-align:center; }
body .journey-heading > div { width:100%; }
body .admin-section-heading > div:first-child { flex:1; min-width:0; }
