.grid-2048{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  grid-template-rows:repeat(4, 1fr);
  gap:10px;
  width:320px;
  height:320px;
  max-width:100%;
  aspect-ratio:1 / 1;
  background:#05060d;
  border-radius:8px;
  padding:10px;
  box-sizing:border-box;
}

.g2048-cell{
  background:rgba(255,255,255,.04);
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-display);
  font-weight:700;
  font-size:22px;
  color:var(--text);
  transition:background-color .15s ease;
  user-select:none;
}

.g2048-cell.pop{ animation:g2048pop .18s ease; }
@keyframes g2048pop{
  0%{ transform:scale(0.75); }
  60%{ transform:scale(1.08); }
  100%{ transform:scale(1); }
}

.tile-2{ background:#2c3357; }
.tile-4{ background:#394073; }
.tile-8{ background:#1f6f78; color:#7ef9ff; }
.tile-16{ background:#215a8a; color:#bfe9ff; }
.tile-32{ background:#4a3a8a; color:#d9c9ff; }
.tile-64{ background:#6a3aa6; color:#ecd9ff; }
.tile-128{ background:#8a3390; color:#ffd9f3; font-size:19px; }
.tile-256{ background:#a63370; color:#ffd9ea; font-size:19px; }
.tile-512{ background:#c2473d; color:#ffe3d9; font-size:19px; }
.tile-1024{ background:#d97a2e; color:#fff2e0; font-size:17px; }
.tile-2048{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#06070f;
  font-size:17px;
  box-shadow:0 0 18px rgba(126,249,255,.5);
}
.tile-super{ background:#fff; color:#111; font-size:15px; }

@media (max-width:480px){
  .grid-2048{ width:280px; height:280px; }
  .g2048-cell{ font-size:18px; }
}
