/* Bannerbruch 3.7.6 – sehr kompakte Formations-Legende im BISHERIGEN
   Trennstreifen zwischen den zwei Spielfeldern; kein zusaetzlicher Block. */
#battlefield {
  gap: 7px; /* vorher 12px – gleicht die neue Beschriftung aus */
}
#battlefield > .formation-legend {
  width: 100%;
  max-width: 610px;
  margin: 0 auto;
  padding: 3px 5px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: center;
  gap: 4px;
  letter-spacing: 0;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  text-shadow: 0 1px 2px #000b;
  background: linear-gradient(90deg,#251c27,#423525,#251c27);
}
.formation-legend-tier {
  min-width: 0;
  padding: 1px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #f5e8d2;
  line-height: 1.3;
  border-right: 1px solid #bba1794d;
}
.formation-legend-tier:last-child { border-right: 0; }
#battlefield .formation-legend-colors {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
  gap: 3px;
  margin: 0;
  color: #f7e6bf;
  font-size: clamp(9px,1.2vw,11px);
  font-weight: 750;
  white-space: nowrap;
}
.formation-legend-colors span { min-width: 0; margin: 0; color: inherit; overflow: hidden; text-overflow: clip; }
#battlefield .formation-legend-values span { margin: 0; color: inherit; }
#battlefield .formation-legend-values {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 3px;
  color: #e8dbc3;
  font-size: 10px;
  font-weight: 550;
}
.formation-legend-values b { font-size: 12px; color: #ffe2a0; }
.formation-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1px solid #fff9;
  border-radius: 50%;
  box-shadow: 0 0 3px #000b;
}
.formation-dot-red { background: #df4b56; }
.formation-dot-blue { background: #a5ddf8; }
.formation-dot-purple { background: #9661c6; }
.formation-dot-green { background: #52bb72; }
.formation-dot-orange { background: #ffd0a2; }
.formation-dot-yellow { background: #f5d754; }
@media (max-width:650px) {
  #battlefield { gap: 6px; } /* vorher 9px */
  #battlefield > .formation-legend { gap: 1px; padding: 2px 1px; }
  #battlefield .formation-legend-colors { font-size: 9px; gap: 2px; }
  #battlefield .formation-legend-values { font-size: 9px; gap: 2px; }
  .formation-legend-values b { font-size: 10px; }
  .formation-dot { width: 7px; height: 7px; flex-basis: 7px; }
}
@media (max-width:370px) {
  #battlefield .formation-legend-colors { font-size: 8px; }
  #battlefield .formation-legend-values { font-size: 8px; }
  .formation-dot { width: 6px; height: 6px; flex-basis: 6px; }
}
