html, body {
  max-width: 100%;
  overflow-x: hidden;
}/* ================= FINAL MOBILE CLEANUP ================= */
html, body {
  height: 100%;
  overscroll-behavior: none;
}

@media (max-width: 480px) {

  /* Hide all banner links */
  .banner-links a {
    display: none !important;
  }

  /* Show ONLY Themes */
  .banner-links a[href="/appearance"] {
    display: inline-block !important;
    font-size: 12px;
    margin-Right: -8px;
  }

}
@media (max-width: 480px) {

  /* ---------------- GLOBAL REMOVALS ---------------- */

  .bottom-row,
  .bottom-row *,
  .footer,
  .footer-links,
  .footer-links *,
  body > div[style*="text-align:center"],
  .user-posts,
  .user-posts *,
  .nav-links,
  .nav-links * {
    display: none !important;
  }
.banner-links a {
  display: none !important;
}


  /* ---------------- LAYOUT ---------------- */

  .main-content {
    display: flex !important;
    flex-direction: column !important;
  }


  /* ---------------- RECENT POSTS ---------------- */

  .content-box.left-box {
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px 0 !important;
    order: 2; /* 👈 BELOW FRIENDS */
  }

  #recent-posts,
  .left-box-content {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* ---------------- REMOVE MESSAGES ONLY ---------------- */


  /* ---------------- CONTAINER ---------------- */

  .container {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
    position: relative !important;

    min-height: 100vh !important;
    padding: 90px 8px 40px;

    display: flex;
    flex-direction: column;
  }
}


.banner-text,
.banner-search-wrapper,
.banner-search-wrapper *,
#banner-search-form {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* ================= MOBILE: RECENT POSTS FIX ================= */
@media (max-width: 480px) {

  /* Remove desktop height constraints */
  .main-content {
    height: auto !important;
    overflow: visible !important;
  }

  .content-box.left-box {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .left-box-content,
  #recent-posts {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Ensure post cards expand and wrap */
  .post-item {
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .post-item img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }

}

@media (max-width: 480px) {

  .banner {
    width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));
    margin-left: calc(-50vw + 50% + env(safe-area-inset-left));
    margin-right: calc(-50vw + 50% + env(safe-area-inset-right));

    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #ribbitLogo {
    max-height: 56px;
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 480px) {

  /* Stop desktop centering behavior */
  body {
    display: block !important;
  }

  /* Normalize container for mobile flow */
  .container {
    position: static !important;
    transform: none !important;
    padding-top: 0 !important;
  }

  /* Clean, normal mobile banner */
  .banner {
    position: static !important;
    height: auto !important;
    min-height: 56px;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

  }

  #ribbitLogo {
    display: block !important;
    margin: 0 auto !important;
    max-height: 56px;
  }

}
@media (max-width: 480px) {
  #invite-bottom {
    display: none !important;
  }
}
@media (max-width: 480px) {

  /* FULL-WIDTH MOBILE BANNER */
  .banner {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;

    position: relative !important;
    left: 0 !important;
    right: 0 !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

  }

  #ribbitLogo {
    max-height: 56px;
  }

}

/* ================= MOBILE: POSTS ACTIVITY EXPAND ================= */
@media (max-width: 480px) {

  /* Posts Activity container */
  .people-you-may-know {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;

    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
  }

  /* Inner content */
  .people-you-may-know-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
  }

  /* Individual activity items (if cards exist) */
  .people-you-may-know-content > * {
    height: auto !important;
    overflow: visible !important;
  }

}
/* ================= MOBILE: MUTUAL FRIENDS EXPAND ================= */
@media (max-width: 480px) {

  /* Mutual Friends container */
  .right-bottom-box {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;

    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
  }

  /* Inner content */
  .right-bottom-box-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
  }

  /* Individual friend entries */
  .right-bottom-box-content > * {
    height: auto !important;
    overflow: visible !important;
  }

}
@media (max-width: 480px) {
  #instant-msg-btn {
    margin-left: -20px !important; /* adjust if you want more/less */
  }
}

@media (max-width: 480px) {
  .people-you-may-know-content {
    margin-bottom: 12px !important; /* adjust spacing as needed */
  }
}

@media (max-width: 480px) {
  .right-bottom-box-content {
    margin-bottom: 12px !important; /* adjust spacing as needed */
  }
}
@media (max-width: 480px) {
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  height: 52px;
  width: 100%;
  z-index: 9999;
}

  .container {
    padding-bottom: 52px;         /* EXACT match */
  }
}
@media (max-width: 480px) {
  .container {
    padding-top: 0;
    padding-left: 8px;
    padding-right: 8px;
    border: none !important;
    padding-bottom: 52px; /* nav height */
  }
}

.mobile-bottom-nav a {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.people-you-may-know-banner {
  position: static !important;
}

.right-bottom-box-banner {
  position: static !important;
}
@media (max-width: 480px) {
  body.has-site-background .container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
}
@media (max-width: 480px) {

  .banner {
    position: relative;
    padding-top: env(safe-area-inset-top);
  }

  .banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px; /* LOWER fade */

    pointer-events: none;
    z-index: 1;

    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;

    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.6) 0%,
      rgba(0,0,0,0.35) 40%,
      rgba(0,0,0,0.12) 70%,
      rgba(0,0,0,0) 100%
    );
  }

}
@media (max-width: 480px) {

  .mobile-bottom-nav {
    position: relative;
  }

  .mobile-bottom-nav::after {
    content: "";
    position: absolute;
    bottom: -32px; /* sits below nav */
    left: 0;
    width: 100%;
    height: 32px;

    pointer-events: none;
    z-index: 1;

    border-top-left-radius: 14px;
    border-top-right-radius: 14px;

    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.6) 0%,
      rgba(0,0,0,0.35) 40%,
      rgba(0,0,0,0.12) 70%,
      rgba(0,0,0,0) 100%
    );
  }

}

