/* v126 mobile device corrections
   Match the reference profile rhythm and avoid double-counting the system status bar. */
@media (max-width: 719px) {
  /* Android/HarmonyOS standalone windows already begin below the status bar. */
  html body main #library:not([hidden]) {
    grid-template-rows: 50px minmax(0, 1fr) !important;
  }

  html body main #library > .mobile-workspace-heading,
  html body.view-home main #library > .mobile-workspace-heading,
  html body.view-database main #library > .mobile-workspace-heading,
  html body.mobile-database-tab main #library > .mobile-workspace-heading {
    height: 50px !important;
    min-height: 50px !important;
    padding-top: 0 !important;
  }

  html body.view-database main #library > #showGrid,
  html body.mobile-database-tab main #library > #showGrid {
    grid-row: 2 !important;
    top: auto !important;
    margin-top: 0 !important;
    padding-top: 8px !important;
  }

  /* Give the date more air and make the watch target visually quieter. */
  html body.view-home main #library #showGrid > .timeline-card .card-quick-watch {
    width: 36px !important;
    height: 36px !important;
    transform: translateY(6px) !important;
  }

  /* Profile reference: identity, three unboxed metrics, one grouped list. */
  #profileDialog.mobile-tab-page .profile-summary,
  #profileDialog.mobile-tab-page .profile-overview,
  #profileDialog.mobile-tab-page .mobile-profile-hub,
  #profileDialog.mobile-tab-page .profile-activity-section {
    width: calc(100% - 32px) !important;
    margin-right: 16px !important;
    margin-left: 16px !important;
  }

  #profileDialog.mobile-tab-page .profile-summary {
    min-height: 88px !important;
    margin-top: 12px !important;
    margin-bottom: 2px !important;
    padding: 12px 4px !important;
  }

  #profileDialog.mobile-tab-page .profile-overview {
    margin-bottom: 14px !important;
    padding: 0 !important;
  }

  #profileDialog.mobile-tab-page .profile-overview-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: 100% !important;
    min-height: 82px !important;
    padding: 8px 0 10px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !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) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 64px !important;
    padding: 4px 6px !important;
    border: 0 !important;
    background: transparent !important;
  }

  #profileDialog.mobile-tab-page .profile-overview-grid strong {
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: clamp(17px, 4.8vw, 20px) !important;
    font-weight: 520 !important;
    line-height: 26px !important;
    letter-spacing: -.035em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #profileDialog.mobile-tab-page .profile-overview-grid span {
    margin-top: 4px !important;
    color: var(--share-muted, #777a80) !important;
    font-size: 12px !important;
    line-height: 18px !important;
  }

  html body #profileDialog.mobile-tab-page .mobile-profile-hub {
    display: block !important;
    margin-bottom: 14px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--share-line, #e2e3e5) !important;
    border-radius: 16px !important;
    background: var(--share-surface, #fff) !important;
    box-shadow: none !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-account,
  #profileDialog.mobile-tab-page .mobile-profile-actions {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-account,
  #profileDialog.mobile-tab-page .mobile-profile-actions > button {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    column-gap: 14px !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--share-line, #e2e3e5) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-actions > button:last-child {
    border-bottom: 0 !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-account > .material-symbols-rounded:first-child,
  #profileDialog.mobile-tab-page .mobile-profile-actions > button > .material-symbols-rounded:first-child {
    width: 34px !important;
    height: 34px !important;
    color: var(--share-muted, #777a80) !important;
    font-size: 25px !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-account b,
  #profileDialog.mobile-tab-page .mobile-profile-actions b {
    font-size: 16px !important;
    font-weight: 480 !important;
    line-height: 22px !important;
  }

  #profileDialog.mobile-tab-page .mobile-profile-account small,
  #profileDialog.mobile-tab-page .mobile-profile-actions small {
    display: none !important;
  }
}
