@media (max-width: 760px), (pointer: coarse) {
  #hud {
    padding: 4px 6px;
    gap: 3px 6px;
  }
  #hud .meter.xp {
    display: none;
  }
  #hud .hud-foot {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 4px;
    min-height: calc(44px / var(--hud-scale));
    padding-right: calc(48px / var(--hud-scale));
  }
  #hud #players-online,
  #hud #net-ping {
    min-height: 16px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 10px;
  }
  #hud #players-online {
    gap: 0 4px;
    flex-wrap: wrap;
    max-width: 100%;
    line-height: 1.15;
  }
  #hud #net-ping {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #hud #net-ping.far {
    color: #855000;
  }
  #hud #hud-flags {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    min-width: 0;
  }
  #hud #hud-flags:empty {
    display: none;
  }
  #hud #hud-flags > * {
    max-width: 100%;
  }
  #hud #hud-flags > span {
    height: auto;
    min-height: 22px;
    white-space: normal;
  }
  #hud #btn-notes {
    position: absolute;
    right: 0;
    bottom: 0;
    width: calc(44px / var(--hud-scale));
    height: calc(44px / var(--hud-scale));
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #hud #btn-notes .px-icon canvas {
    width: 18px;
    height: 18px;
  }
  #hud #btn-notes.on {
    display: none;
  }
  #hud .hud-foot:has(#btn-notes.on) {
    padding-right: 0;
    min-height: 0;
  }
}
@media (max-width: 760px) and (min-height: 501px) and (max-height: 680px) {
  body.first-adventure #hud .hud-foot {
    padding-right: 0;
    min-height: 0;
  }
  body.first-adventure #hud #hud-flags,
  body.first-adventure #hud #btn-notes {
    display: none;
  }
}
