/* Guardas responsivas — topbar e HUD do mapa (somente desktop / tablet largo) */
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] {
  --pm-map-rail-width-effective: min(var(--pm-map-rail-width, 380px), calc(100vw - 24px));
  --pm-topbar-search-open-width: 480px;
  --pm-topbar-left-reserve: 320px;
  --pm-topbar-right-reserve: 300px;
  --pm-map-active-bar-lift: 76px;
  --pm-map-controls-bottom: calc(var(--pm-map-rail-bottom, 28px) + var(--pm-map-active-bar-lift, 76px));
}

html body.pm-liquid-v2.map-source-active .pm-apple-topbar__primary,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__primary {
  min-width: 0 !important;
  overflow: visible !important;
  gap: clamp(6px, 1vw, 12px) !important;
  box-sizing: border-box !important;
  padding-right: var(--pm-topbar-right-reserve, 300px) !important;
}

html body.pm-liquid-v2.map-source-active .pm-apple-topbar__brand-cluster,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__brand-cluster {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
}

html body.pm-liquid-v2.map-source-active .pm-apple-topbar__hud-cluster,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__hud-cluster {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  overflow: visible !important;
}

html body.pm-liquid-v2.map-source-active .pm-apple-topbar__rail-end,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__rail-end {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  margin-left: auto !important;
  overflow: visible !important;
}

html body.pm-liquid-v2.map-source-active .pm-apple-topbar__user-cluster,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__user-cluster {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  gap: 10px !important;
}

/* Tutu: não esticar quando o rótulo some */
html body.pm-liquid-v2.map-source-active .pm-apple-ia-btn,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-ia-btn,
html body.pm-liquid-v2.map-source-active #btnChatIA.pm-apple-ia-btn,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #btnChatIA.pm-apple-ia-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

html body.pm-liquid-v2.map-source-active .pm-apple-topbar__search-toggle-mount,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__search-toggle-mount {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: min(
    var(--pm-topbar-search-open-width, 480px),
    calc(100vw - var(--pm-topbar-left-reserve, 320px) - var(--pm-topbar-right-reserve, 300px))
  ) !important;
  overflow: hidden !important;
}

html body.pm-liquid-v2.map-source-active #pmTopbarSearch.pm-apple-search-expand,
html body.pm-liquid-v2.map-source-active #pmTopbarSearch.pm-apple-search-expand.pm-apple-search--open,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmTopbarSearch.pm-apple-search-expand,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmTopbarSearch.pm-apple-search-expand.pm-apple-search--open {
  width: var(--pm-topbar-chip-height, 52px) !important;
  max-width: min(
    var(--pm-topbar-search-open-width, 480px),
    calc(100vw - var(--pm-topbar-left-reserve, 320px) - var(--pm-topbar-right-reserve, 300px))
  ) !important;
  min-width: var(--pm-topbar-chip-height, 52px) !important;
}

html body.pm-liquid-v2.map-source-active #pmTopbarSearch.pm-apple-search-expand.pm-apple-search--open,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmTopbarSearch.pm-apple-search-expand.pm-apple-search--open {
  width: min(
    var(--pm-topbar-search-open-width, 480px),
    calc(100vw - var(--pm-topbar-left-reserve, 320px) - var(--pm-topbar-right-reserve, 300px))
  ) !important;
  max-width: min(
    var(--pm-topbar-search-open-width, 480px),
    calc(100vw - var(--pm-topbar-left-reserve, 320px) - var(--pm-topbar-right-reserve, 300px))
  ) !important;
}

/* Controles laterais do mapa — sempre visíveis, acima da sidebar */
html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-corner-right,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right,
html body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-map-area .pm-map-corner-right,
html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
  z-index: 55 !important;
  max-height: none !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
  bottom: var(--pm-map-controls-bottom, 104px) !important;
  top: auto !important;
  left: auto !important;
  right: min(
    calc(var(--pm-map-rail-width-effective, 380px) + 28px),
    calc(100% - 56px)
  ) !important;
}

html body.pm-liquid-v2.map-source-active .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right,
html body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right,
html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right {
  left: auto !important;
  right: 16px !important;
  bottom: var(--pm-map-controls-bottom, 104px) !important;
}

html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-corner-right > *,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right > *,
html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-corner-right :is(
  .pm-map-round-btn,
  .pm-map-zoom-pill,
  .pm-map-zoom-btn,
  #pmMapSidebarEdgeToggle,
  #pmMapCompassBtn,
  #pmMapFullscreenBtn,
  #pmMapZoomIn,
  #pmMapZoomOut,
  .pm-map-tools-wrap
),
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right :is(
  .pm-map-round-btn,
  .pm-map-zoom-pill,
  .pm-map-zoom-btn,
  #pmMapSidebarEdgeToggle,
  #pmMapCompassBtn,
  #pmMapFullscreenBtn,
  #pmMapZoomIn,
  #pmMapZoomOut,
  .pm-map-tools-wrap
) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex-shrink: 0 !important;
}

