.board-2048 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px;
  width: min(90vw, 440px);
  aspect-ratio: 1 / 1;
  position: relative;
  touch-action: none;
}

.tile {
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 800;
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  background: color-mix(in srgb, var(--surface-2) 60%, var(--text) 5%);
  color: var(--text);
  transition: background 0.15s ease;
}

.tile[data-val="2"]   { background: #eee4da; color: #776e65; }
.tile[data-val="4"]   { background: #ede0c8; color: #776e65; }
.tile[data-val="8"]   { background: #f2b179; color: #f9f6f2; }
.tile[data-val="16"]  { background: #f59563; color: #f9f6f2; }
.tile[data-val="32"]  { background: #f67c5f; color: #f9f6f2; }
.tile[data-val="64"]  { background: #f65e3b; color: #f9f6f2; }
.tile[data-val="128"] { background: #edcf72; color: #f9f6f2; }
.tile[data-val="256"] { background: #edcc61; color: #f9f6f2; }
.tile[data-val="512"] { background: #edc850; color: #f9f6f2; }
.tile[data-val="1024"]{ background: #edc53f; color: #f9f6f2; }
.tile[data-val="2048"]{ background: #edc22e; color: #f9f6f2; }
.tile[data-val="4096"],
.tile[data-val="8192"],
.tile[data-val="16384"] { background: #3c3a32; color: #f9f6f2; }

.tile[data-val=""] {
  background: color-mix(in srgb, var(--surface-2) 60%, var(--text) 5%);
  color: transparent;
}

@media (max-width: 480px) {
  .board-2048 { gap: 7px; padding: 7px; }
}
