/* V48 — cabeçalho das telas internas no web/desktop.
   Mantém exatamente a mesma caixa/altura do cabeçalho do Mapa.
   Só troca o conteúdo central: métricas no Mapa, título nas demais telas. */

@media (min-width:721px){
  .app:not(.map-screen-active){
    grid-template-rows:112px minmax(0,1fr) 98px !important;
  }

  .app:not(.map-screen-active) .topbar.halloween-topbar{
    box-sizing:border-box !important;
    height:112px !important;
    min-height:112px !important;
    display:grid !important;
    grid-template-columns:340px minmax(320px,1fr) auto !important;
    grid-template-rows:64px 48px !important;
    column-gap:18px !important;
    row-gap:0 !important;
    padding:0 18px 0 0 !important;
    overflow:hidden !important;
  }

  .app:not(.map-screen-active) .halloween-wordmark{
    grid-column:1 !important;
    grid-row:1 / 3 !important;
    height:112px !important;
    min-height:112px !important;
    min-width:0 !important;
    align-self:stretch !important;
  }

  .app:not(.map-screen-active) .halloween-wordmark-img{
    width:330px !important;
    max-width:100% !important;
    height:106px !important;
    max-height:106px !important;
    object-fit:contain !important;
    object-position:left center !important;
    padding-left:10px !important;
  }

  .app:not(.map-screen-active) .headline-zone{
    grid-column:2 !important;
    grid-row:1 / 3 !important;
    min-width:0 !important;
    width:100% !important;
    height:112px !important;
    min-height:112px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    padding:0 8px !important;
    margin:0 !important;
    overflow:visible !important;
    position:relative !important;
  }

  .app:not(.map-screen-active) .headline-zone #screenTitle{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    color:#ffab31 !important;
    font-size:1.34rem !important;
    line-height:1.15 !important;
    font-weight:950 !important;
    text-align:left !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    position:static !important;
    transform:none !important;
  }

  .app:not(.map-screen-active) .map-header-metrics{
    display:none !important;
  }

  .app:not(.map-screen-active) .top-actions{
    grid-column:3 !important;
    grid-row:1 / 3 !important;
    height:112px !important;
    min-height:112px !important;
    align-self:stretch !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:12px !important;
    padding-left:14px !important;
    position:relative !important;
    z-index:2 !important;
  }

  /* Garante que o conteúdo das telas internas nunca entre por baixo do cabeçalho
     nem ultrapasse horizontalmente a viewport. */
  .app:not(.map-screen-active) > .screen.active{
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    overflow-x:hidden !important;
  }

  .app:not(.map-screen-active) > .screen.active > .section-card{
    width:min(900px,calc(100% - 28px)) !important;
    max-width:900px !important;
    margin:14px auto !important;
    box-sizing:border-box !important;
  }
}

@media (min-width:721px) and (max-width:1099px){
  .app:not(.map-screen-active){
    grid-template-rows:104px minmax(0,1fr) 82px !important;
  }

  .app:not(.map-screen-active) .topbar.halloween-topbar{
    height:104px !important;
    min-height:104px !important;
    grid-template-columns:245px minmax(260px,1fr) auto !important;
    grid-template-rows:56px 48px !important;
    column-gap:8px !important;
    padding-right:10px !important;
  }

  .app:not(.map-screen-active) .halloween-wordmark,
  .app:not(.map-screen-active) .top-actions{
    height:104px !important;
    min-height:104px !important;
  }

  .app:not(.map-screen-active) .halloween-wordmark-img{
    width:245px !important;
    height:104px !important;
    max-height:104px !important;
    padding-left:0 !important;
  }

  .app:not(.map-screen-active) .headline-zone{
    height:104px !important;
    min-height:104px !important;
  }

  .app:not(.map-screen-active) .headline-zone #screenTitle{
    font-size:1.08rem !important;
  }
}
