*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: #1a1a1a;
  color: #eee;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100dvh;
}

#controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  width: 100%;
  max-width: 600px;
  flex-shrink: 0;
}

button {
  padding: 6px 14px;
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
}

button:active {
  background: #444;
}

#status-text {
  font-size: 14px;
  font-weight: 600;
  margin-left: auto;
}

#status-text.check    { color: #f90; }
#status-text.checkmate { color: #f44; }
#status-text.stalemate { color: #aaa; }

#board {
  display: block;
  touch-action: none;
}
