.pocket piece:not(.disabled):hover:after, .pocket piece:after {
  box-shadow: inset 0 3px 4px #00000026 !important;
}

.pocket piece:after {
  background: var(--c-accent);
  color: #fff;
  text-shadow: 0 1px 1px #000 !important;
}

@media (hover: hover) {
  .pocket piece:not(.disabled):hover:after {
    background: hsl(from var(--c-accent) h s calc(l + 5));
  }
}

.pocket-c2 {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  display: block;
  position: relative;
}

.pocket piece:after, .pocket {
  border-radius: var(---ui-roundness, 7px);
}

.pocket.usable piece:first-child:hover {
  border-radius: var(---ui-roundness, 7px) 0 0 var(---ui-roundness, 7px);
}

.pocket {
  background: #888;
  justify-content: center;
  width: 62.5%;
  margin: auto;
  display: flex;
}

@media (min-width: 799.3px), (orientation: landscape) {
  .pocket {
    width: 100%;
    box-shadow: inset 0 3px 5px #0000004d;
  }
}

.pocket-c1 {
  flex: 0 0 20%;
  max-width: 10vmin;
}

.pocket piece {
  transition: all .15s;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.pocket piece:after {
  content: attr(data-nb);
  bottom: 0;
}

html:not([dir="rtl"]) .pocket piece:after {
  right: 0;
}

html[dir="rtl"] .pocket piece:after {
  left: 0;
}

.pocket piece:after {
  padding: 3px .3em;
  font-size: 1.1em;
  font-weight: bold;
  line-height: .9em;
  position: absolute;
}

.pocket piece[data-nb="0"] {
  cursor: auto;
  opacity: .1;
}

.pocket piece[data-nb="0"]:after {
  content: none;
}

.pocket piece.premove {
  background-color: #555;
}

.pocket.usable piece {
  cursor: pointer;
  pointer-events: auto;
}

.pocket.usable piece:hover {
  background-color: #aaa;
}

.blindfold .pocket:not(.usable) {
  opacity: 0;
}

.pocket-top {
  grid-area: pocket-top;
}

.pocket-bottom {
  grid-area: pocket-bot;
}

.pocket-c1 {
  max-width: 60px;
}

.analyse.variant-crazyhouse {
  grid-template-rows: auto auto auto auto auto minmax(20em, 30vh);
  grid-template-areas: "pocket-top"
                       "board"
                       "pocket-bot"
                       "kb-move"
                       "controls"
                       "tools"
                       "side"
                       "round-training"
                       "under"
                       "chat"
                       "uchat";
}

@media (min-width: 799.3px), (orientation: landscape) {
  .analyse.variant-crazyhouse {
    grid-template-rows: 60px auto 60px;
    grid-template-areas: "board gauge pocket-top"
                         "board gauge tools"
                         "board gauge pocket-bot"
                         "kb-move . controls"
                         "under . controls"
                         "under . round-training"
                         "under . side"
                         "chat . side"
                         "uchat . side";
  }

  .analyse.variant-crazyhouse .analyse__tools {
    height: auto;
  }
}

@media (min-width: 1259.3px) {
  .analyse.variant-crazyhouse {
    grid-template-rows: 60px auto auto 60px;
    grid-template-areas: "side . board gauge pocket-top"
                         "side . board gauge tools"
                         "chat . board gauge tools"
                         "chat . board gauge pocket-bot"
                         "uchat . kb-move . controls"
                         "uchat . under . controls"
                         "uchat . under . round-training";
  }
}

@media (max-width: 799.29px) and (orientation: portrait) {
  .pocket-top {
    margin-bottom: var(---block-gap);
  }

  .pocket-bottom {
    margin-top: var(---block-gap);
  }
}
