.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--switch-gap, 1rem);
  --threshold: 30rem;
}

.switcher > * {
  flex-grow: 1;
  flex-basis: calc((var(--threshold) - 100%) * 999);
}

.switcher > * > * {
  max-inline-size: 100%;
}

.switcher[data-max-col="2"] > :nth-last-child(n + 3),
.switcher[data-max-col="2"] > :nth-last-child(n + 3) ~ * {
  flex-basis: 100%;
}

.switcher[data-max-col="3"] > :nth-last-child(n + 4),
.switcher[data-max-col="3"] > :nth-last-child(n + 4) ~ * {
  flex-basis: 100%;
}

.switcher[data-max-col="4"] > :nth-last-child(n + 5),
.switcher[data-max-col="4"] > :nth-last-child(n + 5) ~ * {
  flex-basis: 100%;
}

.switcher[data-max-col="5"] > :nth-last-child(n + 6),
.switcher[data-max-col="5"] > :nth-last-child(n + 6) ~ * {
  flex-basis: 100%;
}

.switcher[data-max-col="6"] > :nth-last-child(n + 7),
.switcher[data-max-col="6"] > :nth-last-child(n + 7) ~ * {
  flex-basis: 100%;
}
