The problem accuars, that border-radius cannot cut corners at right angle.
The Idea is - to add another border-radius-divider (or -sectors) attribute to divide rounded corner by sectors as polyhedron. For example - border-radius-sectors: 4; = squire, border-radius-sectors: 8;