------
## 最终结论
```python
import re

def fix_spaces(text):
    text = re.sub(r'\s{3,}', '-', text)  # Replace 3 or more consecutive spaces with '-'
    text = text.replace(' ', '_')         # Replace remaining single spaces with '_'
    return text
```