body {
  font-family: sans-serif;
  background: #222;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 10px;
}

.screen {
  width: 100%;
  max-width: 420px;
}

#board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 336px;
  height: 336px;
  margin: 8px auto;
}

#board img {
  width: 42px;
  height: 42px;
  display: block;
}

#buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

#buttons button {
  padding: 8px 10px;
}

#moveList {
  white-space: pre-wrap;
  background: #111;
  padding: 6px;
  border-radius: 4px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 14px;
}

#statOutput {
  white-space: pre-wrap;
  background: #111;
  padding: 6px;
  border-radius: 4px;
  font-size: 12px;
  max-height: 200px;
  overflow-y: auto;
}

#opponentList button {
  display: block;
  width: 100%;
  margin: 4px 0;
  padding: 8px;
}

#opponentInput {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  margin-top: 10px;
}

#opponentSubmit {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
}

#promoDialog {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

#promoDialog button {
  margin: 4px;
  padding: 10px 14px;
}

#turnLabel {
  text-align: center;
  font-size: 18px;
  margin-top: 4px;
}
