
.main-wrapper {
  display: grid;
  width: 100%;
  grid-template-areas: "sidebar main";
  grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
  padding: 5.5rem 1.5rem 3rem;
}
body > .article-sidebar {
  width: 100%;
  color: var(--sidebar-color);
  background-color: var(--trans-bg);
  border-top: 3px solid var(--trans-bg);
  padding: 0 2rem;
}
.main-wrapper .article-sidebar {
  position: sticky;
  top: 5.5rem;
  height: 90vh;
  grid-area: sidebar;
  overflow: auto;
}
main {
  grid-area: main;
  border-left: 2px solid #6c6c6c;
  padding: 0 2rem;
}
#text {
  width: 100%;
  height: 60px;
  padding: .5rem;
  font-size: 1rem;
  box-shadow: 0 5px var(--input-bg);
  border: 3px solid var(--input-bg);
  resize: none !important;
  border-radius: 5px;
  outline: none;
}
.edit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  gap: 2rem;
}
.edit > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.edit button {
  color: #fff;
  display: block;
  position: relative;
  width: 50px;
  font-size: 1.4rem;
  padding: .5rem;
  border: none;
  border-radius: 10px;
  background-color: var(--input-bg);
  margin-left: auto;
  cursor: pointer;
}
.edit button.copied::before,
.edit button.copied::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: default;
  opacity: 0;
  visibility: hidden;
}
.edit button.copied::before {
  content: '';
  right: 100%;
  border: 8px solid transparent;
  border-left-color: var(--input-bg);
  animation: before 2s ease;
} 
.edit button.copied::after {
  content: 'copied';
  padding: .5rem;
  font-size: 1.12rem;
  right: 16px;
  background: var(--input-bg);
  border-radius: .5rem;
  border: 1px solid var(--input-bg);
  animation: after 2s ease;
}
.edit button span::before {
  content: var(--copy);
  font-weight: 400;
}
.edit button.copied span::before {
  content: var(--check);
  font-weight: 900;
}
@keyframes before {
  0%, 100% {opacity: 0;visibility: hidden;right: 50%;}
  10%, 75% {opacity: 1;visibility: visible;right: 100%;}
}
@keyframes after {
  0%, 100% {opacity: 0;visibility: hidden;right: calc(50% + 15.9px);}
  10%, 75% {opacity: 1;visibility: visible;right: calc(100% + 15.9px);}
}
.select-font {width: 400px;}
.select-size {width: 200px;}
.label {
  display: block;
  padding: .25rem 0;
}
.font-box {
  width: 85%;
  position: relative;
  font-size: .95rem;
  color: #fff;
  z-index: 999;
  cursor: pointer;
}
.selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--input-bg);
  width: 100%;
  border-radius: 10px;
  transition: .1s ease;
}
.selected > span:nth-child(1) {padding: .5rem 1rem;}
.selected > span:nth-child(2) {
  font-size: 1.4rem;
  padding: 0 1rem;
}
.selected > span:nth-child(2).open {transform: rotate(180deg);}
.selected > span:nth-child(2)::before {content: var(--down);}
.figfonts {
  position: absolute;
  top: 125%;
  width: 100%;
  transition: .3s ease;
  height: 0;
  opacity: 0;
  border-radius: 10px;
  background: none;
}
.figfonts.open {
  height: 300px;
  opacity: 1;
}
.figfonts span {
  padding: .5rem 1rem;
  cursor: pointer;
  transition: .1s ease;
}
.figfonts span.active {
  background-color: rgb(255 255 2555 / 4%);
  color: var(--fg);
}
.figfonts div {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 0 20px 1px #000;
  background: var(--input-bg);
}
.scroll::-webkit-scrollbar {width: 1.25rem;}
.scroll::-webkit-scrollbar-track {background: var(--bg);border-radius: 0 10px 10px 0;}
.scroll::-webkit-scrollbar-thumb {background: #ffffffe6;border-radius: 10px;}
.selected:hover {background: #04022a;}
.figfonts span:hover {background-color: rgb(255 255 2555 / 4%);} 
#size {width: 70%;display: block;}
#generator {
  width: 100%;
  height: 420px;
  margin-top: 1rem;
  color: #fff;
  font-size: var(--font-size, 1rem);
  background: var(--bg);
  border-radius: 10px;
  overflow-x: hidden;
  padding: 1rem;
}

.related > ul {padding:0;}
.related > ul > li {
  display: block;
  padding: .7rem 1rem;
  cursor: pointer;
  user-select: none;
}
.related ul ul {padding-left: 2rem;}
.related ul ul li {padding-top: .7rem;}
.related a, .related summary {color: inherit;}
.related a {
  display: block;
  text-decoration: none;
}
.related a:hover {text-decoration: underline;}

@media (max-width: 1105px) {
  .main-wrapper {grid-template-areas: "main main";}
  main {border: none;padding: 0;}
}
@media (max-width: 450px) {
  .main-wrapper {display: flex;flex-direction: column;}
  .edit > div {display: block;width: 100%;}
  .font-box, #size {margin: 0 auto;width: 95%;}
  main h1 {font-size: 6.5vw;}
}