.board2048-wrap {
  width: 100%;
  max-width: 460px;
}
#board2048 {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--board-bg);
  border: 3px solid var(--accent);
  border-radius: 18px;
  box-shadow: var(--glow), inset 0 0 30px rgba(0,0,0,.5);
  touch-action: none;
  overflow: hidden;
}
.cell-bg-layer {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
}
.cell-bg { background: var(--cell-bg); border-radius: 10px; }

.tiles-layer { position: absolute; inset: 0; }

.tile {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  font-family: var(--font-body);
  color: #1a1027;
  transition: left .11s ease, top .11s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}
.tile .val { transition: transform .12s ease; display: inline-block; }
.tile.pop .val { animation: tile-pop .18s ease; }
.tile.spawn { animation: tile-spawn .16s ease; }
@keyframes tile-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
@keyframes tile-spawn {
  from { transform: scale(.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.tile.super { color: #fff; }

.g2048-hint {
  color: var(--text-muted);
  font-size: .82rem;
  text-align: center;
  font-weight: 600;
}
