/* 9.4.7: the mobile Create sheet scrolls inside its own viewport,
   staying above the fixed PWA bottom navigation. */
@media (max-width: 900px) {
  html .mobile-create-sheet:not([hidden]) {
    position: fixed !important;
    z-index: 10020 !important;
    box-sizing: border-box !important;
    top: auto !important;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 100px - 78px - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 100px - 78px - env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-bottom: 26px !important;
    scroll-padding-bottom: 26px;
  }
  html .mobile-create-sheet .mobile-create-actions {
    overflow: visible !important;
    max-height: none !important;
    min-height: 0 !important;
    padding-bottom: 10px !important;
  }
  html .mobile-create-sheet .mobile-create-actions > :is(a,button):last-child {
    margin-bottom: 0 !important;
  }
  html .mobile-create-sheet .mobile-post-form {
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 10px !important;
  }
}
