/* V304 — real pre-floating-dock mobile Legacy mode.
   This restores Yapper's original account/navigation card + inline composer
   instead of restyling the modern floating dock to merely look old. */
@media (max-width: 700px) {
  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"] {
    --mobile-panel-bottom: max(12px, env(safe-area-inset-bottom));
  }

  /* The modern Top/Bottom floating dock does not exist in Legacy. */
  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"] .mobile-dock {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Account/navigation card geometry is intentionally NOT defined here.
     V306 restores the exact pre-floating-dock mobile rules so this file cannot
     accidentally reshape Legacy into the modern layout again. */

  /* Create a Yap goes back to its original inline card/placement. */
  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"] #composerCard,
  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"] #composerCard:not(.mobile-compose-open):not(.mobile-compose-closing) {
    display: block !important;
    position: static !important;
    inset: auto !important;
    translate: none !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
    animation: none !important;
  }

  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"] #closeMobileComposerButton {
    display: none !important;
  }

  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"].mobile-compose-open::before,
  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"].mobile-compose-closing::before {
    display: none !important;
  }

  /* No bottom/top floating-dock reservation in Legacy. */
  body[data-auth-state="authenticated"][data-mobile-dock-position="legacy"] #appSection {
    padding-top: unset !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }

  /* Old feed flow: manual See more Yaps control; infinite observer stays off. */
  body[data-mobile-dock-position="legacy"] #feedLoadSentinel:not([hidden]) {
    display: grid !important;
    justify-items: center !important;
  }

  body[data-mobile-dock-position="legacy"] #loadMoreYapsButton:not(.hidden) {
    display: inline-flex !important;
  }
}
