* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #1e1e2e;
  color: #e0e0e8;
  margin: 0;
  padding: 20px;
}

h1, h2 { font-weight: 600; }

a { color: #8ab4f8; }

.container {
  max-width: 960px;
  margin: 0 auto;
}

.container--wide {
  max-width: 1280px;
}

.card {
  background: #2a2a3d;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

button {
  background: #4c6ef5;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #3b5bdb; }
button:disabled { background: #55556b; cursor: not-allowed; }

input[type="text"] {
  background: #1e1e2e;
  border: 1px solid #444;
  border-radius: 6px;
  color: #e0e0e8;
  padding: 8px 10px;
  font-size: 14px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #3a3a50; }

#nickname-gate {
  display: flex;
  gap: 10px;
  align-items: center;
}

.game-layout {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

#board {
  width: 640px;
  max-width: 100%;
  touch-action: none;
}
#board * {
  touch-action: none;
}

.side-panel {
  flex: 1;
  min-width: 360px;
}

#status-banner {
  font-size: 16px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 6px;
  background: #33334a;
}
#status-banner.game-over { background: #5a3a3a; }

#move-list {
  height: 140px;
  overflow-y: auto;
  background: #1e1e2e;
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

#chat-log {
  height: 200px;
  overflow-y: auto;
  background: #1e1e2e;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}
#chat-log div { margin-bottom: 4px; }
#chat-log .me { color: #8ab4f8; }

.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }

.spectator-note {
  font-style: italic;
  color: #9a9ab0;
  margin-bottom: 16px;
}

.promo-choice {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.muted { color: #9a9ab0; font-size: 13px; }

.highlight-square {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 0, 0.35);
}
