/* APM presentation is isolated from the frozen main HUD stylesheet ratchet. */
#game-screen.branch-background #command-card-stack {
  opacity: 0;
  pointer-events: none;
}

.replay-apm-val {
  min-width: 32px;
  padding-left: 8px;
  border-left: 1px solid rgba(202, 193, 163, 0.34);
  text-align: right;
}

.apm-counter {
  box-sizing: border-box;
  width: 42px;
  min-height: 24px;
  padding: 4px 3px;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-sm);
  background: rgba(39, 37, 31, 0.94);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  text-shadow: 1px 1px 0 #191710;
  pointer-events: none;
}

#command-card-stack {
  position: absolute;
  z-index: var(--hud-z);
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

#command-card-stack #command-card {
  position: static;
  right: auto;
  bottom: auto;
}

@media (pointer: coarse) and (max-width: 1024px) and (max-height: 1024px) {
  .apm-counter {
    width: 34px;
    min-height: 26px;
    font-size: 12px;
  }

  #command-card-stack {
    right: var(--mobile-debug-right);
    bottom: var(--mobile-debug-bottom);
  }
}
