/* Organized by product feature for straightforward maintenance. */
/* Media frames, overlay stacking and menu layers. */

/* Feature components, overlays, recovery and interaction states. */



/* Mobile media and overlay behaviour. */
:root{--cf-layer-menu:90000;--cf-layer-modal:100000}

/* Never crop the splash character. Unused space stays pure black. */
.v131-splash-stage{background:#000!important}
.v131-splash-video{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:#000!important;
  transform:none!important;
}
@media(prefers-reduced-motion:reduce){
  .v131-splash-stage{
    background-color:#000!important;
    background-image:url('/assets/cyborg-splash-poster.jpg')!important;
    background-position:center center!important;
    background-size:contain!important;
    background-repeat:no-repeat!important;
  }
}

/* The current Coach file is 9:16; present it safely inside a 4:5 app card. */
.burt-mascot-wrap{width:100%!important;max-width:540px!important;margin-inline:auto!important;background:#000!important}
.cyborg-coach-stage{
  position:relative!important;
  width:min(100%,520px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:4 / 5!important;
  margin-inline:auto!important;
  overflow:hidden!important;
  background:#000!important;
}
.v132-coach-video{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:#000!important;
}

/* Menu is promoted outside the sticky header by JS and must beat every page card. */
#v131MenuBackdrop{
  position:fixed!important;
  inset:0!important;
  z-index:var(--cf-layer-menu)!important;
  transform:none!important;
  isolation:isolate!important;
}
#v131MenuDrawer{
  position:fixed!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  height:100dvh!important;
  z-index:calc(var(--cf-layer-menu) + 1)!important;
  transform:translateX(105%);
  isolation:isolate!important;
  contain:layout paint!important;
}
#v131MenuDrawer.open{transform:translateX(0)!important}
#v131MenuDrawer:not(.open){pointer-events:none!important}
#v131MenuDrawer.open{pointer-events:auto!important}

/* Settings and every full-screen tool always sit above menu, week view and header. */
#settingsOverlay,#setupOverlay,#tutorialOverlay,#authOverlay,#scanOverlay,#checkinOverlay,#historyOverlay,
.settings-overlay:not(.hidden),.auth-overlay:not(.hidden),.scan-overlay:not(.hidden),.checkin-overlay:not(.hidden),.history-overlay:not(.hidden){
  position:fixed!important;
  inset:0!important;
  z-index:var(--cf-layer-modal)!important;
  transform:none!important;
  filter:none!important;
  perspective:none!important;
  isolation:isolate!important;
}
#settingsOverlay .settings-panel,#setupOverlay .settings-panel,#tutorialOverlay .settings-panel,
#authOverlay .auth-shell,#scanOverlay .scan-panel,#checkinOverlay .checkin-panel,#historyOverlay .history-panel{
  position:relative!important;
  z-index:1!important;
}
body.cf-menu-open,body.cf-modal-open{overflow:hidden!important}

/* Prevent older dashboard positioning rules from creating a competing layer. */
main,.tab-panel,.card,.week-strip,.food-day-strip,.compact-command-row{z-index:auto!important}

@media(max-width:620px){
  .v131-splash-logo{width:min(94vw,620px)!important}
  .cyborg-coach-stage{width:min(100%,460px)!important}
}

/* Entry always precedes account choice, including while auth is resolving. */
body.splash-open #splash{z-index:120000!important}
body.splash-open #authOverlay{visibility:hidden!important;pointer-events:none!important}
#welcomePane button,#confirmationPane button{display:block;width:100%;margin-top:12px;min-height:44px}
#confirmationEmail{overflow-wrap:anywhere}
#authTabs.hidden-block,.auth-card.hidden-block{display:none!important}