html body.pm-liquid-v2.map-source-active .pm-map-area.map-loading .pm-map-corner-right,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area.map-loading .pm-map-corner-right {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* HUD inferior: limitado à área do mapa (não à viewport inteira) */
html body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom,
html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom,
html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  justify-content: center !important;
  left: 12px !important;
  right: calc(var(--pm-map-rail-width, 380px) + var(--pm-map-hud-right-reserve, 86px)) !important;
  width: auto !important;
  max-width: none !important;
  bottom: var(--pm-map-rail-bottom, 28px) !important;
  transform: none !important;
  grid-template-columns: none !important;
  pointer-events: none !important;
}

html body.pm-liquid-v2.map-source-active .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom {
  right: var(--pm-map-hud-right-reserve-collapsed, 74px) !important;
}

html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-bottom-hud .pm-active-bar,
html body.pm-liquid-v2.map-source-active .pm-map-area #pmActiveBar,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-bottom-hud .pm-active-bar,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area #pmActiveBar {
  position: relative !important;
  grid-column: auto !important;
  justify-self: auto !important;
  flex: 0 1 auto !important;
  width: min(480px, 100%) !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  pointer-events: auto !important;
}

html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-bottom-hud .pm-map-scale-hud,
html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-bottom-hud #pmMapDistanceCard,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-bottom-hud .pm-map-scale-hud,
html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-bottom-hud #pmMapDistanceCard {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 1280px) {
  html body.pm-liquid-v2.map-source-active,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] {
    --pm-topbar-left-reserve: 248px;
    --pm-topbar-right-reserve: 288px;
  }

  /* Marca: botão quadrado só com o logo */
  html body.pm-liquid-v2.map-source-active #pmBrandCard .pm-apple-brand-card__copy,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmBrandCard .pm-apple-brand-card__copy,
  html body.pm-liquid-v2.map-source-active #pmBrandCard .pm-apple-brand-card__chev,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmBrandCard .pm-apple-brand-card__chev {
    display: none !important;
  }

  html body.pm-liquid-v2.map-source-active #pmBrandCard.pm-apple-brand-card,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmBrandCard.pm-apple-brand-card {
    width: var(--pm-topbar-chip-height, 52px) !important;
    min-width: var(--pm-topbar-chip-height, 52px) !important;
    max-width: var(--pm-topbar-chip-height, 52px) !important;
    height: var(--pm-topbar-chip-height, 52px) !important;
    min-height: var(--pm-topbar-chip-height, 52px) !important;
    max-height: var(--pm-topbar-chip-height, 52px) !important;
    padding: 7px !important;
    gap: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  html body.pm-liquid-v2.map-source-active #pmBrandCard .pm-apple-brand-card__logo,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmBrandCard .pm-apple-brand-card__logo {
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-profile-btn,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-profile-btn {
    min-width: 0 !important;
    max-width: min(156px, 22vw) !important;
  }
}

@media (max-width: 1180px) {
  /* Sidebar cobre a faixa direita — controles descem para o canto esquerdo */
  html body.pm-liquid-v2.map-source-active .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-corner-right {
    left: 14px !important;
    right: auto !important;
    bottom: var(--pm-map-controls-bottom, 104px) !important;
    top: auto !important;
    align-items: center !important;
    max-height: calc(100dvh - 108px - var(--pm-map-controls-bottom, 104px)) !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-corner-right::-webkit-scrollbar,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-corner-right::-webkit-scrollbar {
    display: none !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-tools-wrap #pmMapToolsPopover.pm-map-tools-popover.open,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-layout:not(.pm-map-sidebar-rail-collapsed) .pm-map-area .pm-map-tools-wrap #pmMapToolsPopover.pm-map-tools-popover.open {
    left: calc(100% + 12px) !important;
    right: auto !important;
  }
}

@media (max-width: 1100px) {
  html body.pm-liquid-v2.map-source-active,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] {
    --pm-topbar-search-open-width: 360px;
    --pm-topbar-left-reserve: 220px;
    --pm-topbar-right-reserve: 196px;
  }

  html body.pm-liquid-v2.map-source-active .pm-weather-card-status,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-weather-card-status {
    display: none !important;
  }

  html body.pm-liquid-v2.map-source-active #pmTopbarSearch.pm-apple-search-expand.pm-apple-search--open,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmTopbarSearch.pm-apple-search-expand.pm-apple-search--open {
    width: min(
      var(--pm-topbar-search-open-width, 360px),
      calc(100vw - var(--pm-topbar-left-reserve, 220px) - var(--pm-topbar-right-reserve, 196px))
    ) !important;
    max-width: min(
      var(--pm-topbar-search-open-width, 360px),
      calc(100vw - var(--pm-topbar-left-reserve, 220px) - var(--pm-topbar-right-reserve, 196px))
    ) !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-topbar__search-toggle-mount,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__search-toggle-mount {
    max-width: min(
      var(--pm-topbar-search-open-width, 360px),
      calc(100vw - var(--pm-topbar-left-reserve, 220px) - var(--pm-topbar-right-reserve, 196px))
    ) !important;
  }
}

