/* v129 OPPO standalone corrections
   Restore normal document flow in the profile, anchor the database to the
   application viewport, and give timeline metadata two explicit columns. */
@media (max-width: 719px) {
  /* On some standalone Android shells the normal-flow library begins below a
     legacy masthead offset. Fixed positioning makes 0 mean the app viewport. */
  html body.view-database main,
  html body.mobile-database-tab main {
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  html body.view-database main #library:not([hidden]),
  html body.mobile-database-tab main #library:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  html body.view-database main #library > .mobile-workspace-heading,
  html body.mobile-database-tab main #library > .mobile-workspace-heading {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
  }

  html body.view-database main #library > #showGrid,
  html body.mobile-database-tab main #library > #showGrid {
    position: absolute !important;
    inset: 50px 0 0 0 !important;
    -webkit-mask: none !important;
    mask: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    filter: none !important;
  }

  /* The profile is one normal-flow stack. Explicit row heights keep the
     activity calendar below all eight controls instead of underneath them. */
  html body #profileDialog.mobile-tab-page .mobile-profile-hub,
  html body:not(.profile-signed-out) #profileDialog.mobile-tab-page .mobile-profile-hub {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    width: calc(100% - 32px) !important;
    height: auto !important;
    min-height: 480px !important;
    max-height: none !important;
    overflow: hidden !important;
    contain: none !important;
  }

  html body #profileDialog.mobile-tab-page .mobile-profile-account {
    position: relative !important;
    flex: 0 0 60px !important;
    height: 60px !important;
    min-height: 60px !important;
  }

  html body #profileDialog.mobile-tab-page .mobile-profile-actions,
  html body:not(.profile-signed-out) #profileDialog.mobile-tab-page .mobile-profile-actions {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 420px !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body #profileDialog.mobile-tab-page .mobile-profile-actions > button,
  html body:not(.profile-signed-out) #profileDialog.mobile-tab-page .mobile-profile-actions > button {
    position: relative !important;
    flex: 0 0 60px !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  html body #profileDialog.mobile-tab-page .profile-activity-section {
    position: relative !important;
    z-index: 0 !important;
    flex: 0 0 auto !important;
    clear: both !important;
  }

  /* Date and action share a narrow right rail. The progress and remaining
     labels already occupy only the left rail, so they need no second padding. */
  html body.view-home main #library #showGrid > .timeline-card .card-content {
    grid-template-columns: minmax(0, 1fr) 72px !important;
  }

  html body.view-home main #library #showGrid > .timeline-card .card-context,
  html body.view-home main #library #showGrid > .timeline-card .card-air-date {
    width: 72px !important;
    max-width: 72px !important;
    text-align: right !important;
  }

  html body.view-home main #library #showGrid > .timeline-card .card-quick-watch {
    position: absolute !important;
    inset: auto 0 8px auto !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  html body.view-home main #library #showGrid > .timeline-card .progress-row,
  html body.view-home main #library #showGrid > .timeline-card .card-remaining {
    padding-right: 0 !important;
  }

  html body.view-home main #library #showGrid > .timeline-card .card-remaining {
    font-size: 11px !important;
  }
}
