:root {
  --bg: #12141c;
  --card: #1c2030;
  --ink: #e8e6df;
  --muted: #9aa3b5;
  --accent: #7cb342;
  --warn: #c9a227;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Segoe UI, Tahoma, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, #243018 0%, var(--bg) 55%);
  color: var(--ink);
  min-height: 100vh;
}
header, footer, nav, main { max-width: 920px; margin: 0 auto; padding: 16px; }
header h1 { margin: 0 0 6px; letter-spacing: .04em; }
header p, footer { color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav button, .hud button, .shop button {
  background: var(--card);
  color: var(--ink);
  border: 1px solid #2e3548;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
nav button.on, .hud button:hover, .shop button:hover { border-color: var(--accent); color: #d8f0b8; }
.panel { display: none; background: var(--card); border-radius: 14px; padding: 16px; }
.panel.on { display: block; }
.hud { display: flex; gap: 16px; align-items: center; margin: 8px 0 12px; flex-wrap: wrap; }
canvas, .board-2048, .mem-board, .aim-field {
  background: #0e1118;
  border-radius: 10px;
}
#snakeCanvas { display: block; max-width: 100%; }
.big {
  width: 160px; height: 160px; border-radius: 50%;
  background: #3a4658; color: #fff; font-size: 22px; border: 0; cursor: pointer;
}
.shop { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.board-2048 {
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
}
.board-2048 div {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: #232a3a; border-radius: 8px; font-weight: 700; font-size: 22px;
}
.mem-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  width: min(360px, 100%);
}
.mem-board button {
  aspect-ratio: 1; font-size: 28px; border: 0; border-radius: 8px;
  background: #2a3144; color: #dbe4ff; cursor: pointer;
}
.aim-field { position: relative; height: 320px; overflow: hidden; }
.aim-dot {
  position: absolute; width: 36px; height: 36px; border-radius: 50%;
  background: var(--warn); border: 0; cursor: pointer;
}
