/* v127 regression repair
   Preserve every profile control and keep the database header from painting over posters. */
@media (max-width: 719px) {
  html body main #library:not([hidden]) {
    grid-template-rows: 50px minmax(0, 1fr) !important;
  }

  html body main #library > .mobile-workspace-heading,
  html body.view-database main #library > .mobile-workspace-heading,
  html body.mobile-database-tab main #library > .mobile-workspace-heading {
    z-index: 2 !important;
    height: 50px !important;
    min-height: 50px !important;
    padding-top: 0 !important;
    overflow: clip !important;
    contain: paint !important;
  }

  html body.view-database main #library > #showGrid,
  html body.mobile-database-tab main #library > #showGrid {
    z-index: 3 !important;
    grid-row: 2 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    isolation: isolate !important;
    background: var(--share-page, #fff) !important;
  }

  html body.view-database main #library > #showGrid > .database-card,
  html body.mobile-database-tab main #library > #showGrid > .database-card {
    position: relative !important;
    z-index: 1 !important;
  }

  /* Keep all four data points; only the boxes are removed. */
  #profileDialog.mobile-tab-page .profile-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  #profileDialog.mobile-tab-page .profile-overview-grid > div,
  #profileDialog.mobile-tab-page .profile-overview-grid > div:nth-child(1),
  #profileDialog.mobile-tab-page .profile-overview-grid > div:nth-child(2),
  #profileDialog.mobile-tab-page .profile-overview-grid > div:nth-child(3),
  #profileDialog.mobile-tab-page .profile-overview-grid > div:nth-child(4) {
    display: flex !important;
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #profileDialog.mobile-tab-page .profile-overview-grid strong {
    font-size: clamp(15px, 4.2vw, 18px) !important;
  }

  /* Every original function remains visible, labelled and actionable. */
  #profileDialog.mobile-tab-page .mobile-profile-actions {
    display: block !important;
    visibility: visible !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-actions > button {
    display: grid !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-account small,
  #profileDialog.mobile-tab-page .mobile-profile-actions small {
    display: block !important;
    margin-top: 1px !important;
    overflow: hidden !important;
    color: var(--share-muted, #777a80) !important;
    font-size: 11px !important;
    line-height: 15px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}
