@media (pointer:coarse) and (orientation:landscape) {
  #hud .radar-legend {
    display: none !important;
  }

  /* The perimeter legend makes a separate RADAR title redundant. */
  #hud .radar-label {
    display: none !important;
  }

  /* Lift the entire radar/legend enough to clear the joystick outer ring. */
  #hud .radar-wrap {
    bottom: calc(var(--erg-bottom) + 148px) !important;
  }

  #hud .radar-curved-legend {
    position: absolute;
    z-index: 15;
    overflow: visible;
    pointer-events: none;
    filter: drop-shadow(0 0 2px rgba(72,255,135,.22));
  }

  #hud .radar-curved-legend-outer-ring,
  #hud .radar-curved-legend-inner-ring {
    fill: none;
    stroke: rgba(114,255,140,.42);
  }

  #hud .radar-curved-legend-outer-ring {
    stroke-width: .95;
  }

  #hud .radar-curved-legend-inner-ring {
    stroke-width: .7;
    opacity: .8;
  }

  #hud .radar-curved-key {
    font-family: "Courier New", monospace;
    font-size: 11.2px;
    font-weight: 400;
    letter-spacing: .9px;
    stroke: none;
    paint-order: normal;
    opacity: .98;
  }

  #hud .radar-key-hostile { fill: #ff5a5a; }
  #hud .radar-key-human { fill: #40dfff; }
  #hud .radar-key-cache { fill: #ffd45a; }

  /* Dynamic fourth slot: hidden until a special radar context is active. */
  #hud .radar-key-context {
    fill: #39dfff;
    font-size: 10.2px;
    letter-spacing: .7px;
    opacity: 0;
  }

  #hud .radar-context-active .radar-key-context {
    opacity: .98;
  }
}
