/* v0.25.9: HUD vertical overflow regression fix.
   Crucial: topbar has a fixed border-box height, so older 7px vertical padding
   left only ~31px usable content in its 47px compact mode; tall chips clipped.
   Use exactly the available inner height and keep the bottom edge inside topbar.
*/
@media (min-width:1061px) and (pointer:fine) {
  body > .app-shell > .topbar {
    --hud-safe-chip-height:52px;
    box-sizing:border-box!important;
    padding-top:1px!important;
    padding-bottom:2px!important;
    align-items:center!important;
    overflow:visible!important;
  }
  body > .app-shell > .topbar > .top-stats {
    box-sizing:border-box!important;
    height:var(--hud-safe-chip-height)!important;
    min-height:var(--hud-safe-chip-height)!important;
    max-height:var(--hud-safe-chip-height)!important;
    padding:0!important;
    margin:0!important;
    align-self:center!important;
    align-items:stretch!important;
    transform:none!important;
    overflow:visible!important;
  }
  body > .app-shell > .topbar > .top-stats > .stat-chip {
    display:flex!important;
    flex-direction:column!important;
    box-sizing:border-box!important;
    height:var(--hud-safe-chip-height)!important;
    min-height:var(--hud-safe-chip-height)!important;
    max-height:var(--hud-safe-chip-height)!important;
    padding:2px 8px!important;
    gap:0!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
  }
  body > .app-shell > .topbar > .top-stats > .stat-chip > .hud-icon-label {
    display:flex!important;
    flex:0 0 auto!important;
    height:20px!important;
    min-height:20px!important;
    max-height:20px!important;
    padding:0!important;
    margin:0!important;
    line-height:20px!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body > .app-shell > .topbar > .top-stats > .stat-chip > strong {
    display:block!important;
    flex:0 0 auto!important;
    height:auto!important;
    min-height:18px!important;
    padding:0!important;
    margin:0!important;
    line-height:18px!important;
    white-space:nowrap!important;
  }
  body > .app-shell > .topbar > .top-stats > .stat-chip .hud-custom-pixel-icon {
    width:19px!important;
    height:19px!important;
    max-width:19px!important;
    max-height:19px!important;
    object-fit:contain!important;
  }
}
@media (min-width:1061px) and (pointer:fine) and (max-height:780px) {
  body > .app-shell > .topbar { --hud-safe-chip-height:42px; }
}
/* Narrow desktop may have a smaller topbar, but phone/touch rules are unchanged. */
@media (min-width:1061px) and (pointer:fine) and (max-width:1400px) {
  body > .app-shell > .topbar > .top-stats > .stat-chip > strong {font-size:14px!important;line-height:17px!important;min-height:17px!important;}
}
