:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --border: #dbe2ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 40%);
  color: var(--text);
}

.container {
  width: min(980px, 95vw);
  margin: 2rem auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 24px rgb(15 23 42 / 8%);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.02em;
}

.header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.board-wrap {
  margin-top: 1.25rem;
  display: grid;
  place-content: center;
}

#board {
  width: min(78vw, 540px);
}

.status-panel {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.85rem 1rem;
}

.status-panel p {
  margin: 0.4rem 0;
}

code {
  word-break: break-word;
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  appearance: none;
  border: 1px solid #1d4ed8;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

button:active {
  transform: translateY(1px);
}

#board .square-55d63.highlight-last-move {
  box-shadow: inset 0 0 0 4px rgb(37 99 235 / 45%);
}

#board .square-55d63.highlight-check {
  box-shadow: inset 0 0 0 4px rgb(220 38 38 / 70%);
}
