[data-genre="library"] { --category-art: url("/assets/category-art/library.webp"); }
[data-genre="children"] { --category-art: url("/assets/category-art/elephant-paradise-ci.webp"); }
[data-genre="history"] { --category-art: url("/assets/category-art/history.webp"); }
[data-genre="youth"] { --category-art: url("/assets/category-art/youth.webp"); }
[data-genre="urban"] { --category-art: url("/assets/category-art/urban.webp"); }
[data-genre="life"] { --category-art: url("/assets/category-art/life.webp"); }
[data-genre="mystery"] { --category-art: url("/assets/category-art/mystery.webp"); }
[data-genre="fantasy"] { --category-art: url("/assets/category-art/fantasy.webp"); }
[data-genre="future"] { --category-art: url("/assets/category-art/future.webp"); }
[data-genre="literary"] { --category-art: url("/assets/category-art/literary.webp"); }

.wx-category-art-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.6vw, 17px);
}

.wx-category-art-grid .wx-category-art {
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  min-width: 0;
  min-height: clamp(96px, 12vw, 156px);
  padding: clamp(6px, 1.1vw, 14px);
  border: 0;
  border-radius: 12px;
  color: #fff8e8;
  background: #2b3f42 var(--category-art) center / cover no-repeat;
  text-decoration: none;
  text-align: left;
}

.wx-category-art-grid .wx-category-shortcut {
  grid-column: span 2;
  min-height: clamp(108px, 14vw, 178px);
}

.wx-category-art-grid [data-genre="children"] { background-position: 76% 24%; }

.wx-category-art-grid [data-genre="children"] .wx-category-label {
  background: #063c3d;
  color: #fff2c5;
}

.wx-category-label,
.wx229-category-name .wx-category-label {
  color: #fff8e8;
  background: rgb(12 20 23 / 91%);
  border-radius: 6px;
  padding: .36em .6em;
  font-size: clamp(.8rem, 2.8vw, 1.03rem);
  font-weight: 750;
  line-height: 1.3;
}

.wx-category-art-grid .wx-category-label {
  width: 100%;
  box-sizing: border-box;
  padding: .42em .25em;
  font-size: clamp(.8rem, 3.55vw, 1.12rem);
  text-align: center;
}

.wx-category-art:hover .wx-category-label,
.wx-category-art:focus-visible .wx-category-label,
.wx229-category-name:hover .wx-category-label,
.wx229-category-name:focus-visible .wx-category-label {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.wx229-category-name[data-genre] {
  padding: 12px;
  min-height: 50px;
  border-radius: 8px;
  color: #fff8e8;
  background: #2b3f42 var(--category-art) center / cover no-repeat;
}

.wx229-category-name .wx-category-label {
  display: inline-block;
}

@media (max-width: 700px) {
  .wx-category-art-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wx-category-art-grid .wx-category-shortcut {
    grid-column: span 1;
  }
}