@media (max-width: 980px) {
  html body.pm-liquid-v2.map-source-active,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] {
    --pm-topbar-left-reserve: 188px;
    --pm-topbar-right-reserve: 168px;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-topbar__actions,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__actions {
    display: none !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-profile-btn__role,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-profile-btn__role {
    display: none !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-profile-btn,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-profile-btn {
    max-width: min(132px, 24vw) !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-bottom-hud.pm-map-corner-bottom {
    left: 10px !important;
    right: var(--pm-map-hud-right-reserve-collapsed, 74px) !important;
  }

  /* Painel inferior: controles ficam acima dele, sempre visíveis */
  html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right {
    left: 12px !important;
    right: auto !important;
    bottom: max(104px, calc(min(62vh, 520px) + 24px)) !important;
    top: auto !important;
    max-height: calc(100dvh - 108px - max(104px, calc(min(62vh, 520px) + 24px))) !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right,
  html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-area .pm-map-corner-right {
    left: auto !important;
    right: 12px !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-map-area .pm-map-corner-right::-webkit-scrollbar,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-map-area .pm-map-corner-right::-webkit-scrollbar {
    display: none !important;
  }
}

@media (max-width: 900px) {
  html body.pm-liquid-v2.map-source-active,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] {
    --pm-topbar-right-reserve: 168px;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-ia-btn__label,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-ia-btn__label {
    display: none !important;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-ia-btn,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-ia-btn,
  html body.pm-liquid-v2.map-source-active #btnChatIA.pm-apple-ia-btn,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #btnChatIA.pm-apple-ia-btn {
    width: var(--pm-topbar-chip-height, 52px) !important;
    min-width: var(--pm-topbar-chip-height, 52px) !important;
    max-width: var(--pm-topbar-chip-height, 52px) !important;
    padding: 0 !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 720px) {
  html body.pm-liquid-v2.map-source-active,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] {
    --pm-topbar-left-reserve: 128px;
    --pm-topbar-right-reserve: 120px;
  }

  html body.pm-liquid-v2.map-source-active .pm-apple-profile-btn__name,
  html body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-profile-btn__name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 72px !important;
  }
}

/* Desktop — popovers de clima/calendário/ferramentas não podem ser cortados */
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active .pm-apple-topbar__shell,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__shell {
  overflow: visible !important;
}

html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active .pm-apple-topbar__weather-mount,
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active .pm-apple-topbar__calendar-mount,
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active .pm-apple-topbar__tools-mount,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__weather-mount,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__calendar-mount,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__tools-mount {
  overflow: visible !important;
  z-index: 4 !important;
}

html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active #pmWeatherTopbarMount:has(.pm-weather-popover.open),
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active #pmCalendarTopbarMount:has(.pm-calendar-popover.open),
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active #pmToolsTopbarMount:has(.pm-map-tools-popover.open),
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmWeatherTopbarMount:has(.pm-weather-popover.open),
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmCalendarTopbarMount:has(.pm-calendar-popover.open),
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmToolsTopbarMount:has(.pm-map-tools-popover.open) {
  z-index: 96 !important;
}

html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active #pmWeatherCard,
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active #pmCalendarBtn,
html:not(.is-mobile-pm) body.pm-liquid-v2.map-source-active #pmMapToolsTrigger,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmWeatherCard,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmCalendarBtn,
html:not(.is-mobile-pm) body.pm-liquid-v2 .censo-integrated[data-active-source="mapa"] #pmMapToolsTrigger {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Suporte + perfil alinhados à largura da sidebar (desktop) */
@media (min-width: 901px) {
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-apple-topbar__rail-end,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__rail-end {
    position: fixed !important;
    right: 16px !important;
    top: 10px !important;
    left: auto !important;
    width: var(--pm-map-rail-width, 380px) !important;
    max-width: min(var(--pm-map-rail-width, 380px), calc(100vw - 32px)) !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: stretch !important;
    align-items: stretch !important;
  }

  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-apple-topbar__user-cluster,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-apple-topbar__user-cluster {
    display: flex !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }

  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-apple-ia-btn,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-apple-ia-btn,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell.map-source-active #btnChatIA.pm-apple-ia-btn,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] #btnChatIA.pm-apple-ia-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 168px !important;
    max-width: none !important;
  }

  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell.map-source-active .pm-apple-profile-btn,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-apple-profile-btn,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell.map-source-active #btnUser.pm-apple-profile-btn,
  html:not(.is-mobile-pm) body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] #btnUser.pm-apple-profile-btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    align-self: stretch !important;
  }
}
