/* Size only the mobile lobby to the visible viewport. Its dock stays in the
   same layout as the scrolling content, so it cannot leave an empty strip. */
html.dc88-mobile-dock {
  overflow: hidden;
  overscroll-behavior-y: none;
}

html:has(> body.dc88-mobile-dock:not(.admin-mode)) {
  overflow: hidden;
  overscroll-behavior-y: none;
}

html body.dc88-mobile-dock:not(.admin-mode) {
  --dc88-mobile-frame-height: var(--dc88-lobby-height, 100vh);
  --ref-width: min(100vw, 560px);
}

@supports (height: 100dvh) {
  html body.dc88-mobile-dock:not(.admin-mode) {
    --dc88-mobile-frame-height: var(--dc88-lobby-height, 100dvh);
  }
}

body.dc88-mobile-dock:not(.admin-mode),
body.dc88-mobile-dock:not(.admin-mode) #app {
  height: var(--dc88-mobile-frame-height);
  min-height: 0 !important;
  overflow: hidden;
  overscroll-behavior-y: none;
}

body.dc88-mobile-dock:not(.admin-mode) #app > .shell {
  display: flex;
  flex-direction: column;
  height: var(--dc88-mobile-frame-height);
  min-height: 0 !important;
  max-height: var(--dc88-mobile-frame-height);
  margin-block: 0;
  padding-bottom: 0;
  overflow: hidden;
}

body.dc88-mobile-dock:not(.admin-mode) #app > .shell > .dc88-lobby-scroll {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  /* Leave room for the wheel above the nav when scrolling to the last item. */
  padding-bottom: clamp(38px, calc(var(--ref-px, 1px) * 46), 62px);
}

body.dc88-mobile-dock:not(.admin-mode) #app > .shell > .dc88-lobby-scroll::-webkit-scrollbar {
  display: none;
}

body.dc88-mobile-dock:not(.admin-mode) #app > .shell > .bottom-nav {
  flex: 0 0 auto;
  position: relative;
  inset: auto;
  transform: none;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  overflow: visible;
}

body.dc88-mobile-dock:not(.admin-mode) #app > .shell > .bottom-nav > .floating-wheel.dc88-main-floating-wheel {
  position: absolute;
  display: block;
  min-width: 55px;
  bottom: calc(var(--ref-px, 1px) * 48 + env(safe-area-inset-bottom)) !important;
}
