@media (max-width: 767px) {
  html:is([data-candao-device="phone"], [data-candao-ux-phone="true"]):not([data-candao-device="desktop"]):not([data-candao-device="tablet"]) body #drawer.drawer,
  html:is([data-candao-device="phone"], [data-candao-ux-phone="true"]):not([data-candao-device="desktop"]):not([data-candao-device="tablet"]) body > .sidebar {
    height: 100vh;
    height: 100dvh;
    bottom: auto;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  /* Scroll the complete menu and footer together, rather than a nested nav. */
  html:is([data-candao-device="phone"], [data-candao-ux-phone="true"]):not([data-candao-device="desktop"]):not([data-candao-device="tablet"]) body > .sidebar > nav {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }

  html:is([data-candao-device="phone"], [data-candao-ux-phone="true"]):not([data-candao-device="desktop"]):not([data-candao-device="tablet"]) body > .sidebar > .sidebar-bottom {
    flex: 0 0 auto;
  }
}
