/* V58.49 | Duas correcoes solicitadas: perfil em bottom sheet e tema visivel no chat.
 * Escopo visual: preserva Firebase, chat/galeria/estatisticas e controles existentes. */
@media (max-width:860px) and (orientation:portrait){
  /* Mesmo modelo de bottom sheet do menu Mais opcoes (v34-sheet-card).
     A area interna rola e os botoes finais deixam de ficar fora da tela. */
  #v5839ProfileOverlay.v5839-profile-overlay{
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;
    padding:0!important;margin:0!important;inset:0!important;
    background:rgba(4,2,11,.74)!important;
    -webkit-backdrop-filter:blur(5px)!important;backdrop-filter:blur(5px)!important;
  }
  #v5839ProfileOverlay .v5839-profile-dialog{
    flex:0 1 auto!important;display:flex!important;flex-direction:column!important;
    width:min(100%,760px)!important;max-width:100%!important;
    height:min(83dvh,860px)!important;max-height:min(83dvh,860px)!important;min-height:0!important;
    padding:0!important;margin:0!important;
    border:1px solid rgba(172,121,196,.34)!important;border-bottom:0!important;
    border-radius:25px 25px 0 0!important;
    background:radial-gradient(ellipse at 20% 0,rgba(79,42,97,.53),transparent 68%),#1d142a!important;
    box-shadow:0 -25px 70px rgba(0,0,0,.7)!important;
    overflow:hidden!important;overscroll-behavior:contain!important;
  }
  #v5839ProfileOverlay .v5839-profile-dialog::before{
    content:'';display:block;flex:0 0 5px;width:40px;height:5px;
    margin:10px auto 5px;border-radius:10px;background:#8e749c;opacity:.7;
  }
  #v5839ProfileOverlay .v5839-profile-body{
    flex:1 1 auto!important;min-height:0!important;max-height:100%!important;
    box-sizing:border-box!important;overflow-y:auto!important;overflow-x:hidden!important;
    overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch!important;
    padding:10px 15px max(25px,env(safe-area-inset-bottom))!important;
    scrollbar-color:#8653a1 transparent!important;
  }
  #v5839ProfileOverlay .v5839-profile-close{right:12px!important;top:22px!important}
  #v5839ProfileOverlay .v5839-profile-actions{padding-bottom:10px!important}
  /* O tema ja e atribuido pelo sistema ao stage (--v36-room-theme).
     A V58.48 pintava um fundo cinza solido por cima dele. */
  #roomColumns#roomColumns.v5840-rave-room.v27-mode-normal.v36-theme-room:not(:fullscreen):not(.v26-pseudo-stage)>.cinema-chat-panel{
    background-color:#30232e!important;
    background-image:linear-gradient(180deg,rgba(20,9,29,.50),rgba(21,11,29,.72)),var(--v36-room-theme)!important;
    background-position:center center!important;background-size:cover!important;background-repeat:no-repeat!important;
  }
  #roomColumns#roomColumns.v5840-rave-room.v27-mode-normal.v36-theme-room:not(:fullscreen):not(.v26-pseudo-stage)>.cinema-chat-panel #v5840VideoBackdrop.v5840-backdrop-live{
    opacity:.14!important; /* tema da sala predomina; filme continua atras sem bloquear */
  }
  #roomColumns#roomColumns.v5840-rave-room.v27-mode-normal:not(.v36-theme-room):not(:fullscreen):not(.v26-pseudo-stage)>.cinema-chat-panel{
    background-image:linear-gradient(170deg,#39233c,#241726)!important;
  }
}
@media (max-width:860px) and (orientation:landscape){
  /* Paisagem: modal ainda abre como folha inferior sem usar altura inteira. */
  #v5839ProfileOverlay.v5839-profile-overlay{align-items:flex-end;justify-content:center;padding:0!important}
  #v5839ProfileOverlay .v5839-profile-dialog{max-height:86dvh!important}
  #v5839ProfileOverlay .v5839-profile-body{overflow-y:auto!important;min-height:0!important}
}
