/* Keep the Armory controls inside the viewport; only its loadout content scrolls. */
.armoryScreen:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vh, 24px);
  overflow: hidden;
}

.armoryCard {
  display: flex;
  flex-direction: column;
  width: min(1040px, 96vw);
  height: min(900px, 96vh);
  height: min(900px, 96dvh);
  min-height: 0;
  max-height: 96vh;
  max-height: 96dvh;
  padding: clamp(12px, 2vh, 24px);
  overflow: hidden;
}

.armoryHead {
  flex: none;
  padding-bottom: clamp(8px, 1.5vh, 16px);
}

.armoryHead h2 {
  font-size: clamp(22px, 3vh, 30px);
}

.armoryHead button {
  flex: none;
}

.armoryTabs {
  flex: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin: clamp(6px, 1.5vh, 14px) 0;
}

.armoryTabs button {
  min-width: 110px;
  padding: 9px 8px;
}

.armoryBody {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}

.attachmentGrid {
  align-content: start;
}

.attachmentSlot {
  padding: clamp(8px, 1.4vh, 12px);
}

.armoryCard aside {
  align-self: start;
  padding: 14px;
}

.armoryCard aside p {
  min-height: 0;
}

@media (max-width: 760px) {
  .armoryCard {
    width: 96vw;
  }

  .armoryTabs {
    flex-direction: row;
  }

  .armoryTabs button {
    flex: 1 1 30%;
  }
}

@media (max-height: 650px) {
  .armoryHead h2 {
    font-size: 21px;
  }

  .armoryTabs button {
    padding: 6px;
  }
}
