/* Keep complete game rows inside the scrollable bookshelf and profile history. */
.library-body,
.pro-players {
  min-width: 0;
  min-height: 0;
}

.shelf {
  grid-auto-rows: max-content;
  align-content: start;
}

.shelf-item {
  min-width: 0;
  min-height: min-content;
}

.shelf-item .body,
.shelf-item .title span {
  min-width: 0;
}

.shelf-item .title > .muted,
.shelf-item .title > .stone-icon {
  flex-shrink: 0;
}

.shelf-item .meta {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.shelf-item .meta > span {
  min-width: 0;
  max-width: 100%;
}

.shelf-item .file-name {
  max-width: min(220px, 100%);
}

.shelf-item .buttons {
  max-width: 100%;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .shelf-item .spine {
    grid-row: 1 / span 2;
  }
}
