.player {
  color: white;
  font-size: 1.6rem;
  padding: 0.5rem;
  border-radius: 0.6rem;
  flex-shrink: 0;
}
.player ul {
  list-style: none;
  padding: 0;
}

.boards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 auto 3rem;
  padding: 3rem 2rem 0;
}

.matrix {
  transition: all 400ms linear 100ms;
}
.matrix .layer {
  transition: all 400ms linear;
}
.matrix .layer .row .column {
  transition: all 250ms cubic-bezier(0.19, 1, 0.22, 1) 50ms;
}

.placement {
  position: sticky;
  top: 0;
  z-index: 10;
  color: white;
  font-size: 1.6rem;
  text-align: center;
  padding: 1.5rem 2rem;
  background-color: #222;
}
.placement p {
  margin: 0 0 1.2rem;
}
.placement .placement-name {
  font-size: 1.8rem;
  padding: 0.6rem 1rem;
  margin: 0.4rem 1rem;
  border-radius: 0.6rem;
  border: none;
  max-width: calc(100% - 2rem);
  box-sizing: border-box;
}
.placement button {
  font-size: 1.8rem;
  font-weight: 700;
  min-width: 14rem;
  margin: 0.4rem 1rem;
  padding: 1rem 2.4rem;
  border: none;
  border-radius: 0.6rem;
  background-color: white;
  color: #333;
  cursor: pointer;
}
.placement button:hover:not(:disabled) {
  color: green;
}
.placement button:disabled {
  color: #888;
  background-color: #555;
  cursor: not-allowed;
}

.column.valid-target {
  cursor: crosshair;
}
.column.valid-target:hover {
  outline: 3px solid yellow;
  outline-offset: -3px;
}

.column.valid-end {
  cursor: pointer;
  outline: 2px dashed #51cf66;
  outline-offset: -2px;
}

.order-pick {
  display: none;
}

.player[data-ordering=true] > :not(.turn-badge):not(.order-pick) {
  display: none;
}
.player[data-ordering=true] > .order-pick {
  display: block;
  box-sizing: border-box;
  min-width: 16rem;
  max-width: calc(100vw - 4rem);
  min-height: 5.2rem;
  padding: 0.8rem 2.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0.2rem solid #3a4770;
  border-left: 0.8rem solid #3a4770;
  border-radius: 2.6rem;
  background-color: #10172c;
  color: #e8ecf8;
  font: inherit;
  font-size: 2rem;
  font-weight: 700;
}
.player[data-ordering=true] > .order-pick:enabled {
  cursor: pointer;
}
.player[data-ordering=true] > .order-pick:enabled:hover, .player[data-ordering=true] > .order-pick:enabled:focus-visible {
  border-top-color: #ff8a3d;
  border-right-color: #ff8a3d;
  border-bottom-color: #ff8a3d;
}

.player[data-pickable=true] {
  cursor: pointer;
}
.player[data-pickable=true]:hover {
  outline: 4px solid yellow;
  outline-offset: 6px;
}

.player.role-own {
  position: sticky;
  top: 1rem;
  z-index: 100;
  max-width: 18rem;
  background-color: rgba(20, 20, 20, 0.9);
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.6);
}
.player.role-own .matrix .layer .row .column {
  height: 1.4rem;
  width: 1.4rem;
}
.player.role-own .player-stats {
  font-size: 1.1rem;
  margin-top: 0.4rem;
}

.player.role-summary {
  font-size: 1.3rem;
}
.player.role-summary .matrix .layer .row .column {
  height: clamp(1.1rem, 4vw, 2rem);
  width: clamp(1.1rem, 4vw, 2rem);
}
.player.role-summary .player-stats {
  font-size: 1.2rem;
}
.player.role-summary .matrix, .player.role-summary .matrix .layer, .player.role-summary .matrix .layer .row .column {
  transition: none;
}
.player.role-summary .matrix .layer .row .column {
  cursor: default;
}
.player.role-summary .matrix .layer .row .column:hover {
  opacity: 1;
}
.player.role-summary .column.valid-target {
  cursor: default;
}
.player.role-summary .column.valid-target:hover {
  outline: none;
}
.player.role-summary .column.valid-end {
  outline: none;
}

.turn-badge {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  min-height: 2.4rem;
}

.player-stats {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  column-gap: 3rem;
  align-items: start;
  margin-top: 1rem;
}
.player-stats .player-name {
  grid-column: 1/-1;
  text-align: center;
  margin-bottom: 0.8rem;
}
.player-stats .player-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 1.4rem;
  text-align: left;
}
.player-stats .stats-control {
  display: block;
  margin-bottom: 0.4rem;
  cursor: pointer;
}
.player-stats ul {
  text-align: left;
  margin: 0;
}