/* The whole pager exits together; the contents fills the space below the header. */
@media (max-width: 800px) {
  body:not(.m2-editor) .m2-float-pager {
    transition: bottom .16s ease-in, opacity .16s ease-in !important;
  }
  html body.m2-opening-contents:not(.m2-editor) > .m2-float-pager {
    bottom: -110px !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  body.m2-opening-contents .m2-float-pager > a:first-child,
  body.m2-opening-contents .m2-float-pager > a:last-child {
    transform: none !important;
    opacity: 1 !important;
  }
  html body.m2-contents-expanded:not(.m2-editor) .m2-main {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    padding: var(--m2-contents-header-height, 134px) 0 0 !important;
    overflow: hidden !important;
  }
  body.m2-contents-expanded .m2-home-cover {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
  }
  body.m2-contents-expanded .m2-home-magazine-page {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 !important;
    animation: none !important;
  }
  body.m2-contents-expanded .m2-float-pager { display:none!important; }
}
@media (prefers-reduced-motion: reduce) {
  body.m2-opening-contents .m2-float-pager { transition:none!important; }
}

@media (max-width:800px) {
  body:not(.m2-editor) #m2-instant-cover {
    box-sizing:border-box!important;
    padding-top:var(--m2-contents-header-height, 160px)!important;
  }
  body:not(.m2-editor) #m2-instant-cover .m2-home-cover {
    margin-top:0!important;
  }
}

/* One scrollport for the initial contents; hidden reader must take no space. */
@media (max-width:800px) {
  html body.m2-contents-expanded:not(.m2-editor) { overflow:hidden!important; }
  html body.m2-contents-expanded:not(.m2-editor) .m2-main[hidden] { display:none!important; }
  html body.m2-contents-expanded:not(.m2-editor) #m2-instant-cover {
    position:fixed!important; inset:0!important; height:100dvh!important;
    overflow:hidden!important; margin:0!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
  }
  #m2-instant-cover .m2-home-cover {height:100%!important;min-height:0!important;}
  html body.m2-contents-expanded:not(.m2-editor) .m2-main {
    min-height:0!important; padding-bottom:env(safe-area-inset-bottom)!important;
  }
  html body.m2-contents-expanded .m2-home-magazine-page {min-height:0!important;}
  .m2-glass-header .m2-header-cookie-control {
    position:static!important; inset:auto!important; display:block;
    width:max-content!important; margin:5px 0 0 auto!important;
    padding:3px 9px!important; font-size:11px!important;
    line-height:18px!important; box-shadow:none!important;
  }
  .m2-glass-header .m2-header-cookie-control[hidden] {display:none!important;}
}
