/* Layout de chamada mobile da Sala: um participante grande + miniaturas.
   Modelado no mecanismo já comprovado `gatto-camera-expanded` (mobile_video.css).
   Não recria mídia, não duplica stream e usa seletores por ID para vencer as
   regras base da Sala sem depender de especificidade frágil. */
@media (max-width: 820px) {
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode {
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    gap: 0 !important;
    background: #04070c !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-header {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    grid-template-columns: 40px !important;
    gap: 0 !important;
    z-index: 60 !important;
    border: 0 !important;
    background: transparent !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-header > .gatto-room-brand,
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-header > .gatto-room-online {
    display: none !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-messages,
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-composer {
    display: none !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-controls-wrap {
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: calc(100% - 16px) !important;
    z-index: 60 !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery {
    position: relative !important;
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    background: #04070c !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant {
    position: absolute !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    transition: width .18s ease, height .18s ease, border-radius .18s ease;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-big {
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: 0 !important;
    z-index: 1 !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-big .gatto-room-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #000 !important;
    z-index: 1 !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb {
    width: 46vw !important;
    max-width: 240px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, .28) !important;
    overflow: hidden !important;
    z-index: 5 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .55) !important;
    touch-action: none !important;
    cursor: grab !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb.is-size-p {
    width: 30vw !important;
    max-width: 150px !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb.is-size-m {
    width: 46vw !important;
    max-width: 240px !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb.is-size-g {
    width: 64vw !important;
    max-width: 340px !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb .gatto-room-media {
    position: absolute !important;
    inset: 0 !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb .gatto-room-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-thumb .gatto-room-name {
    right: 5px !important;
    bottom: 4px !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
  }
  #chatRoomSidePanelV972.gatto-room-shell.gatto-callmode > .gatto-room-gallery > .gatto-room-participant.is-call-dragging {
    opacity: .9 !important;
    z-index: 30 !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 14px 36px rgba(0, 0, 0, .7) !important;
  }
}
