body,
div.main-body,
.miieditor-wrapper {
  z-index: -1;
  user-select: none;
}

svg.logotype {
  position: absolute;
  width: 120px;
  top:42px;
  left:162px;
}

.miieditor-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 3fr;
  background: #0d0f20;
  width: 100vw;
  height: 100vh;
  gap: 0 48px;
}

.miieditor-wrapper::after {
  content: "";
  display: block;
  position: absolute;
  background: radial-gradient(closest-side, #161d40 0%, transparent 100%);
  width: 200vh;
  height: 200vh;
  top: -100vh;
  left: -100vh;
  z-index: -1;
}

div.mii-img-wrapper {
  position: relative;
  margin: auto;
  max-width: 512px;
  width: 26vw;
  height: auto;
}
img#mii-img {
  position: relative;
  width: 512px;
  height: auto;
  z-index: 2;
}
div.mii-img-wrapper .shadow {
  position: absolute;
  bottom: -18px;
  left: 6px;
  height: 72px;
  width: 512px;
  background: #1a214c;
  background: radial-gradient(farthest-side, #1a214c 0%, transparent 100%);
}

div.params-wrapper {
  position: relative;
  overflow-x: visible;
  margin: auto;
  margin-top: 150px;
  margin-right: 100px;
  display: grid;
  z-index: 3;
}

div.tabs {
  display: grid;
  grid-auto-flow: column;
  width: fit-content;
  gap: 2px;
  background: #0A0C19;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 32px;
}
div.tabs .tabbtn {
  min-width: 42px;
  min-height: 42px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  color: var(--text);
}
div.tabs .tabbtn:hover,
div.tabs .tabbtn.active {
  background: #1d203d;
}

div.subtabs {
  position: relative;
  grid-column: 1 / span 2;
}
div.subtabs .subtabbtn {
  position: relative;
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  color: var(--text);
}
div.subtabs .subtabbtn.active::before,
div.subtabs .subtabbtn.active:hover::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #9D6FF3;
  border-radius: 6px;
}

.subtab.has-sliders {
  grid-template-columns: 1fr 1fr;
}

form.params {
  grid-template-columns: repeat(2, auto);
}
form.params .tab {
  display: none;
  grid-template-columns: 534px 258px;
  gap: 48px;
}
form.params .tab.active {
  display: grid;
}

fieldset {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: fit-content;
  height: fit-content;
  grid-row: 2;
}
fieldset.active {
  display: grid;
}
fieldset.color {
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  grid-column: 2;
}
fieldset input[type="radio"] {
  display: none;
}
fieldset input[type="radio"] + label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 18px;
  background: #393b5f;
  width: 120px;
  height: 120px;
}
fieldset input[type="radio"]:checked + label {
  background: #3f4480;
  font-weight: bold;
  box-shadow: inset 0 0 0 4px #9D70F1;
}
fieldset.color input[type="radio"]:checked + label {
  box-shadow: inset 0 0 0 4px #9D70F1, inset 0 0 0 6px #181B33;
}
div.colorSidebar {
  margin: auto;
}

fieldset.has-subpages.active {
  display: block;
}
fieldset.has-subpages .subpage {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: fit-content;
  height: fit-content;
}
fieldset.has-subpages .subpage.active {
  display: grid;
}

input[type="range"].invert {
  direction: rtl;
}

.pagination {
  display: flex;
  flex-flow: row;
  width: max-content;
  grid-column: 3 / span 2;
  grid-row: 4;
  margin-left: auto;
  align-items: center;
  font-size: 18px;
  color: var(--text-secondary);
}
.pagination .current-page-index {
  display: inline-block;
  font-weight: bold;
  color: var(--text);
  width: 18px;
  margin-right: 0.7ch;
  text-align: right;
}

.page-btn {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
}
.page-btn svg{
  height: 36px;
  margin: 6px
}
.page-btn.disabled {
  pointer-events: none;
}
.page-btn.disabled svg path {
  fill: #393B5F;
}

button * {
  pointer-events: none;
}

.miieditor-wrapper::before {
  content: "";
  display: block;
  position: absolute;
  background: #181B33;
  border-radius: 100%;
  width: 1308px;
  height: 1707px;
  top: 50%;
  transform: translateY(-50%);
  right: -200px;
  z-index: 0;
}

