/* One rail on every tab. Topic tools retain their Settings/Shop entries. */
/* Smaller visible controls, with the full 44px target retained. */
html.vr-app.vr-ready .masthead .profilebar>:is(.mm-theme-top,.mm-leaderboard-top,.mm-wearable-top,[data-header-shop],[data-injectable-open]){position:relative;border:0;background:transparent;padding:0}
html.vr-app.vr-ready .masthead .profilebar>:is(.mm-theme-top,.mm-leaderboard-top,.mm-wearable-top,[data-header-shop],[data-injectable-open])::before{content:'';position:absolute;inset:4px;border:1px solid var(--rule);border-radius:50%;pointer-events:none}
html.vr-app.vr-ready .masthead .profilebar>:is(.mm-theme-top,.mm-leaderboard-top,.mm-wearable-top,[data-header-shop],[data-injectable-open]) svg{width:18px;height:18px}
html.vr-app.vr-ready .masthead .profilebar>#prof-chip{justify-content:center}
html.vr-app.vr-ready .masthead .profilebar>#prof-chip .mm-account-avatar{width:36px;height:36px;flex-basis:36px}
html.vr-app .masthead :is(.mm-wearable-top,.mm-theme-top){display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;padding:0;border:1px solid var(--rule);border-radius:50%;background:transparent;color:var(--ink);cursor:pointer}
html.vr-app .masthead :is(.mm-wearable-top,.mm-theme-top) svg{width:22px;height:22px}
html.vr-app .masthead :is(.mm-wearable-top,.mm-theme-top):hover{border-color:var(--amber);color:var(--amber)}
html.vr-app .masthead :is(.mm-wearable-top,.mm-theme-top):focus-visible{outline:3px solid var(--amber);outline-offset:3px}
html.vr-app .masthead :is(.mm-wearable-top,.mm-theme-top)[hidden]{display:none!important}
@media(max-width:899px){
 html.vr-app.vr-ready .masthead{height:auto;min-height:68px;padding:12px;padding-top:calc(12px + env(safe-area-inset-top))}
 html.vr-app.vr-ready .masthead-in{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;width:100%;gap:8px}
 html.vr-app.vr-ready .masthead .brand{display:flex;flex-direction:row;align-items:baseline;justify-content:flex-start;flex:0 0 auto;gap:8px;min-width:0;width:auto;margin:0;opacity:1;overflow:visible;pointer-events:auto;font:600 var(--type-20)/1 var(--sans,system-ui);letter-spacing:-.7px}
 html.vr-app.vr-ready .masthead .brand .vr-wordmark{display:block;font:inherit;letter-spacing:inherit;white-space:nowrap}
 /* Replaced-element baseline is its bottom. 1cap therefore follows the
    wordmark's capital height at every text scale, with no pixel mark size. */
 html.vr-app.vr-ready .masthead .brand img{flex:0 0 auto;width:auto;height:.72em;max-width:none;object-fit:contain;border-radius:0;font:inherit;vertical-align:baseline}
 @supports(height:1cap){html.vr-app.vr-ready .masthead .brand img{height:1cap}}
 html.vr-app.vr-ready .masthead .profilebar{display:flex;align-items:center;flex:0 0 auto;gap:4px;margin:0;min-width:0}
 html.vr-app.vr-ready .masthead .profilebar>:is(.nav-secondary-action,.vr-theme-wrap,.vr-install-wrap,.vr-softlaunch){display:none!important}
 html.vr-app.vr-ready .masthead .profilebar>:is(.mm-theme-top,.mm-leaderboard-top,.mm-wearable-top,[data-header-shop],[data-injectable-open],#prof-chip){order:0;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin:0}
 html.vr-app.vr-ready .masthead .profilebar>:is([data-header-shop],[data-injectable-open]):not([hidden]){display:grid!important}
 html.vr-app.vr-ready .masthead-in.mm-header-stacked{flex-wrap:wrap;row-gap:4px}
 html.vr-app.vr-ready .masthead-in.mm-header-stacked .brand{width:max-content}
 html.vr-app.vr-ready .masthead-in.mm-header-stacked .profilebar{flex-basis:100%;width:100%;justify-content:space-between}
 /* Reuse the existing 41px brand/badge row; the 44px action row stays put. */
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill){display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:calc(var(--type-20) + 21px) 44px;gap:4px 16px;align-items:center}
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill)>.brand{grid-column:1;grid-row:1;align-self:center;width:max-content;max-width:100%;padding:0;font-size:min(calc(var(--type-20) + 20px),calc((100vw - 96px)/6.5));letter-spacing:-1.1px}
 html.vr-app.vr-ready .masthead-in>.mm-header-pro-pill{grid-column:2;grid-row:1;justify-self:end;align-self:center}
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill)>.profilebar{grid-column:1/-1;grid-row:2;width:100%;gap:0;justify-content:space-between}
}
@media(min-width:600px) and (max-width:899px){
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill){grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:44px;gap:8px}
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill)>.brand{font-size:calc(var(--type-20) + 12px)}
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill)>.profilebar{grid-column:2;grid-row:1;width:auto;gap:4px}
 html.vr-app.vr-ready .masthead-in>.mm-header-pro-pill{grid-column:3;grid-row:1}
}


/* Mobile brand is centred on the viewport, independent of the right Pro pill.
   Fit the requested signature in the existing top row; action targets stay put. */
html.vr-app .mm-brand-tagline{display:none}
@media(max-width:599px){
 html.vr-app.vr-ready .masthead-in{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:calc(var(--type-20) + 21px) 44px;gap:4px 16px;align-items:center}
 html.vr-app.vr-ready .masthead-in>.brand,
 html.vr-app.vr-ready .masthead-in:has(>.mm-header-pro-pill)>.brand{display:grid;grid-template-columns:auto auto;grid-template-rows:auto 11px;column-gap:8px;row-gap:0;grid-column:1/-1;grid-row:1;justify-self:center;align-self:center;align-items:baseline;justify-content:center;width:max-content;max-width:100%;margin:0;padding:0;font-size:min(calc(var(--type-20) + 12px),calc((100vw - 112px)/6));line-height:.9375;letter-spacing:-.9px}
 html.vr-app.vr-ready .masthead .brand img{grid-column:1;grid-row:1}
 html.vr-app.vr-ready .masthead .brand .vr-wordmark{grid-column:2;grid-row:1}
 html.vr-app.vr-ready .masthead .brand .mm-brand-tagline{display:block;grid-column:1/-1;grid-row:2;align-self:end;text-align:center;font:400 11px/1 var(--sans,system-ui);letter-spacing:.04em;color:var(--muted);white-space:nowrap}
 html.vr-app.vr-ready .masthead-in>.profilebar{grid-column:1/-1;grid-row:2;width:100%;gap:0;justify-content:space-between}
}
