/* PlaySchool V4.6.2: stable shared header on all public tabs.
   A dedicated center grid column prevents async authentication from moving search. */
@media (min-width: 801px){
  body:not(.ps-station-v4) .psui-header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(215px,430px) minmax(0,1fr)!important;
    align-items:center!important;gap:14px!important;
  }
  body:not(.ps-station-v4) .psui-header .psui-brand{
    grid-column:1;min-width:0!important;justify-self:start!important;
  }
  body:not(.ps-station-v4) .psui-header .psui-search{
    grid-column:2;justify-self:stretch!important;width:100%!important;
    max-width:430px!important;margin:0!important;
  }
  body:not(.ps-station-v4) .psui-header .psui-head-actions{
    grid-column:3;justify-self:end!important;margin:0!important;
  }
  body:not(.ps-station-v4) .psui-all-header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(215px,460px) minmax(0,1fr)!important;
    align-items:center!important;gap:14px!important;
  }
  body:not(.ps-station-v4) .psui-all-header>.psui-all-brand{
    grid-column:1;justify-self:start!important;min-width:0!important;
  }
  body:not(.ps-station-v4) .psui-all-header>.psui-all-search{
    grid-column:2;justify-self:stretch!important;width:100%!important;
    max-width:460px!important;min-width:0!important;margin:0!important;
  }
  body:not(.ps-station-v4) .psui-all-header>.psui-all-actions{
    grid-column:3;justify-self:end!important;margin:0!important;min-width:0!important;
  }
}
/* Old account/admin buttons must never flash before /api/psui/v45/me resolves.
   New, authenticated controls are inserted by the existing V4.5 script. */
.psui-head-actions>.psui-admin-btn,
.psui-head-actions>.psui-head-link,
.psui-all-actions>#psui-all-account{display:none!important}
.psui-head-actions,.psui-all-actions{min-height:36px}
.psui-header .ps45-auth-controls,
.psui-all-header .ps45-auth-controls{min-height:35px;white-space:nowrap}
/* Keep the personal station's hamburger and brand together, as requested. */
body.ps-station-v4 .psui-all-header{display:flex!important;justify-content:flex-start!important;gap:10px!important}
body.ps-station-v4 .psui-all-header>.psui-all-brand{margin:0!important}
body.ps-station-v4 .psui-all-header>.psui-all-search{margin-left:auto!important;margin-right:auto!important}
@media(max-width:800px){
  body:not(.ps-station-v4) .psui-header,body:not(.ps-station-v4) .psui-all-header{gap:9px!important}
  body:not(.ps-station-v4) .psui-brand{min-width:0!important}
}
