/* SITE R3 — three controls, scoped to Academy and Analyzer; Jogar untouched. */
body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:column!important;align-items:center!important;gap:6px!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;
}
body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three > :is(#mainActionsMenu,#settingsButton,.mca-exit-button){grid-column:auto!important;grid-row:1!important;min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important}
body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three > #mainActionsMenu{grid-column:1!important}
body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three > .settings-top{grid-column:2!important;grid-row:1!important;min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important}
body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three > .mca-exit-button{grid-column:3!important}
body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three :is(#mainActionsMenu > summary,.settings-top,.mca-exit-button){display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;height:40px!important;min-height:40px!important;padding:4px 7px!important;line-height:1.15!important;text-align:center!important;border:1px solid var(--mca-ui-accent-border)!important;border-radius:8px!important;background:var(--mca-ui-control)!important;color:var(--mca-ui-ink)!important;font-weight:750!important;white-space:normal!important;text-decoration:none!important}
@media (min-width:801px) and (pointer:fine), (min-width:1281px){
 body.mca-analyzer-game-layout .app > .topbar{display:flex!important;flex-flow:row wrap!important;justify-content:flex-start!important;align-items:center!important;gap:8px!important}
 body.mca-analyzer-game-layout .app > .topbar > .brand{flex:0 1 auto!important;width:auto!important;max-width:clamp(190px,25vw,360px)!important;order:0!important;margin:0!important}
 body.mca-analyzer-game-layout .app > .topbar > .steps{display:contents!important}
 body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three{flex:0 0 min(42vw,440px)!important;width:min(42vw,440px)!important;margin:0 0 0 auto!important;order:30!important;position:relative!important}
}
@media (max-width:800px), (pointer:coarse) and (max-width:1280px){
 body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three{width:100%!important;grid-column:1/-1!important;grid-row:2!important;margin:0!important;position:static!important;flex:1 1 100%!important}
 body.mca-analyzer-game-layout .app > .topbar > .top-actions.mca64-three :is(#mainActionsMenu > summary,.settings-top,.mca-exit-button){font-size:clamp(10px,2.8vw,13px)!important;min-height:36px!important;height:36px!important;padding:3px!important}
}
/* Academy: existing dynamic heading and original exit handlers are kept. */
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;box-sizing:border-box!important;overflow:visible!important;min-height:62px!important;height:auto!important;max-height:none!important;padding:8px 16px!important;background:var(--mca-ui-panel)!important;border-bottom:1px solid var(--mca-ui-border)!important;position:relative;z-index:40}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.mca-academy-heading,.edu-brand){flex:1 1 0!important;min-width:0!important;order:0!important;margin:0!important;color:var(--mca-ui-ink)!important;white-space:normal!important}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > .mca64-academy-actions{order:1!important}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > .mca-academy-settings-trigger{order:2!important}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.academy-exit,.mca-academy-home-exit){order:3!important}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.mca64-academy-actions,.mca-academy-settings-trigger,.academy-exit,.mca-academy-home-exit){flex:0 0 clamp(112px,10vw,145px)!important;width:clamp(112px,10vw,145px)!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;margin:0!important}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header :is(.mca64-academy-actions > summary,.mca-academy-settings-trigger,.academy-exit,.mca-academy-home-exit){display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;height:40px!important;min-height:40px!important;padding:4px 7px!important;font:750 13px/1.15 system-ui,sans-serif!important;text-align:center!important;white-space:normal!important;border:1px solid var(--mca-ui-accent-border)!important;border-radius:8px!important;background:var(--mca-ui-control)!important;color:var(--mca-ui-ink)!important;text-decoration:none!important;cursor:pointer}
body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.series-language,.mca-site-language,.mca-language-control,.academy-head-title[hidden]){display:none!important}
body .mca-web-three-header .mca64-academy-actions-panel{left:0;right:auto;z-index:100}
body .mca-web-three-header :is(summary,button,a):focus-visible{outline:2px solid var(--mca-ui-accent);outline-offset:2px}
.mca-web-academy-extra .edu-brand{display:flex;align-items:center;gap:8px;font-weight:800;text-decoration:none}.mca-web-academy-extra .edu-brand img{width:34px;height:34px;flex:none}
@media(max-width:800px){
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:32px 36px!important;gap:5px!important;padding:4px 8px!important;min-height:81px!important;height:81px!important;max-height:81px!important}
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.mca-academy-heading,.edu-brand){grid-column:1/-1!important;grid-row:1!important}
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > .mca64-academy-actions{grid-column:1!important;grid-row:2!important}
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > .mca-academy-settings-trigger{grid-column:2!important;grid-row:2!important}
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.academy-exit,.mca-academy-home-exit){grid-column:3!important;grid-row:2!important}
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header > :is(.mca64-academy-actions,.mca-academy-settings-trigger,.academy-exit,.mca-academy-home-exit){width:100%!important;min-width:0!important}
 body:is(.academy-page,.mca-academy-home-r4,.mca-web-academy-aux) .mca-web-three-header.mca-web-three-header :is(.mca64-academy-actions > summary,.mca-academy-settings-trigger,.academy-exit,.mca-academy-home-exit){font-size:clamp(10px,2.8vw,13px)!important;height:36px!important;min-height:36px!important;padding:3px!important}
}
/* Auxiliary pages previously had no header; avoid browser default margins around it. */
body.mca-web-academy-aux{margin:0}
