.piece-selector {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 25rem;
  height: 100vh;
  overflow-y: auto;
  user-select: none;
}

.pieces-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  overflow-x: auto;
}

.piece,
.piece > img {
  max-width: 4rem;
  height: 5rem;
  max-height: 5rem;
  cursor: pointer;
}

.piece > img {
  max-height: 3rem;
  pointer-events: none;
}

.piece-caption {
  font-size: small;
  white-space: nowrap;
}

body[dark-mode] .piece-selector {
  background-color: #000000;
  color: #ccc;
}

body[light-mode] .piece-selector {
  background-color: #fff;
  color: #222;
}

.expandsCont {
  display: flex;
}

.expands {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #222;
  color: #969696;
  width: auto;
  height: auto;
  min-width: 4rem;
  border-radius: 4px;
  padding: 0.25rem;

}
.expands .main {
  color: rgb(255, 255, 255);
  font-weight: bold;
}

body[dark-mode] .expands {
  background-color: #160000;
  color: #ddd;
  border: 1px solid #790303;
}
body[light-mode] .expands {
  background-color: #fff;
  color: #222;
  border: 1px solid #999;
}

.expands-caption {
  display: flex;
  justify-content: center;
  font-size: small;
  white-space: nowrap;
  color: #aaa;
  background-color: #a50000;
  padding: 0.25rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.pieces-group-label {
  display: flex;
  justify-content: center;
  font-size: small;
  font-weight: bold;
  white-space: nowrap;
  background-color: #940000;
  padding: 0.25rem;
  width: calc(100% - 1rem);
  margin-bottom: 0.5rem;
}
