/* Approved R53 invitation correction, scoped to the actual Main DOM.
   Stage and controls already share .presence; reserve the existing footer
   only while the Desktop invitation opens the conversation panel. */
@media (min-width:768px) and (pointer:fine) {
  #app[data-call-active="true"]:has(.conversation:not(.chat-collapsed) .invite-card) .conversation {
    height:calc(100svh - 72px - 45px);
    height:calc(100dvh - 72px - 45px);
    min-height:0;
  }
  #app[data-call-active="true"]:has(.conversation:not(.chat-collapsed) .invite-card)>footer {
    display:block!important;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:45px;
    box-sizing:border-box;
    margin-bottom:0;
    background:#fff;
  }
}

/* Preserve the existing in-flow mobile notice while keeping call controls
   inside the viewport. The notice consumes scene space, not button space. */
@media(max-width:767px),(max-width:1024px) and (pointer:coarse) {
  #app[data-call-active="true"]:has(>.mobile-invite) {
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    height:100svh;
    height:100dvh;
  }
  #app[data-call-active="true"]:has(>.mobile-invite) .conversation {
    height:auto;
    min-height:0;
  }
}
