
/* Mobile: one single row like the approved mockup.
   No giant stacked resource blocks and no second row. */
@media(max-width:599px){
  .app > header{
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    overflow:visible!important;
  }

  .app > header .v358-global-header{
    display:grid!important;
    grid-template-columns:46px 82px 1fr 1fr 1.15fr!important;
    grid-template-areas:"menu logo gold harz dampf"!important;
    gap:3px!important;
    align-items:center!important;
    width:100%!important;
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    padding:6px 6px!important;
    box-sizing:border-box!important;
  }

  .app > header .v358-global-header > #v032MenuBtn{
    grid-area:menu!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    border-radius:10px!important;
    font-size:23px!important;
  }

  .app > header .v358-logo{
    grid-area:logo!important;
    width:82px!important;
    min-width:0!important;
    overflow:hidden!important;
    padding:0!important;
    line-height:.78!important;
  }
  .app > header .v358-logo strong{
    display:block!important;
    margin:0!important;
    font-size:16px!important;
    line-height:.86!important;
    letter-spacing:-.5px!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
  .app > header .v358-logo span{
    display:block!important;
    margin:1px 0 0 12px!important;
    font-size:8px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .app > header .v358-logo::after{
    content:"V4.21";
    display:block;
    margin:4px 0 0 10px;
    color:#75d8d9;
    font-size:5.5px;
    font-family:system-ui,sans-serif;
    font-weight:900;
    letter-spacing:.02em;
  }

  .app > header .v358-res{
    min-width:0!important;
    width:100%!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    padding:4px 2px!important;
    border-radius:8px!important;
    box-sizing:border-box!important;
  }
  .app > header .v358-res.gold{grid-area:gold!important}
  .app > header .v358-res.harz{grid-area:harz!important}
  .app > header .v358-res.dampf{grid-area:dampf!important}

  .app > header .v358-res small{
    display:block!important;
    margin:0!important;
    font-size:4.7px!important;
    line-height:1!important;
    letter-spacing:.03em!important;
  }
  .app > header .v358-res b{
    display:block!important;
    margin:4px 0 0!important;
    padding:0!important;
    width:100%!important;
    font-size:8.1px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .app > header .v358-res.dampf b{
    font-size:7.8px!important;
  }

  /* The mockup does not have a bulky second header row.
     Version is shown discreetly under the logo; power remains in the hero/profile;
     settings stays in the hamburger menu. */
  .app > header .v358-subbar{
    display:none!important;
  }

  #v032MenuPanel{
    top:64px!important;
  }

  /* Remove V4.02 stacked-grid rules by overriding every row placement. */
  .app > header .v358-global-header{
    grid-auto-rows:auto!important;
  }
}

/* Very narrow phones still stay one row; reduce type instead of stacking. */
@media(max-width:380px){
  .app > header .v358-global-header{
    grid-template-columns:44px 74px .95fr .95fr 1.1fr!important;
    gap:2px!important;
    padding-left:4px!important;
    padding-right:4px!important;
  }
  .app > header .v358-logo{width:74px!important}
  .app > header .v358-logo strong{font-size:14px!important}
  .app > header .v358-logo span{font-size:7px!important;margin-left:9px!important}
  .app > header .v358-res b{font-size:7.4px!important}
  .app > header .v358-res.dampf b{font-size:7px!important}
}
