:root {
  --bg: #0b0f14;
  --panel: #141b23;
  --text: #e8e8e8;
  --muted: #8a97a6;
  --accent: #60c876;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.shell {
  width: min(520px, 92vw);
  padding: 24px 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

h1 { margin: 0; font-size: 26px; letter-spacing: 0.04em; }

.scores { display: flex; gap: 8px; }

.score-chip {
  background: var(--panel);
  border: 1px solid #232d38;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}

.score-chip strong { color: var(--text); }

.board-wrap { position: relative; }

canvas {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #232d38;
  background: #10151f;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(8, 11, 15, 0.82);
  border-radius: 12px;
  text-align: center;
  padding: 16px;
}

.overlay.hidden { display: none; }

.overlay-title { margin: 0; font-size: 24px; font-weight: 700; }

.overlay-text { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

.btn {
  background: var(--accent);
  color: #071009;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.hint {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
