/* Phase 1 acquisition-density overrides.
 * Keep the full desktop network desk while making the mobile Feed content-first.
 */

@media (max-width: 767px) {
  section[aria-labelledby="network-signal"] {
    padding: 0.875rem !important;
    clip-path: none !important;
  }

  section[aria-labelledby="network-signal"] > div {
    gap: 0.75rem !important;
  }

  #network-signal {
    margin-top: 0.25rem !important;
    font-size: 1.75rem !important;
    line-height: 2rem !important;
  }

  section[aria-labelledby="network-signal"] #network-signal + p {
    margin-top: 0.4rem !important;
    font-size: 0.75rem !important;
    line-height: 1.2rem !important;
  }

  section[aria-labelledby="network-signal"] #network-signal + p + div {
    margin-top: 0.65rem !important;
  }

  /* The four-window network dashboard duplicates information already available
   * from Discover and the side/network desks. On mobile, lead with conversation.
   */
  section[aria-label="Dant3 network overview"] {
    display: none !important;
  }

  /* Preserve the private-room upsell/privacy signal, but do not make users scroll
   * through two synthetic placeholder cards before reaching public conversation.
   */
  section[aria-labelledby="private-signal-preview"] {
    margin-top: 0.65rem !important;
    padding: 0.75rem !important;
    clip-path: none !important;
  }

  section[aria-labelledby="private-signal-preview"] > div {
    gap: 0.5rem !important;
  }

  section[aria-labelledby="private-signal-preview"]
    [aria-label="Synthetic blurred private message previews"],
  section[aria-labelledby="private-signal-preview"] > p:last-child {
    display: none !important;
  }

  section[aria-labelledby="private-signal-preview"] h2 {
    margin-top: 0.25rem !important;
    font-size: 1rem !important;
    line-height: 1.35rem !important;
  }

  section[aria-labelledby="private-signal-preview"] h2 + p {
    margin-top: 0.25rem !important;
    font-size: 0.7rem !important;
    line-height: 1.05rem !important;
  }

  section[aria-labelledby="private-signal-preview"] a[href="/pricing"] {
    margin-top: 0.5rem !important;
    padding: 0.4rem 0.65rem !important;
  }
}

/* The bundled Android WebView receives this marker at build time. Keep its
 * compositor workload deterministic: fixed page backgrounds and layered
 * backdrop filters can leave stale/duplicated tiles on foldables and during
 * scroll/resize transitions. This does not alter the browser build. */
html[data-dant3-mobile="true"],
html[data-dant3-mobile="true"] body,
html[data-dant3-mobile="true"] #root {
  min-height: 100%;
  background-color: var(--background);
}

html[data-dant3-mobile="true"] body {
  min-height: 100dvh;
  background-image: none !important;
  background-attachment: scroll !important;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

html[data-dant3-mobile="true"] .ti-shell {
  background: var(--background) !important;
}

html[data-dant3-mobile="true"] * {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-dant3-mobile="true"] [class~="h-screen"] {
  height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

html[data-dant3-mobile="true"] [class~="min-h-screen"] {
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
