/* Opt-in geometry for mounted immutable Main/Stage headers. No Game-ID rules.
   The canonical shell continues to own Settings, locale and return behavior. */
.wp-shell-header-layout:is(.wp-main-shell-header,.wp-stage-shell-header){
 display:grid!important;position:relative!important;inset:auto!important;
 width:100%!important;max-width:920px!important;height:64px!important;min-height:64px!important;
 margin:0 auto!important;padding:8px 16px!important;gap:8px!important;
 grid-template-columns:58px minmax(0,1fr) 58px!important;grid-template-rows:48px!important;
 align-items:center!important;direction:ltr;overflow:visible!important;
 background:#17243a;color:#f8fafc;isolation:isolate;z-index:100!important;
}
.wp-shell-header-layout>.wp-shell-return{grid-column:1!important;grid-row:1!important;justify-self:start!important;align-self:center!important}
.wp-shell-header-layout>.wp-shell-settings{grid-column:3!important;grid-row:1!important;justify-self:end!important;align-self:center!important}
.wp-shell-header-layout:is(.wp-main-shell-header,.wp-stage-shell-header)>:is(h1,h2,strong){
 position:static!important;inset:auto!important;transform:none!important;
 grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;
 margin:0!important;padding:0!important;white-space:nowrap!important;overflow:hidden!important;
 text-overflow:ellipsis!important;text-align:center!important;font:800 22px/1.2 system-ui,sans-serif!important;
}
.wp-shell-header-layout .wp-shell-settings-button,.wp-shell-header-layout>.wp-shell-return{
 background:#f8fafc!important;color:#176a9d!important;border:1px solid #ffffff29!important;
 border-radius:14px!important;box-shadow:none!important;
}
.wp-shell-header-layout>.wp-shell-return[data-wp-return="stage"]{width:48px!important;min-width:48px!important}
.wp-shell-header-layout .wp-shell-settings-popover{direction:initial;background:#0f1d31!important}
html[dir="rtl"] .wp-shell-header-layout .wp-shell-settings-popover{direction:rtl}
/* Anchor from the measured physical edge, not the document's text direction. */
.wp-shell-header-layout:is(.wp-main-shell-header,.wp-stage-shell-header)>.wp-shell-settings[data-wp-popover-edge="right"]>.wp-shell-settings-popover{right:0!important;left:auto!important;transform-origin:top right!important}
.wp-shell-header-layout:is(.wp-main-shell-header,.wp-stage-shell-header)>.wp-shell-settings[data-wp-popover-edge="left"]>.wp-shell-settings-popover{left:0!important;right:auto!important;transform-origin:top left!important}
@media(max-width:699px) and (orientation:portrait){
 .wp-shell-header-layout:is(.wp-main-shell-header,.wp-stage-shell-header){
  height:88px!important;min-height:88px!important;padding:0 12px!important;
  grid-template-rows:48px 32px!important;
 }
 .wp-shell-header-layout:is(.wp-main-shell-header,.wp-stage-shell-header)>:is(h1,h2,strong){grid-column:1/-1!important;grid-row:2!important;font-size:20px!important}
}
